|
||||||||||
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.MedicalCare
public class MedicalCare
The MedicalCare class represents a building function for providing medical care.
Field Summary | |
---|---|
static java.lang.String |
NAME
|
Constructor Summary | |
---|---|
MedicalCare(Building building)
Constructor |
Method Summary | |
---|---|
boolean |
canTreatProblem(HealthProblem problem)
Checks if a health problem can be treated at this medical aid. |
double |
getFullPowerRequired()
Gets the amount of power required when function is at full power. |
int |
getPatientNum()
Gets the current number of people being treated here. |
java.util.Collection |
getPatients()
Gets the patients at this medical station. |
int |
getPhysicianNum()
Gets the number of people using this medical aid to treat sick people. |
double |
getPowerDownPowerRequired()
Gets the amount of power required when function is at power down level. |
java.util.List |
getProblemsAwaitingTreatment()
Gets the health problems awaiting treatment at the medical station. |
java.util.List |
getProblemsBeingTreated()
Gets the health problems currently being treated at the medical station. |
int |
getSickBedNum()
Gets the number of sick beds. |
java.util.List |
getSupportedTreatments()
Get a list of supported Treatments at this medical aid. |
int |
getTechLevel()
Gets the treatment level. |
void |
requestTreatment(HealthProblem problem)
Add a health problem to the queue of problems awaiting treatment at this medical aid. |
void |
startTreatment(HealthProblem problem,
double treatmentDuration)
Starts the treatment of a health problem in the waiting queue. |
void |
stopTreatment(HealthProblem problem)
Stop a previously started treatment. |
void |
timePassing(double time)
Time passing for the building. |
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 java.lang.String NAME
Constructor Detail |
---|
public MedicalCare(Building building) throws BuildingException
building
- the building this function is for.
BuildingException
- if function could not be constructed.Method Detail |
---|
public int getSickBedNum()
public int getPatientNum()
public java.util.Collection getPatients()
public int getPhysicianNum()
public java.util.List getProblemsAwaitingTreatment()
getProblemsAwaitingTreatment
in interface MedicalAid
public java.util.List getProblemsBeingTreated()
getProblemsBeingTreated
in interface MedicalAid
public java.util.List getSupportedTreatments()
getSupportedTreatments
in interface MedicalAid
public boolean canTreatProblem(HealthProblem problem)
canTreatProblem
in interface MedicalAid
problem
- The health problem to check treatment.
public void requestTreatment(HealthProblem problem) throws java.lang.Exception
requestTreatment
in interface MedicalAid
problem
- The health problem to await treatment.
java.lang.Exception
- if health problem cannot be treated here.public void startTreatment(HealthProblem problem, double treatmentDuration) throws java.lang.Exception
startTreatment
in interface MedicalAid
problem
- the health problem to start treating.treatmentDuration
- the time required to perform the treatment.
java.lang.Exception
- if treatment cannot be started.public void stopTreatment(HealthProblem problem) throws java.lang.Exception
stopTreatment
in interface MedicalAid
problem
- Health problem stopping treatment on.
java.lang.Exception
- if health problem is not being treated.public void timePassing(double time) throws BuildingException
timePassing
in class Function
time
- amount of time passing (in millisols)
BuildingException
- if error occurs.public double getFullPowerRequired()
getFullPowerRequired
in class Function
public double getPowerDownPowerRequired()
getPowerDownPowerRequired
in class Function
public int getTechLevel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |