|
MATSIM
|
Public Member Functions | |
| EditTrips (TripRouter tripRouter, Scenario scenario, InternalInterface internalInterface, TimeInterpretation timeInterpretation) | |
| final boolean | replanCurrentTrip (MobsimAgent agent, double now, String routingMode) |
| final boolean | insertEmptyTrip (Plan plan, Activity fromActivity, Activity toActivity, String mainMode) |
| final List<? extends PlanElement > | replanFutureTrip (Trip trip, Plan plan, String mainMode) |
| final List<? extends PlanElement > | replanFutureTrip (Trip trip, Plan plan, String routingMode, double departureTime) |
| Trip | findTripAfterActivity (Plan plan, Activity activity) |
Static Public Member Functions | |
| static Trip | findCurrentTrip (MobsimAgent agent) |
| static Trip | findTripAtPlanElement (MobsimAgent agent, PlanElement pe) |
| static Trip | findTripAtPlanElementIndex (MobsimAgent agent, int index) |
| static boolean | insertEmptyTrip (Plan plan, Activity fromActivity, Activity toActivity, String mainMode, PopulationFactory pf) |
| static List<? extends PlanElement > | replanFutureTrip (Trip trip, Plan plan, String routingMode, double departureTime, TripRouter tripRouter, Scenario scenario) |
| static List<? extends PlanElement > | relocateFutureTrip (Trip trip, Plan plan, String mainMode, double departureTime, TripRouter tripRouter, Scenario scenario) |
Private Member Functions | |
| void | replanCurrentTripFromLeg (Activity newAct, final PlanElement currentPlanElement, final String routingMode, double now, MobsimAgent agent, Attributes routingAttributes) |
| void | replanCurrentLegWithNetworkRoute (Activity newAct, String mainMode, Leg currentLeg, double now, MobsimAgent agent, Attributes routingAttributes) |
| void | replanCurrentLegWithTransitRoute (Activity newAct, String routingMode, Leg currentLeg, double now, MobsimAgent agent, Attributes routingAttributes) |
| void | replanCurrentLegWithGenericRoute (Activity newAct, String routingMode, Leg currentLeg, double now, MobsimAgent agent) |
| List<? extends PlanElement > | newTripToNewActivity (Facility currentLocationFacility, Activity newAct, String mainMode, double now, Person person, Attributes routingAttributes) |
| void | replanCurrentTripFromStageActivity (Trip trip, int tripElementsIndex, String mainMode, double now, MobsimAgent agent) |
| List< PlanElement > | defaultMergeOldAndNewCurrentPtLeg (Leg currentLeg, List<? extends PlanElement > newTrip, MobsimAgent agent, TransitStopFacility nextStop, TransitPassengerRoute oldPtRoute) |
| boolean | transitRouteLaterStopsAt (Id< TransitLine > lineId, Id< TransitRoute > routeId, Id< TransitStopFacility > currentStopId, Id< TransitStopFacility > egressStopId) |
Static Private Member Functions | |
| static void | replaceRemainderOfCurrentRoute (Leg currentLeg, List<? extends PlanElement > newTrip, MobsimAgent agent) |
Private Attributes | |
| final TripRouter | tripRouter |
| final PopulationFactory | pf |
| final InternalInterface | internalInterface |
| Scenario | scenario |
| TransitStopAgentTracker | transitAgentTracker |
| EventsManager | eventsManager |
| final TimeInterpretation | timeInterpretation |
Static Private Attributes | |
| static final Logger | log = LogManager.getLogger(EditTrips.class) |
The methods here should modify trips, i.e. material between two non-stage-activities.
TODO: When the same agent is replanned multiple times it is problematic to have legs with undefined travel time. These cause undefined time exceptions when EditTrips struggles to find a departure time to route from. At some places the code now sets a travel time which is not really correct because the real value is hard to obtain. Still a defined value at least keeps the simulation running. This should be fixed with look-ups in the transit schedule when exactly the agent arrives at the next stop and can disembark. vsp-gleich nov'21
Definition at line 82 of file EditTrips.java.
| org.matsim.withinday.utils.EditTrips.EditTrips | ( | TripRouter | tripRouter, |
| Scenario | scenario, | ||
| InternalInterface | internalInterface, | ||
| TimeInterpretation | timeInterpretation | ||
| ) |
Definition at line 93 of file EditTrips.java.
References org.matsim.core.mobsim.qsim.QSim.getAgentTrackers(), org.matsim.core.mobsim.qsim.QSim.getEventsManager(), org.matsim.api.core.v01.population.Population.getFactory(), org.matsim.core.mobsim.qsim.InternalInterface.getMobsim(), org.matsim.api.core.v01.Scenario.getPopulation(), org.matsim.withinday.utils.EditTrips.internalInterface, org.matsim.withinday.utils.EditTrips.scenario, org.matsim.withinday.utils.EditTrips.timeInterpretation, and org.matsim.withinday.utils.EditTrips.tripRouter.

