MATSIM
TripInfo.java
Go to the documentation of this file.
1 
2 /* *********************************************************************** *
3  * project: org.matsim.*
4  * TripInfo.java
5  * *
6  * *********************************************************************** *
7  * *
8  * copyright : (C) 2019 by the members listed in the COPYING, *
9  * LICENSE and WARRANTY file. *
10  * email : info at matsim dot org *
11  * *
12  * *********************************************************************** *
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * See also COPYING, LICENSE and WARRANTY file *
19  * *
20  * *********************************************************************** */
21 
22  package org.matsim.core.mobsim.qsim.interfaces;
23 
24 import java.util.List;
25 import java.util.Map;
26 
30 
34 public interface TripInfo{
43  // If these need an ID, they need to be ActivityFacilities. Otherwise, they are ad-hoc facilities, which is probably also ok. kai, mar'19
44 
45  double getExpectedBoardingTime() ;
46  double getExpectedTravelTime() ;
47  double getMonetaryPrice() ;
48  Map<String,String> getAdditionalAttributes() ;
49  String getMode() ;
53  double getLatestDecisionTime() ;
58  void bookTrip( MobsimPassengerAgent agent ) ;
59 
60 
64  interface Provider{
65  List<TripInfo> getTripInfos( Request request ) ;
66  String getMode();
67  // not sure if I like that, but with current design (where the confirmation goes to the TripInfo.Provider, not to the TripInfo instance that we have) I am not sure
68  // if it is possible otherwise. kai, mar'19
70  }
71 
72 
77  interface Request{
78  enum TimeInterpretation {departure, arrival}
79  Facility getFromFacility();
80  Facility getToFacility();
81  double getTime();
82  TimeInterpretation getTimeInterpretation();
83  Route getPlannedRoute();
84  }
85 }
List< TripInfo > getTripInfos(Request request)
void bookTrip(MobsimPassengerAgent agent, TripInfoWithRequiredBooking tripInfo)
void bookTrip(MobsimPassengerAgent agent)