63 myNet(net), myActionBuilder(net),
64 myCurrentIsInternalToSkip(false),
65 myDetectorBuilder(detBuilder), myTriggerBuilder(triggerBuilder),
66 myEdgeControlBuilder(edgeBuilder), myJunctionControlBuilder(junctionBuilder),
67 myAmParsingTLLogicOrJunction(false), myCurrentIsBroken(false),
68 myHaveWarnedAboutDeprecatedLanes(false),
69 myHaveSeenInternalEdge(false),
70 myHaveSeenNeighs(false),
71 myHaveSeenAdditionalSpeedRestrictions(false),
74 myNetIsLoaded(false) {
277 myAmParsingTLLogicOrJunction =
false;
300 if (from ==
nullptr) {
301 WRITE_ERROR(
"Unknown from-node '" + it->second.first +
"' for edge '" + it->first +
"'.");
305 WRITE_ERROR(
"Unknown to-node '" + it->second.second +
"' for edge '" + it->first +
"'.");
308 if (edge !=
nullptr) {
357 WRITE_ERROR(
"Edge '" +
id +
"' has an invalid type.");
384 if (!crossingEdges.empty()) {
385 std::vector<std::string> crossingEdgesVector;
388 crossingEdgesVector.push_back(edges.
next());
437 if (shape.size() < 2) {
438 WRITE_ERROR(
"Shape of lane '" +
id +
"' is broken.\n Can not build according edge.");
443 if (permissions !=
SVCAll) {
453 WRITE_ERROR(
"Another lane with the id '" +
id +
"' exists.");
481 if (shape.size() > 2) {
491 WRITE_ERROR(
"An unknown or invalid junction type occurred in junction '" +
id +
"'.");
496 std::vector<MSLane*> incomingLanes;
499 std::vector<MSLane*> internalLanes;
509 WRITE_ERROR(e.what() + std::string(
"\n Can not build according junction."));
518 const std::string& def, std::vector<MSLane*>& into,
bool& ok) {
521 std::string laneID = st.
next();
526 if (lane ==
nullptr) {
527 WRITE_ERROR(
"An unknown lane ('" + laneID +
"') was tried to be set as incoming to junction '" + junctionID +
"'.");
531 into.push_back(lane);
636 if (request >= 0 && response.length() > 0) {
681 WRITE_ERROR(
"Traffic light '" +
id +
"' has unknown type '" + typeS +
"'.");
726 std::string phaseTypeString;
727 bool transient_notdecisional_bit;
734 transient_notdecisional_bit =
false;
736 if (phaseTypeString.find(
"decisional") != std::string::npos) {
737 transient_notdecisional_bit =
false;
738 }
else if (phaseTypeString.find(
"transient") != std::string::npos) {
739 transient_notdecisional_bit =
true;
741 MsgHandler::getWarningInstance()->
inform(
"SOTL_ATTL_TYPE_DECISIONAL nor SOTL_ATTL_TYPE_TRANSIENT. Assuming phase type as SUMOSOTL_TagAttrDefinitions::SOTL_ATTL_TYPE_TRANSIENT");
742 transient_notdecisional_bit =
false;
744 commit_bit = (phaseTypeString.find(
"commit") != std::string::npos);
746 if (phaseTypeString.find(
"target") != std::string::npos) {
747 std::string delimiter(
" ,;");
755 std::string::size_type firstPos = targetLanesString.find_first_not_of(delimiter, 0);
757 std::string::size_type pos = targetLanesString.find_first_of(delimiter, firstPos);
759 while (std::string::npos != pos || std::string::npos != firstPos) {
761 targetLanesVector.push_back(targetLanesString.substr(firstPos, pos - firstPos));
764 firstPos = targetLanesString.find_first_not_of(delimiter, pos);
767 pos = targetLanesString.find_first_of(delimiter, firstPos);
807 friendlyPos, vTypes);
844 WRITE_WARNING(
"VTypeProbes are deprecated. Use fcd-output devices (assigned to the vType) instead.");
892 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
nullptr, ok);
894 const std::string toLane = attrs.
getOpt<std::string>(
SUMO_ATTR_TO,
id.c_str(), ok,
"");
899 const double length = attrs.
getOpt<
double>(
SUMO_ATTR_LENGTH,
id.c_str(), ok, std::numeric_limits<double>::max());
904 WRITE_WARNING(
"Ignoring deprecated argument 'cont' for E2 detector '" +
id +
"'");
910 double endPosition = attrs.
getOpt<
double>(
SUMO_ATTR_ENDPOS,
id.c_str(), ok, std::numeric_limits<double>::max());
916 bool lanesGiven = lanes !=
"";
917 bool laneGiven = lane !=
"";
918 if (!(lanesGiven || laneGiven)) {
920 WRITE_WARNING(
"Trying to specify detector's lane by the given id since the argument 'lane' is missing.")
924 bool lengthGiven = length != std::numeric_limits<double>::max();
925 bool posGiven = position != std::numeric_limits<double>::max();
926 bool endPosGiven = endPosition != std::numeric_limits<double>::max();
927 bool lsaGiven = lsaid !=
"";
928 bool toLaneGiven = toLane !=
"";
931 std::vector<MSLane*> clanes;
934 std::string seps =
" ,\t\n";
938 std::string nextLaneID = st.
next();
940 if (nextLaneID.find_first_of(seps) != nextLaneID.npos) {
944 clanes.push_back(clane);
946 if (clanes.size() == 0) {
947 throw InvalidArgument(
"Malformed argument 'lanes' for E2Detector '" +
id +
"'.\nSpecify 'lanes' as a sequence of lane-IDs seperated by whitespace or comma (',')");
950 WRITE_WARNING(
"Ignoring argument 'lane' for E2Detector '" +
id +
"' since argument 'lanes' was given.\n" 951 "Usage combinations for positional specification: [lane, pos, length], [lane, endPos, length], or [lanes, pos, endPos]");
954 WRITE_WARNING(
"Ignoring argument 'length' for E2Detector '" +
id +
"' since argument 'lanes' was given.\n" 955 "Usage combinations for positional specification: [lane, pos, length], [lane, endPos, length], or [lanes, pos, endPos]");
960 WRITE_WARNING(
"Missing argument 'pos' for E2Detector '" +
id +
"'. Assuming detector start == lane start of lane '" + clanes[0]->getID() +
"'.");
964 endPosition = clanes[clanes.size() - 1]->getLength();
965 WRITE_WARNING(
"Missing argument 'endPos' for E2Detector '" +
id +
"'. Assuming detector end == lane end of lane '" + clanes[clanes.size() - 1]->getID() +
"'.");
970 std::stringstream ss;
971 ss <<
"Missing argument 'lane' for E2Detector '" <<
id <<
"'." 972 <<
"\nUsage combinations for positional specification: [lane, pos, length], [lane, endPos, length], or [lanes, pos, endPos]";
979 if (endPosGiven && lengthGiven) {
980 std::stringstream ss;
981 ss <<
"Ignoring argument 'endPos' for E2Detector '" <<
id <<
"' since argument 'pos' was given." 982 <<
"\nUsage combinations for positional specification: [lane, pos, length], [lane, endPos, length], or [lanes, pos, endPos]";
984 endPosition = std::numeric_limits<double>::max();
986 if (!lengthGiven && !endPosGiven) {
987 std::stringstream ss;
988 ss <<
"Missing arguments 'length'/'endPos' for E2Detector '" <<
id <<
"'. Assuming detector end == lane end of lane '" << lane <<
"'.";
990 endPosition = clane->getLength();
992 }
else if (endPosGiven) {
995 std::stringstream ss;
996 ss <<
"Missing arguments 'length'/'pos' for E2Detector '" <<
id <<
"'. Assuming detector start == lane start of lane '" << lane <<
"'.";
1000 std::stringstream ss;
1001 if (lengthGiven && fabs(length - clane->getLength()) >
NUMERICAL_EPS) {
1002 ss <<
"Incomplete positional specification for E2Detector '" <<
id <<
"'." 1003 <<
"\nUsage combinations for positional specification: [lane, pos, length], [lane, endPos, length], or [lanes, pos, endPos]";
1006 endPosition = clane->getLength();
1008 ss <<
"Missing arguments 'pos'/'endPos' for E2Detector '" <<
id <<
"'. Assuming that the detector covers the whole lane '" << lane <<
"'.";
1030 throw InvalidArgument(
"The detector '" +
id +
"' refers to an unknown lsa '" + lsaid +
"'.");
1032 if (frequency != -1) {
1033 WRITE_WARNING(
"Ignoring argument 'frequency' for E2Detector '" +
id +
"' since argument 'tl' was given.");
1039 MSLane* cToLane =
nullptr;
1045 std::string filename;
1056 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
1057 vTypes, friendlyPos, showDetector,
1062 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
1063 vTypes, friendlyPos, showDetector,
1077 const std::string file = attrs.
get<std::string>(
SUMO_ATTR_FILE,
id.c_str(), ok);
1086 frequency, haltingSpeedThreshold, haltingTimeThreshold, vTypes, openEntry);
1131 const std::string file = attrs.
get<std::string>(
SUMO_ATTR_FILE,
id.c_str(), ok);
1132 const std::string type = attrs.
getOpt<std::string>(
SUMO_ATTR_TYPE,
id.c_str(), ok,
"performance");
1144 excludeEmpty[0] !=
't' && excludeEmpty[0] !=
'T' && excludeEmpty[0] !=
'1' && excludeEmpty[0] !=
'x',
1145 excludeEmpty ==
"defaults", withInternal, trackVehicles,
1146 maxTravelTime, minSamples, haltingSpeedThreshold, vtypes,
1160 const std::string toID = attrs.
get<std::string>(
SUMO_ATTR_TO,
nullptr, ok);
1183 if (from ==
nullptr) {
1184 WRITE_ERROR(
"Unknown from-edge '" + fromID +
"' in connection.");
1188 if (to ==
nullptr) {
1189 WRITE_ERROR(
"Unknown to-edge '" + toID +
"' in connection.");
1192 if (fromLaneIdx < 0 || fromLaneIdx >= (
int)from->getLanes().size() ||
1193 toLaneIdx < 0 || toLaneIdx >= (int)to->
getLanes().size()) {
1194 WRITE_ERROR(
"Invalid lane index in connection from '" + from->getID() +
"' to '" + to->
getID() +
"'.");
1197 MSLane* fromLane = from->getLanes()[fromLaneIdx];
1208 if ((tlLinkIdx < 0 || tlLinkIdx >= (
int)logic->getCurrentPhaseDef().getState().size())
1212 "' in connection controlled by '" + tlID +
"'");
1224 if (via ==
nullptr) {
1226 "') should be set as a via-lane for lane '" + toLane->
getID() +
"'.");
1233 link =
new MSLink(fromLane, toLane, via, dir, state, length, foeVisibilityDistance, keepClear, logic, tlLinkIdx);
1234 if (via !=
nullptr) {
1297 WRITE_WARNING(
"no valid geo projection loaded from network. fcd-output.geo will not work");
1319 sink->
initialize(
new std::vector<MSLane*>());
1325 source->
initialize(
new std::vector<MSLane*>());
1328 for (std::vector<std::string>::const_iterator i = desc.begin(); i != desc.end(); ++i) {
1331 if (edge ==
nullptr) {
1344 if (shape.size() != 0) {
1345 if (!
myNet.
getShapeContainer().
addPolygon(
myCurrentDistrictID,
"taz", color, 0, 0,
"",
false, shape,
false,
false, 1.0)) {
1366 if (succ !=
nullptr) {
1383 for (std::vector<std::string>::iterator it = edgeIDs.begin(); it != edgeIDs.end(); ++it) {
1385 if (edge ==
nullptr) {
1386 WRITE_ERROR(
"Unknown edge '" + (*it) +
"' in roundabout");
1425 if (lane ==
nullptr) {
1426 WRITE_ERROR(
"Lane '" + laneID +
"' to place poi '" + poiID +
"' on is not known.");
1432 if (lanePos < 0 || lanePos > lane->
getLength()) {
SUMOVehicleClass getVehicleClassID(const std::string &name)
Returns the class id of the abstract class given by its name.
void parseAndAddLotEntry(const SUMOSAXAttributes &attrs)
Parses his values and adds a lot entry to current parking area.
static MsgHandler * getWarningInstance()
Returns the instance to add warnings to.
void parseAndBuildCalibrator(MSNet &net, const SUMOSAXAttributes &attrs, const std::string &base)
Parses his values and builds a mesoscopic or microscopic calibrator.
void beginE3Detector(const SUMOSAXAttributes &attrs)
Starts building of an e3 detector using the given specification.
void initTrafficLightLogic(const std::string &id, const std::string &programID, TrafficLightType type, SUMOTime offset)
Begins the reading of a traffic lights logic.
SumoXMLTag
Numbers representing SUMO-XML - element names.
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
void addWAUTJunction(const SUMOSAXAttributes &attrs)
Builds detectors for microsim.
virtual void addE2Detector(const SUMOSAXAttributes &attrs)
Builds an e2 detector using the given specification.
static RGBColor parseColor(std::string coldef)
Parses a color information.
alternative tag for e1 detector
bool myCurrentIsInternalToSkip
Information whether the currently parsed edge is internal and not wished, here.
Whether vehicles must keep the junction clear.
a source within a district (connection road)
void addAccess(MSNet &net, const SUMOSAXAttributes &attrs)
Parses the values and adds an access point to the currently parsed stopping place.
Storage for all programs of a single tls.
void buildInstantInductLoop(const std::string &id, const std::string &lane, double pos, const std::string &device, bool friendlyPos, const std::string &vTypes)
Builds an instantenous induction and adds it to the net.
MSLane * getLaneChecking(const std::string &laneID, SumoXMLTag type, const std::string &detid)
Returns the named lane.
root element of a network file
begin/end of the description of a junction
virtual MSEdge * closeEdge()
Closes the building of an edge; The edge is completely described by now and may not be opened again...
void createEdgeLaneMeanData(const std::string &id, SUMOTime frequency, SUMOTime begin, SUMOTime end, const std::string &type, const bool useLanes, const bool withEmpty, const bool printDefaults, const bool withInternal, const bool trackVehicles, const double maxTravelTime, const double minSamples, const double haltSpeed, const std::string &vTypes, const std::string &device)
Creates edge based mean data collector using the given specification.
begin/end of the description of a single lane
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
virtual void openWAUT(const SUMOSAXAttributes &attrs)
void addSuccessor(MSEdge *edge, const MSEdge *via=nullptr)
Adds an edge to the list of edges which may be reached from this edge and to the incoming of the othe...
void addIncoming(MSEdge *edge)
A calibrator placed over edge.
void openJunction(const std::string &id, const std::string &key, const SumoXMLNodeType type, const Position pos, const PositionVector &shape, const std::vector< MSLane *> &incomingLanes, const std::vector< MSLane *> &internalLanes)
Begins the processing of the named junction.
a traffic assignment zone
connectio between two lanes
The base class for an intersection.
void addE3Entry(const std::string &lane, double pos, bool friendlyPos)
Builds an entry point of an e3 detector.
const double SUMO_const_laneWidth
static std::string getJunctionIDFromInternalEdge(const std::string internalEdge)
return the junction id when given an edge of type internal, crossing or WalkingArea ...
const std::string & getFileName() const
returns the current file name
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
void addLink(MSLink *link)
Delayed initialization.
virtual void addVTypeProbeDetector(const SUMOSAXAttributes &attrs)
Builds a vtype-detector using the given specification.
void addRoundabout(const SUMOSAXAttributes &attrs)
NLDetectorBuilder & myDetectorBuilder
The detector builder to use.
void parseAndBuildChargingStation(MSNet &net, const SUMOSAXAttributes &attrs)
Parses his values and builds a charging station.
foe visibility distance of a link
void parseAndBuildRerouter(MSNet &net, const SUMOSAXAttributes &attrs, const std::string &base)
Parses his values and builds a rerouter.
void closeJunctionLogic()
Ends the building of a junction logic (row-logic)
void ignoreLinkIndex(int pos)
weights: time range begin
link,node: the traffic light id responsible for this link
void addStopOffsets(const std::map< SVCPermissions, double > &stopOffsets)
process a stopOffset element (originates either from the active edge or lane).
std::map< SVCPermissions, double > parseStopOffsets(const SUMOSAXAttributes &attrs, bool &ok)
Extract stopOffsets from attributes of stopOffset element.
void addIncomingLane(MSLane *lane, MSLink *viaLink)
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
void addPhase(SUMOTime duration, const std::string &state, int nextPhase, SUMOTime min, SUMOTime max)
Adds a phase to the currently built traffic lights logic.
void buildRouteProbe(const std::string &id, const std::string &edge, SUMOTime frequency, SUMOTime begin, const std::string &device, const std::string &vTypes)
Builds a routeProbe and adds it to the net.
double getLength() const
Returns the lane's length.
const PositionVector & getShape() const
Returns this lane's shape.
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...
virtual void addE1Detector(const SUMOSAXAttributes &attrs)
Builds an e1 detector using the given specification.
NLHandler(const std::string &file, MSNet &net, NLDetectorBuilder &detBuilder, NLTriggerBuilder &triggerBuilder, NLEdgeControlBuilder &edgeBuilder, NLJunctionControlBuilder &junctionBuilder)
Constructor.
void initialize(const std::vector< MSLane *> *lanes)
Initialize the edge.
void addLink(MSLink *link, MSLane *lane, int pos)
void beginEdgeParsing(const SUMOSAXAttributes &attrs)
begins the processing of an edge
maximum duration of a phase
const std::string & getID() const
Returns the id.
virtual bool addPolygon(const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, bool relativePath, const PositionVector &shape, bool geo, bool fill, double lineWidth, bool ignorePruning=false)
Builds a polygon using the given values and adds it to the container.
const std::string & getActiveSubKey() const
Returns the active sub key.
virtual MSEdge * buildEdge(const std::string &id, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, const int priority)
Builds an edge instance (MSEdge in this case)
static StringBijection< LinkState > LinkStates
link states
const SVCPermissions SVCAll
all VClasses are allowed
std::string myCurrentDistrictID
The id of the current district.
begin/end of the description of an edge restriction
A parking space for a single vehicle within a parking area.
void closeWAUT(const std::string &wautid)
Closes loading of a WAUT.
void parseAndBeginParkingArea(MSNet &net, const SUMOSAXAttributes &attrs)
Parses his values and builds a parking area.
void buildVTypeProbe(const std::string &id, const std::string &vtype, SUMOTime frequency, const std::string &device)
Builds a vTypeProbe and adds it to the net.
virtual void endE3Detector()
Builds of an e3 detector using collected values.
void endE3Detector()
Builds of an e3 detector using collected values.
bool myAmParsingTLLogicOrJunction
internal information whether a tls-logic is currently read
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.
virtual SumoXMLEdgeFunc getEdgeFunc(bool &ok) const =0
Returns the value of the named attribute.
A class that stores a 2D geometrical boundary.
#define WRITE_WARNING(msg)
The simulated network and simulation perfomer.
static OptionsCont & getOptions()
Retrieves the options.
int getNumberOfLoadedPhases() const
return the number of phases loaded so far (for error reporting)
virtual std::string getString(int id) const =0
Returns the string-value of the named (by its enum-value) attribute.
void parseLanes(const std::string &junctionID, const std::string &def, std::vector< MSLane *> &into, bool &ok)
void closeJunction(const std::string &basePath)
Closes (ends) the processing of the current junction.
MSTLLogicControl::TLSLogicVariants & getTLLogic(const std::string &id) const
Returns a previously build tls logic.
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)...
bool myHaveSeenAdditionalSpeedRestrictions
whether additional files contained type-specific speed limits
void addE3Exit(const std::string &lane, double pos, bool friendlyPos)
Builds an exit point of an e3 detector.
void addParam(const SUMOSAXAttributes &attrs)
an edge based mean data detector
void addDistrict(const SUMOSAXAttributes &attrs)
static StringBijection< LinkDirection > LinkDirections
link directions
void addApproachingLane(MSLane *lane, bool warnMultiCon)
A road/street connecting two junctions.
void setLocation(const SUMOSAXAttributes &attrs)
Parses network location description.
void beginEdgeParsing(const std::string &id, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, int priority, const std::string &bidi)
Begins building of an MSEdge.
The definition of a periodic event.
virtual void openJunction(const SUMOSAXAttributes &attrs)
opens a junction for processing
NLEdgeControlBuilder & myEdgeControlBuilder
The edge builder to use.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void updateParameter(const std::map< std::string, std::string > &mapArg)
Adds or updates all given parameters from the map.
void addE3Entry(const SUMOSAXAttributes &attrs)
Adds an entry to the currently processed e3 detector.
Encapsulated SAX-Attributes.
An instantenous induction loop.
void addE3Exit(const SUMOSAXAttributes &attrs)
Adds an exit to the currently processed e3 detector.
static StringBijection< TrafficLightType > TrafficLightTypes
traffic light types
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
Builder of microsim-junctions and tls.
ShapeContainer & getShapeContainer()
Returns the shapes container.
A point in 2D or 3D with translation and scaling methods.
virtual void endParkingArea()
End a parking area.
parameter associated to a certain key
virtual void closeTrafficLightLogic(const std::string &basePath)
Ends the building of a traffic lights logic.
void addWAUTSwitch(const SUMOSAXAttributes &attrs)
JunctionGraph myJunctionGraph
void addRequest(const SUMOSAXAttributes &attrs)
adds a request item to the current junction logic
void setPermissionsFound()
Labels the network to contain vehicle class permissions.
T get(const std::string &str) const
Position getLanePos(const std::string &poiID, const std::string &laneID, double lanePos, double lanePosLat)
get position for a given laneID
void addConnection(const SUMOSAXAttributes &attrs)
adds a connection
std::string myCurrentTypeID
The id of the currently processed edge type.
void parseAndBuildLaneSpeedTrigger(MSNet &net, const SUMOSAXAttributes &attrs, const std::string &base)
Parses his values and builds a lane speed trigger.
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
void addAction(const SUMOSAXAttributes &attrs, const std::string &basePath)
Builds an action and saves it for further use.
static bool init(OptionsCont &oc)
Initialises the processing and the final instance using the given options.
SUMOTime string2time(const std::string &r)
roundabout defined in junction
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
void addRestriction(const std::string &id, const SUMOVehicleClass svc, const double speed)
Adds a restriction for an edge type.
void parseAndBuildStoppingPlace(MSNet &net, const SUMOSAXAttributes &attrs, const SumoXMLTag element)
Parses the values and builds a stopping places for busses, trains or container vehicles.
MSJunction * retrieve(const std::string id)
try to retrieve junction by id
std::string reportCurrentEdgeOrLane() const
Return info about currently processed edge or lane.
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
edge: the shape in xml-definition
bool myHaveSeenInternalEdge
whether the loaded network contains internal lanes
LinkDirection parseLinkDir(const std::string &dir)
Parses the given character into an enumeration typed link direction.
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
void addParam(const std::string &key, const std::string &value)
Adds a parameter.
begin/end of the description of a neighboring lane
std::string getCurrentE3ID() const
Returns the id of the currently built e3 detector.
virtual SumoXMLNodeType getNodeType(bool &ok) const =0
Returns the value of the named attribute.
void buildInductLoop(const std::string &id, const std::string &lane, double pos, SUMOTime splInterval, const std::string &device, bool friendlyPos, const std::string &vTypes)
Builds an e1 detector and adds it to the net.
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
virtual void addNeigh(const std::string id)
Adds a neighbor to the current lane.
void addOutgoing(MSEdge *edge)
description of a logic request within the junction
MSTLLogicControl & getTLLogicControlToUse() const
Returns the used tls control.
begin/end of the description of an edge
void addWAUTJunction(const std::string &wautid, const std::string &tls, const std::string &proc, bool synchron)
Adds a tls to the list of tls to be switched by the named WAUT.
virtual std::vector< std::string > getStringVector(int attr) const =0
Tries to read given attribute assuming it is a string vector.
std::string myCurrentWAUTID
The id of the currently processed WAUT.
virtual void myEndElement(int element)
Called when a closing tag occurs.
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
a lane based mean data detector
trigger: the time of the step
virtual void addInstantE1Detector(const SUMOSAXAttributes &attrs)
Builds an e1 detector using the given specification.
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.
std::vector< std::string > LaneIdVector
virtual void closeEdge()
Closes the process of building an edge.
virtual void addRouteProbeDetector(const SUMOSAXAttributes &attrs)
Builds a routeProbe-detector using the given specification.
virtual void endStoppingPlace()
End a stopping place.
A train stop (alias for bus stop)
void addLane(const SUMOSAXAttributes &attrs)
adds a lane to the previously opened edge
bool myHaveSeenNeighs
whether the loaded network contains explicit neighbor lanes
void closeLane()
Closes the building of a lane; The edge is completely described by now and may not be opened again...
a sink within a district (connection road)
the edges crossed by a pedestrian crossing
virtual ~NLHandler()
Destructor.
void beginE3Detector(const std::string &id, const std::string &device, SUMOTime splInterval, double haltingSpeedThreshold, SUMOTime haltingTimeThreshold, const std::string &vTypes, bool openEntry)
Stores temporary the initial information about an e3 detector to build.
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
NLTriggerBuilder & myTriggerBuilder
The trigger builder to use.
double myNetworkVersion
the loaded network version
void initJunctionLogic(const std::string &id)
Initialises a junction logic.
The link is controlled by a tls which is off and blinks, has to brake.
static std::string checkForRelativity(const std::string &filename, const std::string &basePath)
Returns the path from a configuration so that it is accessable from the current working directory...
bool myNetIsLoaded
whether the location element was already loadee
void addWAUT(SUMOTime refTime, const std::string &id, const std::string &startProg)
Adds a WAUT definition.
std::vector< Parameterised * > myLastParameterised
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.
virtual std::string getStringSecure(int id, const std::string &def) const =0
Returns the string-value of the named (by its enum-value) attribute.
void inform(std::string msg, bool addType=true)
adds a new error to the list
virtual MSLane * addLane(const std::string &id, double maxSpeed, double length, const PositionVector &shape, double width, SVCPermissions permissions, int index, bool isRampAccel)
Adds a lane to the current edge.
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
void addPhase(const SUMOSAXAttributes &attrs)
adds a phase to the traffic lights logic currently build
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
void addDistrictEdge(const SUMOSAXAttributes &attrs, bool isSource)
MSNet & myNet
The net to fill (preinitialised)
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
LinkState parseLinkState(const std::string &state)
Parses the given character into an enumeration typed link state.
The abstract direction of a link.
void setJunctions(MSJunction *from, MSJunction *to)
void buildE2Detector(const std::string &id, MSLane *lane, double pos, double endPos, double length, const std::string &device, SUMOTime frequency, SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold, const std::string &vTypes, bool friendlyPos, bool showDetector, MSTLLogicControl::TLSLogicVariants *tlls=0, MSLane *toLane=0)
Builds a new E2 detector and adds it to the net's detector control. Also performs some consistency ch...
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
The parent class for traffic light logics.
NLDiscreteEventBuilder myActionBuilder
A builder for object actions.
void addWAUTSwitch(const std::string &wautid, SUMOTime when, const std::string &to)
Adds a WAUT switch step to a previously built WAUT.
link: the index of the link within the traffic light
Parameterised myLastEdgeParameters
TLSLogicVariants & get(const std::string &id) const
Returns the variants of a named tls.
virtual void addCrossingEdges(const std::vector< std::string > &)
add the crossingEdges in a crossing edge if present
virtual void myEndElement(int element)
Called when a closing tag occurs.
MSTrafficLightLogic * getActive() const
virtual void addEdgeLaneMeanData(const SUMOSAXAttributes &attrs, int objecttype)
Builds edge or lane base mean data collector using the given specification.
Builds trigger objects for microsim.
void initJunctionLogic(const SUMOSAXAttributes &attrs)
begins the reading of a junction row logic
bool myLefthand
whether the loaded network was built for left hand traffic
An access point for a train stop.
void closePolygon()
ensures that the last position equals the first
Representation of a lane in the micro simulation.
void buildVaporizer(const SUMOSAXAttributes &attrs)
Builds a vaporization.
a single phase description
alternative tag for e3 detector
const std::string & getActiveKey() const
Returns the active key.
NLJunctionControlBuilder & myJunctionControlBuilder
The junction builder to use.
alternative tag for e2 detector
Parser and container for routes during their loading.
void initTrafficLightLogic(const SUMOSAXAttributes &attrs)
begins the reading of a traffic lights logic
static const Position INVALID
used to indicate that a position is valid
Interface for building edges.
void addLogicItem(int request, const std::string &response, const std::string &foes, bool cont)
Adds a logic item.
void clearParameter()
Clears the parameter map.
Information on vClass specific stop offsets at lane end.