|
static |
Definition at line 122 of file EditTrips.java.
References org.matsim.withinday.utils.EditTrips.findTripAtPlanElement(), and org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.getCurrentPlanElement().
Referenced by org.matsim.withinday.utils.EditPlans.getModeOfCurrentOrNextTrip(), org.matsim.withinday.utils.EditPlans.insertActivity(), org.matsim.withinday.utils.EditTrips.replanCurrentLegWithGenericRoute(), and org.matsim.withinday.utils.EditTrips.replanCurrentTrip().

|
static |
Definition at line 126 of file EditTrips.java.
References org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.getModifiablePlan(), and org.matsim.core.router.TripStructureUtils.getTrips().
Referenced by org.matsim.core.mobsim.qsim.PreplanningEngine.decide(), org.matsim.withinday.utils.EditTrips.findCurrentTrip(), and org.matsim.withinday.utils.EditTrips.findTripAtPlanElementIndex().

|
static |
Definition at line 140 of file EditTrips.java.
References org.matsim.withinday.utils.EditTrips.findTripAtPlanElement(), org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.getModifiablePlan(), and org.matsim.api.core.v01.population.Plan.getPlanElements().

| final boolean org.matsim.withinday.utils.EditTrips.replanCurrentTrip | ( | MobsimAgent | agent, |
| double | now, | ||
| String | routingMode | ||
| ) |
Definition at line 144 of file EditTrips.java.
References org.matsim.withinday.utils.EditTrips.findCurrentTrip(), org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.getCurrentPlanElement(), org.matsim.core.router.TripStructureUtils.Trip.getDestinationActivity(), org.matsim.api.core.v01.Identifiable< T >.getId(), org.matsim.core.router.TripStructureUtils.Trip.getTripAttributes(), org.matsim.core.router.TripStructureUtils.Trip.getTripElements(), org.matsim.core.api.experimental.events.EventsManager.processEvent(), org.matsim.withinday.utils.EditTrips.replanCurrentTripFromLeg(), org.matsim.withinday.utils.EditTrips.replanCurrentTripFromStageActivity(), and org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.resetCaches().
Referenced by org.matsim.withinday.utils.EditPlans.addActivityAtEnd(), org.matsim.withinday.utils.EditPlans.insertActivity(), org.matsim.withinday.utils.EditPlans.removeActivity(), and org.matsim.withinday.utils.EditPlans.replaceActivity().

|
private |
Definition at line 173 of file EditTrips.java.
References org.matsim.api.core.v01.Identifiable< T >.getId(), org.matsim.api.core.v01.population.Leg.getRoute(), org.matsim.withinday.utils.EditTrips.replanCurrentLegWithGenericRoute(), org.matsim.withinday.utils.EditTrips.replanCurrentLegWithNetworkRoute(), org.matsim.withinday.utils.EditTrips.replanCurrentLegWithTransitRoute(), and org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.resetCaches().
Referenced by org.matsim.withinday.utils.EditTrips.replanCurrentTrip().

|
private |
Definition at line 190 of file EditTrips.java.
References org.matsim.core.gbl.Gbl.assertIf(), org.matsim.core.mobsim.framework.NetworkAgent.getCurrentLinkId(), org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.getCurrentPlanElementIndex(), org.matsim.api.core.v01.Identifiable< T >.getId(), org.matsim.api.core.v01.network.Network.getLinks(), org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.getModifiablePlan(), org.matsim.api.core.v01.Scenario.getNetwork(), org.matsim.api.core.v01.population.Plan.getPerson(), org.matsim.api.core.v01.population.Plan.getPlanElements(), org.matsim.withinday.utils.EditTrips.newTripToNewActivity(), org.matsim.withinday.utils.EditTrips.replaceRemainderOfCurrentRoute(), org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.resetCaches(), and org.matsim.facilities.FacilitiesUtils.wrapLink().
Referenced by org.matsim.withinday.utils.EditTrips.replanCurrentTripFromLeg().

