void GUINet::setSimDuration(int val) { myLastSimDuration = val; myOverallSimDuration += val; myLastVehicleMovementCount = getVehicleControl().getRunningVehicleNo(); myOverallVehicleCount += myLastVehicleMovementCount; }
GUIParameterTableWindow * GUINet::getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &) throw() { GUIParameterTableWindow *ret = new GUIParameterTableWindow(app, *this, 13); // add items ret->mkItem("vehicles running [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getRunningVehicleNo)); ret->mkItem("vehicles ended [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getEndedVehicleNo)); ret->mkItem("vehicles emitted [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getEmittedVehicleNo)); ret->mkItem("vehicles loaded [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getLoadedVehicleNo)); ret->mkItem("vehicles waiting [#]", true, new FunctionBinding<MSEmitControl, unsigned int>(&getEmitControl(), &MSEmitControl::getWaitingVehicleNo)); ret->mkItem("end time [s]", false, OptionsCont::getOptions().getString("end")); ret->mkItem("begin time [s]", false, OptionsCont::getOptions().getString("begin")); // ret->mkItem("time step [s]", true, new FunctionBinding<GUINet, SUMOTime>(this, &GUINet::getCurrentTimeStep)); if (logSimulationDuration()) { ret->mkItem("step duration [ms]", true, new FunctionBinding<GUINet, unsigned int>(this, &GUINet::getWholeDuration)); ret->mkItem("simulation duration [ms]", true, new FunctionBinding<GUINet, unsigned int>(this, &GUINet::getSimDuration)); /* ret->mkItem("visualisation duration [ms]", true, new CastingFunctionBinding<GUINet, SUMOReal, int>( &(getNet()), &GUINet::getVisDuration)); */ ret->mkItem("idle duration [ms]", true, new FunctionBinding<GUINet, unsigned int>(this, &GUINet::getIdleDuration)); ret->mkItem("duration factor []", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getRTFactor)); /* ret->mkItem("mean duration factor []", true, new FuncBinding_IntParam<GUINet, SUMOReal>( &(getNet()), &GUINet::getMeanRTFactor), 1); */ ret->mkItem("ups [#]", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getUPS)); ret->mkItem("mean ups [#]", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getMeanUPS)); } // close building ret->closeBuilding(); return ret; }
GUIParameterTableWindow* GUINet::getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView&) { GUIParameterTableWindow* ret = new GUIParameterTableWindow(app, *this, 19); // add items ret->mkItem("loaded vehicles [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getLoadedVehicleNo)); ret->mkItem("waiting vehicles [#]", true, new FunctionBinding<MSInsertionControl, unsigned int>(&getInsertionControl(), &MSInsertionControl::getWaitingVehicleNo)); ret->mkItem("departed vehicles [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getDepartedVehicleNo)); ret->mkItem("running vehicles [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getRunningVehicleNo)); ret->mkItem("arrived vehicles [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getEndedVehicleNo)); ret->mkItem("collisions [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getCollisionCount)); ret->mkItem("teleports [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getTeleportCount)); ret->mkItem("end time [s]", false, OptionsCont::getOptions().getString("end")); ret->mkItem("begin time [s]", false, OptionsCont::getOptions().getString("begin")); // ret->mkItem("time step [s]", true, new FunctionBinding<GUINet, SUMOTime>(this, &GUINet::getCurrentTimeStep)); if (logSimulationDuration()) { ret->mkItem("step duration [ms]", true, new FunctionBinding<GUINet, unsigned int>(this, &GUINet::getWholeDuration)); ret->mkItem("simulation duration [ms]", true, new FunctionBinding<GUINet, unsigned int>(this, &GUINet::getSimDuration)); /* ret->mkItem("visualisation duration [ms]", true, new CastingFunctionBinding<GUINet, SUMOReal, int>( &(getNet()), &GUINet::getVisDuration)); */ ret->mkItem("idle duration [ms]", true, new FunctionBinding<GUINet, unsigned int>(this, &GUINet::getIdleDuration)); ret->mkItem("duration factor []", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getRTFactor)); /* ret->mkItem("mean duration factor []", true, new FuncBinding_IntParam<GUINet, SUMOReal>( &(getNet()), &GUINet::getMeanRTFactor), 1); */ ret->mkItem("ups [#]", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getUPS)); ret->mkItem("mean ups [#]", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getMeanUPS)); } ret->mkItem("nodes [#]", false, (int)myJunctions->size()); ret->mkItem("edges [#]", false, (int)GUIEdge::getIDs(false).size()); ret->mkItem("total edge length [km]", false, GUIEdge::getTotalLength(false, false) / 1000); ret->mkItem("total lane length [km]", false, GUIEdge::getTotalLength(false, true) / 1000); // close building ret->closeBuilding(); return ret; }
GUIParameterTableWindow* GUINet::getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView&) { GUIParameterTableWindow* ret = new GUIParameterTableWindow(app, *this, 28); // add items ret->mkItem("loaded vehicles [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getLoadedVehicleNo)); ret->mkItem("insertion-backlogged vehicles [#]", true, new FunctionBinding<MSInsertionControl, unsigned int>(&getInsertionControl(), &MSInsertionControl::getWaitingVehicleNo)); ret->mkItem("departed vehicles [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getDepartedVehicleNo)); ret->mkItem("running vehicles [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getRunningVehicleNo)); ret->mkItem("arrived vehicles [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getEndedVehicleNo)); ret->mkItem("collisions [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getCollisionCount)); ret->mkItem("teleports [#]", true, new FunctionBinding<MSVehicleControl, unsigned int>(&getVehicleControl(), &MSVehicleControl::getTeleportCount)); if (myPersonControl != 0) { ret->mkItem("loaded persons [#]", true, new FunctionBinding<MSPersonControl, unsigned int>(&getPersonControl(), &MSPersonControl::getLoadedPersonNumber)); ret->mkItem("running persons [#]", true, new FunctionBinding<MSPersonControl, unsigned int>(&getPersonControl(), &MSPersonControl::getRunningPersonNumber)); ret->mkItem("jammed persons [#]", true, new FunctionBinding<MSPersonControl, unsigned int>(&getPersonControl(), &MSPersonControl::getJammedPersonNumber)); } ret->mkItem("end time [s]", false, OptionsCont::getOptions().getString("end")); ret->mkItem("begin time [s]", false, OptionsCont::getOptions().getString("begin")); // ret->mkItem("time step [s]", true, new FunctionBinding<GUINet, SUMOTime>(this, &GUINet::getCurrentTimeStep)); if (logSimulationDuration()) { ret->mkItem("step duration [ms]", true, new FunctionBinding<GUINet, unsigned int>(this, &GUINet::getWholeDuration)); ret->mkItem("simulation duration [ms]", true, new FunctionBinding<GUINet, unsigned int>(this, &GUINet::getSimDuration)); /* ret->mkItem("visualisation duration [ms]", true, new CastingFunctionBinding<GUINet, SUMOReal, int>( &(getNet()), &GUINet::getVisDuration)); */ ret->mkItem("idle duration [ms]", true, new FunctionBinding<GUINet, unsigned int>(this, &GUINet::getIdleDuration)); ret->mkItem("duration factor []", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getRTFactor)); /* ret->mkItem("mean duration factor []", true, new FuncBinding_IntParam<GUINet, SUMOReal>( &(getNet()), &GUINet::getMeanRTFactor), 1); */ ret->mkItem("ups [#]", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getUPS)); ret->mkItem("mean ups [#]", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getMeanUPS)); if (OptionsCont::getOptions().getBool("duration-log.statistics")) { ret->mkItem("avg. trip length [m]", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getAvgRouteLength)); ret->mkItem("avg. trip duration [s]", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getAvgDuration)); ret->mkItem("avg. trip waiting time [s]", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getAvgWaitingTime)); ret->mkItem("avg. trip time loss [s]", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getAvgTimeLoss)); ret->mkItem("avg. trip depart delay [s]", true, new FunctionBinding<GUINet, SUMOReal>(this, &GUINet::getAvgDepartDelay)); } } ret->mkItem("nodes [#]", false, (int)myJunctions->size()); ret->mkItem("edges [#]", false, (int)GUIEdge::getIDs(false).size()); ret->mkItem("total edge length [km]", false, GUIEdge::getTotalLength(false, false) / 1000); ret->mkItem("total lane length [km]", false, GUIEdge::getTotalLength(false, true) / 1000); ret->mkItem("network version ", false, toString(myVersion)); // close building ret->closeBuilding(); return ret; }