question

Miguel Pereira avatar image
0 Likes"
Miguel Pereira asked Eric M commented

Profile Task Sequence Error

Hi,

In a task sequence where the task executors have to load and unload Bags i'm having a Profile Task Sequence Error when i need to load the "2nd time".

When both Task Executors do the first load and unload it's okay but when they reach the load for the 2nd time after a "More Items to Load" = Yes; this prompt error appears:

1625648422365.png

How can i solve it?

Aeroporto.fsm

Thanks, Miguel Pereira.

FlexSim 21.0.5
tasksequencetask executer flowitemtask executor
capturar.png (20.1 KiB)
1625648422365.png (10.1 KiB)
aeroporto.fsm (2.5 MiB)
· 1
5 |100000

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

Eric M avatar image Eric M commented ·
Hi @Miguel Pereira were you able to find a solution to your question? If so, can you accept Roi's answer or post a new answer with the solution? Thanks
0 Likes 0 ·

1 Answer

Roi Sánchez avatar image
0 Likes"
Roi Sánchez answered Miguel Pereira commented

Hi @Miguel Pereira, you are trying to load and unload continuously the same item referenced on 'token.BagsIn' label. As Task Executers are unloading this 'token.BagsIn' item in a sink which is called 'ZonaDescarga', these items are destroyed just after the unload. As a result, in the second load &unload cycle, as they are trying to load the same item, the error comes up.

I do not know exactly what you are trying to do but I guess you should have an array of items in order to load and unload one after another.

· 8
5 |100000

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

Miguel Pereira avatar image Miguel Pereira commented ·

I'm trying to load those groups of 40-60 bags but 15 at a time, so each task executors should go there 2 or 3 times.

0 Likes 0 ·
Miguel Pereira avatar image Miguel Pereira commented ·

i've made some changes and as you can see i'm using the array in the run sub flow, but it's still not working. I'm not sure if i understood how to do the array but i've did the same way i've learn on a tutorial.

Aeroporto.fsm

Thanks.

0 Likes 0 ·
aeroporto.fsm (2.5 MiB)
Roi Sánchez avatar image Roi Sánchez Miguel Pereira commented ·

@Miguel Pereira, if you already create 1 token per baggage to load & unload you don´t need to check if there are more things to load. 1625742991675.png

1 Like 1 ·
1625742991675.png (33.9 KiB)
aeroporto-foro.fsm (2.5 MiB)
Miguel Pereira avatar image Miguel Pereira Roi Sánchez commented ·
It doesn't work if i take that decide off because i'm incrementing the label after the finish and it goes to another Queue. I'll try Joerg solution.
0 Likes 0 ·
Show more comments
Joerg Vogel avatar image Joerg Vogel Miguel Pereira commented ·
You work with the index variable creationRank to address the fields of an array. That is OK, but an Array keeps empty fields still as fields and this causes that they are counted as content when you read the length of an array. Once the items are processed, you must empty the array, by assigning an empty array. You can also work with pop() or shift() methods to return a value of an field and erase it from an array, when you unloads finally the items and before they reach a sink.
1 Like 1 ·