63 static void addTrip(std::vector<PlanItem*>& plan,
const std::string&
id,
65 const double departPos,
const std::string& stopOrigin,
66 const double arrivalPos,
const std::string& busStop,
67 double walkFactor,
const std::string& group);
69 static void addRide(std::vector<PlanItem*>& plan,
const ROEdge*
const from,
const ROEdge*
const to,
const std::string& lines,
70 double arrivalPos,
const std::string& destStop,
const std::string& group);
72 static void addWalk(std::vector<PlanItem*>& plan,
const ConstROEdgeVector& edges,
const double duration,
const double speed,
73 const double departPos,
const double arrivalPos,
const std::string& busStop);
199 const std::string& _lines,
const std::string& _group,
const double cost,
200 const double arrivalPos,
const double _length,
201 const std::string& _destStop =
"",
const std::string& _intended =
"",
const SUMOTime _depart = -1) :
214 return new Ride(
myStart,
from,
to,
lines,
group,
myCost,
arrPos,
length,
destStop,
intended,
depart);
224 return arrPos == std::numeric_limits<double>::infinity() ? -NUMERICAL_EPS :
arrPos;
252 const std::vector<double>& _exitTimes,
253 double departPos = std::numeric_limits<double>::infinity(),
254 double arrivalPos = std::numeric_limits<double>::infinity(),
255 const std::string& _destStop =
"")
258 const double departPos,
const double arrivalPos,
const std::string& _destStop)
266 return edges.front();
272 return arr == std::numeric_limits<double>::infinity() ? 0 :
arr;
297 const double departPos,
const std::string& _stopOrigin,
const double arrivalPos,
const std::string& _stopDest,
double _walkFactor,
const std::string& _group) :
304 for (std::vector<ROVehicle*>::const_iterator it =
myVehicles.begin(); it !=
myVehicles.end(); ++it) {
305 delete (*it)->getRouteDefinition();
335 return dep == std::numeric_limits<double>::infinity() && replaceDefault ? 0 :
dep;
338 return arr == std::numeric_limits<double>::infinity() && replaceDefault ? 0 :
arr;
344 modes |= additionalModes;
399 return myPlan.front()->getOrigin();
404 const bool removeLoops,
MsgHandler* errorHandler);
std::vector< const ROEdge * > ConstROEdgeVector
@ SVC_PEDESTRIAN
pedestrian
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
A storage for options typed value containers)
Static storage of an output device and its base (abstract) implementation.
A basic edge for routing applications.
A planItem can be a Trip which contains multiple tripItems.
double getDepartPos(bool replaceDefault=true) const
void saveVehicles(OutputDevice &os, OutputDevice *const typeos, bool asAlternatives, OptionsCont &options) const
double getDestinationPos() const
const std::string stopDest
SVCPermissions getModes() const
virtual ~PersonTrip()
Destructor.
void updateMOdes(SVCPermissions additionalModes)
double walkFactor
walking speed factor
const std::string stopOrigin
const std::string & getStopDest() const
double getWalkFactor() const
std::vector< ROVehicle * > myVehicles
the vehicles which may be used for routing
SUMOTime getDuration() const
return duration sum of all trip items
double getArrivalPos(bool replaceDefault=true) const
const ROEdge * getDestination() const
PersonTrip(const ROEdge *const _from, const ROEdge *const _to, const SVCPermissions modeSet, const double departPos, const std::string &_stopOrigin, const double arrivalPos, const std::string &_stopDest, double _walkFactor, const std::string &_group)
const std::string & getStopOrigin() const
virtual void addTripItem(TripItem *tripIt)
std::vector< ROVehicle * > & getVehicles()
void saveAsXML(OutputDevice &os, const bool extended, const bool asTrip, OptionsCont &options) const
const std::string group
group id for travelling in groups
virtual bool needsRouting() const
const std::string & getGroup() const
PersonTrip(const ROEdge *_to, const std::string _stopDest)
std::vector< TripItem * > myTripItems
the fully specified trips
void addVehicle(ROVehicle *veh)
PersonTrip & operator=(const PersonTrip &src)
Invalidated assignment operator.
const ROEdge * getOrigin() const
Every person has a plan comprising of multiple planItems.
virtual double getDestinationPos() const =0
virtual ~PlanItem()
Destructor.
virtual void saveAsXML(OutputDevice &os, const bool extended, const bool asTrip, OptionsCont &options) const =0
static const std::string UNDEFINED_STOPPING_PLACE
virtual bool isStop() const
virtual bool needsRouting() const
virtual const std::string & getStopDest() const
virtual const ROEdge * getDestination() const =0
virtual void saveVehicles(OutputDevice &, OutputDevice *const, bool, OptionsCont &) const
virtual SUMOTime getDuration() const =0
virtual PlanItem * clone() const =0
virtual const ROEdge * getOrigin() const =0
virtual void addTripItem(TripItem *)
A ride is part of a trip, e.g., go from here to here by car or bus.
Ride & operator=(const Ride &src)
Invalidated assignment operator.
double getDestinationPos() const
const std::string destStop
const std::string intended
Ride(const SUMOTime start, const ROEdge *const _from, const ROEdge *const _to, const std::string &_lines, const std::string &_group, const double cost, const double arrivalPos, const double _length, const std::string &_destStop="", const std::string &_intended="", const SUMOTime _depart=-1)
const ROEdge * getDestination() const
void saveAsXML(OutputDevice &os, const bool extended, OptionsCont &options) const
const ROEdge * getOrigin() const
A planItem can be a Stop.
const ROEdge * getDestination() const
const ROEdge * getOrigin() const
SUMOTime getDuration() const
Stop & operator=(const Stop &src)
Invalidated assignment operator.
double getDestinationPos() const
Stop(const SUMOVehicleParameter::Stop &stop, const ROEdge *const stopEdge)
void saveAsXML(OutputDevice &os, const bool, const bool, OptionsCont &) const
SUMOVehicleParameter::Stop stopDesc
const std::string & getStopDest() const
A TripItem is part of a trip, e.g., go from here to here by car.
virtual TripItem * clone() const =0
SUMOTime getStart() const
virtual const ROEdge * getDestination() const =0
TripItem(const SUMOTime start, const double cost)
SUMOTime getDuration() const
virtual const ROEdge * getOrigin() const =0
virtual double getDestinationPos() const =0
virtual void saveAsXML(OutputDevice &os, const bool extended, OptionsCont &options) const =0
virtual ~TripItem()
Destructor.
A walk is part of a trip, e.g., go from here to here by foot.
const ConstROEdgeVector edges
void saveAsXML(OutputDevice &os, const bool extended, OptionsCont &options) const
const ROEdge * getOrigin() const
Walk(const SUMOTime start, const ConstROEdgeVector &edges, const double cost, const double duration, const double speed, const double departPos, const double arrivalPos, const std::string &_destStop)
const ROEdge * getDestination() const
Walk & operator=(const Walk &src)
Invalidated assignment operator.
double getDestinationPos() const
Walk(const SUMOTime start, const ConstROEdgeVector &_edges, const double cost, const std::vector< double > &_exitTimes, double departPos=std::numeric_limits< double >::infinity(), double arrivalPos=std::numeric_limits< double >::infinity(), const std::string &_destStop="")
const std::vector< double > exitTimes
const std::string destStop
A person as used by router.
ROPerson & operator=(const ROPerson &src)
Invalidated assignment operator.
virtual ~ROPerson()
Destructor.
ROPerson(const SUMOVehicleParameter &pars, const SUMOVTypeParameter *type)
Constructor.
const ROEdge * getDepartEdge() const
Returns the first edge the person takes.
static void addTrip(std::vector< PlanItem * > &plan, const std::string &id, const ROEdge *const from, const ROEdge *const to, const SVCPermissions modeSet, const std::string &vTypes, const double departPos, const std::string &stopOrigin, const double arrivalPos, const std::string &busStop, double walkFactor, const std::string &group)
static void addStop(std::vector< PlanItem * > &plan, const SUMOVehicleParameter::Stop &stopPar, const ROEdge *const stopEdge)
static void addRide(std::vector< PlanItem * > &plan, const ROEdge *const from, const ROEdge *const to, const std::string &lines, double arrivalPos, const std::string &destStop, const std::string &group)
std::vector< PlanItem * > & getPlan()
void computeRoute(const RORouterProvider &provider, const bool removeLoops, MsgHandler *errorHandler)
static void addWalk(std::vector< PlanItem * > &plan, const ConstROEdgeVector &edges, const double duration, const double speed, const double departPos, const double arrivalPos, const std::string &busStop)
ROPerson(const ROPerson &src)
Invalidated copy constructor.
bool computeIntermodal(SUMOTime time, const RORouterProvider &provider, PersonTrip *const trip, const ROVehicle *const veh, MsgHandler *const errorHandler)
void saveAsXML(OutputDevice &os, OutputDevice *const typeos, bool asAlternatives, OptionsCont &options) const
Saves the complete person description.
std::vector< PlanItem * > myPlan
The plan of the person.
A routable thing such as a vehicle or person.
A vehicle as used by router.
Structure representing possible vehicle parameter.
Definition of vehicle stop (position and duration)
double startPos
The stopping position start.
void write(OutputDevice &dev, const bool close=true, const bool writeTagAndParents=true) const
Writes the stop as XML.
double endPos
The stopping position end.
std::string busstop
(Optional) bus stop if one is assigned to the stop
SUMOTime duration
The stopping duration.
Structure representing possible vehicle parameter.