|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objecteos.economy.Economy
public class Economy
Economy provides a container to hold all agents and markets together.
Field Summary | |
---|---|
static int |
INFLATION_TIME_WIN
time window within which average inflation is computed |
Constructor Summary | |
---|---|
Economy()
|
Method Summary | |
---|---|
static void |
addAgent(Agent agent)
Add agent to the economy |
static void |
addMarket(Market market)
Add market to the economy |
static void |
addPrinter(Printer printer)
Add printer |
static void |
cleanUpPrinters()
clean up printers |
static java.util.Collection<Agent> |
getAgents()
Return agents who are still alive |
static double |
getInflation()
Return the average inflation within INFLATION_TIME_WIN |
static Market |
getMarket(String good)
Return market corresponding to good |
static int |
getTimeStep()
Return the current time step |
static void |
run(int steps)
Run simulation for steps number of steps |
static void |
step()
Run simulation for one step |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int INFLATION_TIME_WIN
Constructor Detail |
---|
public Economy()
Method Detail |
---|
public static Market getMarket(String good)
good
- name of a good
public static void run(int steps)
steps
- public static int getTimeStep()
public static void step()
public static double getInflation()
public static java.util.Collection<Agent> getAgents()
public static void addMarket(Market market)
market
- public static void addAgent(Agent agent)
agent
- public static void addPrinter(Printer printer)
printer
- public static void cleanUpPrinters()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |