question

Arvind J avatar image
0 Likes"
Arvind J asked Joerg Vogel edited

How to change the color according to the batch ?

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.



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

FlexSim 21.1.4
labelsqueuesbatch processingport by caseset color by case
1636676955995.png (26.2 KiB)
1636677084915.png (42.1 KiB)
11-nov-autosave.fsm (38.9 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

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.


· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·
Collect your batches in queue2 to queue5. You send the items by the new number label to port.
0 Likes 0 ·
Arvind J avatar image Arvind J commented ·

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.

Would you mind to show me the steps?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Arvind J commented ·

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 0 ·