Sender: |
|
Date: |
Tue, 10 Oct 2006 15:43:04 -0400 |
MIME-version: |
1.0 |
Reply-To: |
|
Content-type: |
text/plain; charset=US-ASCII |
Subject: |
|
From: |
|
In-Reply-To: |
<Pine.GSO.4.52.0610100008230.8723@cs1> |
Content-transfer-encoding: |
7bit |
Comments: |
|
Parts/Attachments: |
|
|
>
> This is off the top of my head, but maybe you're calling start while on
> the calling stack of the stop. If you call start before super.stop, the
> effect of start gets cancelled by super.stop.
>
> The way I'd do this is:
>
> for i =1,#Runs
> sim.start()
> while(sim.step());
> sim.finish()
>
> So the new start comes after the previous stop ;)
OK, after investigation I've decided to adopt Gabriel's suggestion. In order
to deal with multiple short runs for parameter sweeps an external class
building a simulation is created, which contains more or less following
code:
/* myModel is SimState */
myModel mm = new myModel(parameters1);
for (i = 0:MaxRuns) {
mm.setSweepedParameter(parametrs2);
mm.start();
while(!mm.finishCondition()) {
mm.schedule.step(mm);
}
mm.report();
mm.finish();
}
I randomly generate parametrs2 vector, but it has been suggested it is
possible to introduce them using ParameterDatabse snippet from precomputed
list.
Sean and Gabriel: thank you very much for help,
Maciek
|
|
|