swarm-support
[Top][All Lists]
Advanced

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

modelProbeMap in simpleExperSwarm.m


From: Zafar Iqbal
Subject: modelProbeMap in simpleExperSwarm.m
Date: Tue, 8 Sep 1998 12:42:06 +0100 (BST)

in Swarm-1.1 tutorial simpleExperSwarm the modelProbeMap 
object is created but not displayed. The relevant code is :-
if (numModelsRun == 0)
    {
      // Build a customized probe map for the class ModelSwarm
      modelProbeMap = [EmptyProbeMap createBegin: self];
      [modelProbeMap setProbedClass: [modelSwarm class]];
      modelProbeMap = [modelProbeMap createEnd];
      
      // Add in a bunch of variables, one per simulation parameter
      [modelProbeMap addProbe: [probeLibrary getProbeForVariable: "worldXSize"
                                             inClass: [modelSwarm class]]];
      [modelProbeMap addProbe: [probeLibrary getProbeForVariable: "worldYSize"
                                             inClass: [modelSwarm class]]];
      [modelProbeMap addProbe: [probeLibrary getProbeForVariable: "agentDensity"
                                             inClass: [modelSwarm class]]];
      // Now install our custom probeMap into the probeLibrary.
      
      [probeLibrary setProbeMap: modelProbeMap For: [modelSwarm class]];

    } 

----end of code-----

I added the the line:
CREATE_ARCHIVED_PROBE_DISPLAY (modelSwarm);

This produces a display but when the model is dropped for 
the next iteration, I get a "bus error" or "segmentation 
fault".
I tried to drop the probe using:
[modelProbeMap drop];

This had no effect. 
Is there a way of displaying the modelProbeMap without 
errors?

I'm using sparc-sun-solaris 2.5.1,  Swarm-1.1


----------------------
Zafar Iqbal
address@hidden


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