question

Mehak V avatar image
0 Likes"
Mehak V asked mary commented

release item from queue on an specific time with specific order

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

FlexSim 7.7.4
FlexSim 17.0.4
process timedelaymessage triggeron exit
· 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.

Mehak V avatar image Mehak V commented ·

@Jeff Nordgren

Hi Jeff,

Can you please help me to run the model ?

Mehak

0 Likes 0 ·

1 Answer

·
Jeff Nordgren avatar image
1 Like"
Jeff Nordgren answered mary commented
@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


· 6
5 |100000

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

Mehak V avatar image Mehak V commented ·

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 0 ·
Mehak V avatar image Mehak V commented ·

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

0 Likes 0 ·
Mehak V avatar image Mehak V commented ·

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

0 Likes 0 ·
max avatar image max commented ·
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 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ max commented ·

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 0 ·
mary avatar image mary Jason Lightfoot ♦ commented ·
I have posted a new question with model and tagged you.
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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