|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.simulation.malfunction.MalfunctionManager
public class MalfunctionManager
The MalfunctionManager class manages the current malfunctions in a unit.
| Field Summary | |
|---|---|
static java.lang.String |
MALFUNCTION_EVENT
|
| Constructor Summary | |
|---|---|
MalfunctionManager(Malfunctionable entity)
Constructor |
|
| Method Summary | |
|---|---|
void |
accident()
Called when the unit has an accident. |
void |
activeTimePassing(double time)
Time passing while the unit is being actively used. |
void |
addMaintenanceWorkTime(double time)
Add work time to maintenance. |
void |
addScopeString(java.lang.String scopeString)
Add a unit scope string to the manager. |
void |
depleteResources(double time)
Depletes resources due to malfunctions. |
double |
getAirPressureModifier()
Gets the air flow modifier. |
double |
getEffectiveTimeSinceLastMaintenance()
Gets the time the entity has been actively used since its last maintenance. |
double |
getEstimatedNumberOfMaintenancesPerOrbit()
Gets the estimated number of periodic maintenances this entity will have in one Martian orbit. |
double |
getEstimatedNumberOfMalfunctionsPerOrbit()
Gets the estimated number of malfunctions this entity will have in one Martian orbit. |
java.util.List<Malfunction> |
getEVAMalfunctions()
Gets a list of all EVA malfunctions sorted by highest severity first. |
java.util.Map<Part,java.lang.Double> |
getMaintenancePartProbabilities()
|
java.util.Map<Part,java.lang.Integer> |
getMaintenanceParts()
Gets the parts needed for maintenance on this entity. |
double |
getMaintenanceWorkTime()
Gets the required work time for maintenance for the entity. |
double |
getMaintenanceWorkTimeCompleted()
Gets the work time completed on maintenance. |
java.util.List<Malfunction> |
getMalfunctions()
Gets a list of the unit's current malfunctions. |
Malfunction |
getMostSeriousEmergencyMalfunction()
Gets the most serious emergency malfunction the entity has. |
Malfunction |
getMostSeriousEVAMalfunction()
Gets the most serious EVA malfunction the entity has. |
Malfunction |
getMostSeriousMalfunction()
Gets the most serious malfunction the entity has. |
Malfunction |
getMostSeriousNormalMalfunction()
Gets the most serious normal malfunction the entity has. |
java.util.List<Malfunction> |
getNormalMalfunctions()
Gets a list of all normal malfunctions sorted by highest severity first. |
double |
getOxygenFlowModifier()
Gets the oxygen flow modifier. |
java.util.Map<Part,java.lang.Double> |
getRepairPartProbabilities()
Gets off of the repair part probabilities for the malfunctionable. |
double |
getTemperatureModifier()
Gets the temperature modifier. |
double |
getTimeSinceLastMaintenance()
Gets the time since last maintenance on entity. |
double |
getWaterFlowModifier()
Gets the water flow modifier. |
boolean |
hasEmergencyMalfunction()
Checks if entity has any emergency malfunctions. |
boolean |
hasEVAMalfunction()
Checks if entity has any EVA malfunctions. |
boolean |
hasMalfunction()
Checks if entity has a malfunction. |
boolean |
hasMalfunction(Malfunction malfunction)
Checks if the entity has a given malfunction. |
boolean |
hasNormalMalfunction()
Checks if entity has any normal malfunctions. |
void |
issueMedicalComplaints(Malfunction malfunction)
Issues any necessary medical complaints. |
void |
maintainWithParts(Part part,
int number)
Adds a number of a part to the entity for maintenance. |
void |
setLifeSupportModifiers(double time)
Determine life support modifiers for given time. |
void |
setMaintenanceWorkTime(double maintenanceWorkTime)
Sets the required work time for maintenance for the entity. |
void |
timePassing(double time)
Time passing for unit. |
| 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 MALFUNCTION_EVENT
| Constructor Detail |
|---|
public MalfunctionManager(Malfunctionable entity)
entity - the malfunctionable entity.| Method Detail |
|---|
public void addScopeString(java.lang.String scopeString)
scopeString - a unit scope stringpublic boolean hasMalfunction()
public boolean hasMalfunction(Malfunction malfunction)
public boolean hasEmergencyMalfunction()
public boolean hasNormalMalfunction()
public boolean hasEVAMalfunction()
public java.util.List<Malfunction> getMalfunctions()
public Malfunction getMostSeriousMalfunction()
public Malfunction getMostSeriousEmergencyMalfunction()
public Malfunction getMostSeriousNormalMalfunction()
public java.util.List<Malfunction> getNormalMalfunctions()
public Malfunction getMostSeriousEVAMalfunction()
public java.util.List<Malfunction> getEVAMalfunctions()
public void activeTimePassing(double time)
time - amount of time passing (in millisols)public void timePassing(double time)
time - amount of time passing (in millisols)public void setLifeSupportModifiers(double time)
time - amount of time passing (in millisols)
public void depleteResources(double time)
throws java.lang.Exception
time - amount of time passing (in millisols)
java.lang.Exception - if error depleting resources.public void accident()
public double getTimeSinceLastMaintenance()
public double getEffectiveTimeSinceLastMaintenance()
public double getMaintenanceWorkTime()
public void setMaintenanceWorkTime(double maintenanceWorkTime)
maintenanceWorkTime - (in millisols)public double getMaintenanceWorkTimeCompleted()
public void addMaintenanceWorkTime(double time)
time - (in millisols)public void issueMedicalComplaints(Malfunction malfunction)
malfunction - the new malfunctionpublic double getOxygenFlowModifier()
public double getWaterFlowModifier()
public double getAirPressureModifier()
public double getTemperatureModifier()
public java.util.Map<Part,java.lang.Integer> getMaintenanceParts()
public void maintainWithParts(Part part,
int number)
part - the part.number - the number used.
public java.util.Map<Part,java.lang.Double> getRepairPartProbabilities()
throws java.lang.Exception
java.lang.Exception - if error finding probabilities.
public java.util.Map<Part,java.lang.Double> getMaintenancePartProbabilities()
throws java.lang.Exception
java.lang.Exceptionpublic double getEstimatedNumberOfMalfunctionsPerOrbit()
public double getEstimatedNumberOfMaintenancesPerOrbit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||