MASON-INTEREST-L Archives

January 2007

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:
Tue, 9 Jan 2007 17:00:21 -0500
MIME-version:
1.0 (Apple Message framework v752.3)
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Content-type:
text/plain; charset=US-ASCII; delsp=yes; format=flowed
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 (44 lines)
Jim, the MASON scheduler, like most such schedulers, maintains two  
measures of temporal progress:

	- the simulation timestamp -- what "time" it is right now in the  
simulation world (not the real world).  That's time().
	- the number of times the schedule has pulsed.  That's getSteps().

When you schedule an agent on the schedule, it is scheduled to be  
fired at a given timestamp.  The schedule iterates as follows:

	1. Determine the timestamp of the minimum-time-scheduled agent
	2. Advance the time to that timestamp  (this is what time() returns)
	3. Extract all agents scheduled for that timestamp
	4. Sort them by ordering, and shuffle those with the same ordering  
relative to one another
	5. step() each of them in the order determined by #4
	6. Increment the number of steps   (this is what getSteps() returns)
	7. Go to 1

The timestamp can be any real-valued number.  The steps are obviously  
integers (longs).  If you need a measure of "simulation time", you  
want to use time().  But keep in mind that this is a _discrete_event_  
simulator.  If nothing is scheduled for time 3.14159, the schedule  
will never advance to that time -- it'll just skip past it up to the  
next scheduled-for time.

Sean


On Jan 9, 2007, at 2:10 PM, Jimmy Ong wrote:

>> schedule.time() will return the current timestamp.
>
> Could you kindly elaborate more? I don't quite understand how time()
> would help in the problem scenario. Rather, how would one use time 
> () in an
> agent's step method?
>
> It seems to me that time() and getSteps() always return the same  
> value, no?
>
> Please advise.
> -Jim

ATOM RSS1 RSS2