Skip to content

Commit

Permalink
Tweaked meter CD road naming to be more permissive
Browse files Browse the repository at this point in the history
  • Loading branch information
DougLau committed Jan 29, 2025
1 parent afc630d commit e139154
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/ramp_meters.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ _passage_, _bypass_ and _merge_ detectors.
There are special rules for meters on [CD roads]:
* The meter's `roadway` must be the main road
* The entrance [r_node] must be on the CD road
* The name of the CD road must be the same as the main roadway, but with a " CD"
suffix
* The name of the CD road must be the same as the main roadway, but contain
the word-token "CD"

Advance warning beacons are flashing lights on a static sign, e.g. "PREPARE TO
STOP WHEN FLASHING". Typically, they are hard-wired to flash when the meter
Expand Down
3 changes: 2 additions & 1 deletion src/us/mn/state/dot/tms/server/Corridor.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public Iterator<String> getLinkedCDRoads() {
private boolean matchesCD(GeoLoc loc) {
Road xs = (loc != null) ? loc.getCrossStreet() : null;
String nm = (xs != null) ? xs.getName() : "";
return nm.startsWith(roadway.toString()) && nm.endsWith(" CD");
return nm.startsWith(roadway.toString())
&& nm.matches(".*\\bCD\\b.*");
}

/** Write out the corridor to an XML file */
Expand Down

0 comments on commit e139154

Please sign in to comment.