Models¶
This is the SimKit models
module that contains
definitions for the Model
class.
The SimKit model contains five layers:
Data
,
Formulas
,
Calculations
,
Outputs
and
Simulations
. The
Data
layer organizes
Data Sources by providing methods to add and load data for SimKit.
The Formulas
layer loads
Formulas used by Calculations
calculations. The Outputs
layer
organizes the calculated outputs for use in other calculations. Finally the
Simulations
layer organizes
options such as how long the simulation should run and takes care of actually
running the simulation.
Model Parameter¶
-
class
simkit.core.models.
ModelParameter
(*args, **kwargs)[source]¶ - Parameters
layer (str) – name of the layer class of these parameters, optional
module (str) – module that the sources are defined in, optional
package (str) – package that the source module is contained in, optional
path (str) – path to source package if not on
PYTHONPATH
, optionalsources (list) – name of classes with each layers parameters
Model Base¶
Model¶
-
class
simkit.core.models.
Model
(modelfile=None)[source]¶ A class for models. SimKit is a subclass of the
Model
class.- Parameters
modelfile (str) – The name of the JSON file with model data.
-
command
(cmd, progress_hook=None, *args, **kwargs)[source]¶ Execute a model command.
- Parameters
cmd – Name of the command.
progress_hook – A function to which progress updates are passed.
-
layers
= None¶ dictionary of model layer classes
-
param_file
= None¶ model file
-
property
state
¶ current state of the model