40 #ifdef CHECK_MEMORY_LEAKS
42 #endif // CHECK_MEMORY_LEAKS
48 using namespace traci;
96 std::vector<MSTrafficLightLogic*> logics = vars.
getAllLogics();
101 tempContent.
writeInt((
int) logics.size());
103 for (
unsigned int i = 0; i < logics.size(); ++i) {
123 tempContent.
writeInt((
int) phaseNo);
125 for (
unsigned int j = 0; j < phaseNo; ++j) {
136 const std::string& state = phase.
getState();
150 std::vector<std::string> laneIDs;
151 for (MSTrafficLightLogic::LaneVectorVector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
153 for (MSTrafficLightLogic::LaneVector::const_iterator j = llanes.begin(); j != llanes.end(); ++j) {
154 laneIDs.push_back((*j)->getID());
166 unsigned int cnt = 0;
168 unsigned int no = (
unsigned int) lanes.size();
170 for (
unsigned int i = 0; i < no; ++i) {
175 unsigned int no2 = (
unsigned int) llanes.size();
178 for (
unsigned int j = 0; j < no2; ++j) {
180 std::vector<std::string> def;
182 def.push_back(llanes[j]->getID());
186 #ifdef HAVE_INTERNAL_LANES
187 def.push_back(link->getViaLane() != 0 ? link->getViaLane()->getID() :
"");
232 std::string warning =
"";
288 std::vector<MSPhaseDefinition*> phases;
289 phases.push_back(phase);
291 vars.
addLogic(
"online", logic,
true,
true);
305 int type = 0, index = 0, phaseNo = 0;
326 if (index >= phaseNo) {
330 std::vector<MSPhaseDefinition*> phases;
331 for (
int j = 0; j < phaseNo; ++j) {
332 int duration = 0, minDuration = 0, maxDuration = 0;
347 phases.push_back(phase);
351 vars.
addLogic(subid, logic,
true,
true);