|
||||||||||
| 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.mission.Mission
org.mars_sim.msp.simulation.person.ai.mission.TravelMission
org.mars_sim.msp.simulation.person.ai.mission.VehicleMission
org.mars_sim.msp.simulation.person.ai.mission.RoverMission
org.mars_sim.msp.simulation.person.ai.mission.Mining
public class Mining
Mission for mining mineral concentrations at an explored site.
| Field Summary | |
|---|---|
static java.lang.String |
BACKHOE
|
static java.lang.String |
BULLDOZER_BLADE
|
static java.lang.String |
COLLECT_MINERALS_EVENT
|
static java.lang.String |
DEFAULT_DESCRIPTION
|
static java.lang.String |
EXCAVATE_MINERALS_EVENT
|
static java.lang.String |
MINING_SITE
|
static java.lang.String |
PNEUMATIC_DRILL
|
| Fields inherited from class org.mars_sim.msp.simulation.person.ai.mission.RoverMission |
|---|
MIN_PEOPLE, STARTING_SETTLEMENT_EVENT |
| Fields inherited from class org.mars_sim.msp.simulation.person.ai.mission.VehicleMission |
|---|
DISEMBARKING, EMBARKING, equipmentNeededCache, loadedFlag, OPERATOR_EVENT, TRAVELLING, VEHICLE_EVENT |
| Fields inherited from class org.mars_sim.msp.simulation.person.ai.mission.TravelMission |
|---|
AT_NAVPOINT, DISTANCE_EVENT, NAVPOINTS_EVENT, TRAVEL_STATUS_EVENT, TRAVEL_TO_NAVPOINT |
| Fields inherited from class org.mars_sim.msp.simulation.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(java.util.Collection<Person> members,
Settlement startingSettlement,
ExploredLocation miningSite,
Rover rover,
LightUtilityVehicle luv,
java.lang.String description)
Constructor with explicit data. |
|
Mining(Person startingPerson)
Constructor |
|
| Method Summary | |
|---|---|
void |
collectMineral(AmountResource mineral,
double amount)
Collects an amount of a mineral. |
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(java.lang.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. |
java.util.Map<java.lang.Class,java.lang.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. |
java.util.Map<Resource,java.lang.Number> |
getResourcesNeededForRemainingMission(boolean useBuffer,
boolean parts)
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.simulation.person.ai.mission.RoverMission |
|---|
areVehiclesAvailable, atLeastOnePersonRemainingAtSettlement, getOperateVehicleTask, getResourcesNeededForTrip, getRover, getStartingSettlement, getVehicleWithGreatestRange, hasDangerousMedicalProblemAtAssociatedSettlement, hasEmergency, isEveryoneInRover, isNoOneInRover, isRoverInAGarage, isUsableVehicle, minAvailablePeopleAtSettlement, setStartingSettlement |
| Methods inherited from class org.mars_sim.msp.simulation.person.ai.mission.VehicleMission |
|---|
compareVehicles, determineEmergencyDestination, findClosestSettlement, getAverageVehicleSpeedForOperators, getEquipmentToLoad, getEstimatedTripTime, getFuelNeededForTrip, getLegETA, getPartsNeededForTrip, getResourcesToLoad, getTotalDistanceTravelled, getVehicle, hasEmbarkingMissions, hasEnoughResourcesForRemainingMission, hasVehicle, isVehicleLoadable, isVehicleLoaded, leaveVehicle, performTravelPhase, reserveVehicle, setEmergencyBeacon, setVehicle, timePassing, unitUpdate, updateTravelDestination |
| Methods inherited from class org.mars_sim.msp.simulation.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.simulation.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 java.lang.String DEFAULT_DESCRIPTION
public static final java.lang.String MINING_SITE
public static final java.lang.String EXCAVATE_MINERALS_EVENT
public static final java.lang.String COLLECT_MINERALS_EVENT
public static final java.lang.String PNEUMATIC_DRILL
public static final java.lang.String BACKHOE
public static final java.lang.String BULLDOZER_BLADE
| Constructor Detail |
|---|
public Mining(Person startingPerson)
throws MissionException
startingPerson - the person starting the mission.
MissionException - if error creating mission.
public Mining(java.util.Collection<Person> members,
Settlement startingSettlement,
ExploredLocation miningSite,
Rover rover,
LightUtilityVehicle luv,
java.lang.String description)
throws MissionException
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()
throws MissionException
VehicleMission
determineNewPhase in class VehicleMissionMissionException - if problem setting a new phase.
protected void performPhase(Person person)
throws MissionException
RoverMission
performPhase in class RoverMissionperson - the person performing the phase.
MissionException - if problem performing the phase.
protected void performEmbarkFromSettlementPhase(Person person)
throws MissionException
RoverMission
performEmbarkFromSettlementPhase in class RoverMissionperson - the person currently performing the mission
MissionException - if error performing phase.
protected void performDisembarkToSettlementPhase(Person person,
Settlement disembarkSettlement)
throws MissionException
RoverMission
performDisembarkToSettlementPhase in class RoverMissionperson - the person currently performing the mission.disembarkSettlement - the settlement to be disembarked to.
MissionException - if error performing phase.public void endMiningAtSite()
public java.util.Map<java.lang.Class,java.lang.Integer> getEquipmentNeededForRemainingMission(boolean useBuffer)
throws MissionException
RoverMission
getEquipmentNeededForRemainingMission in class RoverMissionuseBuffer - use time buffers in estimation if true.
MissionException - if error determining needed equipment.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)
throws MissionException
VehicleMission
getEstimatedRemainingMissionTime in class VehicleMissionuseBuffer - Use time buffer in estimations if true.
MissionException
public java.util.Map<Resource,java.lang.Number> getResourcesNeededForRemainingMission(boolean useBuffer,
boolean parts)
throws MissionException
VehicleMission
getResourcesNeededForRemainingMission in class VehicleMissionuseBuffer - use time buffers in estimation if true.parts - include parts.
MissionException - if error determining needed resources.public ExploredLocation getMiningSite()
public void endMission(java.lang.String reason)
RoverMission
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)
throws java.lang.Exception
mineral - the mineral resource.amount - the amount (kg)
java.lang.Exception - if error collecting mineral.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||