|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.core.person.ai.mission.Mission
org.mars_sim.msp.core.person.ai.mission.BuildingConstructionMission
public class BuildingConstructionMission
Mission for construction a stage for a settlement building.
| Field Summary | |
|---|---|
static String |
CONSTRUCTION_PHASE
|
static String |
DEFAULT_DESCRIPTION
|
static String |
PREPARE_SITE_PHASE
|
| Fields inherited from class org.mars_sim.msp.core.person.ai.mission.Mission |
|---|
ADD_MEMBER_EVENT, ASSOCIATED_SETTLEMENT_EVENT, CAPACITY_EVENT, DESCRIPTION_EVENT, END_MISSION_EVENT, MIN_PEOPLE_EVENT, NAME_EVENT, PHASE_DESCRIPTION_EVENT, PHASE_EVENT, REMOVE_MEMBER_EVENT |
| Constructor Summary | |
|---|---|
BuildingConstructionMission(Collection<Person> members,
Settlement settlement,
ConstructionSite site,
ConstructionStageInfo stageInfo,
double xLoc,
double yLoc,
double facing,
List<GroundVehicle> vehicles)
Constructor |
|
BuildingConstructionMission(Person startingPerson)
Constructor |
|
| Method Summary | |
|---|---|
void |
destroy()
Prepare object for garbage collection. |
protected void |
determineNewPhase()
Determines a new phase for the mission when the current phase has ended. |
void |
endMission(String reason)
Finalizes the mission. |
Settlement |
getAssociatedSettlement()
Gets the settlement associated with the mission. |
ConstructionSite |
getConstructionSite()
Gets the mission's construction site. |
ConstructionStage |
getConstructionStage()
Gets the mission's construction stage. |
List<GroundVehicle> |
getConstructionVehicles()
Gets a list of all construction vehicles used by the mission. |
Map<Class,Integer> |
getEquipmentNeededForRemainingMission(boolean useBuffer)
Gets the number and types of equipment needed for the mission. |
static double |
getNewMissionProbability(Person person)
Gets the weighted probability that a given person would start this mission. |
Map<Resource,Number> |
getResourcesNeededForRemainingMission(boolean useBuffer)
Gets the number and amounts of resources needed for the mission. |
protected boolean |
hasEmergency()
Checks if the mission has an emergency situation. |
protected boolean |
isCapableOfMission(Person person)
Checks to see if a person is capable of joining a mission. |
protected void |
performPhase(Person person)
The person performs the current phase of the mission. |
| Methods inherited from class org.mars_sim.msp.core.person.ai.mission.Mission |
|---|
addMissionListener, addPerson, addPhase, assignTask, associateAllMembersWithSettlement, fireMissionUpdate, fireMissionUpdate, getCurrentMissionLocation, getDescription, getMinPeople, getMissionCapacity, getMissionQualification, getName, getPeople, getPeopleNumber, getPhase, getPhaseDescription, getPhaseEnded, hasDangerousMedicalProblems, hasDangerousMedicalProblemsAllCrew, hasEmergencyAllCrew, hasPerson, isDone, performMission, recruitPeopleForMission, removeMissionListener, removePerson, setDescription, setMinPeople, setMissionCapacity, setName, setPhase, setPhaseDescription, setPhaseEnded, timePassing, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_DESCRIPTION
public static final String PREPARE_SITE_PHASE
public static final String CONSTRUCTION_PHASE
| Constructor Detail |
|---|
public BuildingConstructionMission(Person startingPerson)
startingPerson - the person starting the mission.
MissionException - if error creating mission.
public BuildingConstructionMission(Collection<Person> members,
Settlement settlement,
ConstructionSite site,
ConstructionStageInfo stageInfo,
double xLoc,
double yLoc,
double facing,
List<GroundVehicle> vehicles)
members - the mission members.settlement - the settlement.site - the construction site.stageInfo - the construction stage info.xLoc - the X location of the new construction site (ignored if existing site).yLoc - the Y location of the new construction site (ignored if existing site).facing - the facing of the new construction site (ignored if existing site).vehicles - the construction vehicles.
MissionException - if error creating mission.| Method Detail |
|---|
public static double getNewMissionProbability(Person person)
person - the given person
protected boolean isCapableOfMission(Person person)
Mission
isCapableOfMission in class Missionperson - the person to check.
protected void determineNewPhase()
Mission
determineNewPhase in class Missionprotected void performPhase(Person person)
Mission
performPhase in class Missionperson - the person performing the phase.public void endMission(String reason)
Mission
endMission in class Missionpublic Settlement getAssociatedSettlement()
Mission
getAssociatedSettlement in class Missionpublic Map<Resource,Number> getResourcesNeededForRemainingMission(boolean useBuffer)
Mission
getResourcesNeededForRemainingMission in class MissionuseBuffer - use time buffers in estimation if true.
public Map<Class,Integer> getEquipmentNeededForRemainingMission(boolean useBuffer)
Mission
getEquipmentNeededForRemainingMission in class MissionuseBuffer - use time buffers in estimation if true.
public List<GroundVehicle> getConstructionVehicles()
protected boolean hasEmergency()
Mission
hasEmergency in class Missionpublic ConstructionSite getConstructionSite()
public ConstructionStage getConstructionStage()
public void destroy()
Mission
destroy in class Mission
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||