 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
32 #include "../NIImporter_Vissim.h"
33 #include "../tempstructs/NIVissimTL.h"
65 WRITE_ERROR(
"A traffic light group with an unknown traffic light occurred.\n Group-ID: " + toString<int>(
id)
66 +
"\n TrafficLight-ID: " + toString<int>(lsaid));
69 std::string type = tl->
getType();
70 if (type ==
"festzeit") {
73 if (type ==
"festzeit_fake") {
78 return parseVAS(
id, name, lsaid, from);
80 if (type ==
"vsplus") {
83 if (type ==
"trends") {
87 return parseVAP(
id, name, lsaid, from);
90 return parseTL(
id, name, lsaid, from);
93 return parsePOS(
id, name, lsaid, from);
95 WRITE_WARNING(
"Unsupported LSA-Type '" + type +
"' occurred.");
102 int id,
const std::string& name,
int lsaid, std::istream& from) {
105 std::vector<double> times;
106 std::string tag =
myRead(from);
107 if (tag ==
"dauergruen") {
110 }
else if (tag ==
"dauerrot") {
111 isGreenBegin =
false;
116 while (tag ==
"rotende" || tag ==
"gruenanfang") {
119 times.push_back(point);
122 times.push_back(point);
127 double tredyellow, tyellow;
143 int ,
const std::string& ,
int lsaid, std::istream& from) {
144 WRITE_WARNING(
"VAS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
146 while (tag !=
"detektoren") {
155 int ,
const std::string&,
int lsaid, std::istream&) {
156 WRITE_WARNING(
"VSPLUS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
163 int ,
const std::string&,
int lsaid, std::istream&) {
164 WRITE_WARNING(
"TRENDS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
171 int ,
const std::string&,
int lsaid, std::istream&) {
172 WRITE_WARNING(
"VAS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
179 int ,
const std::string&,
int lsaid, std::istream&) {
180 WRITE_WARNING(
"TL traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
187 int ,
const std::string&,
int lsaid, std::istream&) {
188 WRITE_WARNING(
"POS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
195 int ,
const std::string&,
int lsaid, std::istream&) {
196 WRITE_WARNING(
"externally defined traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
bool parse(std::istream &from)
Parses the data type from the given stream.
#define WRITE_WARNING(msg)
bool parseTL(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a TL traffic light.
std::string readName(std::istream &from)
Reads the structures name We cannot use the "<<" operator, as names may contain more than one word wh...
Importer for networks stored in Vissim format.
~NIVissimSingleTypeParser_Signalgruppendefinition()
Destructor.
bool parseTRENDS(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a TRENDS traffic light.
static bool dictionary(int id, const std::string &type, const std::string &name, SUMOTime absdur, SUMOTime offset)
bool parseVAP(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a VAStraffic light.
bool parseVSPLUS(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a VSPLUS traffic light.
bool parseVAS(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a VAS traffic light.
bool parsePOS(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a POS traffic light.
static bool dictionary(int lsaid, int id, NIVissimTLSignalGroup *o)
std::string getType() const
bool parseFixedTime(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a fixed time traffic light.
std::string myRead(std::istream &from)
reads from the stream and returns the lower case version of the read value
NIVissimSingleTypeParser_Signalgruppendefinition(NIImporter_Vissim &parent)
Constructor.
bool parseExternFixedTime(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs fixed time traffic light with an extern definition.