eos.simulation
Class Simulation1

Object
  extended by eos.simulation.Simulation1

public class Simulation1
extends Object

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 necessity firms:

for (int i = 0; i < NUM_NFIRMS; i++) Economy.addAgent(nFirms[i]);

4. Create laborers and add them to the economy.

5. Clear the labor market by calling lMkt.clear(). This is to allow firms to get labor before the start of the first time step.

6. Create printers and add them to the economy. Several printers have been provided in eos.io.printer, but feel free to create more customized printers.

7. Run the simulation by calling Economy.run(NUM_STEP).

8. Clean up the printers by calling Economy.cleanUpPrinters()

9. Plot graphs.


Constructor Summary
Simulation1()
           
 
Method Summary
static void main(String[] args)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Simulation1

public Simulation1()
Method Detail

main

public static void main(String[] args)