MASON-INTEREST-L Archives

October 2006

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Maciej M. Latek" <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Tue, 10 Oct 2006 15:43:04 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
> 
> 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

ATOM RSS1 RSS2