question

Hoang Nk avatar image
0 Likes"
Hoang Nk asked Andrew O commented

How do task sequences handle errors while dispatching

Hi all,

I'm having a question related to abilities to handle errors while executing the task sequences. Below is one small example of a task sequence I set up for an ASRS vehicle:

1670990263754.png

As we can see, the vehicle (referred as crane) will execute the LOAD task and sending feedback messages as well. This control logic works well and has no problems whatsoever. Now I would like to know whether there is anyway for FlexSim to return an error message and finish the task sequence right away if let say there is not enough boxes on the queue (referred as "IF" in the code). Of course I could add some "for loop" to check the number of boxes in advance and etc., that would then be a wholesome of work to cover every possible scenarios that an error can happen.

Hence, it would be nice to have an error handler which will sort of return an error code when the task sequence could not be dispatched properly and then finish the task sequence when an error happens.

I hope someone can help me with this issue.



FlexSim 22.1.2
tasksequencehandling
1670990263754.png (242.4 KiB)
· 2
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

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered

The initial way to handle this was through subtasks, these getting evaluated/constructed at the time of calling rather than being prebuilt with fixed parameters when you issue the task sequence. This may fit well into what you already have as one method is to generate and return them from message trigger code.

With process flows you should be able to handle many outcomes easily since you can issue different tasks based on state rather than having to issue a complete task sequence. Process flows are of course easier to track an interpret than message cases an tasksequences in the tree.

5 |100000

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