swarm-support
[Top][All Lists]
Advanced

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

Re: subdividing simulation time


From: Doug Donalson
Subject: Re: subdividing simulation time
Date: Mon, 01 Jun 1998 13:43:39 -0700

Geoff,

   If I understand your question correctly, I am the only swarmite using this
and I'm also to blame that it is there to start with.  I can help you get
going using it.
You need to make one modification to Schedule.m (which may be your core dump.)

This also means that you need to be using the source (not binary version.)

The code is in Schedule.m in:
void _activity_insertAction( Schedule_c *self, timeval_t tVal, CAction
*anAction )

The section you need to comment out includes line #227 and is:

  /*if (_activity_current
      && self->activityRefs
      &&  !([(id)anAction class] == [ActionMerge_c class]))
    {
      id index = [self->activityRefs begin: scratchZone];
      ScheduleActivity_c *sActivity;

      while ((sActivity = [index next]))
        _check_external_activity (sActivity, tVal);
      [index drop];
    }*/

In addition, if you want to get the current time, there are some additional
code you need to do that (provided to me courtesy of Roger Burkhart.)  Let me
know if you need that as well.

If you need more help, feel free to ask, it's one way I can pay back all the
help and patience that present and past members of the hive have given me.
:-)  Once again and as always, thanks guys!  (Note that I use guys in a
non-gender specific sense.)

(By the way, I have a fairly complex version of this type of schedule working
that includes things like removing actions in the schedule that become
obsolete.  For example, a juvenile insect is scheduled to molt into an adult
at some point in the future, but has the bad luck of becomming a snack for a
predator, that molt action then needs to be removed from the schedule.)

Cheers,

   Doug Donalson
   address@hidden
   (805) 961-4447

Geoffrey Schultz wrote:

> Has anyone implemented subdivision of simulation time within their
> project?  If so, I'd really appreciate some advice (or better, some code).
> The grid turtles example (mousetraps2) which is supposed to do this,
> compiles but causes a seg fault when run on my archive linux installation
> (using 1.05).
>
> Geoff Schultz
> McGill-MGH Pain Centre
>
>                   ==================================
>    Swarm-Support is for discussion of the technical details of the day
>    to day usage of Swarm.  For list administration needs (esp.
>    [un]subscribing), please send a message to <address@hidden>
>    with "help" in the body of the message.
>                   ==================================




                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of 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]