question

Bartosz S2 avatar image
0 Likes"
Bartosz S2 asked Jeanette F commented

How to set the packing order?

Hello everyone. I have recently started using Flexsim software and have a question regarding. How to set the order of packets to queue from the processor. I used triggers on the queues to pass between them. After 8 hours it stops working. And second question is it possible to loop packing on selected period like 24 hours?


123.fsm

FlexSim 20.1.3
flexsim 20.1.3triggerspacking order
123.fsm (40.5 KiB)
· 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.

1 Answer

Eric M avatar image
0 Likes"
Eric M answered Eric M commented

Hi @Bartosz S2, the reason the model stops after 8 hours is because one of the queue's if statements is set to equal 1200 but its max content property is only set to 400 (meaning it will never reach 1200 to open the next queue's port). This change seemed to solve the problem of all the ports being closed after 8 hours.

This way of organizing the outputs certainly works, but as you can probably tell, takes quite a bit of work and leaves room for error. The easiest way to organize the output is under the "output" section of the properties of the processor. There's a "send to port" category with a dropdown that gives you a lot of options. The one that seems most similar to what you're trying to do is "Queue size>>Longest Queue if Available" Another way is to use lists. This works by having the processor "push" items to the list and the queues "pull" items off the list. Different logic can be implemented to pull certain items to certain queues (tutorials on using lists can be found in the manual).

If you want to keep using the logic that you've made, I would point a couple things out. This code gives you the current content of an object so you won't need the ilosc label (although nice job making that work although you would need to add a trigger that will set ilosc to 0 on reset):

  1. current.subnodes.length;  

This code returns the maximum content allowed in a queue (which would have helped with the 8 hour problem):

  1. getvarnum(current,"maxcontent");

As far as the second question, I'm a little confused what you mean by "to loop packing." Does this mean you want a schedule of items to repeat every 24 hours? Have the processor send items based on time (which is a 'send to port' option)?


1622674073442.png (11.3 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.