question

mikelmb avatar image
0 Likes"
mikelmb asked Julie Weller commented

slot assignment first by "matching labels" then by "random bay, level and slot"

Hi, we are trying to program the slot assignment strategy making it "matching labels" in case that item.type has an assigned slot, or making it random in case it doesn't but maintaining the assigned slots only for the matching labels. Is there any way to combine this two assignment strategies?

I mean how can i refer to the slots that are assigned with a item.type?

Thanks,

FlexSim 22.1.4
labelsracksassignments
· 2
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·
Be careful with the case - it should be item.Type as unfortunately lower case 'type' is reserved.
0 Likes 0 ·
mikelmb avatar image mikelmb Jason Lightfoot ♦♦ commented ·

Yes, it's item.Type, my fault

0 Likes 0 ·

1 Answer

Julie Weller avatar image
0 Likes"
Julie Weller answered Julie Weller commented

Hi @mikelmb! What I did was create a queue and a rack and I just used the paint slot labels tool to decide which parts I wanted the item.Type to go to (I left the other sections for items without a type empty) and then changed the slot assignment strategy to be matching labels on the rack object.

1685973445387.png


I attached the model for your reference.

Does that answer your questions?

Slot Assignment Question.fsm


· 9
5 |100000

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

mikelmb avatar image mikelmb commented ·

I didn't mean that @Julie Weller, I have the same matching labels with the colours assigned in the racks. What i need is to use also the slots that are not painted. That is, to use the slots that don't have a color assigned in a random way.

Thanks

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann mikelmb commented ·

You can combine both assignment strategies by simply copying the code of one of them, switching the rack to the other one and pasting in the copied code. You can simply use the ordering (first try to match type, if a slot is found the code stops, if not it reaches the random assignment).

You can also use an if-condition to skip the execution of the type matching code if that label is not present on the item.

if(item.Type?)
{
    // Item Matching Strategy
}
// Random Assignment Strategy

slot-assignment-question_1.fsm

2 Likes 2 ·
mikelmb avatar image mikelmb Felix Möhlmann commented ·
That worked!! Thank you
1 Like 1 ·
Show more comments
Julie Weller avatar image Julie Weller mikelmb commented ·

Additionally, if you don't want the item without a type to appear in your slots with labels you would need to add the code !slot.Type? to two if statements in the following code that assigns random slots:

1685977125528.png


1685977140323.png


Slot Assignment Question.fsm

1 Like 1 ·
1685977125528.png (20.4 KiB)
mikelmb avatar image mikelmb Julie Weller commented ·

Worked! Thanks Julie

1 Like 1 ·
Show more comments