Cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to simulate different scenarios

Creator
Creator

Hi,

 

I am looking for an efficient way to run my model with ~8-10 different scenarios one after another, each of which will take about 15-20 minutes. The only differences between them are different shift calendars and different numbers of workers.

 

The approach I thought of looks like this

  • Import all the data, including scenario parameters
  • Store the scenarios/some identifying flag in a QueueFile
  • When the ending criterion for one run is met (e.g. too few drained parts during the last simulation hour), export all output data, reset the EventController and all statistics
  • When the QueueFile is not empty, pop the next flag and start from new

 

Do you think this is a good and feasible way? I haven't really used for example the ExperimentManager, maybe there is a ready-to-use solution integrated into PS Smiley Happy

 

Thanks a lot in advance!

5 REPLIES

Re: Best way to simulate different scenarios

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
this is the job of the experimentManager and the methods init (to initialize the experiment) and endSim (to write the data)
Usually you will use the setting end in the EventController to restrict the duration of the experiments.
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Best way to simulate different scenarios

Creator
Creator

Hi Steffen,

 

thanks for the reply. So just that I got it right: I will define a global integer variable which is increased every experiment and depending on that value the init-method will assign scenario x. Correct?

 

How can I assign a method to the EventController end setting? Right now I use a generator which fires EventController.stop(true) once a certain condition is met.

 

Best regards

Re: Best way to simulate different scenarios

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
just set the end-attribute in the eventController (fixed or during the simulation run). Then all methods with the name endSim will be called.
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Best way to simulate different scenarios

Creator
Creator

Frustrating, but I'm still not totally clear on this matter Smiley Frustrated

 

In my model I have an integer variable, which is also the only experiment defining parameter in the ExperimentManager. I want the ExperimentManager to increase this variable every time by one, so that during the init-method there will be different ShiftCalendars assigned to all my stations.

However, the variable is not increased and the scenarios are always the same. Do I have to increase it manually during the EndSim-method?

 

init.JPGexpmanager.JPGThanks a lot in advance!

Re: Best way to simulate different scenarios

Creator
Creator

Classic, found the solution minutes after posting. 

 

The problem was the active "initial value".

 

Thanks!