release item from queue on an specific time with specific order

release item from queue on an specific time with specific order

mehak_v
Not applicable
26 Views
8 Replies
Message 1 of 9

release item from queue on an specific time with specific order

mehak_v
Not applicable

[ FlexSim 17.0.4 ]

Dear All,

I have a model where I want to release item on an specific time with specific order from queue. e.g. item 3138 at 9.00:10, item 3133 at 9:12:13 and so on. I have store release time and item order in Global table 1.

process-item-on-specific-time.fsm

0 Likes
Accepted solutions (1)
27 Views
8 Replies
Replies (8)
Message 2 of 9

jeff_nordgren
Not applicable
Accepted solution
@Mehak V

Attached is your model with the changes that I've made.

I changed your global table so that the "Label" is a numeric field rather than a string field. Numerics are much faster to process and easier to work with. I also added a field called "Model Run Time", which is the representation of the actual model run time for the Process Times you have in the table. Again, those are string fields which are much harder to deal with in code than are numeric fields and using strings in code is much slower because everything is converted to numbers in the long run anyway.

All the code is in Queue1. In the OnReset trigger is where the first message is sent back to the queue to release the first flowitem. Then in the OnMessage trigger, the proper flowitem is found in the queue and released. And another message is sent with a delay time between the next flowitem to be released and the current time.

Take a look at the model and see if it is doing what you were wanting it to do. If you have any questions, please let us know.

process-item-on-specific-time-fs1.fsm

Message 3 of 9

mehak_v
Not applicable

Thank You @Jeff Nordgren

I am not able to open the model, it showing as blank screen. I have Flexsim 17.0.4 version.

0 Likes
Message 4 of 9

mehak_v
Not applicable

@Jeff Nordgren solution model file is empty, can you please have a look.

0 Likes
Message 5 of 9

mehak_v
Not applicable

@Jeff Nordgren

Hi Jeff,

Can you please help me to run the model ?

Mehak

0 Likes
Message 6 of 9

mehak_v
Not applicable

Thank you @Jeff Nordgren, after installing new version it working fine. Thank you very much.

0 Likes
Message 7 of 9

priyanka_g2
Not applicable
I have the same model, but instead of process time. I just want to match the label name read from global table. How to do this with code?
0 Likes
Message 8 of 9

jason_lightfootVL7B4
Autodesk
Autodesk

These days this might be better done creating a map on the object as a label an using the name as the key. Can you post your model in a new question and then we can show you the specific solution?

0 Likes
Message 9 of 9

priyanka_g
Not applicable
I have posted a new question with model and tagged you.