question

sanaz karamimoghaddam avatar image
0 Likes"
sanaz karamimoghaddam asked Sam Stubbs commented

How to make one token to cycle in a process flow, create objects, push them to a list, and leave the activity?

Hi,

I use a process flow ("Transportation Process Flow") in which the Task Executers are being pulled from a list at first, load and transport the items, and then are being pushed back to the list. The TEs are created using a process flow ("Task Executer Creation") and are being pushed to the TE List to be used by the first process flow. Now, I want to create the Task Executers one by one, and each creation should be at the same time the item needs to be loaded.

For this, I thought of a Process flow ("Schedule TE Creation") which creates one token at time 0, and sends it to a wait for event activity. Whenever a request for a TE arrives at the TE list, the token proceeds the next activity which is create object. Then using a Decide activity, the token decides if the number of TEs that are created in the process flow has reached the required number (Using two Process Flow Labels.) If that is the case, then the token sinks after pushing the last TE to the list. If not, The token goes back to the Wait for event activity and cycles again in the process flow.

When I tested this process flow, the token never leaves the Wait for event activity. When I Delete the decide activity, the token then never leaves the push to list activity, and it won't cycle in the process flow. I tried the "use max timer" with zero wait time option, and "Keep on Early Release", but it didn't work. I have attached an example of what I use, and what the new process flow would possibly look like. I would appreciate any ideas or suggestions than can solve this problem.

Thanks. eventtriggered-te-creation.fsm

FlexSim 16.2.1
Choose One
process flowpush and pull list
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

Sam Stubbs avatar image
1 Like"
Sam Stubbs answered Sam Stubbs commented

The reason why it wasn't leaving the Wait for Event Activity, is because it wasn't connected to the Create Object activity. The line must have been deleted at some point.

It doesn't leave the Push to List activity, because the TE is never getting pulled from the list. The reason for this, is because in your Schedule TE Creation, you are pushing your created TEs onto the list under Partition 2, and in your Transportation Process Flow, you are pulling TEs from the list based on Partition 1. So, I changed the partition in the TE Creation to 1 as well.

However you may want to check, and make sure your Decide logic is working how you want it. I'm not sure if it's doing what you want it to, as the token never seems to leave the system, it seems to keep looping through and creating more TEs as the model runs. So you might want to change your condition there.

eventtriggered-te-creation.fsm


· 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.