Skip to content

Commit

Permalink
core: stdcm: remove min speed for engineering allowances
Browse files Browse the repository at this point in the history
This was introduce to fix a bug, but that bug also had
other sources that were fixed since then.

Signed-off-by: Eloi Charpentier <[email protected]>
  • Loading branch information
eckter committed Jan 29, 2025
1 parent 2b56d3e commit e7e03a8
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,10 @@ class EngineeringAllowanceManager(private val graph: STDCMGraph) {
// We need to set the first constant speed part to 0
// so that we can use it as floor constraint

// The min speed value isn't entirely trivial to determine:
// We need it to be strictly positive to avoid NaN issues,
// but we're also too optimistic with allowance possibility
// when we let it get close to 0. But if it's too high, we miss
// out on solutions.
// So this is a magic value that could be tweaked if needed.
//
// We need the min speed to be strictly positive to avoid NaN issues.
// Eventually, when we'll have actual capacity stops, we should
// use the actual minimum speed on the network.
val minSpeed = 1.0
val minSpeed = 1e-5
builder.addPart(
EnvelopePart.generateTimes(
mutableListOf<SelfTypeHolder?>(
Expand Down

0 comments on commit e7e03a8

Please sign in to comment.