question

Ludovica Pilleri avatar image
0 Likes"
Ludovica Pilleri asked Emily Hardy commented

logistic supply chain model doesn't work

i trying to use one of the model that has been posted in the platform but with different datas. It's giving me an error about the function "last" in the PF. Can somebody tell me why and how to fix it? Modello che funziona supply chain.fsm

FlexSim 24.2.0
processs flowsupply chain
· 1
5 |100000

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

Emily Hardy avatar image Emily Hardy ♦ commented ·

The value in the Assign Labels is "Model.find("Available/"+token.UnitID).last". This operation relies on the token having a token.UnitID, but all tokens have the value NULL for the UnitID. Is the UnitID supposed to be the column heading? That would be B1, B2, etc.

0 Likes 0 ·

1 Answer

Emily Hardy avatar image
0 Likes"
Emily Hardy answered Emily Hardy commented

In the Assign Labels that throws the exceptions, the Item label should return "Model.find("Available/"+token.UnitID).last". This relies on every token having a value for their token.UnitID. I think you are looking for the name of the column. In that case, when each of those tokens are created you want to get the ColHeader:

1727374716169.png

The value expression is looking for the last item that was put into the Available/UnitID queue. However, the "Available" plane was inside the "Demand" plane. This means the address for the queues is Demand/Available/UnitID. queue. To fix this I moved the "Available" plane into the model floor.

1727374197209.png

After doing these things the model is still throwing some exceptions. This is because the model is searching for queue Available/RUO2, but this queue doesn't exist. I added this queue into the model.

1727374773538.png

Lastly, you had an exception because you had "Cost/unit" as the column rather than "Cost/Unit". I fixed this in the uploaded model.

1727374821655.png

modello-che-funziona-supply-chain_EditedEH.fsm


· 6
5 |100000

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

Ludovica Pilleri avatar image Ludovica Pilleri commented ·

thank you so much Emily, your answer was really exhaustive and you also posted the adjusted model. i really appreciated your help

0 Likes 0 ·
Emily Hardy avatar image Emily Hardy ♦ Ludovica Pilleri commented ·

You're welcome!

0 Likes 0 ·
Ludovica Pilleri avatar image Ludovica Pilleri Emily Hardy ♦ commented ·

Hi again Emily, i wanted to ask you if you could explain me how the creation of Demand works, because the current dashboard "demand total value over time" is growing linearly and i'd like to set a trigger of max daily dales for each product. could you explain me how to do so? thank you so much

0 Likes 0 ·
Show more comments