question

Serge A avatar image
0 Likes"
Serge A asked Phil BoBo edited

Real-time simulation speed with different time units

I noticed, that if the model uses minutes as the time unit, and runs at Run Speed = 1, the actual simulation speed is 60 simulated seconds per real time second. This makes the model 60× accelarated at Run Speed = 1, which is not always desirable.

The possible workaround is to set a Custom speed and type 0.016667 by hand every time.

screenshot of the Run Speed control

Unfortunately, in this case the Run Speed control is not very usable, because

  1. The displayed Run Speed no longer corresponds to the ratio between simulated time and the real time (Run Speed 4.0 means the simulations goes 240 times faster than in the real time if it is using minutes). The value displayed in the control is difficult to interpret directly. It has to be multiplied by 60 to know how much faster or slower than the real time it is. It's counterintuitive that Run Speed 0.05 is 3× faster than the real time.
  2. The true 1× value is too close to the left side of the Run Speed control. Dragging it to adjust the speed precisely is not easy.

The issues get worse for longer time units (hours, days).

I suppose the default simulation speed (1.0 or 4.0) should be tied to the real-time speed rather than to the number of model time units per second. Ideally, the time unit of the model should match the time unit of the user's time tracking system. It does not imply that the simulated process is slower or faster.

I may be missing something. Is it already possible to configure FlexSim so that at Run Speed 1.0 it would run 1/n model units per second, where n = node("MODEL:/Tools/ModelUnits/Time/Multiple").value?

FlexSim 17.2.1
speedunitsrunspeed
5 |100000

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

Mischa Spelt avatar image
2 Likes"
Mischa Spelt answered Phil BoBo edited

If you want, you can execute the following code (e.g. on Model Reset or manually from a Script window) to set the simulation speed to nearly realtime:

runspeed(minutes(1/60))

Specifically for the problem of having little control over the run speed slider at small run speeds, I tend to use the keyboard a lot. Control + Up arrow and Control + Down Arrow will double and halve the speed, respectively. This allows you to not only quickly scale the run speed, but also to easily get back at the exact value (bar rounding errors).

Nevertheless, if you have a concrete solution to improve the Run Speed control please do post it as an idea and I'll be happy to support.

· 4
5 |100000

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

Serge A avatar image Serge A commented ·

That's exactly the workaround I'm already using, setting runspeed to 1/60.

The problem is that the speed control now looks like this https://i.imgur.com/UFkn9D6.png:

Run Speed control @ 1/60

The meaningful range of the slider is entirely on the left hand side, and it's very difficult to increase or increase simulation speed gradually. To reset simulation speed to 1:1, I have to resort to setting speed in code or typing 0.01667 in the Custom field of the speed control.

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Serge A commented ·

Out of curiosity, why did you set your model units to minutes if fractional seconds are so meaningful to your simulation run speed?

Why didn't you select seconds as the time unit for your model?

1 Like 1 ·
Serge A avatar image Serge A Phil BoBo ♦♦ commented ·

The client's time tracking and scheduling data is expressed in minutes, so it is more convenient to work in minutes directly.

Some processes are relatively long (~ hundreds of minutes), while some are relatively fast (less than a minute). These faster processes is where the model gets more complicated. Being able to run the model in real time (or even in slow-motion), helps to show, explain, discuss and understand it (and debug it too). Sometimes it has to be accelerated or slowed down, but then the speed has to be restored to normal (real time). That's where the speed control is not very helpful.

> if fractional seconds are so meaningful to your simulation run speed

It's not about fractional seconds. Run speed 0.016667 is the speed when the operators move naturally. To achieve a real time simulation (or close to that) I have to use fractional run speeds. If anything, I care about fractional minutes, because that's how the field data are reported.

0 Likes 0 ·
Show more comments
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel edited

If the standard speed control don't work as you like, then you can put a tracker into the dashboard and compute the right run speed which you set on drag.

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.