question

Jacek Diakun avatar image
0 Likes"
Jacek Diakun asked Jacek Diakun commented

Dynamically updated schedule during simulation run

Hello,

I would like to create new items by dynamically updating schedule (new rows inserted into schedule table) in Source object with Arrival Schedule during simulation run. What is important to me is to create items immediately using the scheme: Source receives message and immediately adds new entry into schedule with ArrivalTime = current simulation time. Thus Source would generate new items at the time of receiving message (all these events are executed at the same simulation time).

I conducted some "experiments" with test model attached and there is a minimum time offset of value 1.0 between current simulation time and arrival time inserted into schedule necessary for the items to be generated. If this offset is smaller that 1.0, items are not generated though the new entries are inserted into schedule.

Is it possible to obtain the effect of immediate creation of items that way?

Jack

P.S. I want to use that way rather than dynamic creation of items using insertcopy function, because I can clearly see in schedule table when and how much items were generated.

J.

f17-test-add-rows-to-schedule-during-simulation-ru.fsm

FlexSim 17.0.13
arrival schedule
· 3
5 |100000

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

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

Why don't you use Process Flow to create items dynamically and add an entry to a global table whenever you create an item?

0 Likes 0 ·
Jacek Diakun avatar image Jacek Diakun Matthew Gillespie ♦♦ commented ·

Simply speaking - I prefer not to use Process Flow in my models :-|

Jack

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Jacek Diakun commented ·

@Jacek Diakun, You can use Process Flow for a small part of your model, like to create items, without needing to convert your whole model to use Process Flow.

I would recommend becoming more comfortable with Process Flow as that's the direction the software is headed. There are a lot of good tutorials in the manual and you can feel free to ask questions and get help on this site.

4 Likes 4 ·

1 Answer

·
Jeff Nordgren avatar image
2 Likes"
Jeff Nordgren answered Jacek Diakun commented

@Jacek Diakun

It seems that the most important thing you mention is that you can see in the Source schedule table the items that have been created. The way you are doing this is to force the Source to function in a way that is not "native" to the Source. That is why you have to put an offset time so that the Source has time to make the adjustment and create the flowitem.

Rather than be able to see that information in the Source object itself, it seems to me that it would be easier to create the flowitems in the Queue and write the same information you want to see in a Global Table. This way there is no offset time involved and it seems that it is a "cleaner" way to do what you are describing.

Attached is your model with the changes I've made to the Queue to create the flowitems there rather than in the Source. It creates a Global Table with the information that you listed that you wanted to keep track of. Look at the attached model and see if something like this would work for you.

Thanks.

add-rows-to-sourcetable-during-simulation-jn1.fsm


· 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.

Jacek Diakun avatar image Jacek Diakun commented ·

Dear Mr @Jeff Nordgren,

Thank you very much for your answer.

Regards,

Jack

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.