How to add new task in an exist TASKSEQUENCE?

How to add new task in an exist TASKSEQUENCE?

kuilin_s
Not applicable
23 Views
4 Replies
Message 1 of 5

How to add new task in an exist TASKSEQUENCE?

kuilin_s
Not applicable

[ FlexSim 22.0.4 ]

Hello everyone,

I want to know how to add new TASKTYPE_ into an exist task sequence. In other words, could you give me details about how to use TASKTYPE_WAITFORTASK and TASKTYPE_Utilize?

0 Likes
Accepted solutions (1)
24 Views
4 Replies
Replies (4)
Message 2 of 5

joerg_vogel_HsH
Mentor
Mentor
The steps are:
  1. get a reference to your tasksequence,
  2. add a task by method addtask (it will be added as last task),
  3. set a rank for last new added task in the sequence by property rank.

Limits:

  • tasksequence task rank is not already in execution.
  • best - tasksequence is not in execution at all.
  • There is not any coding or conditions which depends on strict ranks of a default transport tasksequence.

Properties in manual about task types.

uitilize keys for item and station are identifiers to free or interrupt a taskexecuter from an utilize task. Otherwise you free possibly more taskexecuters than you want.

0 Likes
Message 3 of 5

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

Wait for task and utilize task are suspending tasks in a tasksequence. A taskexecuter (operator, vehicle) are locked in a state and won’t get available.

I call such tasks “ get them something to do”. For statistical purpose you set a useful state.

a utilize task ends by command freeoperators. A wait for task ends by any new added task to currently active tasksequence. If this added task shouldn’t have any effect a Tasktype of “tag” does this. Probably this mechanism watches the property of number of total tasks.
You find utilize tasks by default in activities calling operators for setup and processing in processor class objects.

0 Likes
Message 4 of 5

kuilin_s
Not applicable
Thank you for your patience. But how can I get the reference of existing tasksequence?
0 Likes
Message 5 of 5

joerg_vogel_HsH
Mentor
Mentor
on receive tasksequence is event where can get access to a tasksequence reference. It is a trigger in dispatchers and taskexecuters. This means you can edit a trigger source code or you evaluate the event in event driven activities in process flow.

Besides this you can evaluate tasksequences in a treenode of taskexecuters and dispatchers. It is called tasksequencequeue.

Or you can get access of an currently executing tasksequence from

activeTasksequence.

0 Likes