question

Kadircan T avatar image
0 Likes"
Kadircan T asked Felix Möhlmann answered

Changing Source Interval

change_source_interval.fsm

Hi,

In the model I built, there are 4 sources and I put them in a group and they all create packets with the same interval. In the process flow, I want to change the creation interval of all of these sources at certain times. For example, until 10.00 pm, all of them create 1 packet in 3 seconds, while after 10.00 pm I want them to create 1 packet in 4 seconds. Can I do this through code, can you help?

FlexSim 22.2.2
sourcecodetime interval
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

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

If the values you want to switch between are numerical and not different distributions, you can use the "setProperty" method.

Model.find("Source1").as(Object).setProperty("InterArrivalTime", newValue);

To trigger this at certain times, you could use a Date Time Source in the Process Flow to create tokens at the respective times with the new interval value as a label.

1676534927590.png


1676534927590.png (14.2 KiB)
5 |100000

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

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.