 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
31 #include "../NIImporter_Vissim.h"
32 #include "../tempstructs/NIVissimTL.h"
64 WRITE_ERROR(
"A traffic light group with an unknown traffic light occurred.\n Group-ID: " + toString<int>(
id)
65 +
"\n TrafficLight-ID: " + toString<int>(lsaid));
68 std::string type = tl->
getType();
69 if (type ==
"festzeit") {
72 if (type ==
"festzeit_fake") {
77 return parseVAS(
id, name, lsaid, from);
79 if (type ==
"vsplus") {
82 if (type ==
"trends") {
86 return parseVAP(
id, name, lsaid, from);
89 return parseTL(
id, name, lsaid, from);
92 return parsePOS(
id, name, lsaid, from);
94 WRITE_WARNING(
"Unsupported LSA-Type '" + type +
"' occurred.");
101 int id,
const std::string& name,
int lsaid, std::istream& from) {
104 std::vector<double> times;
105 std::string tag =
myRead(from);
106 if (tag ==
"dauergruen") {
109 }
else if (tag ==
"dauerrot") {
110 isGreenBegin =
false;
115 while (tag ==
"rotende" || tag ==
"gruenanfang") {
118 times.push_back(point);
121 times.push_back(point);
126 double tredyellow, tyellow;
142 int ,
const std::string& ,
int lsaid, std::istream& from) {
143 WRITE_WARNING(
"VAS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
145 while (tag !=
"detektoren") {
154 int ,
const std::string&,
int lsaid, std::istream&) {
155 WRITE_WARNING(
"VSPLUS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
162 int ,
const std::string&,
int lsaid, std::istream&) {
163 WRITE_WARNING(
"TRENDS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
170 int ,
const std::string&,
int lsaid, std::istream&) {
171 WRITE_WARNING(
"VAS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
178 int ,
const std::string&,
int lsaid, std::istream&) {
179 WRITE_WARNING(
"TL traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
186 int ,
const std::string&,
int lsaid, std::istream&) {
187 WRITE_WARNING(
"POS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
194 int ,
const std::string&,
int lsaid, std::istream&) {
195 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.