Emulation class
The Emulation class is alsways created using the EmulationFactory class. The Emulation class is the main class for the emulation. It is used to create and run the emulation.
A top level class to store all information about an emulation run.
Note that since the ideal parameter is useful when comparing the
emulator results with the simulator for all points. Providing such
results may not be always possible. Therefore, the ideal parameter
is optional.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configs |
Configs
|
The configuration yml file |
required |
solver |
Solver
|
The solver |
required |
simulator |
Simulator
|
The simulator containing experimental data |
required |
emulator |
Emulator
|
The emulator |
required |
ideal |
Optional[Simulator]
|
The simulator containing ideal data (for all emulated points) |
field(default=None)
|
Source code in emulode/emulation.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | |
plot()
Create a combined plot containing the simulator, emulator and
ideal data (if provided) and saves it to the file specified in the
configs parameter.
Source code in emulode/emulation.py
42 43 44 45 46 47 48 49 50 51 | |
EmulationFactory class
The EmulationFactory class is used to create an Emulation object. This object is used to create and run the emulation.
Factory class for the creating the Emulator object.
Currrntly, only yml configuration files are supported. Future versions may support JSON and other configuration files.
Source code in emulode/emulation.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
create_from_json_file(config_file)
staticmethod
Create an Emulation object from a json configuration file
(in future).
Source code in emulode/emulation.py
86 87 88 89 90 91 92 93 | |
create_from_yml_file(config_file, ideal_run)
staticmethod
Create an Emulation object from a yml configuration file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_file |
PathLike
|
The configuration yml file |
required |
ideal_run |
bool
|
Whether to include ideal results |
required |
Source code in emulode/emulation.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |