|
||||||||||
| 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.TravelMission
org.mars_sim.msp.core.person.ai.mission.VehicleMission
org.mars_sim.msp.core.person.ai.mission.RoverMission
org.mars_sim.msp.core.person.ai.mission.Mining
public class Mining
Mission for mining mineral concentrations at an explored site.
| Field Summary | |
|---|---|
static String |
BACKHOE
|
static String |
COLLECT_MINERALS_EVENT
|
static String |
DEFAULT_DESCRIPTION
|
static String |
EXCAVATE_MINERALS_EVENT
|
static String |
MINING_SITE
|
static String |
PNEUMATIC_DRILL
|
| Fields inherited from class org.mars_sim.msp.core.person.ai.mission.RoverMission |
|---|
MIN_PEOPLE, STARTING_SETTLEMENT_EVENT |
| Fields inherited from class org.mars_sim.msp.core.person.ai.mission.VehicleMission |
|---|
DISEMBARKING, EMBARKING, equipmentNeededCache, loadedFlag, OPERATOR_EVENT, TRAVELLING, VEHICLE_EVENT |
| Fields inherited from class org.mars_sim.msp.core.person.ai.mission.TravelMission |
|---|
AT_NAVPOINT, DISTANCE_EVENT, NAVPOINTS_EVENT, TRAVEL_STATUS_EVENT, TRAVEL_TO_NAVPOINT |
| 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 | |
|---|---|
Mining(Collection<Person> members,
Settlement startingSettlement,
ExploredLocation miningSite,
Rover rover,
LightUtilityVehicle luv,
String description)
Constructor with explicit data. |
|
Mining(Person startingPerson)
Constructor |
|
| Method Summary | |
|---|---|
void |
collectMineral(AmountResource mineral,
double amount)
Collects an amount of a mineral. |
void |
destroy()
Prepare object for garbage collection. |
protected void |
determineNewPhase()
Determines a new phase for the mission when the current phase has ended. |
void |
endMiningAtSite()
Ends mining at a site. |
void |
endMission(String reason)
Finalizes the mission |
void |
excavateMineral(AmountResource mineral,
double amount)
Excavates an amount of a mineral. |
Settlement |
getAssociatedSettlement()
Gets the settlement associated with the mission. |
Map<Class,Integer> |
getEquipmentNeededForRemainingMission(boolean useBuffer)
Gets the number and types of equipment needed for the mission. |
double |
getEstimatedRemainingMissionTime(boolean useBuffer)
Gets the estimated time remaining for the mission. |
LightUtilityVehicle |
getLightUtilityVehicle()
Gets the mission's light utility vehicle. |
double |
getMineralExcavationAmount(AmountResource mineral)
Gets the amount of a mineral currently excavated. |
ExploredLocation |
getMiningSite()
Gets the mission mining site. |
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. |
double |
getTotalMineralExcavatedAmount(AmountResource mineral)
Gets the total amount of a mineral that has been excavated so far. |
protected boolean |
isCapableOfMission(Person person)
Checks to see if a person is capable of joining a mission. |
protected void |
performDisembarkToSettlementPhase(Person person,
Settlement disembarkSettlement)
Performs the disembark to settlement phase of the mission. |
protected void |
performEmbarkFromSettlementPhase(Person person)
Performs the embark from settlement phase of the mission. |
protected void |
performPhase(Person person)
The person performs the current phase of the mission. |
protected void |
recruitPeopleForMission(Person startingPerson)
Recruits new people into the mission. |
| Methods inherited from class org.mars_sim.msp.core.person.ai.mission.RoverMission |
|---|
areVehiclesAvailable, atLeastOnePersonRemainingAtSettlement, getOperateVehicleTask, getResourcesNeededForTrip, getRover, getStartingSettlement, getVehicleWithGreatestRange, hasBackupRover, hasDangerousMedicalProblemAtAssociatedSettlement, hasEmergency, hasEnoughBasicResources, isEveryoneInRover, isNoOneInRover, isRoverInAGarage, isUsableVehicle, minAvailablePeopleAtSettlement, setStartingSettlement |
| Methods inherited from class org.mars_sim.msp.core.person.ai.mission.TravelMission |
|---|
addNavpoint, clearRemainingNavpoints, getCurrentLegDistance, getCurrentLegRemainingDistance, getCurrentLegStartingTime, getCurrentNavpoint, getCurrentNavpointIndex, getNavpoint, getNavpointIndex, getNextNavpoint, getNextNavpointIndex, getNumberOfNavpoints, getPreviousNavpoint, getTotalDistance, getTotalRemainingDistance, getTravelStatus, reachedNextNode, setNavpoint, setNextNavpointIndex, startTravelToNextNode |
| 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, removeMissionListener, removePerson, setDescription, setMinPeople, setMissionCapacity, setName, setPhase, setPhaseDescription, setPhaseEnded, 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 MINING_SITE
public static final String EXCAVATE_MINERALS_EVENT
public static final String COLLECT_MINERALS_EVENT
public static final String PNEUMATIC_DRILL
public static final String BACKHOE
| Constructor Detail |
|---|
public Mining(Person startingPerson)
startingPerson - the person starting the mission.
MissionException - if error creating mission.
public Mining(Collection<Person> members,
Settlement startingSettlement,
ExploredLocation miningSite,
Rover rover,
LightUtilityVehicle luv,
String description)
members - collection of mission members.startingSettlement - the starting settlement.miningSite - the site to mine.rover - the rover to use.description - the mission's description.
MissionException - if error constructing mission.| Method Detail |
|---|
public static double getNewMissionProbability(Person person)
person - the given person
protected void determineNewPhase()
VehicleMission
determineNewPhase in class VehicleMissionprotected void performPhase(Person person)
RoverMission
performPhase in class RoverMissionperson - the person performing the phase.protected void performEmbarkFromSettlementPhase(Person person)
RoverMission
performEmbarkFromSettlementPhase in class RoverMissionperson - the person currently performing the mission
protected void performDisembarkToSettlementPhase(Person person,
Settlement disembarkSettlement)
RoverMission
performDisembarkToSettlementPhase in class RoverMissionperson - the person currently performing the mission.disembarkSettlement - the settlement to be disembarked to.public void endMiningAtSite()
public Map<Class,Integer> getEquipmentNeededForRemainingMission(boolean useBuffer)
Mission
getEquipmentNeededForRemainingMission in class MissionuseBuffer - use time buffers in estimation if true.
public Settlement getAssociatedSettlement()
Mission
getAssociatedSettlement in class Missionprotected boolean isCapableOfMission(Person person)
Mission
isCapableOfMission in class Missionperson - the person to check.
protected void recruitPeopleForMission(Person startingPerson)
Mission
recruitPeopleForMission in class MissionstartingPerson - the person starting the mission.public double getEstimatedRemainingMissionTime(boolean useBuffer)
VehicleMission
getEstimatedRemainingMissionTime in class VehicleMissionuseBuffer - Use time buffer in estimations if true.
public Map<Resource,Number> getResourcesNeededForRemainingMission(boolean useBuffer)
VehicleMission
getResourcesNeededForRemainingMission in class VehicleMissionuseBuffer - use time buffers in estimation if true.
public ExploredLocation getMiningSite()
public void endMission(String reason)
VehicleMission
endMission in class RoverMissionreason - the reason of ending the mission.public LightUtilityVehicle getLightUtilityVehicle()
public double getMineralExcavationAmount(AmountResource mineral)
mineral - the mineral resource.
public double getTotalMineralExcavatedAmount(AmountResource mineral)
mineral - the mineral resource.
public void excavateMineral(AmountResource mineral,
double amount)
mineral - the mineral resource.amount - the amount (kg)
public void collectMineral(AmountResource mineral,
double amount)
mineral - the mineral resource.amount - the amount (kg)
Exception - if error collecting mineral.public void destroy()
Mission
destroy in class RoverMission
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||