Household Class Reference

The implementation of the Household. More...

Inherits IBuyer.

Collaboration diagram for Household:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void trade ()
 Implementation of the exchange step for the Household.
void mutateTechnologies ()
 The household mutates its consumption technology coefficients.
double[] calcDemand (double m, double[] price, double[] pConsumptionTechnologyCoefficients)
 Calculate the demand for an amount of money available, a price vector, and consumption technology coefficients.
boolean isEmployed ()
 Check whether the household works.

Static Public Member Functions

static void resetId ()
 Called before the model is initialized.

Package Functions

 Household (Foundation pFoundation, HouseholdInitValues pInitValues) throws ParameterParserException
 The Constructor for the Household agent.
void init ()
 Initialize the Household.
void adjustEmploymentStatus ()
 Implementation of the "households adjust employment status" step.
WorkContract checkWorkContractOffer (WorkContract pOfferedContract)
 Method to check whether the household finds a job offer acceptable.
void addEmployment (WorkContract pWorkContract)
 Add a new employer and work contract to the list of employers with respective work contracts.
void removeEmployment (Firm pEmployer)
 Remove employer and contract from the household's employer list.
void consume ()
 The household consumes $ \delta_x * x $ units.
void account ()
 The Household's accounting method, updates money and savings considering income (see calcIncome), taxes paid, and whether money is saved or savings are turned into money depending on whether the expected income was met.
double calcIncome ()
 Calculate the income of this period from dividends, wage and interest on last period's savings.
double calcCurrentWage ()
 The current wage of the Household.
double calcCurrentWageInclUnemploymentAssurance ()
 The current wage of the Household, including unemployment assurance for the amount of working time the household is not employed.
void imitate (double[] observedTechnologyCoefficients)
 The household observes the consumption technology coefficients of randomly drawn other household.
void addFirmToProperty (Firm pFirm)
 Add a firm to the list of firms that are owned by the household.
void transferSavingsToFirmAndSetProduction (Firm pFirm)
 Transfer the savings (or part of the savings) of the household to a firm it owns.
void removeFirmFromProperty (Firm pFirm)
 Remove a firm from the list of firms that are owned by the household.
double calcWorkAmount ()
 The sum of work amount over all work contracts of this Household.

Private Member Functions

double[] calcDemand (double m, double[] price)
 Calculate the demand for an amount of available money and a price vector, given the current consumption technology coefficients of the Household.
void quitJob (WorkContract pWorkContract)
 The household cancels the work contract pWorkContract.
double getEmployersWageReference (WorkContract pWorkContract)
 The Household gets the wage reference of the employer of a proposed work contract (for comparison with the adjusted fallback in the decision whether to accept the job).

Private Attributes

final HouseholdInitValues initValues
 The initialization values of the Households.
final Employers employers
 The list of Firms that are employing the Household (wrapped in a helper class).
double fallback
 The fallback position of the Household.
double netIncome
 The net income of the Household.
double expectedIncome
 The expected income of the Household.
double expectedIncomeGrowthRate = 0.01d
 The growth rate of the expected income.
double expectedIncomeTrend = 0.01d
 The trend in the expected income.
double savings = 0.d
 (last period) savings
double savingsRate
 The share of unexpected income the household saves.
double money
 The Household's money holdings (excluding savings, i.e.
double moneyVariation = 0
 The variation of the Household's money holdings from one accounting step to the next.
double consumptionValue = 0
 The value of consumption.
double taxesPaid = 0
 The taxes paid.
double unemploymentIncome = 0
 The income from unemployment insurance.
double employmentIncome = 0
 The income from employment received.
double interestOnSavings = 0
 The interests received on savings.
double dividends = 0
 The dividends received from the firms the household owns.
double stock []
 Array of goods the Household owns.
final LinkedList< FirmownedFirms = new LinkedList<Firm>()
 Set of firms owned.

Static Private Attributes

static final double BELIEF_CHANGE_RATE = 0.1d
 The rate of change of beliefs on expected income of the Household.
static int nextId = 0
 The id of the household that will be initialized next.

Classes

class  Employers
 The class Employers is a wrapper for the list of Firms that are employing the Household. More...
class  FallbackComparator
 This Comparator sorts the households by increasing fallback.
class  InverseFallbackComparator
 This Comparator sorts the households by decreasing fallback.
