|
||||||||||
| 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 java.lang.String |
BACKHOE
|
static java.lang.String |
BULLDOZER_BLADE
|
static java.lang.String |
CONSTRUCTION_PHASE
|
static java.lang.String |
CRANE_BOOM
|
static java.lang.String |
DEFAULT_DESCRIPTION
|
static java.lang.String |
PREPARE_SITE_PHASE
|
static java.lang.String |
SOIL_COMPACTOR
|
| 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(java.util.Collection<Person> members,
Settlement settlement,
ConstructionSite site,
ConstructionStageInfo stageInfo,
java.util.List<GroundVehicle> vehicles)
Constructor |
|
BuildingConstructionMission(Person startingPerson)
Constructor |
|
| Method Summary | |
|---|---|
protected void |
determineNewPhase()
Determines a new phase for the mission when the current phase has ended. |
void |
endMission(java.lang.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. |
java.util.List<GroundVehicle> |
getConstructionVehicles()
Gets a list of all construction vehicles used by the mission. |
java.util.Map<java.lang.Class,java.lang.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. |
java.util.Map<Resource,java.lang.Number> |
getResourcesNeededForRemainingMission(boolean useBuffer,
boolean parts)
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 java.lang.String DEFAULT_DESCRIPTION
public static final java.lang.String PREPARE_SITE_PHASE
public static final java.lang.String CONSTRUCTION_PHASE
public static final java.lang.String SOIL_COMPACTOR
public static final java.lang.String BACKHOE
public static final java.lang.String BULLDOZER_BLADE
public static final java.lang.String CRANE_BOOM
| Constructor Detail |
|---|
public BuildingConstructionMission(Person startingPerson)
throws MissionException
startingPerson - the person starting the mission.
MissionException - if error creating mission.
public BuildingConstructionMission(java.util.Collection<Person> members,
Settlement settlement,
ConstructionSite site,
ConstructionStageInfo stageInfo,
java.util.List<GroundVehicle> vehicles)
throws MissionException
members - the mission members.settlement - the settlement.site - the construction site.stageInfo - the construction stage info.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()
throws MissionException
Mission
determineNewPhase in class MissionMissionException - if problem setting a new phase.
protected void performPhase(Person person)
throws MissionException
Mission
performPhase in class Missionperson - the person performing the phase.
MissionException - if problem performing the phase.public void endMission(java.lang.String reason)
Mission
endMission in class Missionpublic Settlement getAssociatedSettlement()
Mission
getAssociatedSettlement in class Mission
public java.util.Map<Resource,java.lang.Number> getResourcesNeededForRemainingMission(boolean useBuffer,
boolean parts)
throws MissionException
Mission
getResourcesNeededForRemainingMission in class MissionuseBuffer - use time buffers in estimation if true.parts - include parts.
MissionException - if error determining needed resources.
public java.util.Map<java.lang.Class,java.lang.Integer> getEquipmentNeededForRemainingMission(boolean useBuffer)
throws MissionException
Mission
getEquipmentNeededForRemainingMission in class MissionuseBuffer - use time buffers in estimation if true.
MissionException - if error determining needed equipment.public java.util.List<GroundVehicle> getConstructionVehicles()
protected boolean hasEmergency()
Mission
hasEmergency in class Missionpublic ConstructionSite getConstructionSite()
public ConstructionStage getConstructionStage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||