swarm-support
[Top][All Lists]
Advanced

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

Re: EmptyProbeMapImpl object


From: Olivier Jauze
Subject: Re: EmptyProbeMapImpl object
Date: Tue, 03 Jul 2001 16:19:16 +0200

thanks Mr Johnson, it is exactly what I want to do.
I hope one day, I could help you as well as you do for me.
Have a good day.


At 09:07 03/07/01 -0500, you wrote:
Your probemap shows, right? I can't tell from your code below if it
would or not, but I believe you say it does.  Is the problem that the
values in the probe are not being updated as the sim runs?  I have done
projects like that.  If that is what you want, I think the solution is
to schedule a method in your observer level that updates the tk widgets
at each step.

If you have a method that is scheduled to run every time, I think you
can just put this at the end of it:
          [actionCache doTkEvents];

Or you can explicitly schedule a tk update:
         [displayActions createActionTo: actionCache message:
M(doTkEvents)];
Of course, you translate over for java, but you appear to be quite good
at that, as far as I can see:)
pj

Olivier Jauze wrote:
>
> Hi,
> like in the mousetrap exemple, I have tried to create and customize an
> EmptyProbeMap.
> I would like to update this probe after I press on the start button.
> My aim is to visualize class' attributs during the simulation then I will
> know how this attributes will evolve in time.
> How can I do that ? Is it possible ?
> Thanks in advance.
>
> Here it is my code for the EmptyProbeMap:
>
>   class ModelSwarmProtoProbeMap extends EmptyProbeMapImpl
>   {
>            private VarProbe probeVariable (String name)
>            {
>              return Globals.env.probeLibrary.getProbeForVariable$inClass
>                     ( name, ModelSwarmProto.this.getClass () );
>            }
>
>            private void add (String name)
>            {
>              addProbe (probeVariable (name));
>            }
>
>            public ModelSwarmProtoProbeMap (Zone _aZone, Class aClass)
>            {
>              super (_aZone, aClass);
>              add ("nbSimu");
>              add ("optionGenisse");
>              add("essai");
>            }
>   }

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

                  ==================================
   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.

Olivier JAUZE
INRA unité URH équipe SP
Centre de Theix

                 ==================================
  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]