question

xzlee avatar image
0 Likes"
xzlee asked xzlee commented

how to load certain number of goods pulled from a list to a truck

As a new learner of flexsim, I have read the official tutorial and am working on my first project: simulating the operation of a port.

now I am working on a very early stage:

1. ship comes periodly, unload the items along side the dock.

2. folk lifter transports the items to a field.

3. trucks come periodly.

4. when trucks come, folk lifter transports at most 3 items to the truck then trucks leave.


I have finished the first 3 steps smoothly with the help from the forum. But I encountered a new problem in step 4. I used a list to store items transported to the field, and when truck comes, I pull at most 3 items from the list, and build a tasksequence ordering folk lifters to transport the pulled items to the truck. In the simulation, 3 items in the list can be pulled from the list as I excepted, But only 1 of them will be transported to the truck. I have googled the answer but didn't find it. Can you please help me with it? Really thank you for your help.

1695268995271.png

ex001_autosave.fsm

FlexSim 22.2.0
pull from listtasksequences
1695268995271.png (32.4 KiB)
ex001-autosave.fsm (2.2 MiB)
· 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.

xzlee avatar image xzlee commented ·

after multiple trying, I think it might be a problem related to token lable, but I cannot fix it.

0 Likes 0 ·

1 Answer

Paula LG avatar image
1 Like"
Paula LG answered xzlee commented

Hi,

You were correct trying to implement a run sub flow activity to do what you asked but a few things about it needed to be changed:

- The label you created on the tokens doesn't need the "token." part, you have to write directly its name. The way you were doing it, it was creating a label with an empty name that couldn't be accessed.

- There's no need to run the tokens one at a time because you are already assigning the task executer via a dispatcher.

- The labels have to be copied on the token and not read only on Parent, to be able to have independent task sequences on each created token.

1695283118805.png1695283181872.png

I attach your model with the changes applied: ex001-autosave.fsm

I hope it helps!


1695283118805.png (25.5 KiB)
1695283181872.png (24.4 KiB)
ex001-autosave.fsm (202.2 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.

xzlee avatar image xzlee commented ·
Thank you again for saving me twice. Moreover, your explaination is concise and clear. Appreciate you so much.
0 Likes 0 ·