|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.simulation.structure.building.function.Function
org.mars_sim.msp.simulation.structure.building.function.LivingAccommodations
public class LivingAccommodations
The LivingAccommodations class is a building function for a living accommodations.
| Field Summary | |
|---|---|
static java.lang.String |
NAME
|
static double |
WASH_WATER_USAGE_PERSON_SOL
|
| Constructor Summary | |
|---|---|
LivingAccommodations(Building building)
Constructor |
|
| Method Summary | |
|---|---|
void |
addSleeper()
Adds a sleeper to a bed. |
int |
getBeds()
Gets the number of beds in the living accommodations. |
double |
getFullPowerRequired()
Gets the amount of power required when function is at full power. |
double |
getPowerDownPowerRequired()
Gets the amount of power required when function is at power down level. |
int |
getSleepers()
Gets the number of people sleeping in the beds. |
void |
removeSleeper()
Removes a sleeper from a bed. |
void |
timePassing(double time)
Time passing for the building. |
void |
waterUsage(double time)
Utilizes water for bathing, washing, etc based on population. |
| Methods inherited from class org.mars_sim.msp.simulation.structure.building.function.Function |
|---|
getBuilding, getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double WASH_WATER_USAGE_PERSON_SOL
public static final java.lang.String NAME
| Constructor Detail |
|---|
public LivingAccommodations(Building building)
throws BuildingException
building - the building this function is for.
BuildingException - if error in constructing function.| Method Detail |
|---|
public int getBeds()
public int getSleepers()
public void addSleeper()
throws BuildingException
BuildingException - if beds are already in use.
public void removeSleeper()
throws BuildingException
BuildingException - if no sleepers to remove.
public void waterUsage(double time)
throws java.lang.Exception
time - amount of time passing (millisols)
java.lang.Exception - if error in water usage.
public void timePassing(double time)
throws BuildingException
timePassing in class Functiontime - amount of time passing (in millisols)
BuildingException - if error occurs.public double getFullPowerRequired()
getFullPowerRequired in class Functionpublic double getPowerDownPowerRequired()
getPowerDownPowerRequired in class Function
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||