question

Mischa Spelt avatar image
0 Likes"
Mischa Spelt asked Matt Long answered

Changing number of resources in model with Task Executer flow

@Patrick Zweekhorst found an interesting bug, which is demonstrated in the attached model.

The model started with a single operator attached to a resource in a global flow. In addition, the operator is attached to its own instance of a Task Executer flow. If the Count of the global flow's Resource is set to 1, everything works fine: there is a single operator in the model and the Task Executer flow's Source generates a single token for the operator.

However, if you change the Resource Count to 3, the Task Executer flow now has way too many tokens. To be precise: there is one token for the original operator, and 3 tokens for each of the copies.

Looking at the way the experimenter changes the number of resources, we suspect that

applicationcommand("recreateObjectConnections", newObj, firstObj);

generates some additional events for the Task Executer Process Flow at the start of the event list, in addition to the event that the Process Flow generates itself.

FlexSim 17.0.3
process flowsourcetask executerresources
too-many-tokens.fsm (22.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
0 Likes"
Matt Long answered

Hitting reset twice after changing the Resource count makes it work correctly. We'll take a look at what's going on.

5 |100000

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