Skip to content

Commit

Permalink
warn if number of lanes does not match
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed May 15, 2024
1 parent 80c70a0 commit 8f914c4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ private void applyChanges(Link link, Feature ft) {
modified = true;
}

if (ft.features().getOrDefault("num_lanes", link.getNumberOfLanes()) != link.getNumberOfLanes())
log.warn("Number of lanes for link {} does not match the feature file", link.getId());

int totalCap = BigDecimal.valueOf(link.getNumberOfLanes() * perLane).setScale(0, RoundingMode.HALF_UP).intValue();
link.setCapacity(totalCap);
}
Expand Down

0 comments on commit 8f914c4

Please sign in to comment.