forked from mento-protocol/simulation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault_experiment.py
34 lines (27 loc) · 1.01 KB
/
default_experiment.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""
The default experiment with default model, Initial State,
System Parameters, and Simulation Configuration.
The defaults are defined in their respective modules:
* Initial State in `model/state_variables.py`
* System Parameters in `model/system_parameters.py`
* Simulation Configuration in `experiments/simulation_configuration.py`
"""
from radcad import Simulation, Experiment, Backend
from experiments.simulation_configuration import TIMESTEPS, MONTE_CARLO_RUNS
from model.utils.engine import Engine
from model import model
# Create Model Simulation
simulation = Simulation(
model=model,
timesteps=TIMESTEPS,
runs=MONTE_CARLO_RUNS
)
simulation.engine = Engine()
# Create Experiment of single Simulation
experiment = Experiment([simulation])
experiment.engine = Engine()
# Configure Simulation & Experiment engine
simulation.engine = experiment.engine
experiment.engine.backend = Backend.SINGLE_PROCESS
experiment.engine.deepcopy = False
experiment.engine.drop_substeps = True # Do not store data for substeps