swarm-support
[Top][All Lists]
Advanced

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

Why does adding modelSwarm reference cause problems??


From: Darren Schreiber
Subject: Why does adding modelSwarm reference cause problems??
Date: Fri, 26 May 2000 19:46:11 -0700

I am revising currently revising my code and wanted all of my agents to be able to reference the coalitionList from the ModelSwarm. When I made the changes, I started getting a string of strange text (it looks like something from tk/tcl). When I remove the code in the ModelSwarm and in the Agent files that allows me to set an id to the coalitionList, I don't get the tk/tcl stuff and the program continues to execute. I also get the same type of errors when I try to allow my agents to get the coalitionList info from the ModelSwarm by creating an id for the ModelSwarm. These errors persist even when I comment out the other changes I have made to the code, so I am pretty sure that they are a result of the references to the coalitionList or modelSwarm.

I don't understand why this would be occurring from just a simple reference. I have uploaded Voting1.00.4.tar.gz into the incoming directory.

Here is the diff output from Voting1.00.4 with the setting of coalitionList and Voting1.00.4a without it. I thought it might be because coalitionList is empty when I create this, but putting an nil to initialize it didn't work.

address@hidden/MyWork] $ diff Voting1.00.4/ModelSwarm.m Voting1.00.4a/ModelSwarm.m -c
*** Voting1.00.4/ModelSwarm.m   Fri May 26 19:09:02 2000
--- Voting1.00.4a/ModelSwarm.m  Fri May 26 19:40:30 2000
***************
*** 94,100 ****
     [newCoalition addInferior: agent1];
     [newCoalition addInferior: agent2];
     [newCoalition setSuperior: self];
!    [newCoalition setCoalitionList: coalitionList];
     [newCoalition setNumberOfIssues: numberOfIssues];
     [newCoalition setTotalVoters: numVoters];
     [newCoalition setStoppingRule: stoppingRule];
--- 94,100 ----
     [newCoalition addInferior: agent1];
     [newCoalition addInferior: agent2];
     [newCoalition setSuperior: self];
!    //[newCoalition setCoalitionList: coalitionList];
     [newCoalition setNumberOfIssues: numberOfIssues];
     [newCoalition setTotalVoters: numVoters];
     [newCoalition setStoppingRule: stoppingRule];
***************
*** 399,405 ****
      [aVoter distributeIssueWeights];
      aVoter = [aVoter createEnd];
      [aVoter setSuperior: self];  // Added for Version0.7
!     [aVoter setCoalitionList: coalitionList];
      [aVoter setDimensionsX: xDim Y: yDim]; // Added for Version0.7.2
      [aVoter setNode: graphCanvas];
      [aVoter setMyCanvas: graphCanvas];  // Added for Version0.7
--- 399,405 ----
      [aVoter distributeIssueWeights];
      aVoter = [aVoter createEnd];
      [aVoter setSuperior: self];  // Added for Version0.7
!     //[aVoter setCoalitionList: coalitionList];
      [aVoter setDimensionsX: xDim Y: yDim]; // Added for Version0.7.2
      [aVoter setNode: graphCanvas];
      [aVoter setMyCanvas: graphCanvas];  // Added for Version0.7
address@hidden/MyWork] $

Voting1.00.4a still breaks down, but I know the reasons at least.

Thanks in advance.

        Darren

(BTW this is in Swarm-2.1.1 on a Windows 98 Machine)



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