Running two simulations

Anything that doesn't fit elsewhere.
Post Reply
Posts: 77
Joined: Sun Feb 20, 2011 7:15 pm

Running two simulations

Post by shyam_u2 » Sat Apr 06, 2013 12:27 pm

In my network model I want to run two simulations. Simulation 1 runs for 1000 ms and Simulation 2 for another 1000 ms.
Simulation 2 uses a variable 'var1' which is calculated from the results of simulation 1. How do I do this ? The condition is that simulation 2 should not be a continuation of simulation 1. It should start fresh (just that a variable in sim 2 is computed from result of sim 1).

thanks in advance

Site Admin
Posts: 5684
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine

Re: Running two simulations

Post by ted » Mon Apr 08, 2013 10:28 am

Code: Select all

// $1 and $2 are durations of the first and second parts of the simulation

proc runrun() {
  tstop = $1
  mycustomstuff() // analyzes results and changes one or more parameters
                  // note:  mycustomstuff() shouldn't destroy the contents
                  // of any Vector that was capturing data

Post Reply