83 WRITE_ERRORF(
TL(
"Unknown edge ('%') referenced in a vaporizer."),
id);
92 WRITE_ERRORF(
TL(
"A vaporization begin time is negative (edge id='%')."),
id);
96 WRITE_ERRORF(
TL(
"A vaporization ends before it starts (edge id='%')."),
id);
110 const std::string& base) {
121 std::vector<MSLane*> lanes;
122 for (
const std::string& laneID : attrs.
get<std::vector<std::string> >(
SUMO_ATTR_LANES,
id.c_str(), ok)) {
124 if (lane ==
nullptr) {
125 throw InvalidArgument(
"The lane '" + laneID +
"' to use within MSLaneSpeedTrigger '" +
id +
"' is not known.");
127 lanes.push_back(lane);
130 throw InvalidArgument(
"The lanes to use within MSLaneSpeedTrigger '" +
id +
"' are not known.");
132 if (lanes.size() == 0) {
133 throw InvalidArgument(
"No lane defined for MSLaneSpeedTrigger '" +
id +
"'.");
170 if ((chargeType !=
"normal") && (chargeType !=
"battery-exchange") && (chargeType !=
"fuel")) {
171 throw InvalidArgument(
"The chargeType to use within MSLaneSpeedTrigger '" +
id +
"' is invalid.");
175 throw InvalidArgument(
"Invalid position for charging station '" +
id +
"'.");
178 buildChargingStation(net,
id, lane, frompos, topos, name, chargingPower, efficiency, chargeInTransit, chargeDelay, chargeType, waitingTime, parkingArea);
196 MSLane*
const lane =
getLane(attrs,
"overheadWireSegment",
id);
197 if (lane ==
nullptr) {
198 WRITE_MESSAGEF(
TL(
"The overheadWireSegment '%' was not created as it is attached to internal lane. It will be build automatically."),
id);
203 WRITE_MESSAGEF(
TL(
"The overheadWireSegment '%' not built as it is attached to internal lane. It will be build automatically."),
id);
215 WRITE_MESSAGEF(
TL(
"The overheadWireSegment '%' has wrong position. Automatically set from 0 to the length of the lane."),
id);
223 WRITE_WARNING(
TL(
"Overhead wire solver (Eigen) not compiled in, expect errors in overhead wire simulation"))
237 if (substation ==
nullptr) {
238 throw InvalidArgument(
"Traction substation '" + substationId +
"' refereced by an OverheadWire Section is not known.");
240 throw InvalidArgument(
"Traction substation '" + substationId +
"' refereced by an OverheadWire Section is probably referenced twice (a known limitation of the actual version of overhead wire simulation).");
246 throw InvalidArgument(
"Segments referenced by Traction substation '" + substationId +
"' are not declared .");
252 for (
const std::string& laneID : forbiddenInnerLanesIDs) {
254 if (lane !=
nullptr) {
257 throw InvalidArgument(
"Unknown lane '" + laneID +
"' in Traction substation '" + substationId +
"'.");
266 std::vector<MSOverheadWire*> segments;
273 for (
const std::string& segmentID : segmentIDs) {
274 const MSLane* connection =
nullptr;
276 std::string neigboringOvrhdSegmentID;
279 if (ovrhdSegment ==
nullptr) {
280 throw InvalidArgument(
"The OverheadWireSegment with id='" + segmentID +
"' referenced by OverheadWireSegment for substation '" + substationId +
"' was not defined.");
284 if (!(ts == substation || ts ==
nullptr)) {
285 std::string tsName = ts->
getID();
286 throw InvalidArgument(
"The OverheadWireSegment '" + segmentID +
"' referenced by OverheadWireSegment for substation '" + substationId +
"' is already assigned to substation '" + tsName +
"'.");
294 const std::vector<std::pair<const MSLane*, const MSEdge*> > outgoingLanesAndEdges = lane->
getOutgoingViaLanes();
295 std::vector<const MSLane*> neigboringInnerLanes;
296 neigboringInnerLanes.reserve(outgoingLanesAndEdges.size());
297 for (
size_t it = 0; it < outgoingLanesAndEdges.size(); ++it) {
298 neigboringInnerLanes.push_back(outgoingLanesAndEdges[it].first);
303 for (std::vector<const MSLane*>::iterator it = neigboringInnerLanes.begin(); it != neigboringInnerLanes.end(); ++it) {
306 if (neigboringOvrhdSegmentID !=
"") {
310 neigboringOvrhdSegment =
nullptr;
311 neigboringOvrhdSegmentTractionSubstation =
nullptr;
314 if (neigboringOvrhdSegmentTractionSubstation == substation && !(*it)->isInternal()) {
316 if (connection !=
nullptr) {
328 for (std::vector<const MSLane*>::iterator it = neigboringInnerLanes.begin(); it != neigboringInnerLanes.end(); ++it) {
331 if (neigboringOvrhdSegmentID !=
"") {
335 neigboringOvrhdSegment =
nullptr;
336 neigboringOvrhdSegmentTractionSubstation =
nullptr;
339 if (neigboringOvrhdSegmentTractionSubstation == substation && !(*it)->isInternal()) {
341 if (connection !=
nullptr) {
355 for (
const std::string& segmentID : segmentIDs) {
360 for (
const std::string& segmentID : segmentIDs) {
361 if (segmentID ==
"") {
366 segments.push_back(ovrhdSegment);
374 for (
const std::string& clampID : clampIDs) {
376 if (clamp !=
nullptr) {
383 WRITE_WARNINGF(
TL(
"A connecting overhead wire start segment '%' defined for overhead wire clamp '%' is not assigned to the traction substation '%'."), clamp->
start->
getID(), clampID, substationId);
385 WRITE_WARNINGF(
TL(
"A connecting overhead wire end segment '%' defined for overhead wire clamp '%' is not assigned to the traction substation '%'."), clamp->
end->
getID(), clampID, substationId);
389 WRITE_WARNINGF(
TL(
"The overhead wire clamp '%' defined in an overhead wire section was not assigned to the substation '%'. Please define proper <overheadWireClamp .../> in additional files before defining overhead wire section."), clampID, substationId);
393 WRITE_WARNING(
TL(
"Overhead circuit solver requested, but solver support (Eigen) not compiled in."));
397 if (segments.size() == 0) {
398 throw InvalidArgument(
"No segments found for overHeadWireSection '" + substationId +
"'.");
402 segments[0]->getCircuit()->checkCircuit(substationId);
404 WRITE_WARNING(
TL(
"Cannot check circuit, overhead circuit solver support (Eigen) not compiled in."));
440 if (substation ==
nullptr) {
441 throw InvalidArgument(
"Traction substation '" + substationId +
"' using within an overheadWireClamp '" +
id +
"' is not known.");
449 if (ovrhdSegment_fromItsStart ==
nullptr) {
450 throw InvalidArgument(
"The overheadWireSegment '" + overhead_fromItsStart +
"' to use within overheadWireClamp '" +
id +
"' is not known.");
461 if (ovrhdSegment_fromItsEnd ==
nullptr) {
462 throw InvalidArgument(
"The overheadWireSegment '" + overhead_fromItsEnd +
"' to use within overheadWireClamp '" +
id +
"' is not known.");
469 if (substation->
findClamp(
id) ==
nullptr) {
470 substation->
addClamp(
id, ovrhdSegment_fromItsStart, ovrhdSegment_fromItsEnd);
472 WRITE_ERROR(
"The overhead wire clamp '" +
id +
"' is probably declared twice.")
476 WRITE_WARNING(
TL(
"Not building overhead wire clamps, overhead wire solver support (Eigen) not compiled in."));
479 WRITE_WARNING(
TL(
"Ignoring overhead wire clamps, they make no sense when overhead wire circuit solver is off."));
509 const std::vector<std::string>& lines = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_LINES,
id.c_str(), ok);
519 const int transportableCapacity = attrs.
getOpt<
int>(capacityAttr,
id.c_str(), ok, defaultCapacity);
522 buildStoppingPlace(net,
id, lines, lane, frompos, topos, element, ptStopName, transportableCapacity, parkingLength, color, angle);
529 throw InvalidArgument(
"Could not add access outside a stopping place.");
540 const bool random = accessPos ==
"random";
542 if (accessPos ==
"doors") {
544 }
else if (accessPos ==
"carriage") {
555 if (!
myCurrentStop->addAccess(lane, startPos, endPos, length, exit)) {
587 throw InvalidArgument(
"Invalid position for parking area '" +
id +
"'.");
589 const std::vector<std::string>& lines = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_LINES,
id.c_str(), ok);
591 beginParkingArea(net,
id, lines, acceptedBadges, lane, frompos, topos, capacity, width, length, angle, name, onRoad, departPos, lefthand);
624 const std::string& base) {
636 throw InvalidArgument(
"The node calibrator '" +
id +
"' cannot define an edge or lane as well.");
638 const std::string nodeID = attrs.
get<std::string>(
SUMO_ATTR_NODE,
id.c_str(), ok);
640 if (node ==
nullptr) {
641 throw InvalidArgument(
"The node " + nodeID +
" to use within the calibrator '" +
id +
"' is not known.");
645 const std::string edgeID = attrs.
get<std::string>(
SUMO_ATTR_EDGE,
id.c_str(), ok);
647 if (edge ==
nullptr) {
648 throw InvalidArgument(
"The edge " + edgeID +
" to use within the calibrator '" +
id +
"' is not known.");
651 lane =
getLane(attrs,
"calibrator",
id);
652 if (&lane->
getEdge() != edge) {
653 throw InvalidArgument(
"The edge " + edgeID +
" to use within the calibrator '" +
id
654 +
"' does not match the calibrator lane '" + lane->
getID() +
".");
658 lane =
getLane(attrs,
"calibrator",
id);
662 const double pos = node !=
nullptr ? 0 :
getPosition(attrs, lane,
"calibrator",
id, edge);
665 const std::string file =
getFileName(attrs, base,
true);
672 if (routeProbe !=
"") {
674 if (probe ==
nullptr) {
675 throw InvalidArgument(
"The routeProbe '" + routeProbe +
"' to use within the calibrator '" +
id +
"' is not known.");
679 if (lane !=
nullptr && edge->
getLanes().size() > 1) {
681 +
"' defined for lane '" + lane->
getID()
682 +
"' will collect data for all lanes of edge '" + edge->
getID() +
"'.");
689 MSCalibrator* trigger =
buildCalibrator(
id, edge, lane, node, pos, file, outfile, period, probe, invalidJamThreshold, vTypes, local);
706 throw InvalidArgument(
"Could not build rerouter '" +
id +
"'; probably declared twice.");
709 for (
const std::string& edgeID : attrs.
get<std::vector<std::string> >(
SUMO_ATTR_EDGES,
id.c_str(), ok)) {
711 if (edge ==
nullptr) {
712 throw InvalidArgument(
"The edge '" + edgeID +
"' to use within rerouter '" +
id +
"' is not known.");
714 edges.push_back(edge);
717 throw InvalidArgument(
"The edge to use within rerouter '" +
id +
"' is not known.");
719 if (edges.size() == 0) {
728 const double radius = attrs.
getOpt<
double>(
SUMO_ATTR_RADIUS,
id.c_str(), ok, std::numeric_limits<double>::max());
730 WRITE_WARNINGF(
TL(
"It is strongly advisable to give an explicit position when using radius in the definition of rerouter '%'."),
id)
735 if (posSplit.size() == 1) {
738 lanePos += edges.front()->getLanes()[0]->getLength();
740 p = edges.front()->getLanes()[0]->geometryPositionAtOffset(lanePos);
741 }
else if (posSplit.size() == 2) {
743 }
else if (posSplit.size() == 3) {
763 const std::vector<MSLane*>& destLanes,
764 const std::string& file) {
773 const std::string& file,
774 const std::string& outfile,
777 const double invalidJamThreshold,
778 const std::string& vTypes) {
781 probe, invalidJamThreshold, vTypes);
791 const std::string& file,
792 const std::string& outfile,
795 const double invalidJamThreshold,
796 const std::string& vTypes,
798 return new MSCalibrator(
id, edge, lane, node, pos, file, outfile, freq,
799 edge ==
nullptr ? 0. : edge->
getLength(),
800 probe, invalidJamThreshold, vTypes, local,
true);
806 MSEdgeVector& edges,
double prob,
bool off,
bool optional,
807 SUMOTime timeThreshold,
const std::string& vTypes,
const Position& pos,
const double radius) {
808 return new MSTriggeredRerouter(
id, edges, prob, off, optional, timeThreshold, vTypes, pos, radius);
814 double frompos,
double topos,
const SumoXMLTag element, std::string ptStopName,
815 int personCapacity,
double parkingLength,
RGBColor& color,
double angle) {
816 myCurrentStop =
new MSStoppingPlace(
id, element, lines, *lane, frompos, topos, ptStopName, personCapacity, parkingLength, color, angle);
827 const std::vector<std::string>& lines,
828 const std::vector<std::string>& badges,
829 MSLane* lane,
double frompos,
double topos,
830 unsigned int capacity,
831 double width,
double length,
double angle,
const std::string& name,
833 const std::string& departPos,
836 MSParkingArea* stop =
new MSParkingArea(
id, lines, badges, *lane, frompos, topos, capacity, width, length, angle, name, onRoad, departPos, lefthand);
839 throw InvalidArgument(
"Could not build parking area '" +
id +
"'; probably declared twice.");
848 double width,
double length,
849 double angle,
double slope) {
852 myParkingArea->addLotEntry(x, y, z, width, length, angle, slope);
855 throw InvalidArgument(
"Cannot not add lot entry to on-road parking area.");
858 throw InvalidArgument(
"Could not add lot entry outside a parking area.");
869 throw InvalidArgument(
"Could not end a parking area that is not opened.");
880 throw InvalidArgument(
"Could not end a stopping place that is not opened.");
887 const std::string& name,
double chargingPower,
double efficiency,
bool chargeInTransit,
890 chargeInTransit, chargeDelay, chargeType, waitingTime) :
new MSChargingStation(
id, parkingArea, name, chargingPower, efficiency,
891 chargeInTransit, chargeDelay, chargeType, waitingTime);
893 delete chargingStation;
894 throw InvalidArgument(
"Could not build charging station '" +
id +
"'; probably declared twice.");
902 bool voltageSource) {
905 delete overheadWireSegment;
906 throw InvalidArgument(
"Could not build overheadWireSegment '" +
id +
"'; probably declared twice.");
912 if (frontConnection == NULL && behindConnection == NULL) {
914 }
else if (frontConnection != NULL && behindConnection == NULL) {
917 }
else if (frontConnection == NULL && behindConnection != NULL) {
920 }
else if (frontConnection != NULL && behindConnection != NULL) {
931 delete myTractionSubstation;
932 throw InvalidArgument(
"Could not build traction substation '" +
id +
"'; probably declared twice.");
942 const std::string& base,
943 const bool allowEmpty) {
963 const std::string& tt,
964 const std::string& tid) {
968 if (lane ==
nullptr) {
976 throw InvalidArgument(
"The lane " + objectid +
" to use within the " + tt +
" '" + tid +
"' is not known.");
986 if (!ok || objectID.size() == 0) {
993 throw InvalidArgument(
"The parkingArea " + objectID +
" to use within the " + tt +
" '" + tid +
"' is not known.");
1002 const std::string& tt,
const std::string& tid,
1004 assert(lane !=
nullptr || edge !=
nullptr);
1017 pos = length - (double) 0.1;
1019 if (lane !=
nullptr) {
1020 throw InvalidArgument(
"The position of " + tt +
" '" + tid +
"' lies beyond the lane's '" + lane->
getID() +
"' length.");
1022 throw InvalidArgument(
"The position of " + tt +
" '" + tid +
"' lies beyond the edge's '" + edge->
getID() +
"' length.");
std::vector< MSEdge * > MSEdgeVector
#define WRITE_WARNINGF(...)
#define WRITE_MESSAGEF(...)
#define WRITE_ERRORF(...)
#define WRITE_WARNING(msg)
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
@ SVC_PEDESTRIAN
pedestrian
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_REROUTER
A rerouter.
@ SUMO_TAG_ROUTEPROBE
a routeprobe detector
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
@ SUMO_TAG_CONTAINER_STOP
A container stop.
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_OVERHEAD_WIRE_SEGMENT
An overhead wire segment.
@ SUMO_TAG_CALIBRATOR
A calibrator placed over edge.
@ SUMO_TAG_VSS
A variable speed sign.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_ACCEPTED_BADGES
@ SUMO_ATTR_RADIUS
The turning radius at an intersection in m.
@ SUMO_ATTR_SUBSTATIONID
id of a traction substation substation
@ SUMO_ATTR_JAM_DIST_THRESHOLD
@ SUMO_ATTR_CHARGETYPE
Charge type (fuel or electric).
@ SUMO_ATTR_PARKING_LENGTH
@ SUMO_ATTR_VOLTAGE
voltage of the traction substation [V]
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_OVERHEAD_WIRE_FORBIDDEN
forbidden lanes for overhead wire segment
@ SUMO_ATTR_HALTING_TIME_THRESHOLD
@ SUMO_ATTR_OVERHEAD_WIRE_CLAMP_END
id of the overhead wire segment, to the end of which the overhead wire clamp is connected
@ SUMO_ATTR_CHARGEINTRANSIT
Allow/disallow charge in transit in Charging Stations.
@ SUMO_ATTR_CONTAINER_CAPACITY
@ SUMO_ATTR_OVERHEAD_WIRE_CLAMPS
overhead wire clamps for overhead wire segment
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_ROADSIDE_CAPACITY
@ SUMO_ATTR_CURRENTLIMIT
current limit of the traction substation [A]
@ SUMO_ATTR_CHARGINGPOWER
@ SUMO_ATTR_OVERHEAD_WIRE_CLAMP_START
id of the overhead wire segment, to the start of which the overhead wire clamp is connected
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_EFFICIENCY
Eficiency of the charge in Charging Stations.
@ SUMO_ATTR_VOLTAGESOURCE
a voltage source on the overhead wire segment [bool]
@ SUMO_ATTR_PERSON_CAPACITY
@ SUMO_ATTR_OVERHEAD_WIRE_SEGMENTS
@ SUMO_ATTR_CHARGEDELAY
Delay in the charge of charging stations (different of waiting time).
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Base (microsim) event class.
static bool isAbsolute(const std::string &path)
Returns the information whether the given path is absolute.
static std::string getConfigurationRelative(const std::string &configPath, const std::string &path)
Returns the second path as a relative path to the first file.
void registerParent(const int tag, GenericSAXHandler *handler)
Assigning a parent handler which is enabled when the specified tag is closed.
Calibrates the flow on a segment to a specified one.
Calibrates the flow on a segment to a specified one.
A road/street connecting two junctions.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
SUMOTime decVaporization(SUMOTime t)
Disables vaporization.
double getLength() const
return the length of the edge
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....
SUMOTime incVaporization(SUMOTime t)
Enables vaporization.
virtual void addEvent(Command *operation, SUMOTime execTimeStep=-1)
Adds an Event.
static bool gOverheadWireSolver
static MELoop * gMesoNet
mesoscopic simulation infrastructure
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
The base class for an intersection.
Representation of a lane in the micro simulation.
double getLength() const
Returns the lane's length.
const MSLane * getInternalFollowingLane(const MSLane *const) const
returns the internal lane leading to the given lane or nullptr, if there is none
bool allowsVehicleClass(SUMOVehicleClass vclass) const
const std::vector< std::pair< const MSLane *, const MSEdge * > > getOutgoingViaLanes() const
get the list of outgoing lanes
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
std::vector< const MSLane * > getNormalIncomingLanes() const
get the list of all direct (disregarding internal predecessors) non-internal predecessor lanes of thi...
MSEdge & getEdge() const
Returns the lane's edge.
Changes the speed allowed on a set of lanes.
The simulated network and simulation perfomer.
bool addStoppingPlace(const SumoXMLTag category, MSStoppingPlace *stop)
Adds a stopping place.
MSDetectorControl & getDetectorControl()
Returns the detector control.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
bool addTractionSubstation(MSTractionSubstation *substation)
Adds a traction substation.
std::string getStoppingPlaceID(const MSLane *lane, const double pos, const SumoXMLTag category) const
Returns the stop of the given category close to the given position.
MSJunctionControl & getJunctionControl()
Returns the junctions control.
MSStoppingPlace * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Returns the named stopping place of the given category.
MSTractionSubstation * findTractionSubstation(const std::string &substationId)
find electrical substation by its id
Definition of overhead wire segment.
MSTractionSubstation * getTractionSubstation() const
void setTractionSubstation(MSTractionSubstation *substation)
A lane area vehicles can halt at.
Writes routes of vehicles passing a certain edge.
A lane area vehicles can halt at.
const MSLane & getLane() const
Returns the lane this stop is located at.
static int getDefaultTransportablesAbreast(double length, SumoXMLTag element)
Traction substation powering one or more overhead wire sections.
void addOverheadWireClampToCircuit(const std::string id, MSOverheadWire *startSegment, MSOverheadWire *endSegment)
void addClamp(const std::string &id, MSOverheadWire *startPos, MSOverheadWire *endPos)
bool isAnySectionPreviouslyDefined()
bool isForbidden(const MSLane *lane)
void addOverheadWireSegmentToCircuit(MSOverheadWire *newOverheadWireSegment)
OverheadWireClamp * findClamp(std::string id)
Find an overhead wire clamp by its ID.
void addForbiddenLane(MSLane *lane)
Reroutes traffic objects passing an edge.
static const std::map< std::string, MSTriggeredRerouter * > & getInstances()
return all rerouter instances
The XML-Handler for network loading.
MSParkingArea * getParkingArea(const SUMOSAXAttributes &attrs, const std::string &tt, const std::string &tid)
Returns the parking area defined by attribute "parkingArea".
NLTriggerBuilder()
Constructor.
virtual void buildOverheadWireClamp(MSNet &net, const std::string &id, MSLane *lane_start, MSLane *lane_end)
MSParkingArea * myParkingArea
definition of the currently parsed parking area
void parseAndBuildTractionSubstation(MSNet &net, const SUMOSAXAttributes &attrs)
Parses its values and builds a traction substation.
void addAccess(MSNet &net, const SUMOSAXAttributes &attrs)
Parses the values and adds an access point to the currently parsed stopping place.
void parseAndBuildOverheadWireSegment(MSNet &net, const SUMOSAXAttributes &attrs)
Parses its values and builds an overhead wire segment.
void parseAndBuildCalibrator(MSNet &net, const SUMOSAXAttributes &attrs, const std::string &base)
Parses his values and builds a mesoscopic or microscopic calibrator.
double getPosition(const SUMOSAXAttributes &attrs, MSLane *lane, const std::string &tt, const std::string &tid, MSEdge *edge=0)
returns the position on the lane checking it
void buildInnerOverheadWireSegments(MSNet &net, const MSLane *connection, const MSLane *frontConnection, const MSLane *behindConnection)
Builds an overhead wire inner segments.
virtual void buildStoppingPlace(MSNet &net, std::string id, std::vector< std::string > lines, MSLane *lane, double frompos, double topos, const SumoXMLTag element, std::string string, int personCapacity, double parkingLength, RGBColor &color, double angle)
Builds a stopping place.
virtual MSLaneSpeedTrigger * buildLaneSpeedTrigger(MSNet &net, const std::string &id, const std::vector< MSLane * > &destLanes, const std::string &file)
Builds a lane speed trigger.
virtual void buildChargingStation(MSNet &net, const std::string &id, MSLane *lane, double frompos, double topos, const std::string &name, double chargingPower, double efficiency, bool chargeInTransit, SUMOTime chargeDelay, std::string chargeType, SUMOTime waitingTime, MSParkingArea *parkingArea)
Builds a charging station.
virtual void endParkingArea()
End a parking area.
void parseAndBuildLaneSpeedTrigger(MSNet &net, const SUMOSAXAttributes &attrs, const std::string &base)
Parses his values and builds a lane speed trigger.
void parseAndAddLotEntry(const SUMOSAXAttributes &attrs)
Parses his values and adds a lot entry to current parking area.
void updateParkingAreaDefaultCapacity()
updates the parkingArea default capacity
NLHandler * myHandler
The parent handler to set for subhandlers.
MSLane * getLane(const SUMOSAXAttributes &attrs, const std::string &tt, const std::string &tid)
Returns the lane defined by attribute "lane".
void buildVaporizer(const SUMOSAXAttributes &attrs)
Builds a vaporization.
void parseAndBuildRerouter(MSNet &net, const SUMOSAXAttributes &attrs)
Parses his values and builds a rerouter.
void parseAndBuildOverheadWireSection(MSNet &net, const SUMOSAXAttributes &attrs)
Parses its values and builds an overhead wire section.
virtual void beginParkingArea(MSNet &net, const std::string &id, const std::vector< std::string > &lines, const std::vector< std::string > &badges, MSLane *lane, double frompos, double topos, unsigned int capacity, double width, double length, double angle, const std::string &name, bool onRoad, const std::string &departPos, bool lefthand)
Begin a parking area.
void setHandler(NLHandler *handler)
Sets the parent handler to use for nested parsing.
bool myParkingAreaCapacitySet
virtual ~NLTriggerBuilder()
Destructor.
void buildTractionSubstation(MSNet &net, std::string id, double voltage, double currentLimit)
Builds a traction substation.
bool myHaveWarnedAboutEigen
virtual METriggeredCalibrator * buildMECalibrator(const std::string &id, MSEdge *edge, double pos, const std::string &file, const std::string &outfile, const SUMOTime freq, MSRouteProbe *probe, const double invalidJamThreshold, const std::string &vTypes)
builds a mesoscopic calibrator
void addLotEntry(double x, double y, double z, double width, double length, double angle, double slope)
Add a lot entry to current parking area.
void parseAndBuildChargingStation(MSNet &net, const SUMOSAXAttributes &attrs)
Parses his values and builds a charging station.
void parseAndBuildOverheadWireClamp(MSNet &net, const SUMOSAXAttributes &attrs)
Parses its values and builds an overhead wire clamp.
virtual MSTriggeredRerouter * buildRerouter(MSNet &net, const std::string &id, MSEdgeVector &edges, double prob, bool off, bool optional, SUMOTime timeThreshold, const std::string &vTypes, const Position &pos, const double radius)
builds an rerouter
virtual void endStoppingPlace()
End a stopping place.
virtual void buildOverheadWireSegment(MSNet &net, const std::string &id, MSLane *lane, double frompos, double topos, bool voltageSource)
Builds an overhead wire segment.
MSStoppingPlace * myCurrentStop
The currently parsed stop to add access points to.
MSStoppingPlace * getCurrentStop()
virtual MSCalibrator * buildCalibrator(const std::string &id, MSEdge *edge, MSLane *lane, MSJunction *node, double pos, const std::string &file, const std::string &outfile, const SUMOTime freq, const MSRouteProbe *probe, const double invalidJamThreshold, const std::string &vTypes, const bool local)
builds a microscopic calibrator
void parseAndBuildStoppingPlace(MSNet &net, const SUMOSAXAttributes &attrs, const SumoXMLTag element)
Parses the values and builds a stopping places for busses, trains or container vehicles.
void parseAndBeginParkingArea(MSNet &net, const SUMOSAXAttributes &attrs)
Parses his values and builds a parking area.
std::string getFileName(const SUMOSAXAttributes &attrs, const std::string &base, const bool allowEmpty=false)
Helper method to obtain the filename.
const std::string & getID() const
Returns the id.
T get(const std::string &id) const
Retrieves an item.
static OptionsCont & getOptions()
Retrieves the options.
A point in 2D or 3D with translation and scaling methods.
static const Position INVALID
used to indicate that a position is valid
static const RGBColor INVISIBLE
Encapsulated SAX-Attributes.
virtual std::string getString(int id, bool *isPresent=nullptr) const =0
Returns the string-value of the named (by its enum-value) attribute.
SUMOTime getOptPeriod(const char *objectid, bool &ok, SUMOTime defaultValue, bool report=true) const
Tries to read the SUMOTime 'period' attribute.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue=T(), bool report=true) const
Tries to read given attribute assuming it is an int.
SUMOTime getOptSUMOTimeReporting(int attr, const char *objectid, bool &ok, SUMOTime defaultValue, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
SUMOTime getSUMOTimeReporting(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
std::vector< std::string > getVector()
return vector of strings
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
A wrapper for a Command function.
#define UNUSED_PARAMETER(x)