65 #include <mesogui/GUIMEVehicleControl.h>
68 #ifdef CHECK_MEMORY_LEAKS
70 #endif // CHECK_MEMORY_LEAKS
90 myLastSimDuration(0), myLastIdleDuration(0),
91 myLastVehicleMovementCount(0), myOverallVehicleCount(0), myOverallSimDuration(0) {
140 for (std::vector<MSTrafficLightLogic*>::const_iterator i = logics.begin(); i != logics.end(); ++i) {
153 if (links.size() == 0) {
160 MSTrafficLightLogic::LinkVectorVector::const_iterator j;
161 for (j = links.begin(); j != links.end(); ++j) {
162 MSTrafficLightLogic::LinkVector::const_iterator j2;
163 for (j2 = (*j).begin(); j2 != (*j).end(); ++j2) {
230 std::vector<GUIGlID> ret;
232 if (!(*i)->isInner() || includeInternal) {
233 ret.push_back((*i)->getGlID());
242 std::vector<GUIGlID> ret;
243 std::vector<std::string> ids;
245 std::string sid = (*i).second->getMicrosimID();
246 if (find(ids.begin(), ids.end(), sid) == ids.end()) {
247 ret.push_back((*i).second->getGlID());
260 for (std::map<std::string, MSDetectorFileOutput*>::const_iterator j = dets.begin(); j != dets.end(); ++j) {
276 for (std::map<std::string, MSJunction*>::const_iterator i = junctions.begin(); i != junctions.end(); ++i) {
280 float* cmin =
new float[2];
281 float* cmax =
new float[2];
285 const std::vector<MSLane*>& lanes = edge->
getLanes();
286 for (std::vector<MSLane*>::const_iterator j = lanes.begin(); j != lanes.end(); ++j) {
287 b.
add((*j)->getShape().getBoxBoundary());
298 throw ProcessError(
"Network size exceeds 1 Lightyear. Please reconsider your inputs.\n");
420 ret->
mkItem(
"loaded vehicles [#]",
true,
422 ret->
mkItem(
"waiting vehicles [#]",
true,
424 ret->
mkItem(
"departed vehicles [#]",
true,
426 ret->
mkItem(
"running vehicles [#]",
true,
428 ret->
mkItem(
"arrived vehicles [#]",
true,
430 ret->
mkItem(
"collisions [#]",
true,
432 ret->
mkItem(
"teleports [#]",
true,
477 throw ProcessError(
"A gui-network was not yet constructed.");
500 GUINet::getGUIMEVehicleControl() {
511 const std::vector<MSLane*>& lanes = (*i)->getLanes();
512 for (std::vector<MSLane*>::const_iterator j = lanes.begin(); j != lanes.end(); ++j) {
513 static_cast<GUILane*
>(*j)->updateColor(s);
518 (*i)->updateColor(s);