org.mars_sim.msp.core.person.ai.task
Class BiologyStudyFieldWork

java.lang.Object
  extended by org.mars_sim.msp.core.person.ai.task.Task
      extended by org.mars_sim.msp.core.person.ai.task.EVAOperation
          extended by org.mars_sim.msp.core.person.ai.task.BiologyStudyFieldWork
All Implemented Interfaces:
Serializable, Comparable<Task>

public class BiologyStudyFieldWork
extends EVAOperation
implements Serializable

A task for the EVA operation of performing biology field work at a research site for a scientific study.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mars_sim.msp.core.person.ai.task.EVAOperation
BASE_ACCIDENT_CHANCE, containerUnit, ENTER_AIRLOCK, enteredAirlock, EXIT_AIRLOCK, exitedAirlock
 
Fields inherited from class org.mars_sim.msp.core.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
BiologyStudyFieldWork(Person person, Person leadResearcher, ScientificStudy study, Rover rover)
          Constructor
 
Method Summary
protected  void addExperience(double time)
          Adds experience to the person's skills used in this task.
static boolean canResearchSite(Person person, Rover rover)
          Checks if a person can research a site.
 void destroy()
          Prepare object for garbage collection.
 List<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.
protected  double performMappedPhase(double time)
          Performs the method mapped to the task's current phase.
 
Methods inherited from class org.mars_sim.msp.core.person.ai.task.EVAOperation
checkForAccident, endEVA, enterAirlock, exitAirlock, getAvailableAirlock, shouldEndEVAOperation
 
Methods inherited from class org.mars_sim.msp.core.person.ai.task.Task
addPhase, compareTo, endTask, getCreateEvents, getCrowdingProbabilityModifier, getDescription, getDuration, getName, getPhase, getProbability, 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

BiologyStudyFieldWork

public BiologyStudyFieldWork(Person person,
                             Person leadResearcher,
                             ScientificStudy study,
                             Rover rover)
Constructor

Parameters:
person - the person performing the task.
leadResearcher - the researcher leading the field work.
study - the scientific study the field work is for.
rover - the rover
Throws:
Exception - if error creating task.
Method Detail

canResearchSite

public static boolean canResearchSite(Person person,
                                      Rover rover)
Checks if a person can research a site.

Parameters:
person - the person
rover - the rover
Returns:
true if person can research a site.

addExperience

protected void addExperience(double time)
Description copied from class: Task
Adds experience to the person's skills used in this task.

Specified by:
addExperience in class Task
Parameters:
time - the amount of time (ms) the person performed this task.

getAssociatedSkills

public List<String> getAssociatedSkills()
Description copied from class: Task
Gets a list of the skills associated with this task. May be empty list if no associated skills.

Specified by:
getAssociatedSkills in class Task
Returns:
list of skills as strings

getEffectiveSkillLevel

public int getEffectiveSkillLevel()
Description copied from class: Task
Gets the effective skill level a person has at this task.

Specified by:
getEffectiveSkillLevel in class Task
Returns:
effective skill level

performMappedPhase

protected double performMappedPhase(double time)
Description copied from class: Task
Performs the method mapped to the task's current phase.

Specified by:
performMappedPhase in class Task
Parameters:
time - the amount of time (millisol) the phase is to be performed.
Returns:
the remaining time (millisol) after the phase has been performed.

destroy

public void destroy()
Description copied from class: Task
Prepare object for garbage collection.

Overrides:
destroy in class EVAOperation


Copyright © 2009-2013. All Rights Reserved.