class  Probe
 The probe class outputs information to the UI. More...
class  SavingsComparator
 This Comparator can be used to sort households in dependency of their savings.
class  Stats
class  UtilityComparator
 This Comparator compares the utility per monetary unit of consumption coefficients. More...
class  WorkAmountComparator
 This Comparator is used in Firm.hireWorkers to sort households in dependency of their work amount.


Detailed Description

The implementation of the Household.

At Construction time the Household is unemployed (i.e. the Employer is the Government).

Definition at line 56 of file Household.java.


Constructor & Destructor Documentation

Household ( Foundation  pFoundation,
HouseholdInitValues  pInitValues 
) throws ParameterParserException [package]

The Constructor for the Household agent.

Definition at line 627 of file Household.java.

00628                                        {
00629     foundation = pFoundation;
00630     initValues = pInitValues;
00631     random = Foundation.getRandomGenerator();
00632     employers = new Employers();
00633     suppliers = new Suppliers[foundation.getNumSectors()];
00634     priceVector = new double[foundation.getNumSectors()];
00635     consumptionTechnology = ConsumptionTechnologyFactory.getConsumptionTechnologyWithName(
00636                                                initValues.getConsumptionTechnologyName(),
00637                                                this, foundation.getNumSectors());
00638     consumptionTechnologyCoefficients = new double[foundation.getNumSectors()];
00639   }


Member Function Documentation

void init (  )  [package]

Initialize the Household.

Definition at line 643 of file Household.java.

Referenced by Household.init().

00643               {
00644     final int lNumSectors = foundation.getNumSectors();
00645     final double lUnemploymentRate = Foundation.getInitValues().governmentInitValues().getInitUnemploymentRate();
00646     final double lMaxNumberSuppliersRatio=0.5;
00647     
00648     for (final Sector lSector : foundation.getSectorList()) {
00649       suppliers[lSector.getArrayIndex()] = new Suppliers();
00650       suppliers[lSector.getArrayIndex()].init( foundation,this, lSector,
00651                                                lMaxNumberSuppliersRatio);
00652       consumptionTechnologyCoefficients[lSector.getArrayIndex()] =
00653           lSector.getInitConsumption() / foundation.getInitOverallConsumption();
00654     }
00655     initialConsumptionTechnologyCoefficients = ArrayTools.deepCopy(
00656                                                             consumptionTechnologyCoefficients);
00657     stock = new double[foundation.getNumSectors()];
00658     rationing =new double[foundation.getNumSectors()];
00659     
00660     // fallback is initialized uniformly  and in such a way that the share of agents with fallback above one
00661     //equals the unemployment rate.
00662     fallback=(1+lUnemploymentRate/(1-lUnemploymentRate))*random.nextDouble();
00663     //fallback=0;
00664     savings =initValues.getSavings() / foundation.getNumHouseholdsTotal();
00665     expectedIncome = Foundation.getInitValues().overallConsumption() / foundation.getNumHouseholdsTotal();
00666     setMoney(expectedIncome);
00667     // TODO v2:  this formulation would be more convenient (stf)
00668     // money = savings;
00669     // expectedIncome = savings;
00670     savingsRate = initValues.getSavingRate();
00671     // construct the MutationIntervals
00672     consumptionTechnologyMutation = new DoubleInterval[lNumSectors];
00673     for (int iSector = 0; iSector < lNumSectors; iSector++) {
00674       consumptionTechnologyMutation[iSector] = new DoubleInterval(
00675           initValues.getConsumptionTechnologyMutationMin()[iSector],
00676           initValues.getConsumptionTechnologyMutationMax()[iSector]);
00677     }
00678 
00679     probe.init();
00680     foundation.getProbeManager().addProbe(probe);
00681     stats.init(foundation.getStepManager());
00682   }

void trade (  ) 

Implementation of the exchange step for the Household.

See also the mathematical description.

Implements IBuyer.

Definition at line 690 of file Household.java.