|
private |
Definition at line 222 of file EditTrips.java.
References org.matsim.api.core.v01.Identifiable< T >.getId(), org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.getModifiablePlan(), org.matsim.api.core.v01.population.Plan.getPerson(), and org.matsim.api.core.v01.population.Plan.getPlanElements().
Referenced by org.matsim.withinday.utils.EditTrips.replanCurrentTripFromLeg().

|
private |
This assumes that all generic routes are actually teleported. There is no apparent way to differentiate teleported legs (like typically walk, bike, access_walk, egress_walk) from possible other modes using generic routes, but hypothetically something else than teleportation.
Definition at line 468 of file EditTrips.java.
References org.matsim.core.router.TripRouter.calcRoute(), org.matsim.core.population.PopulationUtils.createActivity(), org.matsim.core.utils.timing.TimeInterpretation.decideOnLegTravelTime(), org.matsim.withinday.utils.EditTrips.findCurrentTrip(), org.matsim.api.core.v01.Scenario.getActivityFacilities(), org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.getCurrentPlanElementIndex(), org.matsim.core.router.TripStructureUtils.Trip.getDestinationActivity(), org.matsim.api.core.v01.population.Activity.getEndTime(), org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.getModifiablePlan(), org.matsim.api.core.v01.population.Plan.getPerson(), org.matsim.api.core.v01.population.Plan.getPlanElements(), org.matsim.core.router.TripStructureUtils.Trip.getTripAttributes(), org.matsim.api.core.v01.population.Activity.getType(), org.matsim.core.router.TripRouter.insertTrip(), org.matsim.core.utils.misc.OptionalTime.isDefined(), org.matsim.core.router.StageActivityTypeIdentifier.isStageActivity(), org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.resetCaches(), org.matsim.core.utils.misc.OptionalTime.seconds, and org.matsim.facilities.FacilitiesUtils.toFacility().
Referenced by org.matsim.withinday.utils.EditTrips.replanCurrentTripFromLeg().

|
private |
Definition at line 549 of file EditTrips.java.
References org.matsim.core.router.TripRouter.calcRoute(), org.matsim.core.population.PopulationUtils.createActivity(), org.matsim.api.core.v01.Scenario.getActivityFacilities(), org.matsim.core.router.StageActivityTypeIdentifier.isStageActivity(), and org.matsim.facilities.FacilitiesUtils.toFacility().
Referenced by org.matsim.withinday.utils.EditTrips.replanCurrentLegWithNetworkRoute().

|
private |
Definition at line 565 of file EditTrips.java.
References org.matsim.api.core.v01.Identifiable< T >.getId(), org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.getModifiablePlan(), org.matsim.api.core.v01.population.Plan.getPerson(), org.matsim.api.core.v01.population.Plan.getPlanElements(), and org.matsim.core.router.TripStructureUtils.Trip.getTripElements().
Referenced by org.matsim.withinday.utils.EditTrips.replanCurrentTrip().

|
static |
Definition at line 604 of file EditTrips.java.
References org.matsim.api.core.v01.population.PopulationFactory.createLeg(), and org.matsim.core.router.TripRouter.insertTrip().
Referenced by org.matsim.withinday.utils.EditPlans.insertActivity(), org.matsim.withinday.utils.EditTrips.insertEmptyTrip(), org.matsim.withinday.utils.EditPlans.removeActivity(), and org.matsim.withinday.utils.EditPlans.replaceActivity().

| final boolean org.matsim.withinday.utils.EditTrips.insertEmptyTrip | ( | Plan | plan, |
| Activity | fromActivity, | ||
| Activity | toActivity, | ||
| String | mainMode | ||
| ) |
Definition at line 609 of file EditTrips.java.
References org.matsim.withinday.utils.EditTrips.insertEmptyTrip().

