Skip to content

Commit

Permalink
feat(app): provide getHaltingVehicles from LaneAreaDetectors (#454)
Browse files Browse the repository at this point in the history
* feat: Make getHaltingVehicles from lastLaneAreaInfo accessible
  • Loading branch information
hoelger authored Jan 8, 2025
1 parent c352cf4 commit 8b8c6c7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ public double getLength() {
}

@SuppressWarnings("unused")
public int getAmountOfVehiclesOnSegment() {
public int getNumberOfVehicles() {
return lastLaneAreaInfo == null ? 0 : Math.max(0, lastLaneAreaInfo.getVehicleCount());
}

public int getNumberOfHaltingVehicles() {
return lastLaneAreaInfo == null ? 0 : Math.max(0, lastLaneAreaInfo.getHaltingVehicles());
}

public double getMeanSpeed() {
return lastLaneAreaInfo == null || lastLaneAreaInfo.getVehicleCount() == 0 ? -1d : lastLaneAreaInfo.getMeanSpeed();
}
Expand Down

0 comments on commit 8b8c6c7

Please sign in to comment.