Package it.unibo.alchemist.model
Interface Actionable
-
- All Implemented Interfaces:
-
java.io.Serializable
,kotlin.Comparable
public interface Actionable<T extends Object> implements Comparable<Actionable<T>>, Serializable
A time-distributed entity with inboundDependencies, outboundDependencies and an execution strategy.
-
-
Method Summary
Modifier and Type Method Description abstract Boolean
canExecute()
abstract Unit
execute()
Executes the reactions. abstract Unit
initializationComplete(Time atTime, Environment<T, ?> environment)
This method is called when the environment has completed its initialization. abstract Unit
update(Time currentTime, Boolean hasBeenExecuted, Environment<T, ?> environment)
Updates the scheduling of this reaction. abstract List<Action<T>>
getActions()
The list of Actions of the Reaction. abstract Unit
setActions(List<Action<T>> actions)
The list of Actions of the Reaction. abstract List<Condition<T>>
getConditions()
The list of Conditions of the Reaction. abstract Unit
setConditions(List<Condition<T>> conditions)
The list of Conditions of the Reaction. abstract ListSet<out Dependency>
getOutboundDependencies()
abstract ListSet<out Dependency>
getInboundDependencies()
Double
getRate()
Time
getTau()
abstract TimeDistribution<T>
getTimeDistribution()
-
-
Method Detail
-
canExecute
abstract Boolean canExecute()
- Returns:
true if the reaction can be executed (namely, all the conditions are satisfied).
-
initializationComplete
abstract Unit initializationComplete(Time atTime, Environment<T, ?> environment)
This method is called when the environment has completed its initialization. Can be used by this reaction to compute its next execution time - in case such computation requires an inspection of the environment.
- Parameters:
atTime
- the time at which the initialization of this reaction was accomplishedenvironment
- the environment
-
update
abstract Unit update(Time currentTime, Boolean hasBeenExecuted, Environment<T, ?> environment)
Updates the scheduling of this reaction.
- Parameters:
currentTime
- the current Time of execution.hasBeenExecuted
- true if the reaction have just been executed.environment
- the current environment
-
getActions
abstract List<Action<T>> getActions()
-
setActions
abstract Unit setActions(List<Action<T>> actions)
-
getConditions
abstract List<Condition<T>> getConditions()
-
setConditions
abstract Unit setConditions(List<Condition<T>> conditions)
-
getOutboundDependencies
abstract ListSet<out Dependency> getOutboundDependencies()
- Returns:
The list of Dependency whose concentration may change after the execution of this reaction.
-
getInboundDependencies
abstract ListSet<out Dependency> getInboundDependencies()
- Returns:
The list of Dependencys whose concentration may affect the execution of the Reaction.
-
getTimeDistribution
abstract TimeDistribution<T> getTimeDistribution()
- Returns:
the TimeDistribution for this Reaction
-
-
-
-