|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteos.simulation.Simulation
public class Simulation
Guidelines for creating a simulation
Please follow the steps below. The order is important.
1. Create the markets and add them into the economy. The markets need to be created first because the constructors of the agents reference the markets. Here is an example of creating a labor market and adding it to the economy.
LaborMarket lMkt = new LaborMarket();
Economy.addMarket(lMkt);
2. Create the firms. Capital firms need to be created before other firms, because the constructors of consumer goods firms require reference to an array of capital firms.
3. Add the firms to the economy. For instance, here is how to add the X firms:
for (int i = 0; i < NUM_XFIRMS; i++) Economy.addAgent(XFirms[i]);
4. Create laborers and add them to the economy.
5. Clear the labor market by calling lMkt.clear(). This is to allow // forget this for now firms to get labor before the start of the first time step.
6. Note: eos.io.printer has been removed; printing for tracing, debugging, and graphing is now done through the simpler eos.io.trace
7. Run the simulation by calling Economy.run(NUM_STEP).
Field Summary | |
---|---|
static int |
CAPITAL_LIFE
|
static double |
CFIRM_INIT_CAPITAL_PRICE
|
static double |
CGDEMAND_TC
|
static double |
CGSUPPLY_TC
|
static double |
CPI_TC
|
static double |
DEFAULT_TC
|
static double |
DELTA_TC
|
static double |
EPSILON
|
static double |
INFLATION_TC
|
static double |
IR_TC
|
static double |
LOAN_IR_TC
|
static int |
MACHINE_LABOR_NEEDED
|
static double |
PROFIT_TC
|
static double |
SUBACCOUNT_TC
|
static double |
WAGE_TC
|
Constructor Summary | |
---|---|
Simulation()
|
Method Summary | |
---|---|
static java.lang.String |
getAgentName(int ID)
Return name of agent given ID |
static double |
getINIT_ESTIMATED_OCG_PRICE()
Return INIT_ESTIMATED_OCG_PRICE |
static double |
getLABORER_INIT_WAGE()
Return LABORER_INIT_WAGE |
static double |
getNUM_LABORERS()
Return NUM_LABORERS |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double EPSILON
public static final double DEFAULT_TC
public static final double PROFIT_TC
public static final double IR_TC
public static final double DELTA_TC
public static final double SUBACCOUNT_TC
public static final double CPI_TC
public static final double INFLATION_TC
public static final double WAGE_TC
public static final double CGDEMAND_TC
public static final double CGSUPPLY_TC
public static final double LOAN_IR_TC
public static final int CAPITAL_LIFE
public static final int MACHINE_LABOR_NEEDED
public static final double CFIRM_INIT_CAPITAL_PRICE
Constructor Detail |
---|
public Simulation()
Method Detail |
---|
public static void main(java.lang.String[] args)
public static double getLABORER_INIT_WAGE()
public static java.lang.String getAgentName(int ID)
public static double getINIT_ESTIMATED_OCG_PRICE()
public static double getNUM_LABORERS()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |