Logic to keep the model running

Logic to keep the model running

samuel_patarroyodiaz
Enthusiast Enthusiast
95 Views
1 Reply
Message 1 of 2

Logic to keep the model running

samuel_patarroyodiaz
Enthusiast
Enthusiast

Hello, 

 

The model I'm working on is a crane that is controlled by a process flow. The crane must pick up stock from different racks and deposit it onto three different conveyors depending on the product type. The sequence is defined by a table I created in the global table (SequenceTable).

 

The model works well overall, but I have a problem: when one of the stock sources runs out, the model stops completely. In other words, when the crane no longer has stock to pick up from the queues(no more in the list), it halts and doesn't continue. I need the model to keep working with the remaining two product types until everything is finished. 

Initial model.

samuel_patarroyodiaz_0-1758921548319.png

 

I tried using a decide condition before the pull, but it didn’t work, and I'm not sure it's the best way to do it.

 

samuel_patarroyodiaz_1-1758921600973.png

samuel_patarroyodiaz_2-1758921612085.png

 

If someone can help me get unstuck, I’d really appreciate it.

0 Likes
96 Views
1 Reply
Reply (1)
Message 2 of 2

moehlmann_fe
Enthusiast
Enthusiast

You have already half implemented the solution: Setting a maximum wait time on the Pull from List activities and releasing the token through a second connection when nothing could be pulled. The model is just missing that second connection. To prevent an infinite when all partitions are empty, increment the "Failed" label when no value gets pulled. Then check if the value is equal to the number of rows in the sequence table (meaning nothing could be pulled for any row). In that case make the token wait until something new gets pushed to the list. Remember to reset the "Failed" label back to 0 when a value does get pulled successfully.

0 Likes