How to change the color according to the batch ?

How to change the color according to the batch ?

arvind_j
Not applicable
172 Views
4 Replies
Message 1 of 5

How to change the color according to the batch ?

arvind_j
Not applicable

[ FlexSim 21.1.4 ]

Hi, please do advice.

I have selected On Creation > visual > set colour by case at the Source1 but I'm unable to separate box colour according to the ItemName.

1636676955995.png

I have selected port by case at Queue1 but the ItemName arrive at queue2 is mixed.

45845-1636599955916.png


I want each queue2,3,4 and 5 have same batch colour according to the ItemName.



1636677084915.png


Please do advice how to change the color according to the batch and make the same batch in each queue.

11 nov_autosave.fsm

0 Likes
Accepted solutions (1)
173 Views
4 Replies
Replies (4)
Message 2 of 5

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

Please consider to add another number label in Arrival Schedule table (picture 1). Then you can easily set a color by case by this new number label.

You can translate a string into a number and use this number then color by case, but this is not anyway smarter than a new number label

Array myNames = [“4644”,”5555”,”1111”,”0000”];
int colorCase = myNames.indexOf(item.name);
// parse variable colorCase into logical switch statement

you can do a similar approach by global table in conjunction with the method getValueByKey

or you do it in a global list which you fill by push arguments. The 1st push argument is your name. The push value is just order number (1, 2, 3,…). Then you can query for the order number by name Argument.


0 Likes
Message 3 of 5

joerg_vogel_HsH
Mentor
Mentor
Collect your batches in queue2 to queue5. You send the items by the new number label to port.
0 Likes
Message 4 of 5

arvind_j
Not applicable

Hi @Joerg Vogel ,in my case I have more than 700 datas. I'll include all the data at the ItemName and Quantity at the source1.

45893-1636676955995.png

Would you mind to show me the steps?

0 Likes
Message 5 of 5

joerg_vogel_HsH
Mentor
Mentor

If Your arrivals exceed immense the number of item names, then you are better of with an indirect approach to set the color number value in a label by an On Exit event or trigger by look up a global table or global list.
The easiest way to get a number value would be to rename the row header name of a global table to match with the item name. Then you can read the value.

yourGlobalTable[item.name][1]

You could parse this statement directly into Color by Case, too.

Edit: Otherwise set in picture 1 labels to 2 and fill the new column in each row with a number value. Exchange the name of the column perhaps to a more suitable name.
If you have 700 different products then you should think about to add an own color pallet.

0 Likes