|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.simulation.person.ai.task.Task
org.mars_sim.msp.simulation.person.ai.task.UnloadVehicle
public class UnloadVehicle
The UnloadVehicle class is a task for unloading a fuel and supplies from a vehicle.
Field Summary |
---|
Fields inherited from class org.mars_sim.msp.simulation.person.ai.task.Task |
---|
effortDriven, hasDuration, person, phaseTimeCompleted, phaseTimeRequired, stressModifier, subTask, TASK_DESC_EVENT, TASK_ENDED_EVENT, TASK_NAME_EVENT, TASK_PHASE_EVENT, TASK_SUBTASK_EVENT |
Constructor Summary | |
---|---|
UnloadVehicle(Person person)
Constructor |
|
UnloadVehicle(Person person,
Vehicle vehicle)
Constructor |
Method Summary | |
---|---|
protected void |
addExperience(double time)
Adds experience to the person's skills used in this task. |
java.util.List<java.lang.String> |
getAssociatedSkills()
Gets a list of the skills associated with this task. |
int |
getEffectiveSkillLevel()
Gets the effective skill level a person has at this task. |
static double |
getProbability(Person person)
Returns the weighted probability that a person might perform this task. |
static boolean |
isFullyUnloaded(Vehicle vehicle)
Returns true if the vehicle is fully unloaded. |
protected double |
performMappedPhase(double time)
Performs the method mapped to the task's current phase. |
protected double |
unloadingPhase(double time)
Perform the unloading phase of the task. |
Methods inherited from class org.mars_sim.msp.simulation.person.ai.task.Task |
---|
addPhase, compareTo, endTask, getCreateEvents, getCrowdingProbabilityModifier, getDescription, getDuration, getName, getPhase, getRelationshipModifier, getSubTask, getTeacher, getTeachingExperienceModifier, getTimeCompleted, getTopPhase, hasTeacher, isDone, isEffortDriven, setCreateEvents, setDescription, setDuration, setName, setPhase, setStressModifier, setTeacher, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UnloadVehicle(Person person) throws java.lang.Exception
person
- the person to perform the task.
java.lang.Exception
- if error constructing task.public UnloadVehicle(Person person, Vehicle vehicle) throws java.lang.Exception
person
- the person to perform the taskvehicle
- the vehicle to be unloaded
java.lang.Exception
- if error constructing task.Method Detail |
---|
public static double getProbability(Person person)
person
- the person to perform the task
protected double performMappedPhase(double time) throws java.lang.Exception
performMappedPhase
in class Task
time
- the amount of time (millisol) the phase is to be performed.
java.lang.Exception
- if error in performing phase or if phase cannot be found.protected double unloadingPhase(double time) throws java.lang.Exception
time
- the amount of time (millisol) to perform the phase.
java.lang.Exception
- if error in loading phase.protected void addExperience(double time)
addExperience
in class Task
time
- the amount of time (ms) the person performed this task.public static boolean isFullyUnloaded(Vehicle vehicle) throws InventoryException
vehicle
- Vehicle to check.
InventoryException
- if error checking vehicle.public int getEffectiveSkillLevel()
getEffectiveSkillLevel
in class Task
public java.util.List<java.lang.String> getAssociatedSkills()
getAssociatedSkills
in class Task
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |