Print

Print


Professor Luke, Gabriel

The console thingy is the way I've already tried (it is so brutal that one can't really miss it, :-)), but I see I did it the wrong way. Doloops are very intriguing indeed. 

Nevertheless, the objective is to get it to work with GUI-less version. I will definitely get up earlier tomorrow to play with your suggestions. Now I have to finish writing up Joey's nemesis.

Thanks for suggestions, I will report tomorrow.

Best regards,

Maciek Latek


----- Original Message -----
From: Sean Luke <[log in to unmask]>
Date: Tuesday, October 10, 2006 0:28 am
Subject: Re: Scheduling a restart

> On Oct 8, 2006, at 9:50 PM, Maciej M Latek wrote:
> 
> > 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).
> 
> If you're using the command line, it's fairly straightforward: 
> write  
> your on top-level MASON loop.
> A basic loop is really pretty simple; I think we cover it in one 
> of  
> the tutorials.  All you have to do
> is write a version of it that repeats, something like:
> 
> 1. Make a SimState
> 2. loop as long as you want
> 3.     set up your parameters, reset your SimState variables as 
> you  
> see fit
> 4.     start()
> 5.     loop while schedule.step() is true
> 6.     finish()
> 
> If you need to do this with a GUI, then I have to think about how  
> best to hack MASON to do this.  Probably the right thing is to 
> hack  
> the Console a little, along the lines of how the Console can 
> restart  
> with a new seed upon pressing stop.
> 
> One gotcha lies in movies and time series -- they won't update 
> unless  
> the timestamp is smaller than they've seen before (of course).  
> Since  
> you're restarting, the timestamp is now small again.  You'll need 
> to  
> reset them as well, or else do a little hacking there too.
> 
> Sean
>