![]() |
SUMO - Simulation of Urban MObility
|
#include <MSSOTLE2Sensors.h>
Public Member Functions | |
void | buildCountOutSensors (MSTrafficLightLogic::LaneVectorVector controlledLanes, NLDetectorBuilder &nb) |
void | buildCountSensors (MSTrafficLightLogic::LaneVectorVector controlledLanes, NLDetectorBuilder &nb) |
void | buildOutSensors (MSTrafficLightLogic::LaneVectorVector controlledLanes, NLDetectorBuilder &nb) |
This function member has to be extended to properly build sensors for the output lanes Sensors has to be constrained on lane dimension Built sensors has to be collected and associated properly to theirs MSLane for retrieval using MSSOTLSensors::countVehicles(std::string) See extension classes for further specifications on sensor building. More... | |
void | buildOutSensors (MSTrafficLightLogic::LaneVectorVector controlledLanes, NLDetectorBuilder &nb, double sensorLength) |
void | buildSensors (MSTrafficLightLogic::LaneVectorVector controlledLanes, NLDetectorBuilder &nb) |
This function member has to be extended to properly build sensors for the input lanes Sensors has to be constrained on lane dimension Built sensors has to be collected and associated properly to theirs MSLane for retrieval using MSSOTLSensors::countVehicles(std::string) See extension classes for further specifications on sensor building. More... | |
void | buildSensors (MSTrafficLightLogic::LaneVectorVector controlledLanes, NLDetectorBuilder &nb, double sensorLength) |
int | countVehicles (MSLane *lane) |
int | countVehicles (std::string laneId) |
int | estimateVehicles (std::string laneId) |
double | getEstimateQueueLength (std::string laneId) |
virtual double | getMaxSpeed (std::string laneId) |
int | getPassedVeh (std::string laneId, bool out) |
virtual double | meanVehiclesSpeed (MSLane *lane) |
virtual double | meanVehiclesSpeed (std::string laneId) |
MSSOTLE2Sensors (std::string tlLogicID, const MSTrafficLightLogic::Phases *phases) | |
void | setSpeedThresholdParam (double newThreshold) |
virtual void | setVehicleWeigths (const std::string &weightString) |
virtual void | stepChanged (int newStep) |
void | subtractPassedVeh (std::string laneId, int passed) |
~MSSOTLE2Sensors (void) | |
Protected Member Functions | |
void | buildContinueSensior (MSLane *lane, NLDetectorBuilder &nb, double sensorLength, MSLane *continueOnLane, double usedLength) |
void | buildCountSensorForLane (MSLane *lane, NLDetectorBuilder &nb) |
void | buildCountSensorForOutLane (MSLane *lane, NLDetectorBuilder &nb) |
void | buildSensorForLane (MSLane *lane, NLDetectorBuilder &nb) |
This function member has to be extended to properly build a sensor for a specific input lane Sensors has to be constrained on lane dimension Built sensors has to be collected and associated properly to the respective MSLane for retrieval using MSSOTLSensors::countVehicles(std::string) See extension classes for further specifications on sensor building. More... | |
void | buildSensorForLane (MSLane *lane, NLDetectorBuilder &nb, double sensorLength) |
void | buildSensorForOutLane (MSLane *lane, NLDetectorBuilder &nb) |
This function member has to be extended to properly build a sensor for a specific output lane Sensors has to be constrained on lane dimension Built sensors has to be collected and associated properly to the respective MSLane for retrieval using MSSOTLSensors::countVehicles(std::string) See extension classes for further specifications on sensor building. More... | |
void | buildSensorForOutLane (MSLane *lane, NLDetectorBuilder &nb, double sensorLength) |
int | count (MSE2Collector *sensor) |
template<typename Method , typename ValueType > | |
bool | getVelueFromSensor (std::string laneId, Method function, ValueType &value) |
Protected Attributes | |
int | currentStep |
std::map< std::string, std::vector< std::string > > | m_continueSensorOnLanes |
MSLaneID_MaxSpeedMap | m_maxSpeedMap |
MSLaneID_MSE2CollectorMap | m_sensorMap |
std::map< const std::string, int > | m_typeWeightMap |
const MSTrafficLightLogic::Phases * | myPhases |
double | speedThresholdParam |
std::string | tlLogicID |
Definition at line 35 of file MSSOTLE2Sensors.h.
MSSOTLE2Sensors::MSSOTLE2Sensors | ( | std::string | tlLogicID, |
const MSTrafficLightLogic::Phases * | phases | ||
) |
Definition at line 30 of file MSSOTLE2Sensors.cpp.
MSSOTLE2Sensors::~MSSOTLE2Sensors | ( | void | ) |
Definition at line 35 of file MSSOTLE2Sensors.cpp.
|
protected |
Definition at line 300 of file MSSOTLE2Sensors.cpp.
References MSDetectorControl::add(), NLDetectorBuilder::createE2Detector(), DIST_THRS, DU_TL_CONTROL, MSNet::getDetectorControl(), Named::getID(), MSNet::getInstance(), MSLane::getLength(), HALTING_SPEED_THRS, HALTING_TIME_THRS, INVALID_POSITION, MSEdge::isCrossing(), MSEdge::isInternal(), MSEdge::isWalkingArea(), m_continueSensorOnLanes, m_sensorMap, SUMO_TAG_LANE_AREA_DETECTOR, MSSOTLSensors::tlLogicID, and WRITE_MESSAGE.
Referenced by buildSensorForLane().
void MSSOTLE2Sensors::buildCountOutSensors | ( | MSTrafficLightLogic::LaneVectorVector | controlledLanes, |
NLDetectorBuilder & | nb | ||
) |
Definition at line 83 of file MSSOTLE2Sensors.cpp.
References buildCountSensorForOutLane().
Referenced by MSSOTLTrafficLightLogic::init().
|
protected |
Definition at line 124 of file MSSOTLE2Sensors.cpp.
References MSDetectorControl::add(), COUNT_SENSOR_START, NLDetectorBuilder::createE2Detector(), DIST_THRS, DU_TL_CONTROL, MSNet::getDetectorControl(), Named::getID(), MSNet::getInstance(), MSLane::getLength(), HALTING_SPEED_THRS, HALTING_TIME_THRS, INPUT_COUNT_SENSOR_LENGTH, INVALID_POSITION, m_maxSpeedMap, m_sensorMap, SUMO_TAG_LANE_AREA_DETECTOR, and MSSOTLSensors::tlLogicID.
Referenced by buildCountSensors().
|
protected |
Definition at line 166 of file MSSOTLE2Sensors.cpp.
References MSDetectorControl::add(), NLDetectorBuilder::createE2Detector(), DIST_THRS, DU_TL_CONTROL, MSNet::getDetectorControl(), Named::getID(), MSNet::getInstance(), MSLane::getLength(), HALTING_SPEED_THRS, HALTING_TIME_THRS, INVALID_POSITION, m_maxSpeedMap, m_sensorMap, OUTPUT_COUNT_SENSOR_LENGTH, SENSOR_START, SUMO_TAG_LANE_AREA_DETECTOR, and MSSOTLSensors::tlLogicID.
Referenced by buildCountOutSensors().
void MSSOTLE2Sensors::buildCountSensors | ( | MSTrafficLightLogic::LaneVectorVector | controlledLanes, |
NLDetectorBuilder & | nb | ||
) |
Definition at line 66 of file MSSOTLE2Sensors.cpp.
References buildCountSensorForLane().
Referenced by MSSOTLTrafficLightLogic::init().
|
virtual |
This function member has to be extended to properly build sensors for the output lanes Sensors has to be constrained on lane dimension Built sensors has to be collected and associated properly to theirs MSLane for retrieval using MSSOTLSensors::countVehicles(std::string) See extension classes for further specifications on sensor building.
Implements MSSOTLSensors.
Definition at line 101 of file MSSOTLE2Sensors.cpp.
References OUTPUT_SENSOR_LENGTH.
void MSSOTLE2Sensors::buildOutSensors | ( | MSTrafficLightLogic::LaneVectorVector | controlledLanes, |
NLDetectorBuilder & | nb, | ||
double | sensorLength | ||
) |
Definition at line 106 of file MSSOTLE2Sensors.cpp.
References buildSensorForOutLane().
|
protectedvirtual |
This function member has to be extended to properly build a sensor for a specific input lane Sensors has to be constrained on lane dimension Built sensors has to be collected and associated properly to the respective MSLane for retrieval using MSSOTLSensors::countVehicles(std::string) See extension classes for further specifications on sensor building.
Implements MSSOTLSensors.
Definition at line 242 of file MSSOTLE2Sensors.cpp.
References INPUT_SENSOR_LENGTH.
Referenced by buildSensors().
|
protected |
Definition at line 248 of file MSSOTLE2Sensors.cpp.
References MSDetectorControl::add(), buildContinueSensior(), NLDetectorBuilder::createE2Detector(), DIST_THRS, DU_TL_CONTROL, MSNet::getDetectorControl(), MSLane::getEdge(), Named::getID(), MSNet::getInstance(), MSLane::getLength(), HALTING_SPEED_THRS, HALTING_TIME_THRS, INVALID_POSITION, MSEdge::isCrossing(), MSEdge::isInternal(), MSEdge::isWalkingArea(), m_maxSpeedMap, m_sensorMap, SENSOR_START, SUMO_TAG_LANE_AREA_DETECTOR, MSSOTLSensors::tlLogicID, and WRITE_MESSAGE.
|
protectedvirtual |
This function member has to be extended to properly build a sensor for a specific output lane Sensors has to be constrained on lane dimension Built sensors has to be collected and associated properly to the respective MSLane for retrieval using MSSOTLSensors::countVehicles(std::string) See extension classes for further specifications on sensor building.
Implements MSSOTLSensors.
Definition at line 327 of file MSSOTLE2Sensors.cpp.
References OUTPUT_SENSOR_LENGTH.
Referenced by buildOutSensors().
|
protected |
Definition at line 332 of file MSSOTLE2Sensors.cpp.
References MSDetectorControl::add(), NLDetectorBuilder::createE2Detector(), DIST_THRS, DU_TL_CONTROL, MSNet::getDetectorControl(), Named::getID(), MSNet::getInstance(), MSLane::getLength(), HALTING_SPEED_THRS, HALTING_TIME_THRS, INVALID_POSITION, m_maxSpeedMap, m_sensorMap, SENSOR_START, SUMO_TAG_LANE_AREA_DETECTOR, and MSSOTLSensors::tlLogicID.
|
virtual |
This function member has to be extended to properly build sensors for the input lanes Sensors has to be constrained on lane dimension Built sensors has to be collected and associated properly to theirs MSLane for retrieval using MSSOTLSensors::countVehicles(std::string) See extension classes for further specifications on sensor building.
Implements MSSOTLSensors.
Definition at line 39 of file MSSOTLE2Sensors.cpp.
References INPUT_SENSOR_LENGTH.
Referenced by MSSOTLTrafficLightLogic::init().
void MSSOTLE2Sensors::buildSensors | ( | MSTrafficLightLogic::LaneVectorVector | controlledLanes, |
NLDetectorBuilder & | nb, | ||
double | sensorLength | ||
) |
Definition at line 45 of file MSSOTLE2Sensors.cpp.
References buildSensorForLane().
|
protected |
Definition at line 520 of file MSSOTLE2Sensors.cpp.
References MSE2Collector::getCurrentVehicleNumber(), MSE2Collector::getCurrentVehicles(), and m_typeWeightMap.
Referenced by countVehicles(), and setSpeedThresholdParam().
|
virtual |
Implements MSSOTLSensors.
Definition at line 377 of file MSSOTLE2Sensors.cpp.
References Named::getID().
Referenced by setSpeedThresholdParam().
|
virtual |
Implements MSSOTLSensors.
Definition at line 427 of file MSSOTLE2Sensors.cpp.
References count(), m_continueSensorOnLanes, and m_sensorMap.
int MSSOTLE2Sensors::estimateVehicles | ( | std::string | laneId | ) |
Definition at line 411 of file MSSOTLE2Sensors.cpp.
References m_continueSensorOnLanes, m_sensorMap, and speedThresholdParam.
Referenced by setSpeedThresholdParam().
double MSSOTLE2Sensors::getEstimateQueueLength | ( | std::string | laneId | ) |
Definition at line 385 of file MSSOTLE2Sensors.cpp.
References m_sensorMap.
Referenced by setSpeedThresholdParam().
|
virtual |
Implements MSSOTLSensors.
Definition at line 444 of file MSSOTLE2Sensors.cpp.
References m_maxSpeedMap, and WRITE_ERROR.
Referenced by setSpeedThresholdParam().
int MSSOTLE2Sensors::getPassedVeh | ( | std::string | laneId, |
bool | out | ||
) |
Definition at line 210 of file MSSOTLE2Sensors.cpp.
References MSE2Collector::getPassedVeh(), getVelueFromSensor(), m_continueSensorOnLanes, and m_sensorMap.
Referenced by MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), and MSSwarmTrafficLightLogic::updatePheromoneLevels().
|
inlineprotected |
Definition at line 133 of file MSSOTLE2Sensors.h.
References m_sensorMap.
Referenced by getPassedVeh(), and meanVehiclesSpeed().
|
virtual |
Implements MSSOTLSensors.
Definition at line 454 of file MSSOTLE2Sensors.cpp.
References Named::getID().
Referenced by setSpeedThresholdParam().
|
virtual |
Implements MSSOTLSensors.
Definition at line 458 of file MSSOTLE2Sensors.cpp.
References MSE2Collector::getCurrentMeanSpeed(), MSE2Collector::getCurrentVehicleNumber(), getVelueFromSensor(), m_continueSensorOnLanes, m_sensorMap, and WRITE_ERROR.
|
inline |
Definition at line 79 of file MSSOTLE2Sensors.h.
References count(), countVehicles(), estimateVehicles(), getEstimateQueueLength(), getMaxSpeed(), meanVehiclesSpeed(), setVehicleWeigths(), and speedThresholdParam.
|
virtual |
Definition at line 502 of file MSSOTLE2Sensors.cpp.
References TplConvert::_2int(), m_typeWeightMap, split(), trim(), and WRITE_MESSAGE.
Referenced by setSpeedThresholdParam().
|
inlinevirtualinherited |
Definition at line 134 of file MSSOTLSensors.h.
Referenced by MSSOTLTrafficLightLogic::init(), and MSSOTLTrafficLightLogic::trySwitch().
void MSSOTLE2Sensors::subtractPassedVeh | ( | std::string | laneId, |
int | passed | ||
) |
Definition at line 230 of file MSSOTLE2Sensors.cpp.
References m_sensorMap.
Referenced by MSSwarmTrafficLightLogic::calculateEtaDiff(), and MSSwarmTrafficLightLogic::calculateEtaRatio().
|
protectedinherited |
Definition at line 43 of file MSSOTLSensors.h.
|
protected |
Definition at line 150 of file MSSOTLE2Sensors.h.
Referenced by buildContinueSensior(), countVehicles(), estimateVehicles(), getPassedVeh(), and meanVehiclesSpeed().
|
protected |
Definition at line 143 of file MSSOTLE2Sensors.h.
Referenced by buildCountSensorForLane(), buildCountSensorForOutLane(), buildSensorForLane(), buildSensorForOutLane(), and getMaxSpeed().
|
protected |
Definition at line 142 of file MSSOTLE2Sensors.h.
Referenced by buildContinueSensior(), buildCountSensorForLane(), buildCountSensorForOutLane(), buildSensorForLane(), buildSensorForOutLane(), countVehicles(), estimateVehicles(), getEstimateQueueLength(), getPassedVeh(), getVelueFromSensor(), meanVehiclesSpeed(), and subtractPassedVeh().
|
protected |
Definition at line 151 of file MSSOTLE2Sensors.h.
Referenced by count(), and setVehicleWeigths().
|
protectedinherited |
Definition at line 41 of file MSSOTLSensors.h.
Referenced by MSSOTLSensors::MSSOTLSensors().
|
protected |
Definition at line 149 of file MSSOTLE2Sensors.h.
Referenced by estimateVehicles(), and setSpeedThresholdParam().
|
protectedinherited |
Definition at line 42 of file MSSOTLSensors.h.
Referenced by buildContinueSensior(), buildCountSensorForLane(), buildCountSensorForOutLane(), buildSensorForLane(), buildSensorForOutLane(), and MSSOTLSensors::MSSOTLSensors().