Class AbstractAlchemistSimulationAdapter
-
- All Implemented Interfaces:
-
it.unibo.alchemist.multivesta.adapter.AlchemistSimulationAdapter
public abstract class AbstractAlchemistSimulationAdapter implements AlchemistSimulationAdapter
This is an adapter that allow MultiVesta to interact with Alchemist.
-
-
Constructor Summary
Constructors Constructor Description AbstractAlchemistSimulationAdapter(Simulation<Object, Void> simulation)
-
Method Summary
Modifier and Type Method Description final Double
getTime()
Get the simulation time. final Double
rval(String obs)
Get the value for the given observation. final Double
rval(Integer obsId)
Get the value for the given observation. final Unit
doStep()
Perform a simulation step. final Unit
performWholeSimulation()
Perform the whole simulation. abstract Double
getObsValue(Integer obsId)
Get the value of the observation with the given id. abstract Double
getObsValue(String obs)
Get the value of the observation with the given name. -
-
Constructor Detail
-
AbstractAlchemistSimulationAdapter
AbstractAlchemistSimulationAdapter(Simulation<Object, Void> simulation)
- Parameters:
simulation
- the simulation to be wrapped.
-
-
Method Detail
-
rval
final Double rval(String obs)
Get the value for the given observation.
- Parameters:
obs
- the name of the observation
-
rval
final Double rval(Integer obsId)
Get the value for the given observation.
- Parameters:
obsId
- the id of the observation
-
doStep
final Unit doStep()
Perform a simulation step. In Alchemist this means that the simulation will be advanced of the number of step needed to reach the next time.
-
performWholeSimulation
final Unit performWholeSimulation()
Perform the whole simulation.
-
getObsValue
abstract Double getObsValue(Integer obsId)
Get the value of the observation with the given id.
-
getObsValue
abstract Double getObsValue(String obs)
Get the value of the observation with the given name. The observations named "time" and "step" have been already handled.
-
-
-
-