swarm-modeling
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scheduling Question (off-by-one error)


From: Paul Johnson
Subject: Re: Scheduling Question (off-by-one error)
Date: Sun, 14 Apr 2002 07:19:28 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020326

I'm not digging through the detail of our model, but I've encountered this problem before.

Look at your activateIn method and the order in which the things are activated. I think you will find this in activateIn:

  [modelSwarm activateIn: self];
  [displaySchedule activateIn: self];

Which causes the model steps to be ahead of the display steps. Try reversing them.

Before my recent deep exploration of Scheduling for the last Swarmfest, I think I worked around this by making agents wait until time 1 to take a step. You could consider that as well.

Christopher J. Mackie wrote:
My (Java) EZGraphs are displaying off-by-one (time 0 in the model doesn't
appear at all on the graphs, time 1 shows up as time 0 on the EZGraph,
etc.).  Everything else seems to be working fine.  I've tried changing the
order of various selectors in the schedules, but so far no luck.  Can anyone
tell me why this might be happening, or what else to check for?

I'm using Swarm-2.2-pretest-6 under Windows.  The framework code is borrowed
almost directly from the Java "SimpleObserverBug3" tutorial app--here are
some of the key content pieces:

Three EZGraphs:  satisfactionGraph, enrollGraph, and qualityGraph, all built
in modelSwarm.buildObjects(), with the following sequence-selectors (only
one shown here):


--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700



                 ==================================
  Swarm-Modelling is for discussion of Simulation and Modelling techniques
  esp. using Swarm.  For list administration needs (esp. [un]subscribing),
  please send a message to <address@hidden> with "help" in the
  body of the message.
                 ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]