public class ProducerHHImpl extends AbstractHH implements ProducerHH
Constructor and Description |
---|
ProducerHHImpl(repast.simphony.context.Context theContext,
Selling mySellingDecision,
GlobSpace theGlobSpace) |
Modifier and Type | Method and Description |
---|---|
void |
addCow()
creates a new cow for entries
|
void |
ageYourAnimals()
ages the herd and transforms calves into bulls or cows
|
void |
birthYourAnimalsBrand(double yearlyLwg)
calculates the new population of heifers (>1 year) in every year based on the branding rate and cows of last year
|
void |
dieYourAnimals(double yearlyLwg)
causes the death of animals based on yearly % mortality
|
EntryAble |
exit()
exit method.
|
double |
getAgriRev()
returns the average monthly agricultural profit
|
java.util.Collection<? extends Animal> |
getAnimals() |
double |
getConditionalCooperation()
Returns individual conditional cooperativeness
|
double |
getHerdSize() |
double |
getId() |
double |
getNonAgriIncMemb() |
int |
getSellingType() |
double |
getValueOfHerd()
returns the monetary value of the herd
|
void |
hhBalanceSimple()
computes monthly savings of HH
|
void |
informLwg(double lwg)
increases monthly live-weight gain of individual herds
|
void |
iniWithFileData(java.util.HashMap<java.lang.String,java.lang.Double> attributes)
initializes all HH with data from input files where they are not specific to the HH type
|
boolean |
isExit()
checker for exiting producers
|
java.util.ArrayList<Animal> |
sellIndividual()
Individual selling of animals (no norm)
|
java.util.ArrayList<Animal> |
sellNorm()
Selling triggerd by the norm
|
void |
storeInvestmentCosts()
stores investment costs for new entries into livestock production for calculating profits
|
void |
updateCooperation(double groupRepuation,
double severity)
updates individual cooperativeness
|
getAccSavingsMemb, getIniCoop, getSavings, hhBalanceTypes, iniCooperator, iniWithOtherHHData, isCooperator, isDefector, resetAccSavings, setCooperator, setDefector
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hhBalanceTypes, iniCooperator, iniWithOtherHHData, isCooperator, isDefector, resetAccSavings, setCooperator, setDefector
public void iniWithFileData(java.util.HashMap<java.lang.String,java.lang.Double> attributes)
SimpleHH
iniWithFileData
in interface SimpleHH
iniWithFileData
in class AbstractHH
public void informLwg(double lwg)
ProducerHH
informLwg
in interface ProducerHH
public void ageYourAnimals()
ProducerHH
ageYourAnimals
in interface ProducerHH
public void birthYourAnimalsBrand(double yearlyLwg)
ProducerHH
birthYourAnimalsBrand
in interface ProducerHH
public void dieYourAnimals(double yearlyLwg)
ProducerHH
dieYourAnimals
in interface ProducerHH
public java.util.ArrayList<Animal> sellIndividual()
ProducerHH
sellIndividual
in interface ProducerHH
public java.util.ArrayList<Animal> sellNorm()
ProducerHH
sellNorm
in interface ProducerHH
public boolean isExit()
ProducerHH
isExit
in interface ProducerHH
public EntryAble exit()
ProducerHH
exit
in interface ProducerHH
public void hhBalanceSimple()
SimpleHH
hhBalanceSimple
in interface SimpleHH
hhBalanceSimple
in class AbstractHH
public void updateCooperation(double groupRepuation, double severity)
ProducerHH
updateCooperation
in interface ProducerHH
groupRepuation
- level of norm followersseverity
- degree of norm violationspublic double getConditionalCooperation()
ProducerHH
getConditionalCooperation
in interface ProducerHH
public double getValueOfHerd()
ProducerHH
getValueOfHerd
in interface ProducerHH
public void addCow()
addCow
in interface ProducerHH
public void storeInvestmentCosts()
ProducerHH
storeInvestmentCosts
in interface ProducerHH
public double getId()
public java.util.Collection<? extends Animal> getAnimals()
getAnimals
in interface ProducerHH
public double getHerdSize()
getHerdSize
in interface ProducerHH
public double getAgriRev()
ProducerHH
getAgriRev
in interface ProducerHH
public double getNonAgriIncMemb()
public int getSellingType()