From: Yunhwan K. <yun...@gm...> - 2014-07-07 02:10:49
|
Hi, all, I’d like to ask about defining a global variable and how to chart it. I’m building my first Repast Symphony model, and I need to define a global variable which shows the state of the system. For example, given that agents in my model have a boolean variable called “intention”, I want to count the number of agents with TRUE of intention and FALSE of it. And I want to define a global variable “number” and increase 1 if the number of agent with TRUE is greater than that with FALSE at each tick. And I want to plot the value of “number” using chart. After searching the mailing archive, I’ve found how to define global “behavior” but still puzzling how(and where) to define global “variable”. If I define a global variable inside the context builder class, it seems not to be initialized. Am I correct? Then, where is the main() method of plain Java language in Repast Simphony? And i’m still puzzling how to plot the value of the global variable. Which do I need to use among Aggregate or Nonaggregate Data Source if I want to plot the global variable inside the context builder class? Many thanks in advance. Yunhwan Kim |