question

You Yang O avatar image
0 Likes"
You Yang O asked Matt Long answered

How to make TaskExecuter load up more than 1 item in a Process Flow?

I have create a Tram Ride simulation. However, I'm having issues figuring out how to make the taskexecuter load up more than 1 item.

I am trying to load 70 item on each TaskExecutor to simulate 70 people boarding a Tram.
ns-model.fsm

FlexSim 19.0.0
process flowlabelstask executerload item
ns-model.fsm (39.5 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

·
Matt Long avatar image
1 Like"
Matt Long answered

It's important to pay attention to who is controlling the logic in your model. Right now your model is creating one token for each 'passenger' flowitem. Those passenger tokens are then being used to call a tram to come pick up the passenger. Once the passenger is picked up, the passenger token tells the tram to move on. Your logic is being controlled by the passengers, from their perspective.

There is more than one way to model what you're doing, but I would recommend changing your logic so that you have a token that represents each tram and that token is what is controlling the trams and telling them where to go and who to pick up.

If you create a token for each tram at the start of the model, then have them loop through a series of tasks. For example:

  1. Travel to the first tram station
  2. Load any waiting passengers
  3. Travel to the next tram station
  4. Unload passengers
  5. Load any waiting passengers
  6. etc

I would recommend using a List to determine which passengers are waiting to board the tram. Create a token for each passenger, as you are already doing, but instead of those tokens moving through task sequence activities, have them push themselves to a list (possibly partitioned by tram station). When the tram arrives at the station it will pull from the station's list to grab any waiting passenger tokens. In your Pull From List you can define a pull quantity (70, or 70 - current content of tram). Then loop through each passenger token that was pulled and load its associated flowitem onto the tram.

The tram token will then move onto the next step, moving to the next tram station. Hopefully this makes sense. Give it go and if you get stuck or need additional help let us know.

5 |100000

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

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.