|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.simulation.malfunction.Malfunction
public class Malfunction
The Malfunction class represents a malfunction in a vehicle, structure or equipment.
Constructor Summary | |
---|---|
Malfunction(java.lang.String name,
int severity,
double probability,
double emergencyWorkTime,
double workTime,
double EVAWorkTime,
java.util.Collection<java.lang.String> scope,
java.util.Map<AmountResource,java.lang.Double> resourceEffects,
java.util.Map<java.lang.String,java.lang.Double> lifeSupportEffects,
java.util.Map<java.lang.String,java.lang.Double> medicalComplaints)
Constructs a Malfunction object |
Method Summary | |
---|---|
double |
addEmergencyWorkTime(double time)
Adds emergency work time to the malfunction. |
double |
addEVAWorkTime(double time)
Adds EVA work time to the malfunction. |
double |
addWorkTime(double time)
Adds work time to the malfunction. |
Malfunction |
getClone()
Gets a clone of this malfunction. |
double |
getCompletedEmergencyWorkTime()
Returns the completed emergency work time. |
double |
getCompletedEVAWorkTime()
Returns the completed EVA work time. |
double |
getCompletedWorkTime()
Returns the completed work time. |
double |
getEmergencyWorkTime()
Returns the emergency work time required to repair the malfunction. |
double |
getEVAWorkTime()
Returns the EVA work time required to repair the malfunction. |
java.util.Map<java.lang.String,java.lang.Double> |
getLifeSupportEffects()
Gets the life support effects of the malfunction. |
java.util.Map<java.lang.String,java.lang.Double> |
getMedicalComplaints()
Gets the medical complaints produced by this malfunction and their probability of occuring. |
java.lang.String |
getName()
Returns the name of the malfunction. |
double |
getProbability()
Returns the probability of this malfunction occuring. |
java.util.Map<Part,java.lang.Integer> |
getRepairParts()
Gets the parts required to repair this malfunction. |
java.util.Map<AmountResource,java.lang.Double> |
getResourceEffects()
Gets the resource effects of the malfunction. |
int |
getSeverity()
Returns the severity level of the malfunction. |
double |
getWorkTime()
Returns the work time required to repair the malfunction. |
boolean |
isFixed()
Returns true if malfunction is fixed. |
void |
repairWithParts(Part part,
int number)
Repairs the malfunction with a number of a part. |
java.lang.String |
toString()
Gets the string value for the object. |
boolean |
unitScopeMatch(java.util.Collection<java.lang.String> unitScope)
Checks if a unit's scope strings have any matches with the malfunction's scope strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Malfunction(java.lang.String name, int severity, double probability, double emergencyWorkTime, double workTime, double EVAWorkTime, java.util.Collection<java.lang.String> scope, java.util.Map<AmountResource,java.lang.Double> resourceEffects, java.util.Map<java.lang.String,java.lang.Double> lifeSupportEffects, java.util.Map<java.lang.String,java.lang.Double> medicalComplaints)
name
- name of the malfunctionMethod Detail |
---|
public java.lang.String getName()
public boolean isFixed()
public int getSeverity()
public double getProbability()
public double getWorkTime()
public double getCompletedWorkTime()
public double addWorkTime(double time)
time
- work time (in millisols)
public double getEmergencyWorkTime()
public double getCompletedEmergencyWorkTime()
public double addEmergencyWorkTime(double time)
time
- emergency work time (in millisols)
public double getEVAWorkTime()
public double getCompletedEVAWorkTime()
public double addEVAWorkTime(double time)
time
- EVA work time (in millisols)
public boolean unitScopeMatch(java.util.Collection<java.lang.String> unitScope)
public java.util.Map<AmountResource,java.lang.Double> getResourceEffects()
public java.util.Map<java.lang.String,java.lang.Double> getLifeSupportEffects()
public java.util.Map<java.lang.String,java.lang.Double> getMedicalComplaints()
public Malfunction getClone()
public java.util.Map<Part,java.lang.Integer> getRepairParts()
public void repairWithParts(Part part, int number)
part
- the part.number
- the number used for repair.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |