-
- All Implemented Interfaces:
public final class EuclideanSimulationKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any, P extends Position<P>, Vector<P>> EuclideanEnvironment<T, P>startSimulation(EuclideanEnvironment<T, P> $self, Function1<EuclideanEnvironment<T, P>, Unit> onceInitialized, Function4<EuclideanEnvironment<T, P>, Reaction<T>, Time, Long, Unit> atEachStep, Function3<EuclideanEnvironment<T, P>, Time, Long, Unit> whenFinished, Long steps)Run the simulation this environment owns. final static <T extends Any, P extends Position<P>, Vector<P>> EuclideanEnvironment<T, P>loadYamlSimulation(String resource, Map<String, Double> vars)Loads a simulation from a YAML file. -
-
Method Detail
-
startSimulation
final static <T extends Any, P extends Position<P>, Vector<P>> EuclideanEnvironment<T, P> startSimulation(EuclideanEnvironment<T, P> $self, Function1<EuclideanEnvironment<T, P>, Unit> onceInitialized, Function4<EuclideanEnvironment<T, P>, Reaction<T>, Time, Long, Unit> atEachStep, Function3<EuclideanEnvironment<T, P>, Time, Long, Unit> whenFinished, Long steps)
Run the simulation this environment owns.
- Parameters:
onceInitialized-the lambda to execute when the simulation begins.atEachStep-the lambda to execute on each step of the simulation.whenFinished-the lambda to execute at the end of the simulation.steps-the number of steps the simulation must execute.
-
loadYamlSimulation
final static <T extends Any, P extends Position<P>, Vector<P>> EuclideanEnvironment<T, P> loadYamlSimulation(String resource, Map<String, Double> vars)
Loads a simulation from a YAML file.
- Parameters:
resource-the name of the file containing the simulation to load.vars-a map specifying name-value bindings for the variables in this scenario.
-
-
-
-