174 throw TraCIException(
"The vehicle type '" + typeID +
"' is not known.");
182 for (
const MSEdge* e : edges) {
183 result.
edges.push_back(e->getID());
193 std::vector<TraCIStage>
195 const std::string& modes,
const SUMOTime depart,
const int routingMode,
const double speed,
const double walkFactor,
196 const double departPos,
const double arrivalPos,
const double departPosLat,
197 const std::string& pType,
const std::string& vehType) {
200 std::vector<TraCIStage> result;
212 const std::string mode = st.next();
215 }
else if (mode ==
"bicycle") {
217 }
else if (mode ==
"public") {
232 for (
const MSEdge* e : edges) {
233 result.back().edges.push_back(e->getID());
235 result.back().travelTime = result.back().cost = cost;
242 throw TraCIException(
"Invalid vehicle type '" + type->
getID() +
"', it is not allowed on the start edge.");
247 std::vector<MSNet::MSIntermodalRouter::TripItem> items;
248 if (
MSNet::getInstance()->getIntermodalRouter().compute(fromEdge, toEdge, departPos, arrivalPos,
249 pedType->
getMaxSpeed() * walkFactor, vehicle, modeSet, dep, items)) {
250 for (std::vector<MSNet::MSIntermodalRouter::TripItem>::iterator it = items.begin(); it != items.end(); ++it) {
251 if (!it->edges.empty()) {
252 if (it->line ==
"") {
254 }
else if (vehicle != 0 && it->line == vehicle->getID()) {
257 result.back().destStop = it->destStop;
258 result.back().line = it->line;
259 for (
const MSEdge* e : it->edges) {
260 result.back().edges.push_back(e->
getID());
262 result.back().travelTime = result.back().cost = it->cost;
277 const std::string attrName = key.substr(16);
280 throw TraCIException(
"Invalid chargingStation '" + objectID +
"'");
285 throw TraCIException(
"Invalid chargingStation parameter '" + attrName +
"'");
288 const std::string attrName = key.substr(12);
293 if (attrName ==
"capacity") {
295 }
else if (attrName ==
"occupancy") {
298 throw TraCIException(
"Invalid parkingArea parameter '" + attrName +
"'");
301 throw TraCIException(
"Parameter '" + key +
"' is not supported.");
A lane area vehicles can halt at.
std::map< std::string, SubscribedValues > SubscribedContextValues
double ymin() const
Returns minimum y-coordinate.
static void init()
Initialises the xml-subsystem.
const SubscribedContextValues & getContextSubscriptionResults() const
double xmax() const
Returns maximum x-coordinate.
virtual void deleteVehicle(SUMOVehicle *v, bool discard=false)
Deletes the vehicle.
const Boundary & getConvBoundary() const
Returns the converted boundary.
MSStoppingPlace * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Returns the named stopping place of the given category.
virtual double recomputeCosts(const std::vector< const E *> &edges, const V *const v, SUMOTime msTime) const =0
static void simulationStep(const SUMOTime time=0)
Advances by one step (or up to the given time)
static void load(const std::vector< std::string > &args)
load a simulation with the given arguments
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
static SUMOTime getCurrentTime()
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...
double zmax() const
Returns maximum z-coordinate.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSPedestrianRouterDijkstra & getPedestrianRouter(const MSEdgeVector &prohibited=MSEdgeVector()) const
static std::string getParameter(const std::string &objectID, const std::string &key)
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...
int getActiveVehicleCount() const
Returns the number of build vehicles that have not been removed or need to wait for a passenger or a ...
std::map< std::string, TraCIValues > SubscribedValues
std::vector< const MSEdge * > ConstMSEdgeVector
const std::string & getID() const
Returns the id.
static TraCIStage findRoute(const std::string &from, const std::string &to, const std::string &typeID, const SUMOTime depart, const int routingMode)
bool hasVType(const std::string &id) const
Asks for existence of a vehicle type.
double zmin() const
Returns minimum z-coordinate.
#define UNUSED_PARAMETER(x)
A class that stores a 2D geometrical boundary.
The car-following model and parameter.
static void setArgs(int argc, char **argv)
Stores the command line arguments for later parsing.
const SubscribedValues & getSubscriptionResults() const
A road/street connecting two junctions.
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.
std::vector< std::string > edges
The sequence of edges to travel.
void close()
Connects to the specified SUMO server.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
SubscribedValues mySubscribedValues
int getCapacity() const
Returns the area capacity.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
double xmin() const
Returns minimum x-coordinate.
int getOccupancy() const
Returns the area occupancy.
vehicle is a passenger car (a "normal" car)
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.
static TraCIBoundary getNetBoundary()
Structure representing possible vehicle parameter.
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...
MSInsertionControl & getInsertionControl()
Returns the insertion control.
const std::string DEFAULT_PEDTYPE_ID
int getPendingFlowCount() const
Returns the number of flows that are still active.
const std::string & getID() const
Returns the name of the vehicle type.
double travelTime
duration of the stage
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
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)
static int getMinExpectedNumber()
std::map< int, TraCIValue > TraCIValues
{object->{variable->value}}
SubscribedContextValues mySubscribedContextValues
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector()) const
The class responsible for building and deletion of vehicles.
SVCPermissions getPermissions() const
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.
void simulationStep()
Performs a single simulation step.
double ymax() const
Returns maximum y-coordinate.
static SUMOTime getDeltaT()
vehicles ignoring classes
SUMOVehicleClass getVehicleClass() const
Get this vehicle type's vehicle class.
double getTotalCharged() const