Base Experiment¶
This module contains the abstract definition of an experiment. It has an abstract definition BaseExperiment that should be extended using the concrete classes of the simulation paradigm to be used.
Example
Creating an experiment:
class DiscreteEventExperiment(BaseExperiment):
def __init__(self, dynamic_system: DiscreteEventDynamicSystem):
report = DefaultReport()
simulator = DiscreteEventSimulationEngine(dynamic_system, report)
control = DiscreteEventControl(simulator, ThreadControlStrategy())
recovery_strategy = PickleRecovery()
super(DiscreteEventExperiment, self).__init__(
dynamic_system, simulator, control, report, recovery_strategy
)
-
class
gsf.experiments.core.base_experiment.
BaseExperiment
(dynamic_system: BaseDynamicSystem, simulator: BaseSimulator, control: BaseControl, report: BaseReport, recovery_strategy: RecoveryStrategy)¶ Bases:
abc.ABC
Simulation experiment
Organizes the simulation modules.
-
__dynamic_system
¶ Dynamic system where things will be built.
- Type
-
__simulator
¶ Simulator that will run the simulations.
- Type
-
__control
¶ Control for the simulation.
- Type
-
__report
¶ Report module for the simulation.
- Type
-
__recovery_strategy
¶ Strategy for persistence of the experiment.
- Type
-
property
dynamic_system
¶ Gets the dynamic system of the experiment
-
load
(data: Any)¶ Imports an already existing experiment.
-
save
()¶ Saves the experiment.
-
property
simulation_control
¶ Gets the simulation control of the experiment
-
property
simulation_report
¶ Gets the simulation report of the experiment
-
property
simulator
¶ Gets the simulator of the experiment
-