|
||||||||||
| 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.CollectResourcesMission
public abstract class CollectResourcesMission
The CollectResourcesMission class is a mission to travel in a rover to several random locations around a settlement and collect resources of a given type.
| Field Summary | |
|---|---|
static String |
COLLECT_RESOURCES
|
static double |
EVA_COLLECTION_OVERHEAD
|
| 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 |
| 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 |
endCollectingAtSite()
|
Settlement |
getAssociatedSettlement()
Gets the settlement associated with the mission. |
protected abstract String |
getCollectionSiteDescription(int siteNum)
Gets the description of a collection site. |
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. |
protected double |
getEstimatedTimeAtCollectionSite(boolean useBuffer)
Gets the estimated time spent at a collection site. |
static double |
getNewMissionProbability(Person person,
Class containerType,
int containerNum,
int minPeople,
Class missionType)
Gets the weighted probability that a given person would start this mission. |
int |
getNumCollectionSites()
Gets the total number of collection sites for this mission. |
int |
getNumCollectionSitesVisited()
Gets the number of collection sites that have been currently visited by the mission. |
protected Map<Resource,Number> |
getPartsNeededForTrip(double distance)
Gets the parts needed for the trip. |
Map<Resource,Number> |
getResourcesNeededForRemainingMission(boolean useBuffer)
Gets the number and amounts of resources needed for the mission. |
double |
getTotalCollectedResources()
Gets the total amount of resources collected so far in the mission. |
static double |
getTotalTripTimeLimit(Rover rover,
int memberNum,
boolean useBuffer)
Gets the time limit of the trip based on life support capacity. |
protected boolean |
isCapableOfMission(Person person)
Checks to see if a person is capable of joining a mission. |
protected static int |
numCollectingContainersAvailable(Settlement settlement,
Class containerType)
Gets the number of empty containers of given type at the settlement. |
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.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 COLLECT_RESOURCES
public static final double EVA_COLLECTION_OVERHEAD
| Method Detail |
|---|
public static double getNewMissionProbability(Person person,
Class containerType,
int containerNum,
int minPeople,
Class missionType)
person - the given personcontainerType - = the required container class.containerNum - = the number of containers required.minPeople - = the minimum number of people required.missionType - the mission class.
public double getTotalCollectedResources()
protected void determineNewPhase()
determineNewPhase in class VehicleMissionMissionException - if problem setting a new phase.protected void performPhase(Person person)
performPhase in class RoverMissionperson - the person performing the phase.
MissionException - if problem performing the phase.public void endCollectingAtSite()
public Settlement getAssociatedSettlement()
getAssociatedSettlement in class Missionprotected boolean isCapableOfMission(Person person)
isCapableOfMission in class Missionperson - the person to check.
protected void recruitPeopleForMission(Person startingPerson)
recruitPeopleForMission in class MissionstartingPerson - the person starting the mission.
protected static int numCollectingContainersAvailable(Settlement settlement,
Class containerType)
settlement - the settlementcontainerType - the type of container
MissionException - if error determining number.public double getEstimatedRemainingMissionTime(boolean useBuffer)
getEstimatedRemainingMissionTime in class VehicleMissionuseBuffer - use time buffer in estimations if true.
MissionExceptionpublic Map<Resource,Number> getResourcesNeededForRemainingMission(boolean useBuffer)
VehicleMission
getResourcesNeededForRemainingMission in class VehicleMissionuseBuffer - use time buffers in estimation if true.
protected Map<Resource,Number> getPartsNeededForTrip(double distance)
VehicleMission
getPartsNeededForTrip in class VehicleMissiondistance - the distance of the trip.
public final int getNumCollectionSites()
public final int getNumCollectionSitesVisited()
protected double getEstimatedTimeAtCollectionSite(boolean useBuffer)
useBuffer - Use time buffer in estimation if true.
public static double getTotalTripTimeLimit(Rover rover,
int memberNum,
boolean useBuffer)
useBuffer - use time buffer in estimation if true.
MissionException - if error determining time limit.public Map<Class,Integer> getEquipmentNeededForRemainingMission(boolean useBuffer)
Mission
getEquipmentNeededForRemainingMission in class MissionuseBuffer - use time buffers in estimation if true.
protected abstract String getCollectionSiteDescription(int siteNum)
siteNum - the number of the site.
public void destroy()
Mission
destroy in class RoverMission
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||