MASON-INTEREST-L Archives

May 2016

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:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Wed, 25 May 2016 17:18:34 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (17 lines)
MASON doesn't have anything designed for this.  If you think it's of significant benefit, it could of course be easily added.

Sean

On May 25, 2016, at 10:31 AM, Joey Harrison <[log in to unmask]> wrote:

> Is there a way to tell if my simulation is currently running? Specifically, I want to know if it's between start() and finish(). It is trivial to create and maintain my own flag, but this seems like functionality that would already exist.
> 
> At first I thought I could tell based on schedule.getTime() or schedule.getSteps(), but they don't change when start is called. The closest thing I've found is schedule.isSealed() but it's initialized to false before start() has ever been called. After starting it once, it seems to behave like what I'm looking for.
> 
> To give you a brief idea of what I'm doing, I want to schedule something when a certain value is changed in the GUI, but only if the simulation is currently running. Otherwise, it will get scheduled when start() is called.
> 
> Thanks,
> Joey
> 
> 

ATOM RSS1 RSS2