MASON-INTEREST-L Archives

October 2006

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Proportional Font
Show HTML 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:
Gabriel Catalin Balan <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Tue, 10 Oct 2006 00:26:51 -0400
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (52 lines)
Hi

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 ;)

By stop I probably mean finish, or however you stop the scheduler.

Gabriel

PS this is not the official recommendation of the MASON developers on
the issue; I bet Professor Luke has something in his collection of doloops
for this very thing. This is just me trying to get you back to work asap.
:P


>
> Date:    Sun, 8 Oct 2006 21:50:50 -0400
> From:    Maciej M Latek <[log in to unmask]>
> Subject: Scheduling a restart
>
> Hi all!
>
> I need to solve a problem concerning stopping and restarting a simulation.
> My bless point is to have a function on a schedule, which in each step
> checks a condition for ending a given run, if false does nothing,  if
> true does some reporting, resets simulation parameters to some new
> values and restarts the simulation.
>
> Now, the condition checking, reporting and resetting values works fine, unfortunately I'm not able to get simulation started once again after finishing the first run (I'm using the start() SimState method).
>
> Any guidance on having the Mason do multiple runs will be highly appreciated.
>
> Best regards,
>
> Maciek
>
> ------------------------------
>
> End of MASON-INTEREST-L Digest - 7 Oct 2006 to 8 Oct 2006 (#2006-63)
> ********************************************************************
>

ATOM RSS1 RSS2