MASON-INTEREST-L Archives

October 2009

MASON-INTEREST-L@LISTSERV.GMU.EDU

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

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

Print Reply
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Mon, 26 Oct 2009 19:47:29 +0100
MIME-version:
1.0 (Apple Message framework v936)
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Content-type:
text/plain; charset=US-ASCII; format=flowed; delsp=yes
Subject:
From:
Sean Luke <[log in to unmask]>
In-Reply-To:
Content-transfer-encoding:
7bit
Comments:
To: MASON Multiagent Simulation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (24 lines)
On Oct 26, 2009, at 5:29 PM, steven citron-pousty wrote:

> Thanks for your initial help - I got this running. The next problem  
> I am running into is that since we use the doLoop to instantiate the  
> class I don't have a handle to it nor can I pass in objects that I  
> want to live on after the simulations are done.

doLoop is just a convenience method meant for calling things at the  
command line: don't do use it then.  Instead of doLoop, you could just  
do something like this:

	MyApp app = new MyApp(System.currentTimeMillis());
	app.start();
	for(int x=0 ; x < steps; x++)	// steps is whatever you want.  Or use  
some other stopping metric.
		app.schedule.step(app);
	app.finish();

Seriously, that simple.  The MASON simulation loop is intentionally  
simplistic.  At any rate, at the end of all this, you have the app  
variable, holding your simulation.

Sean

ATOM RSS1 RSS2