64 #include <mesogui/GUIMEVehicleControl.h>
67 #ifdef CHECK_MEMORY_LEAKS
69 #endif // CHECK_MEMORY_LEAKS
89 myLastSimDuration(0), myLastIdleDuration(0),
90 myLastVehicleMovementCount(0), myOverallVehicleCount(0), myOverallSimDuration(0) {
139 for (std::vector<MSTrafficLightLogic*>::const_iterator i = logics.begin(); i != logics.end(); ++i) {
152 if (links.size() == 0) {
159 MSTrafficLightLogic::LinkVectorVector::const_iterator j;
160 for (j = links.begin(); j != links.end(); ++j) {
161 MSTrafficLightLogic::LinkVector::const_iterator j2;
162 for (j2 = (*j).begin(); j2 != (*j).end(); ++j2) {
229 std::vector<GUIGlID> ret;
231 if (!(*i)->isInner() || includeInternal) {
232 ret.push_back((*i)->getGlID());
241 std::vector<GUIGlID> ret;
242 std::vector<std::string> ids;
244 std::string sid = (*i).second->getMicrosimID();
245 if (find(ids.begin(), ids.end(), sid) == ids.end()) {
246 ret.push_back((*i).second->getGlID());
259 for (std::map<std::string, MSDetectorFileOutput*>::const_iterator j = dets.begin(); j != dets.end(); ++j) {
275 for (std::map<std::string, MSJunction*>::const_iterator i = junctions.begin(); i != junctions.end(); ++i) {
279 float* cmin =
new float[2];
280 float* cmax =
new float[2];
284 const std::vector<MSLane*>& lanes = edge->
getLanes();
285 for (std::vector<MSLane*>::const_iterator j = lanes.begin(); j != lanes.end(); ++j) {
286 b.
add((*j)->getShape().getBoxBoundary());
297 throw ProcessError(
"Network size exceeds 1 Lightyear. Please reconsider your inputs.\n");
419 ret->
mkItem(
"loaded vehicles [#]",
true,
421 ret->
mkItem(
"waiting vehicles [#]",
true,
423 ret->
mkItem(
"departed vehicles [#]",
true,
425 ret->
mkItem(
"running vehicles [#]",
true,
427 ret->
mkItem(
"arrived vehicles [#]",
true,
429 ret->
mkItem(
"collisions [#]",
true,
431 ret->
mkItem(
"teleports [#]",
true,
476 throw ProcessError(
"A gui-network was not yet constructed.");
499 GUINet::getGUIMEVehicleControl() {
510 const size_t numLanes = (*i)->getLanes().size();
511 for (
size_t j = 0; j < numLanes; ++j) {
512 (*i)->getLaneGeometry(j).updateColor(s);
517 (*i)->updateColor(s);