MASON-INTEREST-L Archives

May 2016

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced 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:
Joey Harrison <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Thu, 26 May 2016 13:30:32 -0400
Content-Type:
multipart/alternative
Parts/Attachments:
text/plain (1218 bytes) , text/html (1801 bytes)
I can think of a few scenarios (in addition to my current one) where a
state.isRunning() function would be useful.

On Wed, May 25, 2016 at 5:18 PM, Sean Luke <[log in to unmask]> wrote:

> 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