How do task sequences handle errors while dispatching

How do task sequences handle errors while dispatching

hoang_nk
Not applicable
6 Views
3 Replies
Message 1 of 4

How do task sequences handle errors while dispatching

hoang_nk
Not applicable

[ FlexSim 22.1.2 ]

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.



0 Likes
Accepted solutions (1)
7 Views
3 Replies
Replies (3)
Message 2 of 4

joerg_vogel_HsH
Mentor
Mentor
There is a problem you haven’t considered in your request. While you create a tasksequence there looks everything fine. BUT when you let execute your tasksequence the situation can be totally different. Boxes you expected to be at a loading station aren’t anymore available. This leads to errors, too. It is called a runtime problem or error. A tasksequence is a forecast of a future, that may never happen. If you prevent this you are responsible for a static behavior of your model until boxes are loaded. You delay dynamic actions. You can achieve this by adding attributes of availability to your items once they are reserved for going to be transferred.

Error handling is a level beyond user level. It is a level of event management. You have to catch faulty events between creation notices and showing their content to a user. I do not know if there exists a level you can interact with in FlexSim on user level of Process Flow and Flexscript.

0 Likes
Message 3 of 4

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

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.

Message 4 of 4

andrew_o2
Not applicable

Hi @Hoang Nk, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes