40 #ifdef CHECK_MEMORY_LEAKS
42 #endif // CHECK_MEMORY_LEAKS
48 using namespace traci;
98 std::vector<MSTrafficLightLogic*> logics = vars.
getAllLogics();
101 unsigned int cnt = 0;
103 tempContent.
writeInt((
int) logics.size());
105 for (
unsigned int i = 0; i < logics.size(); ++i) {
125 tempContent.
writeInt((
int) phaseNo);
127 for (
unsigned int j = 0; j < phaseNo; ++j) {
138 const std::string& state = phase.
getState();
152 std::vector<std::string> laneIDs;
153 for (MSTrafficLightLogic::LaneVectorVector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
155 for (MSTrafficLightLogic::LaneVector::const_iterator j = llanes.begin(); j != llanes.end(); ++j) {
156 laneIDs.push_back((*j)->getID());
168 unsigned int cnt = 0;
170 unsigned int no = (
unsigned int) lanes.size();
172 for (
unsigned int i = 0; i < no; ++i) {
177 unsigned int no2 = (
unsigned int) llanes.size();
180 for (
unsigned int j = 0; j < no2; ++j) {
182 std::vector<std::string> def;
184 def.push_back(llanes[j]->getID());
188 #ifdef HAVE_INTERNAL_LANES
189 def.push_back(link->getViaLane() != 0 ? link->getViaLane()->getID() :
"");
234 std::string warning =
"";
257 int index = inputStorage.
readInt();
271 std::string subID = inputStorage.
readString();
285 int duration = inputStorage.
readInt();
296 std::string state = inputStorage.
readString();
299 std::vector<MSPhaseDefinition*> phases;
300 phases.push_back(phase);
302 vars.
addLogic(
"online", logic,
true,
true);
323 std::string subid = inputStorage.
readString();
340 int index = inputStorage.
readInt();
345 int phaseNo = inputStorage.
readInt();
347 if (index >= phaseNo) {
352 std::vector<MSPhaseDefinition*> phases;
353 for (
int j = 0; j < phaseNo; ++j) {
358 int duration = inputStorage.
readInt();
363 int minDuration = inputStorage.
readInt();
368 int maxDuration = inputStorage.
readInt();
373 std::string state = inputStorage.
readString();
375 phases.push_back(phase);
379 vars.
addLogic(subid, logic,
true,
true);