article

Paul Toone avatar image
0 Likes"
Paul Toone posted

OnResourceAvailable Trigger   

Overview:

This trigger is available for either a Dispatcher or a TaskExecuter and behaves a little differently on each. For a Dispatcher, the trigger is fired whenever a downstream TaskExecuter becomes available. For a TaskExecuter, the trigger is fired whenever that TaskExecuter finishes a task sequence. If the TaskExecuter is also a Dispatcher, meaning it has a team that it dispatches tasks to, then the trigger will be fired for both cases.

If the function returns a 0, the Dispatcher/TaskExecuter will do its own dispatching logic. If the function returns a 1, the Dispatcher/TaskExecuter will not do anything, and assumes all dispatching logic is done with this trigger using the movetasksequence() and dispatchtasksequence() commands.

Access variables:

current: the current object

port: for a Dispatcher, this is the output port of the Dispatcher; for a TaskExecuter that has just finished a task sequence the port value is 0

resource: for a Dispatcher, this is the downstream resource that has become available; for a TaskExecuter, this value is the TaskExecuter itself (or the same as current)

nextts: this value is the next task sequence in the task sequence queue

lastts: for a Dispatcher, this value is always NULL; for a TaskExecuter, this value is the task sequence that was just completed before it became available



flexsim users manualusers manual
5 |100000

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

Article

Contributors

paul.t contributed to this article

Navigation

FlexSim 2016.1