question

David Seo avatar image
2 Likes"
David Seo asked Brandon Peterson commented

TaskSequence in ProcessFlow

I am working through the tutorials for Process Flow.

While studying them, I found a problem in the TaskSequence tutorial.

When changing the capacity to '2' in the second processor, the second operator transports two items at same time, though the operator's capacity is '1'.

What's the problem? Is it a bug?

I am using 16.1.0 beta.

FlexSim 16.0.1
process flowoperatorprocessortask sequencecapacity
5 |100000

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

Jordan Johnson avatar image
3 Likes"
Jordan Johnson answered Brandon Peterson commented

This is expected behavior. The processor is requesting an operator for every flowitem. With standard 3D objects, the processor generates the complete task sequence (including load and unload tasks) for the operator, and then gives it to the operator. The operator, in turn, completes each task sequence in order.

Because this example uses a subflow to manage transport, the processor does not do any of that logic. Instead, it assumes that the subflow will handle everything. The processor does nothing more than call the subflow when the item finishes.

In this case, the following sequence of events sometimes occurs:

  1. An item finishes, so the processor calls the sub flow, creating a token
  2. That token gives a load task to the operator. Note that the token does not immediately move on. The operator begins walking towards the processor.
  3. Another item finishes, so the processor calls the sub flow again, creating another token.
  4. The newest token creates another load task and gives it to the operator.
  5. The operator arrives at the processor, and loads the first item. The operator then moves to the next task in the sequence, which happens to be another load task, so the operator loads the item.
  6. Both tokens move to the unload task as soon as their respective load tasks are complete, and both generate an unload task for the operator.
  7. The operator goes to the unload destination, and unloads the first item. The operator then begins the next task in the sequence, which is to unload the second item.

A simple way to use the operator's max capacity would be to surround the load and unload tasks with a Zone. Have the Zone use a max content of getvarnum(current, "maxcontent"). That way, the operator will only receive as many load tasks as its max content allows.

· 3
5 |100000

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

anthony.johnson avatar image
3 Likes"
anthony.johnson answered anthony.johnson edited

The max content setting on the operator is more a "suggestion" than a hard set rule. In the end, task sequences are king, both in the standard 3D world and in the Process Flow world. In other words, if a task sequence tells an operator to load more than one item, it will load more than one item, no matter what its max content is.

The way that the standard 3D modeling logic integrates the max content setting into the mix is via the break task. Actually, the break task is the only place in the internal task executer logic where max content is considered. The standard transport task sequence is: travel - load - break - travel - unload. The break task allows the operator to break away from his current, single-item-focused task sequence, and go to a different task sequence, essentially allowing the operator to multi-task. However, when the operator gets to the break task, he will first check his max content, and if his current content has reached his max content, he will not break to a new task sequence, but will instead finish the task sequence he is on, unloading the item he just loaded.

The break task's exclusive use of the max content setting is the reason why I say the max content setting is a "suggestion" more than a hard rule. If you don't use the break task, then the internal task executer logic will never look at the max content setting at all.

While the standard break task based logic works for many cases, for some problems, such as doing proper unload sequencing, it's not very well suited. In these problems, Process Flow allows for much more customized control over the task executer. However, you would need to take max content into account explicitly. Usually this would just be a decide activity that uses some expression like content(object) < getvarnum(object, "maxcontent"), and then does one thing if the object still has capacity, and another if it doesn't.

In the upcoming 16.1 release, we've added an AGV template process flow that does high level AGV dispatching, and it does just that, looking at the max content setting and dispatching based on it. I mention that just to point you to a (future) example of how you might do it.

5 |100000

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