| final List<? extends PlanElement> org.matsim.withinday.utils.EditTrips.replanFutureTrip | ( | Trip | trip, |
| Plan | plan, | ||
| String | mainMode | ||
| ) |
Convenience method that estimates the trip departure time rather than explicitly requesting it.
Definition at line 615 of file EditTrips.java.
References org.matsim.core.utils.timing.TimeInterpretation.decideOnActivityEndTimeAlongPlan(), and org.matsim.core.router.TripStructureUtils.Trip.getOriginActivity().
Referenced by org.matsim.withinday.replanning.replanners.NextLegReplanner.doReplanning(), org.matsim.withinday.utils.EditTrips.relocateFutureTrip(), and org.matsim.withinday.utils.EditTrips.replanFutureTrip().

| final List<? extends PlanElement> org.matsim.withinday.utils.EditTrips.replanFutureTrip | ( | Trip | trip, |
| Plan | plan, | ||
| String | routingMode, | ||
| double | departureTime | ||
| ) |
Definition at line 620 of file EditTrips.java.
References org.matsim.withinday.utils.EditTrips.replanFutureTrip().

|
staticprivate |
Definition at line 626 of file EditTrips.java.
References org.matsim.core.gbl.Gbl.assertNotNull(), org.matsim.core.mobsim.framework.NetworkAgent.getCurrentLinkId(), org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.getCurrentRouteLinkIdIndex(), org.matsim.api.core.v01.population.Route.getEndLinkId(), org.matsim.core.population.routes.NetworkRoute.getLinkIds(), org.matsim.api.core.v01.population.Leg.getRoute(), and org.matsim.core.mobsim.qsim.agents.WithinDayAgentUtils.resetCaches().
Referenced by org.matsim.withinday.utils.EditTrips.replanCurrentLegWithNetworkRoute().

|
private |
Definition at line 653 of file EditTrips.java.
References org.matsim.api.core.v01.population.Leg.getRoute().

|
private |
Definition at line 696 of file EditTrips.java.
References org.matsim.api.core.v01.Id< T >.equals(), org.matsim.pt.transitSchedule.api.TransitSchedule.getTransitLines(), and org.matsim.api.core.v01.Scenario.getTransitSchedule().

|
static |
In contrast to the other replanFutureLegRoute(...) method, the leg at the given index is replaced by a new one. This is e.g. necessary when replacing a pt trip which might consists of multiple legs and pt_interaction activities.
Definition at line 717 of file EditTrips.java.
References org.matsim.core.router.TripRouter.calcRoute(), org.matsim.core.population.PopulationUtils.createActivity(), org.matsim.api.core.v01.Scenario.getActivityFacilities(), org.matsim.core.router.TripStructureUtils.Trip.getDestinationActivity(), org.matsim.core.router.TripStructureUtils.Trip.getOriginActivity(), org.matsim.api.core.v01.population.Plan.getPerson(), org.matsim.core.router.TripStructureUtils.Trip.getTripAttributes(), org.matsim.core.router.TripRouter.insertTrip(), org.matsim.core.router.StageActivityTypeIdentifier.isStageActivity(), and org.matsim.facilities.FacilitiesUtils.toFacility().

|
static |
Convenience method, to be consistent with earlier syntax. kai, may'16
| trip | |
| plan | |
| mainMode | |
| departureTime | |
| tripRouter | |
| scenario |
Definition at line 751 of file EditTrips.java.
References org.matsim.withinday.utils.EditTrips.replanFutureTrip().

Definition at line 756 of file EditTrips.java.
References org.matsim.core.router.TripStructureUtils.findTripStartingAtActivity().
Referenced by org.matsim.withinday.utils.EditPlans.getModeOfCurrentOrNextTrip().

|
staticprivate |
Definition at line 83 of file EditTrips.java.
|
private |
Definition at line 85 of file EditTrips.java.
Referenced by org.matsim.withinday.utils.EditTrips.EditTrips().
|
private |
Definition at line 86 of file EditTrips.java.
|
private |
Definition at line 87 of file EditTrips.java.
Referenced by org.matsim.withinday.utils.EditTrips.EditTrips().
|
private |
Definition at line 88 of file EditTrips.java.
Referenced by org.matsim.withinday.utils.EditTrips.EditTrips().
|
private |
Definition at line 89 of file EditTrips.java.
|
private |
Definition at line 90 of file EditTrips.java.
|
private |
Definition at line 91 of file EditTrips.java.
Referenced by org.matsim.withinday.utils.EditTrips.EditTrips().
1.8.13