Skip to content

Commit

Permalink
fix #11335
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Aug 11, 2022
1 parent 3a16462 commit 909cf67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/microsim/MSFrame.cpp
Expand Up @@ -442,6 +442,9 @@ MSFrame::fillOptions() {
oc.doRegister("tls.actuated.jam-threshold", new Option_Float(-1));
oc.addDescription("tls.actuated.jam-threshold", "Processing", "Sets default jam-treshold parameter for all actuation detectors");

oc.doRegister("tls.actuated.detector-length", new Option_Float(0));
oc.addDescription("tls.actuated.detector-length", "Processing", "Sets default detector length parameter for all actuation detectors");

oc.doRegister("tls.delay_based.detector-range", new Option_Float(100));
oc.addDescription("tls.delay_based.detector-range", "Processing", "Sets default range for detecting delayed vehicles");

Expand Down
4 changes: 2 additions & 2 deletions src/microsim/traffic_lights/MSActuatedTrafficLightLogic.cpp
Expand Up @@ -55,7 +55,6 @@ const std::vector<std::string> MSActuatedTrafficLightLogic::OPERATOR_PRECEDENCE(
// parameter defaults definitions
// ===========================================================================
#define DEFAULT_MAX_GAP "3.0"
#define DEFAULT_DET_LENGTH "0"
#define DEFAULT_PASSING_TIME "1.9"
#define DEFAULT_DETECTOR_GAP "2.0"
#define DEFAULT_INACTIVE_THRESHOLD "180"
Expand Down Expand Up @@ -166,7 +165,8 @@ MSActuatedTrafficLightLogic::init(NLDetectorBuilder& nb) {
std::map<MSInductLoop*, int> inductLoopInfoMap; // retrieve junction entry lane in case loops are placed further upstream (and other properties)
int detEdgeIndex = -1;
int detLaneIndex = 0;
const double detDefaultLength = StringUtils::toDouble(getParameter("detector-length", DEFAULT_DET_LENGTH));
const double detDefaultLength = StringUtils::toDouble(getParameter("detector-length",
OptionsCont::getOptions().getValueString("tls.actuated.detector-length")));
MSEdge* prevDetEdge = nullptr;
for (LaneVector& lanes : myLanes) {
for (MSLane* lane : lanes) {
Expand Down

0 comments on commit 909cf67

Please sign in to comment.