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.

Joerg Vogel avatar image Joerg Vogel commented ·
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 0 ·
Andrew O avatar image Andrew O commented ·

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 0 ·

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.