public interface Model extends Value
A traditional regression model could be considered a single-step model, with all data being provided before/during setup, and then a single step phase where the outputs are derived.
In comparison, an iterative model can follow the same procedure, but would take initial conditions before/during setup, and then each step would take the current conditions and move forward a single delta. Iterative models can then behave in non-linear ways, exposing feedback loops as each step is recursively dependent upon the previous.
Paradigms of modeling may be introduced and orchestrated inside step in a modular fashion. Calculate may then represent agents moving forward one time step, the processing of a window of events in a discrete event model, etc.
| Modifier and Type | Method and Description |
|---|---|
default void |
dispose()
An optional lifecycle point triggered when a model is restarted or explicitly closed.
|
default void |
done() |
void |
emitData(ModelContext dataContext,
ModelExecutionPhase phase) |
default void |
init()
This method is called just after the Model is constructed, allowing the state of the model to
be updated.
|
void |
registerSchemas(ModelContext dataContext) |
default void |
setup()
An optional lifecycle point at which to take configured initial parameters and initialise
required internal state.
|
default boolean |
shouldEmitData() |
void |
step()
Required lifecycle method for implementing the calculation of a model.
|
void |
writeToLog(ALCat inType,
java.lang.String value) |
default void init()
default void setup()
default void dispose()
default void done()
void step()
step will be called once or more times, with the external user or simudyne.core.exec.harness able to read outputs, change inputs, etc. in-between calls. Each step represents the moving forward in time, but the explicit notion of progress is left as specific to the implementing model.
void emitData(ModelContext dataContext, ModelExecutionPhase phase)
default boolean shouldEmitData()
void registerSchemas(ModelContext dataContext)
registerSchemas in interface Valuevoid writeToLog(ALCat inType, java.lang.String value)