eos.economy
Class Economy

java.lang.Object
  extended by eos.economy.Economy

public class Economy
extends java.lang.Object

Economy provides a container to hold all agents and markets together.


Field Summary
static double CGDEMAND_TC
          time constant for exponential smoothing of consumption
static double CGSUPPLY_TC
          time constant for exponential smoothing of consumption
static double CPI_TC
          time constant for smoothing cpi
static ExpSmoother demandCGSmoother
           
static double INFLATION_TC
          time constant for smoothing inflation
static double LOAN_IR_TC
          time constant for exponential smoothing of loanIR
static ExpSmoother supplyCGSmoother
           
static double WAGE_TC
          time constant for smoothing wage
 
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 java.util.Collection<Agent> getAgents()
          Return agents who are still alive
static double getLaborerNetBalance()
          Return laborerNetBalance (used in Bank to update IR) this is recomputed when called and is therefore up-to-date
static Market getMarket(java.lang.String good)
          Return market corresponding to good
static double getSmoothedAvgWage()
          Return smoothedAvgWage
static double getSmoothedCPI()
          Return smoothedCPI
static double getSmoothedInflation()
          Return exponentially smoothed inflation
static double getSmoothedLoanIR()
          Return exponentially smoothed loanIR
static double getSupplyOfLoans()
          Return supply of loans
static int getTimeStep()
          Return the current time step )
static double getTotDemandCG()
          return total demand of CG update total totDemandCG and smoothedTotDemandCG (both in dollars)
static void run(int steps)
          Run simulation for steps number of steps
static void step()
          Run simulation for one step
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CPI_TC

public static final double CPI_TC
time constant for smoothing cpi

See Also:
Constant Field Values

INFLATION_TC

public static final double INFLATION_TC
time constant for smoothing inflation

See Also:
Constant Field Values

WAGE_TC

public static final double WAGE_TC
time constant for smoothing wage

See Also:
Constant Field Values

CGDEMAND_TC

public static final double CGDEMAND_TC
time constant for exponential smoothing of consumption

See Also:
Constant Field Values

CGSUPPLY_TC

public static final double CGSUPPLY_TC
time constant for exponential smoothing of consumption

See Also:
Constant Field Values

LOAN_IR_TC

public static final double LOAN_IR_TC
time constant for exponential smoothing of loanIR

See Also:
Constant Field Values

demandCGSmoother

public static ExpSmoother demandCGSmoother

supplyCGSmoother

public static ExpSmoother supplyCGSmoother
Constructor Detail

Economy

public Economy()
Method Detail

getMarket

public static Market getMarket(java.lang.String good)
Return market corresponding to good

Parameters:
good - name of a good
Returns:
market corresponding to good

run

public static void run(int steps)
Run simulation for steps number of steps

Parameters:
steps -

getTimeStep

public static int getTimeStep()
Return the current time step )

Returns:
the current time step

step

public static void step()
Run simulation for one step


getSmoothedLoanIR

public static double getSmoothedLoanIR()
Return exponentially smoothed loanIR

Returns:
the exponentially smoothed loanIR

getSmoothedInflation

public static double getSmoothedInflation()
Return exponentially smoothed inflation

Returns:
the exponentially smoothed inflation

getAgents

public static java.util.Collection<Agent> getAgents()
Return agents who are still alive

Returns:
agents who are still alive

getTotDemandCG

public static double getTotDemandCG()
return total demand of CG update total totDemandCG and smoothedTotDemandCG (both in dollars)


getSmoothedAvgWage

public static double getSmoothedAvgWage()
Return smoothedAvgWage

Returns:
smoothed average wage

getSmoothedCPI

public static double getSmoothedCPI()
Return smoothedCPI

Returns:
smoothed CPI

addMarket

public static void addMarket(Market market)
Add market to the economy

Parameters:
market -

addAgent

public static void addAgent(Agent agent)
Add agent to the economy

Parameters:
agent -

getLaborerNetBalance

public static double getLaborerNetBalance()
Return laborerNetBalance (used in Bank to update IR) this is recomputed when called and is therefore up-to-date

Returns:
laborerNetBalance

getSupplyOfLoans

public static double getSupplyOfLoans()
Return supply of loans

Returns:
supply of loans