Skip to content

Commit

Permalink
core: envelope-sim: migrate pipelines to kt
Browse files Browse the repository at this point in the history
Signed-off-by: Eloi Charpentier <[email protected]>
  • Loading branch information
eckter committed Dec 3, 2024
1 parent d529bf2 commit 80deb88
Show file tree
Hide file tree
Showing 6 changed files with 321 additions and 267 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package fr.sncf.osrd.envelope_sim

import com.google.common.collect.RangeMap

class EnvelopeSimContext(
@JvmField val rollingStock: PhysicsRollingStock,
@JvmField val path: PhysicsPath,
@JvmField val timeStep: Double,
tractiveEffortCurveMap: RangeMap<Double, Array<PhysicsRollingStock.TractiveEffortPoint>>
) {
@JvmField
val tractiveEffortCurveMap: RangeMap<Double, Array<PhysicsRollingStock.TractiveEffortPoint>>

/** Creates a context suitable to run simulations on envelopes */
init {
checkNotNull(tractiveEffortCurveMap)
this.tractiveEffortCurveMap = tractiveEffortCurveMap
}

fun updateCurves(
tractiveEffortCurveMap: RangeMap<Double, Array<PhysicsRollingStock.TractiveEffortPoint>>
): EnvelopeSimContext {
return EnvelopeSimContext(rollingStock, path, timeStep, tractiveEffortCurveMap)
}
}
Loading

0 comments on commit 80deb88

Please sign in to comment.