00690                       {
00691     final double lMoneyBeforeTrade = getMoney();
00692     consumptionValue=0;
00693     assert (FloatMath.lowerOrApproxEqual(0, getMoney()));
00694 
00695     for (int iSector = 0; iSector < foundation.getNumSectors(); iSector++) {
00696       suppliers[iSector].updateSuppliers(Suppliers.SellerSet.INCLUDE_IMPORT);
00697       priceVector[iSector] = suppliers[iSector].averagePrice();
00698     }
00699 
00700     // the initial demand.
00701     double[] lDemand = calcDemand(lMoneyBeforeTrade, priceVector);
00702     //assert (FloatMath.lowerOrApproxEqual(ArrayTools.scalarArrays(lDemand,priceVector),lMoneyBeforeTrade));
00703     
00704     // In case of rationning, add suppliers 
00705     for (int iSector = 0; iSector < foundation.getNumSectors(); iSector++) {
00706       suppliers[iSector].addSuppliers(lDemand[iSector],Suppliers.SellerSet.INCLUDE_IMPORT);     
00707       priceVector[iSector] = suppliers[iSector].averagePrice();
00708       rationing[iSector]=Math.max(0,lDemand[iSector]-suppliers[iSector].maxSupply());
00709     }
00710     // recompute the demand 
00711     lDemand = calcDemand(lMoneyBeforeTrade, priceVector);
00712     
00713     // compute the total value of demand
00714     double lTotalDemandValue = ArrayTools.scalarArrays(lDemand,priceVector);
00715     if (lTotalDemandValue>0){
00716       // compute the value demanded for each good
00717       assert (FloatMath.lowerOrApproxEqual(lTotalDemandValue,lMoneyBeforeTrade));
00718       double[] lDemandValue = new double[foundation.getNumSectors()];
00719       for (int iSector = 0; iSector < foundation.getNumSectors(); iSector++) {
00720         lDemandValue[iSector]= (lDemand[iSector]*priceVector[iSector]/lTotalDemandValue)*lMoneyBeforeTrade;       
00721       // purchase the goods.
00722         final double lTradeValue = Math.min(lDemandValue[iSector], suppliers[iSector].costOfTotalStock());
00723         final double lAmount = suppliers[iSector].buyValue(lTradeValue);
00724         consumptionValue +=lTradeValue;
00725         stock[iSector] += lAmount;
00726         setMoney(getMoney() - lTradeValue);
00727       }
00728     }
00729 
00730     assert(FloatMath.greaterOrApproxZero(money));
00731   }

double [] calcDemand ( double  m,
double[]  price 
) [private]

Calculate the demand for an amount of available money and a price vector, given the current consumption technology coefficients of the Household.

See also the mathematical description.

Parameters:
m The amount of money that can be spent in the complete trade step.
p The average price of the observed suppliers for the given sector.
Returns:
The calculated demand.

Definition at line 743 of file Household.java.

Referenced by Household.trade().

00743                                                         {
00744     return calcDemand(m, price, consumptionTechnologyCoefficients);
00745   }

void adjustEmploymentStatus (  )  [package]

Implementation of the "households adjust employment status" step.

Definition at line 752 of file Household.java.

00752                                 {   
00753     //  first check the existing work contracts, find those jobs that are paid too little...
00754     final LinkedList<WorkContract> lListOfJobsToQuit = new LinkedList<WorkContract>();
00755     for (final WorkContract lExistingContract : employers)
00756     {
00757       if (!FloatMath.greaterOrApproxEqual(getEmployersWageReference(lExistingContract),
00758                                           getUnemploymentAdjustedFallback())) {
00759         lListOfJobsToQuit.add(lExistingContract);
00760       }
00761     }
00762     // ... and quit them
00763     for  (final WorkContract lJobToQuit : lListOfJobsToQuit) {
00764       quitJob(lJobToQuit);
00765     }
00766 
00767     //Then try to find new jobs
00768     final long lNumRemainingFirmsToObserve =
00769       Math.round(Math.max(1.d, initValues.getObservedEmployersQuotient() * 
00770                                                                foundation.getNumFirms()));        
00771     final LinkedList<Firm> lAllFirms = foundation.generateFirmList();
00772     for (int i = 0; i < lNumRemainingFirmsToObserve; i++) {
00773       // draw a random firm
00774       final Firm lFirm = lAllFirms.get(random.nextInt(lAllFirms.size()));
00775       // get a work contract ...
00776       final WorkContract lOffer = lFirm.constructActualWorkContract();
00777       // if the firm has a job to offer ...
00778       if (lOffer.getStatus() == WorkContract.Status.OFFERED) {
00779         // check whether it is acceptable ...
00780         final WorkContract lReply = checkWorkContractOffer(lOffer);
00781         // ... if so, accept
00782         if (lReply.getStatus() == WorkContract.Status.ACCEPTED) {
00783           lReply.getEmployer().householdAcceptWorkContract(this, lReply);
00784         }
00785       }
00786     }
00787   }

