60 : myHandler(nullptr), myParkingArea(nullptr), myCurrentStop(nullptr) {}
73 WRITE_WARNING(
"Vaporizers are deprecated. Use rerouters instead.");
82 WRITE_ERROR(
"Unknown edge ('" +
id +
"') referenced in a vaporizer.");
91 WRITE_ERROR(
"A vaporization begin time is negative (edge id='" +
id +
"').");
95 WRITE_ERROR(
"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 +
"'.");
166 throw InvalidArgument(
"Invalid position for charging station '" +
id +
"'.");
169 buildChargingStation(net,
id, lane, frompos, topos, name, chargingPower, efficiency, chargeInTransit, chargeDelay);
186 MSLane*
const lane =
getLane(attrs,
"overheadWireSegment",
id);
187 if (lane ==
nullptr) {
188 WRITE_MESSAGE(
"The overheadWireSegment '" +
id +
"' was not created as it is attached to internal lane. It will be build automatically.");
193 WRITE_MESSAGE(
"The overheadWireSegment '" +
id +
"' not built as it is attached to internal lane. It will be build automatically.");
205 WRITE_MESSAGE(
"The overheadWireSegment '" +
id +
"' has wrong position. Automatically set from 0 to the length of the lane.");
213 WRITE_WARNING(
"Overhead wire solver (Eigen) not compiled in, expect errors in overhead wire simulation")
227 if (substation ==
nullptr) {
228 throw InvalidArgument(
"Traction substation '" + substationId +
"' refereced by an OverheadWire Section is not known.");
230 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).");
236 throw InvalidArgument(
"Segments referenced by Traction Substation '" + substationId +
"' are not declared .");
242 if (forbiddenInnerLanesStrings !=
"") {
245 for (std::vector<std::string>::iterator i = forbiddenInnerLanesIDs.begin(); i != forbiddenInnerLanesIDs.end(); ++i) {
247 if (lane !=
nullptr) {
259 std::vector<MSOverheadWire*> segments;
266 for (std::vector<std::string>::iterator it_segment = segmentIDs.begin(); it_segment != segmentIDs.end(); ++it_segment) {
268 const MSLane* connection =
nullptr;
270 std::string neigboringOvrhdSegmentID;
273 if (ovrhdSegment ==
nullptr) {
274 throw InvalidArgument(
"The OverheadWireSegment with id='" + (*it_segment) +
"' referenced by OverheadWireSgment for substation '" + substationId +
"' was not defined.");
278 if (!(ts == substation || ts ==
nullptr)) {
279 std::string tsName = ts->
getID();
280 throw InvalidArgument(
"The OverheadWireSegment '" + (*it_segment) +
"' referenced by OverheadWireSgment for substation '" + substationId +
"' is already assigned to substation '" + tsName +
"'.");
288 const std::vector<std::pair<const MSLane*, const MSEdge*> > outgoingLanesAndEdges = lane->
getOutgoingViaLanes();
289 std::vector<const MSLane*> neigboringInnerLanes;
290 neigboringInnerLanes.reserve(outgoingLanesAndEdges.size());
291 for (
size_t it = 0; it < outgoingLanesAndEdges.size(); ++it) {
292 neigboringInnerLanes.push_back(outgoingLanesAndEdges[it].first);
297 for (std::vector<const MSLane*>::iterator it = neigboringInnerLanes.begin(); it != neigboringInnerLanes.end(); ++it) {
300 if (neigboringOvrhdSegmentID !=
"") {
304 neigboringOvrhdSegment =
nullptr;
305 neigboringOvrhdSegmentTractionSubstation =
nullptr;
308 if (neigboringOvrhdSegmentTractionSubstation == substation && !(*it)->isInternal()) {
310 if (connection !=
nullptr) {
322 for (std::vector<const MSLane*>::iterator it = neigboringInnerLanes.begin(); it != neigboringInnerLanes.end(); ++it) {
325 if (neigboringOvrhdSegmentID !=
"") {
329 neigboringOvrhdSegment =
nullptr;
330 neigboringOvrhdSegmentTractionSubstation =
nullptr;
333 if (neigboringOvrhdSegmentTractionSubstation == substation && !(*it)->isInternal()) {
335 if (connection !=
nullptr) {
349 for (std::vector<std::string>::iterator it_segment = segmentIDs.begin(); it_segment != segmentIDs.end(); ++it_segment) {
354 for (std::vector<std::string>::iterator it_segment = segmentIDs.begin(); it_segment != segmentIDs.end(); ++it_segment) {
355 if (*it_segment ==
"") {
360 segments.push_back(ovrhdSegment);
369 for (std::vector<std::string>::iterator it_clamp = clampIDs.begin(); it_clamp != clampIDs.end(); ++it_clamp) {
370 clamp = substation->
findClamp(*it_clamp);
371 if (clamp !=
nullptr) {
378 WRITE_WARNING(
"A connecting overhead wire start segment '" + clamp->
start->
getID() +
"' defined for overhead wire clamp '" + (*it_clamp) +
"' is not assigned to the traction substation '" + substationId +
"'.");
380 WRITE_WARNING(
"A connecting overhead wire end segment '" + clamp->
end->
getID() +
"' defined for overhead wire clamp '" + (*it_clamp) +
"' is not assigned to the traction substation '" + substationId +
"'.");
384 WRITE_WARNING(
"The overhead wire clamp '" + (*it_clamp) +
"' defined in an overhead wire section was not assigned to the substation '" + substationId +
"'. Please define proper <overheadWireClamp .../> in additional files before defining overhead wire section.");
388 WRITE_WARNING(
"Overhead circuit solver requested, but solver support (Eigen) not compiled in.");
392 if (segments.size() == 0) {
393 throw InvalidArgument(
"No segments found for overHeadWireSection '" + substationId +
"'.");
397 segments[0]->getCircuit()->checkCircuit(substationId);
399 WRITE_WARNING(
"Cannot check circuit, overhead circuit solver support (Eigen) not compiled in.");
433 if (substation ==
nullptr) {
434 throw InvalidArgument(
"Traction substation '" + substationId +
"' using within an overheadWireClamp '" +
id +
"' is not known.");
442 if (ovrhdSegment_fromItsStart ==
nullptr) {
443 throw InvalidArgument(
"The overheadWireSegment '" + overhead_fromItsStart +
"' to use within overheadWireClamp '" +
id +
"' is not known.");
454 if (ovrhdSegment_fromItsEnd ==
nullptr) {
455 throw InvalidArgument(
"The overheadWireSegment '" + overhead_fromItsEnd +
"' to use within overheadWireClamp '" +
id +
"' is not known.");
462 if (substation->
findClamp(
id) ==
nullptr) {
463 substation->
addClamp(
id, ovrhdSegment_fromItsStart, ovrhdSegment_fromItsEnd);
465 WRITE_ERROR(
"The overhead wire clamp '" +
id +
"' is probably declared twice.")
469 WRITE_WARNING(
"Not building overhead wire clamps, overhead wire solver support (Eigen) not compiled in.");
472 WRITE_WARNING(
"Ignoring overhead wire clamps, they make no sense when overhead wire circuit solver is off.");
494 if (!ok || (
myHandler->
checkStopPos(frompos, topos, lane->getLength(), POSITION_EPS, friendlyPos) != SUMORouteHandler::StopPos::STOPPOS_VALID)) {
502 buildStoppingPlace(net,
id, lines, lane, frompos, topos, element, ptStopName, personCapacity, parkingLength);
509 throw InvalidArgument(
"Could not add access outside a stopping place.");
553 throw InvalidArgument(
"Invalid position for parking area '" +
id +
"'.");
557 beginParkingArea(net,
id, lines, lane, frompos, topos, capacity, width, length, angle, name, onRoad);
589 const std::string& base) {
602 if (edge ==
nullptr) {
603 throw InvalidArgument(
"The edge " + edgeID +
" to use within the calibrator '" +
id +
"' is not known.");
606 lane =
getLane(attrs,
"calibrator",
id);
607 if (&lane->
getEdge() != edge) {
608 throw InvalidArgument(
"The edge " + edgeID +
" to use within the calibrator '" +
id
609 +
"' does not match the calibrator lane '" + lane->
getID() +
".");
613 lane =
getLane(attrs,
"calibrator",
id);
616 const double pos =
getPosition(attrs, lane,
"calibrator",
id, edge);
625 if (routeProbe !=
"") {
627 if (probe ==
nullptr) {
628 throw InvalidArgument(
"The routeProbe '" + routeProbe +
"' to use within the calibrator '" +
id +
"' is not known.");
632 if (lane !=
nullptr && edge->
getLanes().size() > 1) {
634 +
"' defined for lane '" + lane->
getID()
635 +
"' will collect data for all lanes of edge '" + edge->
getID() +
"'.");
642 MSCalibrator* trigger =
buildCalibrator(net,
id, edge, lane, pos, file, outfile, freq, probe, invalidJamThreshold, vTypes);
652 const std::string& base) {
662 for (
const std::string& edgeID : attrs.
get<std::vector<std::string> >(
SUMO_ATTR_EDGES,
id.c_str(), ok)) {
664 if (edge ==
nullptr) {
665 throw InvalidArgument(
"The edge '" + edgeID +
"' to use within MSTriggeredRerouter '" +
id +
"' is not known.");
667 edges.push_back(edge);
670 throw InvalidArgument(
"The edge to use within MSTriggeredRerouter '" +
id +
"' is not known.");
672 if (edges.size() == 0) {
673 throw InvalidArgument(
"No edges found for MSTriggeredRerouter '" +
id +
"'.");
680 throw InvalidArgument(
"Could not parse MSTriggeredRerouter '" +
id +
"'.");
697 const std::vector<MSLane*>& destLanes,
698 const std::string& file) {
707 const std::string& file,
708 const std::string& outfile,
711 const double invalidJamThreshold,
712 const std::string& vTypes) {
713 return new METriggeredCalibrator(
id, edge, pos, file, outfile, freq,
MSGlobals::gMesoNet->getSegmentForEdge(*edge, pos)->getLength(), probe, invalidJamThreshold, vTypes);
722 const std::string& file,
723 const std::string& outfile,
726 const double invalidJamThreshold,
727 const std::string& vTypes) {
728 return new MSCalibrator(
id, edge, lane, pos, file, outfile, freq, edge->
getLength(), probe, invalidJamThreshold, vTypes);
735 double prob,
const std::string& file,
bool off,
737 const std::string& vTypes) {
744 double frompos,
double topos,
const SumoXMLTag element, std::string ptStopName,
int personCapacity,
double parkingLength) {
756 const std::vector<std::string>& lines,
757 MSLane* lane,
double frompos,
double topos,
758 unsigned int capacity,
759 double width,
double length,
double angle,
const std::string& name,
762 MSParkingArea* stop =
new MSParkingArea(
id, lines, *lane, frompos, topos, capacity, width, length, angle, name, onRoad);
765 throw InvalidArgument(
"Could not build parking area '" +
id +
"'; probably declared twice.");
774 double width,
double length,
double angle) {
779 throw InvalidArgument(
"Cannot not add lot entry to on-road parking area.");
782 throw InvalidArgument(
"Could not add lot entry outside a parking area.");
792 throw InvalidArgument(
"Could not end a parking area that is not opened.");
802 throw InvalidArgument(
"Could not end a stopping place that is not opened.");
809 double chargingPower,
double efficiency,
bool chargeInTransit,
double chargeDelay) {
812 delete chargingStation;
813 throw InvalidArgument(
"Could not build charging station '" +
id +
"'; probably declared twice.");
820 bool voltageSource) {
823 delete overheadWireSegment;
824 throw InvalidArgument(
"Could not build overheadWireSegment '" +
id +
"'; probably declared twice.");
830 if (frontConnection == NULL && behindConnection == NULL) {
832 }
else if (frontConnection != NULL && behindConnection == NULL) {
835 }
else if (frontConnection == NULL && behindConnection != NULL) {
838 }
else if (frontConnection != NULL && behindConnection != NULL) {
849 delete myTractionSubstation;
850 throw InvalidArgument(
"Could not build traction substation '" +
id +
"'; probably declared twice.");
860 const std::string& base,
861 const bool allowEmpty) {
881 const std::string& tt,
882 const std::string& tid) {
886 if (lane ==
nullptr) {
894 throw InvalidArgument(
"The lane " + objectid +
" to use within the " + tt +
" '" + tid +
"' is not known.");
903 const std::string& tt,
const std::string& tid,
905 assert(lane != 0 || edge != 0);
918 pos = length - (double) 0.1;
920 if (lane !=
nullptr) {
921 throw InvalidArgument(
"The position of " + tt +
" '" + tid +
"' lies beyond the lane's '" + lane->
getID() +
"' length.");
923 throw InvalidArgument(
"The position of " + tt +
" '" + tid +
"' lies beyond the edges's '" + edge->
getID() +
"' length.");
std::vector< MSEdge * > MSEdgeVector
#define WRITE_MESSAGE(msg)
#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_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.
@ SUMO_ATTR_OVERHEAD_WIRE_SECTION
@ SUMO_ATTR_SUBSTATIONID
id of a traction substation substation
@ SUMO_ATTR_JAM_DIST_THRESHOLD
@ 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_OVERHEAD_WIRE_CLAMPS
overhead wire clamps for overhead wire segment
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_ROADSIDE_CAPACITY
@ 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_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_CHARGEDELAY
Delay in the charge of charging stations.
#define UNUSED_PARAMETER(x)
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.
const NamedObjectCont< MSDetectorFileOutput * > & getTypedDetectors(SumoXMLTag type) const
Returns the list of detectors of the given type.
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.
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 {.
MSEdge & getEdge() const
Returns the lane's edge.
std::vector< const MSLane * > getNormalIncomingLanes() const
get the list of all direct (disregarding internal predecessors) non-internal predecessor lanes of thi...
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.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSDetectorControl & getDetectorControl()
Returns the detector control.
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.
MSStoppingPlace * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Returns the named stopping place of the given category.
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
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.
double getAngle() const
Returns the lot rectangle angle.
double getLength() const
Returns the lot rectangle length.
double getWidth() const
Returns the lot rectangle width.
bool parkOnRoad() const
whether vehicles park on the road
virtual void addLotEntry(double x, double y, double z, double width, double length, double angle)
Add a lot entry to parking area.
Writes routes of vehicles passing a certain edge.
A lane area vehicles can halt at.
int getPersonsAbreast() const
const MSLane & getLane() const
Returns the lane this stop is located at.
virtual bool addAccess(MSLane *lane, const double pos, const double length)
adds an access point to this stop
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)
void addForbiddenLane(MSLane *lane)
Reroutes vehicles passing an edge.
The XML-Handler for network loading.
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 buildChargingStation(MSNet &net, const std::string &id, MSLane *lane, double frompos, double topos, const std::string &name, double chargingPower, double efficiency, bool chargeInTransit, double chargeDelay)
Builds a charging station.
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 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.
NLHandler * myHandler
The parent handler to set for subhandlers.
void buildTractionSubstation(MSNet &net, std::string id, double voltage)
Builds a traction substation.
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.
virtual MSTriggeredRerouter * buildRerouter(MSNet &net, const std::string &id, MSEdgeVector &edges, double prob, const std::string &file, bool off, SUMOTime timeThreshold, const std::string &vTypes)
builds an rerouter
void parseAndBuildOverheadWireSection(MSNet &net, const SUMOSAXAttributes &attrs)
Parses its values and builds an overhead wire section.
void setHandler(NLHandler *handler)
Sets the parent handler to use for nested parsing.
virtual MSCalibrator * buildCalibrator(MSNet &net, const std::string &id, MSEdge *edge, MSLane *lane, double pos, const std::string &file, const std::string &outfile, const SUMOTime freq, const MSRouteProbe *probe, const double invalidJamThreshold, const std::string &vTypes)
builds a microscopic calibrator
virtual ~NLTriggerBuilder()
Destructor.
bool myHaveWarnedAboutEigen
virtual void beginParkingArea(MSNet &net, const std::string &id, const std::vector< std::string > &lines, MSLane *lane, double frompos, double topos, unsigned int capacity, double width, double length, double angle, const std::string &name, bool onRoad)
Begin a 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.
void parseAndBuildRerouter(MSNet &net, const SUMOSAXAttributes &attrs, const std::string &base)
Parses his values and builds a 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.
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)
Builds a stopping place.
MSStoppingPlace * getCurrentStop()
virtual METriggeredCalibrator * buildMECalibrator(MSNet &net, const std::string &id, const 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 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.
void addLotEntry(double x, double y, double z, double width, double length, double angle)
Add a lot entry to current parking area.
const std::string & getID() const
Returns the id.
T get(const std::string &id) const
Retrieves an item.
static OptionsCont & getOptions()
Retrieves the options.
static StopPos checkStopPos(double &startPos, double &endPos, const double laneLength, const double minLength, const bool friendlyPos)
check start and end position of a stop
Encapsulated SAX-Attributes.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue, bool report=true) const
Tries to read given attribute assuming it is an int.
const std::vector< std::string > getOptStringVector(int attr, const char *objectid, bool &ok, bool report=true) const
convenience function to avoid the default argument and the template stuff at getOpt<>
const std::vector< std::string > getStringVector(int attr) const
Tries to read given attribute assuming it is a string vector.
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.
A wrapper for a Command function.
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false, const bool isRoute=false)
Runs the given handler on the given file; returns if everything's ok.