Cancel
Showing results for 
Search instead for 
Did you mean: 

Run Multiple Simulations Model Frames

Pioneer
Pioneer

Hello,

 

I'd like to run two model frames at the same time.  One would think that since I can am forced to add an event controller to every model frame that this means I can run them seperately (otherwise it would be a global object - and I shouldnt need to add it).

 

However, when I start one, then go to another, and start that - the other stops??  This makes no sense.

 

I also tried doing this via simtalk.

for i := 1 to Replications
	model := self.~.duplicate(.ModelTemp,.models.frame.name + "Iter"+i)
	.Methods.Experiments.ThroughputAnalysis.&ThroughputReplication.newcallchain(model, i)
next

 

 

Since these are in call chains, they can run simotanuously.

 

The 'ThroughputReplication' method has the code to start the simulation

model.eventcontroller.reset
model.eventcontroller.startWithoutAnimation

 

It turns out that only one (the second replication) runs.

 

Is there a way to do this?  It seems to me running these in parallel (rather than in serial) should be possible.

 

If not - then stop forcing me to add an event controller to every frame.

6 REPLIES

Betreff: Run Multiple Simulations Model Frames

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello DJH,

 

you can create a frame and insert all the models you want to run in parallel. Add an event controller and reste and start them. That's all.

Hope this helps.

 

Regards
GG

------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution

Betreff: Run Multiple Simulations Model Frames

Pioneer
Pioneer

Ok.  That is an intersting idea.  I will try this.  Do I need to delete the event controller in each of the model frames?

 

I am still confused why I need an event controller in a frame, and why it's not a application level object. 

Betreff: Run Multiple Simulations Model Frames

Pioneer
Pioneer

I have thought more about running this in a frame.  The intent of running these in parallel was to run them with different random number seeds.  When they all run with one event controller, they are all running the same random number seed.  This kind of defeats the purpose, unless there is there a way I can have a different random number seed in each model frame??

Betreff: Run Multiple Simulations Model Frames

Siemens Legend Siemens Legend
Siemens Legend

Since the "parallel" objects are not generating the same random numbers it would work. Exactly because they are using the same the same random number stream the draw different random numbers (events are processed sequencially).

 

For your task the Experiment Manager is the right tool. Insert it, set the output value(s), and run multiple observations w/o defining experiments or changing input values. Find more details in the "Help" menu of the Experiment Manager -> "Help on Object".

 

Betreff: Run Multiple Simulations Model Frames

Pioneer
Pioneer

Good point on the random seed.  I will try this.

 

I am building an experiment for a library for our group that we use over and over again.  This experiment has a specific output report as well. 

 

The built in experimenter would require reconfiguration of the experiment every time, and would not create the standard report.  Also the experimenter modifies the base model, and even though it is supposed to reset the data, I have seen many instances where it did not - this can be very frustrating. 

Betreff: Run Multiple Simulations Model Frames

Pioneer
Pioneer

Turns out putting replications in a frame will not work.  If the model has any refrences to the 'RootFrame'  this method changes the 'RootFrame'.  I am back to making multiple models in the library and running them in serial.