Class CurrentIstant

java.lang.Object
  extended bySwarmObjectImpl
      extended byCurrentIstant

public class CurrentIstant
extends SwarmObjectImpl

This is a class for calling a different number of agents for every istant of simulating day. The CurrentAgent is called a numberOfOperatinAgents times.

Author:
Marco Agagliate
See Also:
Serialized Form

Field Summary
 int maxNumberOfOperatingAgents
          The maximum number of operating agents.
 int numberOfOperatingAgents
          The number of operating agents per istant.
 int percentageOfOperatingAgents
          The percentage quota of agents which act in the market.
 int printing
          If 1 many objects print data on the terminal window.
(package private)  CurrentAgent theCurrentAgent
          The Current Agent of the simulation.
 boolean typeOfPercentage
          The type of percetage of agents.
 
Constructor Summary
CurrentIstant(Zone aZone)
          Constructor for a new CurrentIstant.
 
Method Summary
 void callAgents()
          The method calls the CurrentAgent numberOfOperatingAgents times.
 void setCurrentAgent(CurrentAgent c)
          The method sets theCurrentAgent.
 void setMaxNumberOfOperatingAgents(int n)
          This method sets the maximum value of operating agents.
 void setPercentageOfOperatingAgents(int p)
          This method sets the percentage of operating agents.
 void setPrinting(int p)
          To set the value of option printing.
 void setTypeOfPercentage(boolean t)
          This method sets the type of percentage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theCurrentAgent

CurrentAgent theCurrentAgent
The Current Agent of the simulation.


numberOfOperatingAgents

public int numberOfOperatingAgents
The number of operating agents per istant.


maxNumberOfOperatingAgents

public int maxNumberOfOperatingAgents
The maximum number of operating agents.


percentageOfOperatingAgents

public int percentageOfOperatingAgents
The percentage quota of agents which act in the market.


typeOfPercentage

public boolean typeOfPercentage
The type of percetage of agents. If it is true percentage is a maximum value; if it is false percentage is a fixed value.


printing

public int printing
If 1 many objects print data on the terminal window.

Constructor Detail

CurrentIstant

public CurrentIstant(Zone aZone)
Constructor for a new CurrentIstant.

Method Detail

setCurrentAgent

public void setCurrentAgent(CurrentAgent c)
The method sets theCurrentAgent.


setMaxNumberOfOperatingAgents

public void setMaxNumberOfOperatingAgents(int n)
This method sets the maximum value of operating agents.


setPercentageOfOperatingAgents

public void setPercentageOfOperatingAgents(int p)
This method sets the percentage of operating agents.


setTypeOfPercentage

public void setTypeOfPercentage(boolean t)
This method sets the type of percentage.


setPrinting

public void setPrinting(int p)
To set the value of option printing.


callAgents

public void callAgents()
The method calls the CurrentAgent numberOfOperatingAgents times. The CurrentAgent calls act1 method from an agent, which is in a list.