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.

sanaz karamimoghaddam avatar image sanaz karamimoghaddam commented ·

@Sam, Thanks, the problem with the decide was a bad object reference in the labels. Now I ran into another problem. First, I want the "Schedule TE Creation" Process Flow to continue creating TEs regardless of availability of other TEs, until the number of created TEs reach the limit. The items should get transferred with the newly created TEs during that time. To do this I guess I cannot use "On back Order Input Change" event on the wait for event activity. I tried to use "On Pull" Event, but I got the error of: "Bad Task Sequence/Task Executor reference" on the travel to loading area activity. I'd appreciate any comments on this too.

3573-eventtriggered-te-creation.fsm

0 Likes 0 ·
Sam Stubbs avatar image Sam Stubbs ♦ sanaz karamimoghaddam commented ·

What's the limit of number of TEs? I'm still a little unsure of how you are determining this. (I noticed your label was set to 5, is this just a hard set limit?) Also, If you are creating TEs to match the incoming items, could you have the Wait for Event listen to the incoming items on the Item List instead of the TE list? I don't know exactly where your final project is headed or what you have in mind though, so I don't know exactly what to advise you on.

I've reattached your model, and I rearranged the Process Flow a little, see if this is more along the lines of what you're looking for.

eventtriggered-te-creation.fsm

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.