[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Simulation Parameters
From: |
Darren Schreiber |
Subject: |
Simulation Parameters |
Date: |
Sun, 8 Aug 1999 23:03:18 -0700 |
I want to have three parameters used throughout my spatial voting model:
numberOfIssues, minPosition, maxPosition. So far, I have main, ModelSwarm,
and Agent objects. The ModelSwarm and Agents will use the parameters to
get random numbers between minPosition and maxPosition. The numberOfIssues
variable will be used for loops and such in the ModelSwarm. In the Agents,
I have a few array variables that will have numberOfIssue elements (e.g.
int issuePosition[numberOfIssues]; ). But, when I compile I get the
following error:
Agent.h:17: `numberOfIssues' undeclared here (not in a function)
So, what is the best way to make simulation parameters available to all
objects in the model and to also use them at compile time to create fixed
arrays?
My guesses have been to use #define numberOfIssues 3; or obj->
numberOfIssues=3; but neither seems to do exactly what I am wanting in the
way I am using. Do I need two separate variables or is there some other
way I should be setting this up?
Darren
_____________________________________________
Darren Schreiber
Attorney at Law
Graduate Student
Political Science, UCLA
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.
- Simulation Parameters,
Darren Schreiber <=