WorkContract checkWorkContractOffer ( WorkContract  pOfferedContract  )  [package]

Method to check whether the household finds a job offer acceptable.

This depends on a comparison of the household's fallback, adjusted by the unemployment rate (the more unemployment there is, the less wage the household requires to accept the job) and the firm's wage reference, that is, how well the firm pays in comparison to the benchmark wage in its sector. The work amount is adjusted during this check to the amount that the household can work out of the work amount the firm needs.

Definition at line 809 of file Household.java.

Referenced by Household.adjustEmploymentStatus(), and Firm.hireWorkers().

00809                                                                      {
00810     double lAcceptedAmount = 0.d;
00811     // check acceptability, i.e. whether the firm's wage reference is larger than 
00812     // the fallback adjusted by the current unemployment rate
00813     if (FloatMath.greaterOrApproxEqual(getEmployersWageReference(pOfferedContract),
00814                                           getUnemploymentAdjustedFallback())) {
00815       // if accepted, household offers up to its free time as work amount 
00816     lAcceptedAmount = Math.min(1.d - calcWorkAmount(), pOfferedContract.getAmount());
00817       pOfferedContract.reduceAmount(lAcceptedAmount);
00818     }
00819 
00820     // If there already exist a work contract with the firm that offers the new one,
00821     // add the current work amount to the accepted offer, else create a new contract.
00822     if (lAcceptedAmount > 0.d){
00823       final WorkContract lExisting = employers.get(pOfferedContract.getEmployer());
00824       if (lExisting != null) {
00825           lAcceptedAmount += lExisting.getAmount();
00826           removeEmployment(lExisting.getEmployer());
00827       }
00828       pOfferedContract.setAmount(lAcceptedAmount);
00829       pOfferedContract.setStatus(WorkContract.Status.ACCEPTED);
00830       addEmployment(pOfferedContract);
00831     }
00832     else {
00833       pOfferedContract.setStatus(WorkContract.Status.REJECTED);
00834     }
00835     //returns the actual contract with the work amount that firm and household agree on
00836     return pOfferedContract;
00837   }

void quitJob ( WorkContract  pWorkContract  )  [private]

The household cancels the work contract pWorkContract.

Parameters:
pWorkContract The work contract that will be canceled.

Definition at line 845 of file Household.java.

Referenced by Household.adjustEmploymentStatus().

00845                                                    {
00846     removeEmployment(pWorkContract.getEmployer());
00847     //cancel the worker form the employer's worker list
00848     pWorkContract.getEmployer().workerQuitJob(this);
00849   }

double getEmployersWageReference ( WorkContract  pWorkContract  )  [private]

The Household gets the wage reference of the employer of a proposed work contract (for comparison with the adjusted fallback in the decision whether to accept the job).

Definition at line 855 of file Household.java.

Referenced by Household.adjustEmploymentStatus(), and Household.checkWorkContractOffer().

00855                                                                        {
00856     return pWorkContract.getEmployer().getWageReference();
00857   }

void addEmployment ( WorkContract  pWorkContract  )  [package]

Add a new employer and work contract to the list of employers with respective work contracts.

Parameters:
pWorkContract The new WorkContract.

Definition at line 868 of file Household.java.

Referenced by Household.checkWorkContractOffer(), and Firm.layoffWorkers().

00868                                                  {
00869     employers.addContract(pWorkContract.getEmployer(), pWorkContract);
00870   }

void removeEmployment ( Firm  pEmployer  )  [package]

Remove employer and contract from the household's employer list.

Parameters:
pEmployer The Firm which lays off the Household.

Definition at line 878 of file Household.java.

Referenced by Household.checkWorkContractOffer(), Firm.layoffWorkers(), and Household.quitJob().

00878                                         {
00879     employers.removeContract(pEmployer);
00880   }

void consume (  )  [package]

The household consumes $ \delta_x * x $ units.

See also the mathematical description.

Definition at line 888 of file Household.java.

