101 throw TraCIException(
"The vehicle type '" + typeID +
"' is not known.");
109 for (
const MSEdge* e : edges) {
110 result.
edges.push_back(e->getID());
120 std::vector<TraCIStage>
122 const std::string modes,
const SUMOTime depart,
const int routingMode,
const double speed,
const double walkFactor,
123 const double departPos,
const double arrivalPos,
const double departPosLat,
124 const std::string& pType,
const std::string& vehType) {
127 std::vector<TraCIStage> result;
139 const std::string mode = st.next();
142 }
else if (mode ==
"bicycle") {
144 }
else if (mode ==
"public") {
159 for (
const MSEdge* e : edges) {
160 result.back().edges.push_back(e->getID());
162 result.back().travelTime = result.back().cost = cost;
169 throw TraCIException(
"Invalid vehicle type '" + type->
getID() +
"', it is not allowed on the start edge.");
174 std::vector<MSNet::MSIntermodalRouter::TripItem> items;
175 if (
MSNet::getInstance()->getIntermodalRouter().compute(fromEdge, toEdge, departPos, arrivalPos,
176 pedType->
getMaxSpeed() * walkFactor, vehicle, modeSet, dep, items)) {
177 for (std::vector<MSNet::MSIntermodalRouter::TripItem>::iterator it = items.begin(); it != items.end(); ++it) {
178 if (!it->edges.empty()) {
179 if (it->line ==
"") {
181 }
else if (vehicle != 0 && it->line == vehicle->getID()) {
184 result.back().destStop = it->destStop;
185 result.back().line = it->line;
186 for (
const MSEdge* e : it->edges) {
187 result.back().edges.push_back(e->
getID());
189 result.back().travelTime = result.back().cost = it->cost;
204 const std::string attrName = key.substr(16);
207 throw TraCIException(
"Invalid chargingStation '" + objectID +
"'");
212 throw TraCIException(
"Invalid chargingStation parameter '" + attrName +
"'");
215 const std::string attrName = key.substr(12);
220 if (attrName ==
"capacity") {
222 }
else if (attrName ==
"occupancy") {
225 throw TraCIException(
"Invalid parkingArea parameter '" + attrName +
"'");
228 throw TraCIException(
"Parameter '" + key +
"' is not supported.");
A lane area vehicles can halt at.
int getCapacity() const
Returns the area capacity.
int getOccupancy() const
Returns the area occupancy.
double xmax() const
Returns maximum x-coordinate.
int getPendingFlowCount() const
Returns the number of flows that are still active.
virtual void deleteVehicle(SUMOVehicle *v, bool discard=false)
Deletes the vehicle.
SUMOVehicleClass getVehicleClass() const
Get this vehicle type's vehicle class.
double zmax() const
Returns maximum z-coordinate.
double ymax() const
Returns maximum y-coordinate.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
MSPedestrianRouterDijkstra & getPedestrianRouter(const MSEdgeVector &prohibited=MSEdgeVector()) const
static SUMOTime getDeltaT()
int getActiveVehicleCount() const
Returns the number of build vehicles that have not been removed or need to wait for a passenger or a ...
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
virtual bool compute(const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into)=0
Builds the route between the given edges using the minimum effort at the given time The definition of...
SVCPermissions getPermissions() const
static bool dictionary(const std::string &id, MSEdge *edge)
Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary...
static int getMinExpectedNumber()
std::vector< const MSEdge * > ConstMSEdgeVector
double compute(const E *from, const E *to, double departPos, double arrivalPos, double speed, SUMOTime msTime, const N *onlyNode, std::vector< const E * > &into, bool allEdges=false)
Builds the route between the given edges using the minimum effort at the given time The definition of...
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
#define UNUSED_PARAMETER(x)
static std::vector< TraCIStage > findIntermodalRoute(const std::string &from, const std::string &to, const std::string modes, const SUMOTime depart, const int routingMode, const double speed, const double walkFactor, const double departPos, const double arrivalPos, const double departPosLat, const std::string &pType, const std::string &vehType)
A class that stores a 2D geometrical boundary.
The car-following model and parameter.
MSStoppingPlace * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Returns the named stopping place of the given category.
const std::string & getID() const
Returns the id.
A road/street connecting two junctions.
double travelTime
duration of the stage
static bool startsWith(const std::string &str, const std::string prefix)
Checks whether a given string starts with the prefix.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Representation of a vehicle.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
double getTotalCharged() const
bool hasVType(const std::string &id) const
Asks for existence of a vehicle type.
const Boundary & getConvBoundary() const
Returns the converted boundary.
vehicle is a passenger car (a "normal" car)
static SUMOTime getCurrentTime()
MSVehicleType * getVType(const std::string &id=DEFAULT_VTYPE_ID, std::mt19937 *rng=0)
Returns the named vehicle type or a sample from the named distribution.
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector()) const
Structure representing possible vehicle parameter.
MSInsertionControl & getInsertionControl()
Returns the insertion control.
const std::string DEFAULT_PEDTYPE_ID
double xmin() const
Returns minimum x-coordinate.
virtual double recomputeCosts(const std::vector< const E * > &edges, const V *const v, SUMOTime msTime) const =0
const std::string & getID() const
Returns the name of the vehicle type.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
double ymin() const
Returns minimum y-coordinate.
static TraCIStage findRoute(const std::string &from, const std::string &to, const std::string &typeID, const SUMOTime depart, const int routingMode)
The class responsible for building and deletion of vehicles.
virtual SUMOVehicle * buildVehicle(SUMOVehicleParameter *defs, const MSRoute *route, MSVehicleType *type, const bool ignoreStopErrors, const bool fromRouteFile=true)
Builds a vehicle, increases the number of built vehicles.
static std::string getParameter(const std::string &objectID, const std::string &key)
static TraCIBoundary getNetBoundary()
vehicles ignoring classes
double zmin() const
Returns minimum z-coordinate.
std::vector< std::string > edges
The sequence of edges to travel.