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

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

mikelmb
Not applicable
37 Views
12 Replies
Message 1 of 13

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

mikelmb
Not applicable

[ FlexSim 22.1.4 ]

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,

0 Likes
Accepted solutions (1)
38 Views
12 Replies
Replies (12)
Message 2 of 13

julie_weller
Not applicable
Accepted solution

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

0 Likes
Message 3 of 13

jason_lightfootVL7B4
Autodesk
Autodesk
Be careful with the case - it should be item.Type as unfortunately lower case 'type' is reserved.
0 Likes
Message 4 of 13

mikelmb
Not applicable

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
Message 5 of 13

mikelmb
Not applicable

Yes, it's item.Type, my fault

0 Likes
Message 6 of 13

moehlmann_fe
Observer
Observer

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

Message 7 of 13

mikelmb
Not applicable
That worked!! Thank you
Message 8 of 13

julie_weller
Not applicable

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


Image.png


Slot Assignment Question.fsm

Message 9 of 13

mikelmb
Not applicable

HI @Felix Möhlmann , sorry but i realized now that the items assigned with colors are getting the correct slots, but when is transporting a pallet with no assigned slot it puts its in slots that assigned with a color. What i mean is that we don't want to full the slots the colored slots with items that are not for those slots.

1685978112178.png

0 Likes
Message 10 of 13

julie_weller
Not applicable

Hey @mikelmb, check out my comment just below this, I solved that problem for you already 🙂

0 Likes
Message 11 of 13

mikelmb
Not applicable

Worked! Thanks Julie

Message 12 of 13

mikelmb
Not applicable

@Julie Weller Do you know if there is any way to define the colors of the slots depending on the hour? I want to define different ubications for material for 8h periods during the day

0 Likes
Message 13 of 13

julie_weller
Not applicable

Hi @mikelmb, you can do that. You would need to use process flow to change the label on the slots when the 8 hour period hits, you could do that with code similar to this post:

https://answers.flexsim.com/questions/109074/paint-slot-labels-by-code.html

And then just built a process flow system around that. Hope that helps!

0 Likes