00888                  {
00889     final double lConsume[] = ArrayTools.multiplyArray(1, stock);
00890 
00891     // report consumption
00892     for (final Sector lSector : foundation.getSectorList()) {
00893       lSector.getProbe().reportConsumption(lConsume[lSector.getArrayIndex()]);
00894     }
00895 
00896     // remove consumption from stock
00897     stock = ArrayTools.subtractArrays(stock, lConsume);
00898   }

void account (  )  [package]

The Household's accounting method, updates money and savings considering income (see calcIncome), taxes paid, and whether money is saved or savings are turned into money depending on whether the expected income was met.

Also updates the expected income, using a fixed belief change rate and a growth rate for the expected income that depends on income growth over the last period, or, if nothing was earned, on the inflation rate.

See also the mathematical description.

Definition at line 911 of file Household.java.

00911                  {
00912     final double lTaxRate = foundation.getGovernment().getTaxRate();
00913     taxesPaid = lTaxRate * calcIncome();
00914     netIncome = calcIncome() - taxesPaid;
00915     assert (FloatMath.lowerOrApproxEqual(0, netIncome));
00916 
00917     //if the Household earned more than expected, it saves money
00918     if (netIncome > expectedIncome) {
00919       assert (FloatMath.lowerOrApproxEqual(0, netIncome));
00920       savings += savingsRate * (netIncome - expectedIncome);
00921       setMoney(getMoney() + (netIncome - savingsRate * (netIncome - expectedIncome)));
00922     } else {//otherwise it takes money out of the savings
00923       final double lWealth = getMoney() + netIncome + savings;
00924       setMoney(Math.min(expectedIncome, lWealth));
00925       savings = lWealth - getMoney();
00926     }
00927     assert (FloatMath.lowerOrApproxEqual(0, getMoney()));
00928     moneyVariation = money - stats.getLastPeriodMoney();
00929 
00930     double lOldBase= expectedIncome;
00931     double lOldTrend= expectedIncomeTrend;
00932     double lRate=initValues.getExpectedIncomeUpdateRate();
00933     expectedIncome=Math.max(0,(1-lRate)*(lOldBase+lOldTrend)+lRate*netIncome);
00934     expectedIncomeTrend=Math.max(0,(1-lRate)*lOldTrend+lRate*(expectedIncome-lOldBase));
00935 
00936   }

double calcIncome (  )  [package]

Calculate the income of this period from dividends, wage and interest on last period's savings.

Definition at line 943 of file Household.java.

Referenced by Household.account().

00943                       {
00944     final double r = foundation.getFinancial().getInterestRate();
00945     interestOnSavings = r * savings;
00946     // add wage and interest on savings
00947     double lIncome = calcCurrentWageInclUnemploymentAssurance() + interestOnSavings ;
00948     // add dividends from all firms owned
00949     dividends = 0;
00950     for (final Firm lOwnedFirm : ownedFirms) {
00951       dividends += lOwnedFirm.getDividend();
00952     }
00953     lIncome += dividends;
00954     return lIncome;
00955   }

double calcCurrentWage (  )  [package]

The current wage of the Household.

Only the wages from work contracts are taken into account.

Returns:
The current wage of the Household.

Definition at line 965 of file Household.java.

Referenced by Household.calcCurrentWageInclUnemploymentAssurance().

00965                            {
00966     return employers.calcCurrentWage();
00967   }

double calcCurrentWageInclUnemploymentAssurance (  )  [package]

The current wage of the Household, including unemployment assurance for the amount of working time the household is not employed.

Returns:
The current wage plus unemployment assurance for the amount of unemployed working time.

Definition at line 978 of file Household.java.

Referenced by Household.calcIncome().

00978                                                     {
00979     employmentIncome = calcCurrentWage();
00980     
00981     final double lUnemploymentWage = foundation.getGovernment().getUnemploymentWage();
00982     final double lWorkAmount = calcWorkAmount();
00983     //the government pays unemployment income for the amount of time that the household is not
00984     // working
00985     unemploymentIncome= (1 - lWorkAmount) * lUnemploymentWage;
00986     if (lWorkAmount > 0){
00987       assert (employmentIncome > 0);
00988     }
00989     assert ((employmentIncome + unemploymentIncome) > 0);
00990     return (employmentIncome + unemploymentIncome);
00991   }

void imitate ( double[]  observedTechnologyCoefficients  )  [package]

