question

CH L avatar image
0 Likes"
CH L asked CH L commented

How to auto record runspeed of FlexSim model

I need to run simulation study with a model connected to SQL server for data exchange with another software. Currently, all of the required data can be recorded by Statistic Collector or in Global table except the runspeed. I expect the runspeed of FlexSim would affect the result, but I are not sure how much it will be. It would be appreciated if someone can tell me how to auto record runspeed just like other data. Thanks!

FlexSim 18.2.3
flexsim 18.2.3runspeedauto record
· 2
5 |100000

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

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

@leungch, do you mean the runspeed slider that a user can adjust to affect the amount of simulation time per real time? Or some other runspeed?

Please give some more description of what data you are trying to capture. I can't think of a reason you would store info about how the user moves the runspeed slider. Ideally you will have built your model such that the runspeed does not effect the logic of your model, and therefore the results.

Perhaps you mean something else. Please elaborate and we'll be happy to answer your questions.

0 Likes 0 ·
CH L avatar image CH L Ben Wilson ♦♦ commented ·

@ben.wilson, I agree simulation model should be built that runspeed has no effect on result.

My model is an virtual production environment with production equipments and AGVs. The AGVs are responsible for material transfer, loading and unloading amongst the equipments production line. It is used to evaluate our production control software which would control the AGV according to the material status at equipments.

The problem we are facing is our simulation studies have to run for a few 10 hours. On the other hands, processing time of our production control software and the communication between FlexSim model and it (through SQL server) would not be accelerated. If we only set a higher runspeed (by the slider you mentioned), simulation result would definitely be affected.

I don't think we can resolve that problem. If we need to get absolute data which reflect the actual case, we have to run model in normal speed. However, I think we can still make comparison (no need of absolute results) between results of simulation studies with different parameters in higher runspeed. So I wonder if the runspeed could be auto. recorded.

0 Likes 0 ·

1 Answer

·
Benjamin W2 avatar image
2 Likes"
Benjamin W2 answered CH L commented

@leungch,

You can reference the runspeed with the following command:

maintree().find("project/exec/step").value


In the attached model, I created a statistics collector to collect the runspeed every 10 model seconds.

First, create a timer event, then add an Event Data Label like so:

Then, add a column that references the runspeed:

RunSpeed.fsm



1599081593514.png (56.4 KiB)
1599081628176.png (58.3 KiB)
runspeed.fsm (27.3 KiB)
· 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.

CH L avatar image CH L commented ·

@benjamin.w2 Although your model couldn't be run in my copy of FlexSim (v18.2.3), I tested your command and it works as what I need. Thanks!

0 Likes 0 ·

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.