eos.agent.laborer
Class Laborer

java.lang.Object
  extended by eos.agent.Agent
      extended by eos.agent.laborer.Laborer

public class Laborer
extends Agent

Laborer


Constructor Summary
Laborer(double initOCGQty, double initBal, double initMort, double initInt, double initRev, double initPay, double initWage)
          Create a new laborer
 
Method Summary
 void act()
          Called by Economy.step() in each step.
 double chooseSavings(double i, double ir)
          Return savings given total income i and interest rate ir
 Good getGood(java.lang.String goodName)
          Return a reference to the good with name goodName
 double getOCGConsumption()
          Return consumption of ordinary CG (in $)
 double getSavings()
          Return savings
 
Methods inherited from class eos.agent.Agent
die, getID, getName, isAlive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Laborer

public Laborer(double initOCGQty,
               double initBal,
               double initMort,
               double initInt,
               double initRev,
               double initPay,
               double initWage)
Create a new laborer

Parameters:
initOCGQty - initial ordinary CG quantity
initBal - initial bank balance (subaccount)
initMort - initial total mortgage loans subaccount
initInt - initial interest subaccount
initRev - initial revenue subaccount
initPay - initial payments subaccount
initWage - initial wage subaccount
Method Detail

act

public void act()
Called by Economy.step() in each step.

Specified by:
act in class Agent

getGood

public Good getGood(java.lang.String goodName)
Return a reference to the good with name goodName

Specified by:
getGood in class Agent
Returns:
a reference to a good given goodName

getSavings

public double getSavings()
Return savings

Returns:
savings

getOCGConsumption

public double getOCGConsumption()
Return consumption of ordinary CG (in $)

Returns:
consumption of ordinary CG (in $)

chooseSavings

public double chooseSavings(double i,
                            double ir)
Return savings given total income i and interest rate ir

Returns:
savings given total income i and interest rate ir