The household observes the consumption technology coefficients of randomly drawn other household.

The coefficients are compared by the utility they yield given the prices observed by the first household. If the utility of the observed household is higher, imitation (see Household.imitate) takes place. The household imitates consumption technology coefficients of another household by a mixture. The new coefficients are obtained by adding (ImitationFactor * the other's coefficients) to ((1-ImitationFactor) * own coefficients).

Parameters:
observedTechnologyCoefficients 

Definition at line 1043 of file Household.java.

01043                                                         {
01044     consumptionTechnologyCoefficients = ArrayTools.addArrays(
01045                 ArrayTools.multiplyArray(initValues.getImitationFactor(),
01046                                          observedTechnologyCoefficients),
01047                 ArrayTools.multiplyArray(1.d - initValues.getImitationFactor(),
01048                                          consumptionTechnologyCoefficients));
01049   }

void mutateTechnologies (  ) 

The household mutates its consumption technology coefficients.

Definition at line 1054 of file Household.java.

01054                                    {
01055     consumptionTechnologyCoefficients = consumptionTechnology.mutateCoefficients(
01056                                     consumptionTechnologyMutation, foundation.getNumSectors());
01057   }

double [] calcDemand ( double  m,
double[]  price,
double[]  pConsumptionTechnologyCoefficients 
)

Calculate the demand for an amount of money available, a price vector, and consumption technology coefficients.

Parameters:
m The amount of money that can be spent in the complete trade step.
price Vector with a price for each sector.
pConsumptionTechnologyCoefficients The consumption technology used.

Definition at line 1068 of file Household.java.

01069                                                                           {
01070     final int lNumSectors = foundation.getNumSectors();
01071     final double[] lDemand = new double[lNumSectors];
01072 
01073     //The household allocates the fraction of money given by the coefficient of a sector to 
01074     //that sector. Demand for that sector is then the amount that can be bought with that 
01075     //fraction of the money at the price of that sector (given by the price vector)   
01076     for (int iSector = 0; iSector < lNumSectors; iSector++) {
01077       lDemand[iSector] = m * pConsumptionTechnologyCoefficients[iSector] / price[iSector];
01078     }
01079 
01080     return lDemand;
01081   }

void addFirmToProperty ( Firm  pFirm  )  [package]

Add a firm to the list of firms that are owned by the household.

Parameters:
pFirm A new firm that is owned by the household.

Definition at line 1090 of file Household.java.

Referenced by Sector.addFirm(), and Sector.createNextFirmGeneration().

01090                                      {
01091     ownedFirms.add(pFirm);
01092     pFirm.setOwner(this);
01093   }

void transferSavingsToFirmAndSetProduction ( Firm  pFirm  )  [package]

Transfer the savings (or part of the savings) of the household to a firm it owns.

Parameters:
pFirm A firm that should get the savings.

Definition at line 1101 of file Household.java.

Referenced by Sector.addFirm().

01101                                                          {
01102     final double lProduction = pFirm.getDesiredProduction();
01103     final double lSavings = savings;
01104     final double lTargetInvestment = pFirm.calcNeededMoneyForProduction(lProduction);
01105     final double lInvestment = Math.min(lTargetInvestment, lSavings);
01106     savings -= lInvestment;
01107     pFirm.setMoney(lInvestment);
01108     pFirm.setDesiredProduction((lInvestment/lTargetInvestment) * lProduction);
01109     foundation.getFinancial().setSavingsInvested(
01110                               foundation.getFinancial().getSavingsInvested() + lInvestment);
01111     //assert (foundation.getFinancial().getSavingsInvested() > 0);
01112   }

void removeFirmFromProperty ( Firm  pFirm  )  [package]

Remove a firm from the list of firms that are owned by the household.

Parameters:
pFirm The firm that will be removed from the list of firms owned.

Definition at line 1120 of file Household.java.

01120                                           {
01121     ownedFirms.remove(pFirm);
01122     pFirm.setOwner(null);
01123   }

double calcWorkAmount (  )  [package]

The sum of work amount over all work contracts of this Household.

Returns:
The accumulated work amount, as a fraction of the maximal possible work amount. So 0 means the Household is unemployed, and 1 means the Household is fully employed.

Definition at line 1135 of file Household.java.

Referenced by Household.calcCurrentWageInclUnemploymentAssurance(), Household.checkWorkContractOffer(), and Household.isEmployed().

01135                           {
01136     return employers.getWorkAmount();
01137   }

boolean isEmployed (  ) 

Check whether the household works.

Definition at line 1140 of file Household.java.

01140                               {
01141     return (calcWorkAmount() > 0.d);
01142   }

static void resetId (  )  [static]

Called before the model is initialized.

Definition at line 1145 of file Household.java.

01145                                {
01146     nextId = 0;
01147   }


Member Data Documentation

final double BELIEF_CHANGE_RATE = 0.1d [static, private]

The rate of change of beliefs on expected income of the Household.

Definition at line 58 of file Household.java.

final HouseholdInitValues initValues [private]

The initialization values of the Households.

Definition at line 450 of file Household.java.

Referenced by Household.account(), Household.adjustEmploymentStatus(), Household.imitate(), and Household.init().

final Employers employers [private]

The list of Firms that are employing the Household (wrapped in a helper class).

Definition at line 456 of file Household.java.

Referenced by Household.addEmployment(), Household.adjustEmploymentStatus(), Household.calcCurrentWage(), Household.calcWorkAmount(), Household.checkWorkContractOffer(), and Household.removeEmployment().

double fallback [private]

The fallback position of the Household.

This number, adjusted by the unemployment rate, is compared to the firm's wage reference in order to decide whether to accept a work contract offer. The initial value is drawn uniformly in the interval [0,1].

Definition at line 466 of file Household.java.

Referenced by Household.init().

double netIncome [private]

The net income of the Household.

Definition at line 473 of file Household.java.

Referenced by Household.account().

double expectedIncome [private]

The expected income of the Household.

Definition at line 479 of file Household.java.

Referenced by Household.account(), and Household.init().

double expectedIncomeGrowthRate = 0.01d [private]

The growth rate of the expected income.

Definition at line 485 of file Household.java.

double expectedIncomeTrend = 0.01d [private]

The trend in the expected income.

Definition at line 489 of file Household.java.

Referenced by Household.account().

double savings = 0.d [private]

(last period) savings

Definition at line 496 of file Household.java.

Referenced by Household.account(), Household.calcIncome(), Household.init(), and Household.transferSavingsToFirmAndSetProduction().

double savingsRate [private]

The share of unexpected income the household saves.

Definition at line 503 of file Household.java.

Referenced by Household.account(), and Household.init().

double money [private]

The Household's money holdings (excluding savings, i.e.

money is cash).

