question

Elle avatar image
0 Likes"
Elle asked Elle commented

Temporarily place items on a queue once floorstorage is full

Hello!

I asked a question here a couple of days ago which worked perfectly however another problem was found when running the simulation.


The following steps show the desired logic of the simulation:

1. Two forklift operators are responsible to transfer the pallets to their designated floorstorage.

  • If the floor storage is completely occupied, temporarily transfer this to "Queue 14". So that once a slot opens or is available on the said floorstorage, then this pallet will be transferred to that location.

2. The pallets that are on the floorstorages are then transferred by an operator to their designated queue. (The logic here works perfectly fine!)


Current issue with the simulation:

The first step of the simulation works until a specific floorstorage is completely occupied. This tends for the forklift operators to stop. I would like to temporarily transfer this to "Queue 14" and once a slot is open on its designated floorstorage then this gets transferred to that location.

1679457860266.png


The following links below are some of the logic that I tried:

1. https://answers.flexsim.com/questions/90910/when-rack-storage-is-full-error-message-and-model.html?childToView=138947#comment-138947 (I've tried doing this by simply putting a port between the floorstorage and queue, but did not worked for me. I'm pretty sure I've missed something in here!)


2. https://answers.flexsim.com/questions/25815/how-to-get-part-of-label-from-another-label.html

(I also tried playing around with this by getting the pallet's location through extracting the label "FloorStorageNo" from the pallets. I was attempting to take the value of the pallet's "FloorStorageNo" to compare this to the conditions written on the custom code. However, every time I run the simulation, the return value of this custom code (named "FloorStorageQty") is always zero. I guess taking the value of "FloorStorageNo" was not successful at all.)

1679460631483.png

Please see below my plan for the process flow:

1. For each pallet, I'd like to assign a label based on "conditional by case". "FloorStorageNo" will be holding this value.

- So if my pallet is 1, then the corresponding case for it is the default case which points to Model.find("FloorStorage1").

- On the pallet's label, this appears as "/FloorStorage1".

1679460587710.png

2. I created another "assign a label" which contains a custom code for comparison.

- So if the "FloorStorageNo" contains /FloorStorage1, then this should go to the first condition which should return the length of floorstorage1. (However, the custom code can't seem to pick up the value of the "FloorStorageNo")

1679459448720.png3. Only if Step 2 is working, then I can able to know if the floorstorage is full by using the "decide". So that if there are 32 pallets currently then this will trigger the forklift operators to transfer the pallet to Queue14.


Lastly, here is the sample model of my current situation. Current State.fsm

FYI: I just wanted to test out first the conveyor belt 1 and that's why its process flow differs from conveyor belt 2.


I would really appreciate it if anyone can help me with my problem.

Thank you in advance for your time and effort in helping me! :)

FlexSim 22.2.2
if floorstorage is fulltemporary hold pallettemporary hold pallet and return to its designation
1679457860266.png (214.2 KiB)
1679459448720.png (58.7 KiB)
1679460587710.png (11.3 KiB)
1679460631483.png (197.3 KiB)
current-state.fsm (115.1 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

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Elle commented

In your code you compare the FloorStorageNo value, which is a pointer value (node reference) to a string (text) value. These never match, so no value is returned by the code and the label stays at 0.

You can distinguish between the types by how they appear in the labels tab. Text is aligned to the left of the cell, pointers are aligned to the right and have purple font (and numbers are also aligned to the right).

1679557919291.png

Also, when assigning the FloorStorageNo label you use the pointer to the pallet as case function, which is not a number and thus all tokens are assigned the default value of FloorStorage1. The case value should be "token.Pallet.Pallet".

Since at that point you already have a reference to the storage object, you can get its content in a single expression.

1679558147270.pngFinally, all of this isn't even necessary. You can also simply add a maximum wait time to the "Find Slot" activity and send the token to a different destination if that timer elapsed.

1679558317584.png 1679558327172.png

current-state-fm.fsm


1679557919291.png (2.2 KiB)
1679558147270.png (5.4 KiB)
1679558317584.png (14.5 KiB)
1679558327172.png (24.2 KiB)
current-state-fm.fsm (113.4 KiB)
· 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.

Elle avatar image Elle commented ·

Hello @Felix,

It is now working! Thank you very much for answering my queries and providing a more simplified solution!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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