65 const std::string& vTypes,
const double departPos,
const double arrivalPos,
const std::string& busStop,
68 void addRide(
const ROEdge*
const from,
const ROEdge*
const to,
const std::string& lines,
double arrivalPos,
const std::string& destStop);
71 const double departPos,
const double arrivalPos,
const std::string& busStop);
94 virtual void saveAsXML(
OutputDevice& os,
const bool extended,
const bool asTrip,
const bool writeGeoTrip)
const = 0;
112 : stopDesc(stop), edge(stopEdge) {}
115 return new Stop(stopDesc, edge);
125 return (stopDesc.startPos + stopDesc.endPos) / 2;
134 return stopDesc.duration;
179 const std::string& _lines,
const double _cost,
const double arrivalPos,
180 const std::string& _destStop =
"",
const std::string& _intended =
"",
const SUMOTime _depart = -1) :
182 from(_from), to(_to),
191 return new Ride(from, to, lines, cost, arr, destStop, intended, depart);
227 double departPos = std::numeric_limits<double>::infinity(),
228 double arrivalPos = std::numeric_limits<double>::infinity(),
229 const std::string& _destStop =
"")
230 :
TripItem(_cost), edges(_edges), dur(-1), v(-1), dep(departPos), arr(arrivalPos), destStop(_destStop) {}
232 const double departPos,
const double arrivalPos,
const std::string& _destStop)
233 :
TripItem(_cost), edges(edges), dur(duration), v(speed), dep(departPos), arr(arrivalPos), destStop(_destStop) {}
236 return new Walk(edges, cost, dep, arr, destStop);
240 return edges.front();
252 const double dur,
v, dep, arr;
268 : from(0), to(0), modes(
SVC_PEDESTRIAN), dep(0), arr(0), stopDest(
""), walkFactor(1.0) {}
270 const double departPos,
const double arrivalPos,
const std::string& _stopDest,
double _walkFactor)
271 : from(from), to(to), modes(modeSet), dep(departPos), arr(arrivalPos), stopDest(_stopDest), walkFactor(_walkFactor) {}
274 for (std::vector<TripItem*>::const_iterator it = myTripItems.begin(); it != myTripItems.end(); ++it) {
277 for (std::vector<ROVehicle*>::const_iterator it = myVehicles.begin(); it != myVehicles.end(); ++it) {
278 delete (*it)->getRouteDefinition();
286 myTripItems.push_back(tripIt);
289 myVehicles.push_back(veh);
295 return from != 0 ? from : myTripItems.front()->getOrigin();
301 if (myTripItems.empty()) {
302 return getArrivalPos(
true);
304 return myTripItems.back()->getDestinationPos();
308 return dep == std::numeric_limits<double>::infinity() && replaceDefault ? 0 : dep;
311 return arr == std::numeric_limits<double>::infinity() && replaceDefault ? -
POSITION_EPS : arr;
320 return myTripItems.empty();
323 void saveAsXML(
OutputDevice& os,
const bool extended,
const bool asTrip,
const bool writeGeoTrip)
const;
357 return myPlan.front()->getOrigin();
362 const bool removeLoops,
MsgHandler* errorHandler);
SVCPermissions getModes() const
virtual double getDestinationPos() const =0
SUMOTime getDuration() const
Ride(const ROEdge *const _from, const ROEdge *const _to, const std::string &_lines, const double _cost, const double arrivalPos, const std::string &_destStop="", const std::string &_intended="", const SUMOTime _depart=-1)
void addVehicle(ROVehicle *veh)
Structure representing possible vehicle parameter.
const std::string stopDest
const SVCPermissions modes
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
A planItem can be a Stop.
std::vector< ROVehicle * > myVehicles
the vehicles which may be used for routing
double getDestinationPos() const
SUMOTime getDuration() const
std::vector< const ROEdge * > ConstROEdgeVector
void saveAsXML(OutputDevice &os, const bool, const bool, const bool) const
const ROEdge * getOrigin() const
Every person has a plan comprising of multiple planItems.
A planItem can be a Trip which contains multiple tripItems.
virtual ~PlanItem()
Destructor.
Walk(const ConstROEdgeVector &edges, const double _cost, const double duration, const double speed, const double departPos, const double arrivalPos, const std::string &_destStop)
const ROEdge * getOrigin() const
A routable thing such as a vehicle or person.
const ROEdge * getDestination() const
A ride is part of a trip, e.g., go from here to here by car or bus.
A vehicle as used by router.
ROPerson & operator=(const ROPerson &src)
Invalidated assignment operator.
const ROEdge * getOrigin() const
virtual void saveVehicles(OutputDevice &, OutputDevice *const, bool, OptionsCont &) const
std::vector< PlanItem * > myPlan
The plan of the person.
SUMOVehicleParameter::Stop stopDesc
std::vector< PlanItem * > & getPlan()
TripItem(const double _cost)
virtual bool needsRouting() const
virtual void addTripItem(TripItem *)
void addStop(const SUMOVehicleParameter::Stop &stopPar, const ROEdge *const stopEdge)
const ROEdge * getDestination() const
A person as used by router.
A TripItem is part of a trip, e.g., go from here to here by car.
A walk is part of a trip, e.g., go from here to here by foot.
A basic edge for routing applications.
virtual const ROEdge * getDestination() const =0
const std::string & getStopDest() const
virtual ~ROPerson()
Destructor.
std::vector< TripItem * > myTripItems
the fully specified trips
void addTrip(const ROEdge *const from, const ROEdge *const to, const SVCPermissions modeSet, const std::string &vTypes, const double departPos, const double arrivalPos, const std::string &busStop, double walkFactor)
Definition of vehicle stop (position and duration)
ROPerson(const SUMOVehicleParameter &pars, const SUMOVTypeParameter *type)
Constructor.
virtual ~PersonTrip()
Destructor.
double getWalkFactor() const
void computeRoute(const RORouterProvider &provider, const bool removeLoops, MsgHandler *errorHandler)
double getDestinationPos() const
Structure representing possible vehicle parameter.
virtual SUMOTime getDuration() const =0
const std::string destStop
double getArrivalPos(bool replaceDefault=true) const
virtual bool needsRouting() const
const std::string intended
void addWalk(const ConstROEdgeVector &edges, const double duration, const double speed, const double departPos, const double arrivalPos, const std::string &busStop)
Walk(const ConstROEdgeVector &_edges, const double _cost, double departPos=std::numeric_limits< double >::infinity(), double arrivalPos=std::numeric_limits< double >::infinity(), const std::string &_destStop="")
A storage for options typed value containers)
const std::string destStop
double getDestinationPos() const
double getDepartPos(bool replaceDefault=true) const
void addRide(const ROEdge *const from, const ROEdge *const to, const std::string &lines, double arrivalPos, const std::string &destStop)
virtual PlanItem * clone() const =0
const ROEdge * getDestination() const
Static storage of an output device and its base (abstract) implementation.
const ConstROEdgeVector edges
std::vector< ROVehicle * > & getVehicles()
virtual void addTripItem(TripItem *tripIt)
double getDestinationPos() const
Stop(const SUMOVehicleParameter::Stop &stop, const ROEdge *const stopEdge)
virtual const ROEdge * getOrigin() const =0
double walkFactor
walking speed factor
bool computeIntermodal(SUMOTime time, const RORouterProvider &provider, PersonTrip *const trip, const ROVehicle *const veh, MsgHandler *const errorHandler)
const ROEdge * getDepartEdge() const
Returns the first edge the person takes.
const ROEdge * getOrigin() const
virtual bool isStop() const
PersonTrip(const ROEdge *const from, const ROEdge *const to, const SVCPermissions modeSet, const double departPos, const double arrivalPos, const std::string &_stopDest, double _walkFactor)
virtual void saveAsXML(OutputDevice &os, const bool extended, const bool asTrip, const bool writeGeoTrip) const =0
virtual ~TripItem()
Destructor.
const ROEdge * getDestination() const