Definition at line 510 of file Household.java.

Referenced by Household.account(), and Household.trade().

double moneyVariation = 0 [private]

The variation of the Household's money holdings from one accounting step to the next.

Definition at line 518 of file Household.java.

Referenced by Household.account().

double consumptionValue = 0 [private]

The value of consumption.

Definition at line 525 of file Household.java.

Referenced by Household.trade().

double taxesPaid = 0 [private]

The taxes paid.

Definition at line 532 of file Household.java.

Referenced by Household.account().

double unemploymentIncome = 0 [private]

The income from unemployment insurance.

Definition at line 540 of file Household.java.

Referenced by Household.calcCurrentWageInclUnemploymentAssurance().

double employmentIncome = 0 [private]

The income from employment received.

Definition at line 547 of file Household.java.

Referenced by Household.calcCurrentWageInclUnemploymentAssurance().

double interestOnSavings = 0 [private]

The interests received on savings.

Definition at line 554 of file Household.java.

Referenced by Household.calcIncome().

double dividends = 0 [private]

The dividends received from the firms the household owns.

Definition at line 561 of file Household.java.

Referenced by Household.calcIncome().

double stock[] [private]

Array of goods the Household owns.

Definition at line 568 of file Household.java.

Referenced by Household.consume(), Household.init(), and Household.trade().

int nextId = 0 [static, private]

The id of the household that will be initialized next.

Definition at line 571 of file Household.java.

Referenced by Household.resetId().

final LinkedList<Firm> ownedFirms = new LinkedList<Firm>() [private]

Set of firms owned.

Definition at line 582 of file Household.java.

Referenced by Household.addFirmToProperty(), Household.calcIncome(), and Household.removeFirmFromProperty().


The documentation for this class was generated from the following file:
Generated on Tue Sep 14 11:11:49 2010 for lagom_generiC by  doxygen 1.5.4