|
||||||||||
| 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
public abstract class RoverMission
A mission that involves driving a rover vehicle along a series of navpoints.
| Field Summary | |
|---|---|
protected static int |
MIN_PEOPLE
|
static java.lang.String |
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 | |
|---|---|
protected |
RoverMission(java.lang.String name,
Person startingPerson)
Constructor |
protected |
RoverMission(java.lang.String name,
Person startingPerson,
int minPeople)
Constructor with min people |
protected |
RoverMission(java.lang.String name,
Person startingPerson,
int minPeople,
Rover rover)
Constructor with min people and rover. |
| Method Summary | |
|---|---|
protected static boolean |
areVehiclesAvailable(Settlement settlement)
Checks to see if any vehicles are available at a settlement. |
protected static boolean |
atLeastOnePersonRemainingAtSettlement(Settlement settlement,
Person person)
Checks to see if at least one inhabitant a settlement is remaining there. |
void |
endMission(java.lang.String reason)
Finalizes the mission |
abstract java.util.Map<java.lang.Class,java.lang.Integer> |
getEquipmentNeededForRemainingMission(boolean useBuffer)
Gets the number and types of equipment needed for the mission. |
protected OperateVehicle |
getOperateVehicleTask(Person person,
java.lang.String lastOperateVehicleTaskPhase)
Gets a new instance of an OperateVehicle task for the person. |
java.util.Map<Resource,java.lang.Number> |
getResourcesNeededForTrip(boolean useBuffer,
boolean parts,
double distance)
Gets a map of all resources needed for the trip. |
Rover |
getRover()
Gets the mission's rover if there is one. |
Settlement |
getStartingSettlement()
Gets the starting settlement. |
protected static Vehicle |
getVehicleWithGreatestRange(Settlement settlement)
Gets the available vehicle at the settlement with the greatest range. |
protected boolean |
hasDangerousMedicalProblemAtAssociatedSettlement()
Checks if there is only one person at the associated settlement and he/she has a serious medical problem. |
protected boolean |
hasEmergency()
Checks if the mission has an emergency situation. |
protected boolean |
isEveryoneInRover()
Checks that everyone in the mission is aboard the rover. |
protected boolean |
isNoOneInRover()
Checks that no one in the mission is aboard the rover. |
protected boolean |
isRoverInAGarage()
Checks if the rover is currently in a garage or not. |
protected boolean |
isUsableVehicle(Vehicle newVehicle)
Checks if vehicle is usable for this mission. |
protected static boolean |
minAvailablePeopleAtSettlement(Settlement settlement,
int minNum)
Checks to see if at least a minimum number of people are available for a mission at a settlement. |
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 |
setStartingSettlement(Settlement startingSettlement)
Sets the starting settlement. |
| 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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String STARTING_SETTLEMENT_EVENT
protected static final int MIN_PEOPLE
| Constructor Detail |
|---|
protected RoverMission(java.lang.String name,
Person startingPerson)
throws MissionException
name - the name of the mission.startingPerson - the person starting the mission.
MissionException - if error constructing mission.
protected RoverMission(java.lang.String name,
Person startingPerson,
int minPeople)
throws MissionException
name - the name of the mission.startingPerson - the person starting the mission.minPeople - the minimum number of people required for mission.
MissionException - if error constructing mission.
protected RoverMission(java.lang.String name,
Person startingPerson,
int minPeople,
Rover rover)
throws MissionException
name - the name of the mission.startingPerson - the person starting the mission.minPeople - the minimum number of people required for mission.rover - the rover to use on the mission.
MissionException - if error constructing mission.| Method Detail |
|---|
public final Rover getRover()
protected final void setStartingSettlement(Settlement startingSettlement)
startingSettlement - the new starting settlementpublic final Settlement getStartingSettlement()
protected void performPhase(Person person)
throws MissionException
performPhase in class VehicleMissionperson - the person performing the phase.
MissionException - if problem performing the phase.
protected static final Vehicle getVehicleWithGreatestRange(Settlement settlement)
throws java.lang.Exception
settlement - the settlement to check.
java.lang.Exception - if error finding vehicles.protected static boolean areVehiclesAvailable(Settlement settlement)
settlement - the settlement to check.
protected boolean isUsableVehicle(Vehicle newVehicle)
throws MissionException
isUsableVehicle in class VehicleMissionnewVehicle - the vehicle to check
MissionException - if problem determining if vehicle is usable.protected final boolean isEveryoneInRover()
protected final boolean isNoOneInRover()
protected boolean isRoverInAGarage()
protected void performEmbarkFromSettlementPhase(Person person)
throws MissionException
performEmbarkFromSettlementPhase in class VehicleMissionperson - the person currently performing the mission
MissionException - if error performing phase.
protected void performDisembarkToSettlementPhase(Person person,
Settlement disembarkSettlement)
throws MissionException
performDisembarkToSettlementPhase in class VehicleMissionperson - the person currently performing the mission.disembarkSettlement - the settlement to be disembarked to.
MissionException - if error performing phase.
protected OperateVehicle getOperateVehicleTask(Person person,
java.lang.String lastOperateVehicleTaskPhase)
throws MissionException
getOperateVehicleTask in class VehicleMissionperson - the person operating the vehicle.
MissionException - if error creating OperateVehicle task.
protected static boolean atLeastOnePersonRemainingAtSettlement(Settlement settlement,
Person person)
settlement - the settlement to check.person - the person checking
protected static boolean minAvailablePeopleAtSettlement(Settlement settlement,
int minNum)
settlement - the settlement to check.minNum - minimum number of people required.
protected final boolean hasDangerousMedicalProblemAtAssociatedSettlement()
protected final boolean hasEmergency()
hasEmergency in class Mission
public java.util.Map<Resource,java.lang.Number> getResourcesNeededForTrip(boolean useBuffer,
boolean parts,
double distance)
throws MissionException
getResourcesNeededForTrip in class VehicleMissionuseBuffer - should a buffer be used when determining resources?parts - include parts.distance - the distance of the trip.
MissionException - if error determining resources.
public abstract java.util.Map<java.lang.Class,java.lang.Integer> getEquipmentNeededForRemainingMission(boolean useBuffer)
throws MissionException
getEquipmentNeededForRemainingMission in class MissionuseBuffer - use time buffers in estimation if true.
MissionException - if error determining needed equipment.public void endMission(java.lang.String reason)
endMission in class VehicleMissionreason - the reason of ending the mission.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||