|
||||||||||
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.MissionManager
public class MissionManager
The MissionManager class keeps track of ongoing missions in the simulation. The simulation has only one mission manager.
Constructor Summary | |
---|---|
MissionManager()
Constructor |
Method Summary | |
---|---|
void |
addListener(MissionManagerListener newListener)
Add a listener |
void |
addMission(Mission newMission)
Adds a new mission to the mission list. |
Mission |
getMission(Person person)
Gets the mission a given person is a member of. |
Mission |
getMissionForVehicle(Vehicle vehicle)
Gets a mission that the given vehicle is a part of. |
java.util.List<Mission> |
getMissions()
Gets a list of current missions. |
java.util.List<Mission> |
getMissionsForSettlement(Settlement settlement)
Gets all the active missions associated with a given settlement. |
Mission |
getNewMission(Person person)
Gets a new mission for a person based on potential missions available. |
int |
getNumActiveMissions()
Gets the number of currently active missions. |
double |
getTotalMissionProbability(Person person)
Determines the total probability weight for available potential missions for a given person. |
void |
removeListener(MissionManagerListener oldListener)
Remove a listener |
void |
timePassing(double time)
Updates mission based on passing time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MissionManager()
Method Detail |
---|
public void addListener(MissionManagerListener newListener)
newListener
- The listener to add.public void removeListener(MissionManagerListener oldListener)
oldListener
- the listener to remove.public int getNumActiveMissions()
public java.util.List<Mission> getMissions()
public Mission getMission(Person person)
person
- the given person
public void addMission(Mission newMission)
newMission
- new mission to be addedpublic double getTotalMissionProbability(Person person)
person
- the given person
public Mission getNewMission(Person person)
person
- person to find the mission for
public java.util.List<Mission> getMissionsForSettlement(Settlement settlement)
settlement
- the settlement to find missions.
public Mission getMissionForVehicle(Vehicle vehicle)
vehicle
- the vehicle to check for.
public void timePassing(double time) throws java.lang.Exception
time
- amount of time passing (millisols)
java.lang.Exception
- if error in updating missions
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |