Skip to content

Commit

Permalink
Fixed STSU default speeds (#43)
Browse files Browse the repository at this point in the history
The current implementation stores the speed in minutes instead of the expected seconds.
  • Loading branch information
JamesVaughan authored Jul 15, 2024
1 parent d26e685 commit 0742ea1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion TMG.Visum/TransitAssignment/HeadwayImpedanceParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ internal override void UpdateSTSUSegmentSpeeds(VisumInstance instance)
NetObjectType = "LINK",
OnlyActive = true,
ResultAttributeName = $"ADDVAL1",
Formula = $"IF({autoTimes} < 9999, {autoTimes}, 60 * [LENGTH] / {parameter.DefaultEROWSpeed})"
// 3600 because VISUM uses seconds for time
Formula = $"IF({autoTimes} < 9999, {autoTimes}, 3600 * [LENGTH] / {parameter.DefaultEROWSpeed})"
});

// Apply to lines in the filter
Expand Down

0 comments on commit 0742ea1

Please sign in to comment.