|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.simulation.person.PhysicalCondition
public class PhysicalCondition
This class represents the Physical Condition of a Person. It models the Persons health and physical characteristics.
Field Summary | |
---|---|
static double |
ACCIDENT_STRESS
|
static java.lang.String |
DEATH_EVENT
|
static java.lang.String |
FATIGUE_EVENT
|
static java.lang.String |
HUNGER_EVENT
|
static java.lang.String |
ILLNESS_EVENT
|
static java.lang.String |
PERFORMANCE_EVENT
|
static java.lang.String |
STRESS_EVENT
|
Constructor Summary | |
---|---|
PhysicalCondition(Person newPerson)
Constructor |
Method Summary | |
---|---|
void |
addMedicalComplaint(Complaint complaint)
Adds a new medical complaint to the person. |
void |
consumeFood(double amount)
Person consumes a given amount of food not taken from local container. |
void |
consumeFood(double amount,
Unit container)
Person consumes given amount of food |
DeathInfo |
getDeathDetails()
Get the details of this Person's death. |
double |
getFatigue()
Gets the person's fatigue level |
static double |
getFoodConsumptionRate()
Gets the food consumption rate per Sol. |
java.lang.String |
getHealthSituation()
Get a string description of the most serious health situation. |
double |
getHunger()
Gets the person's hunger level |
Complaint |
getMostSerious()
Gets the most serious illness. |
static double |
getOxygenConsumptionRate()
Gets the oxygen consumption rate per Sol. |
double |
getPerformanceFactor()
Get the performance factor that effect Person with the complaint. |
java.util.Collection<HealthProblem> |
getProblems()
The collection of known Medical Problems. |
double |
getStress()
Gets the person's stress level |
static double |
getWaterConsumptionRate()
Gets the water consumption rate per Sol. |
boolean |
hasSeriousMedicalProblems()
Checks if the person has any serious medical problems. |
boolean |
isDead()
Checks if the person is dead. |
void |
setDead(HealthProblem illness)
This Person is now dead. |
void |
setFatigue(double newFatigue)
Define the fatigue setting for this person |
void |
setHunger(double newHunger)
Define the hunger setting for this person |
void |
setStress(double newStress)
Sets the person's stress level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FATIGUE_EVENT
public static final java.lang.String HUNGER_EVENT
public static final java.lang.String STRESS_EVENT
public static final java.lang.String PERFORMANCE_EVENT
public static final java.lang.String ILLNESS_EVENT
public static final java.lang.String DEATH_EVENT
public static final double ACCIDENT_STRESS
Constructor Detail |
---|
public PhysicalCondition(Person newPerson)
newPerson
- The person requiring a physical presence.Method Detail |
---|
public void addMedicalComplaint(Complaint complaint)
complaint
- the new medical complaintpublic void consumeFood(double amount, Unit container) throws java.lang.Exception
amount
- amount of food to consume (in kg).container
- unit to get food from
java.lang.Exception
- if error consuming food.public void consumeFood(double amount)
amount
- the amount of food to consume (in kg).public DeathInfo getDeathDetails()
public double getFatigue()
public double getPerformanceFactor()
public void setFatigue(double newFatigue)
newFatigue
- New fatigue.public double getHunger()
public void setHunger(double newHunger)
newHunger
- New hunger.public double getStress()
public void setStress(double newStress)
newStress
- the new stress level (0.0 to 100.0)public void setDead(HealthProblem illness)
illness
- THe Compliant that makes person dead.public boolean isDead()
public java.lang.String getHealthSituation()
public Complaint getMostSerious()
public java.util.Collection<HealthProblem> getProblems()
public boolean hasSeriousMedicalProblems()
public static double getOxygenConsumptionRate() throws java.lang.Exception
java.lang.Exception
- if error in configuration.public static double getWaterConsumptionRate() throws java.lang.Exception
java.lang.Exception
- if error in configuration.public static double getFoodConsumptionRate() throws java.lang.Exception
java.lang.Exception
- if error in configuration.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |