@@ -54,7 +54,7 @@ def shutdown(self, **kwargs):
54
54
def run_with_config (self , configuration ) -> SimulationResult :
55
55
"""Run the simulator with the given configuration and return the results in the structure of a
56
56
SimulationResult
57
- :param configuration:
57
+ :param configuration: the configuration required to initialise the Simulation
58
58
:return: Simulation results in the structure of the SimulationResult data class"""
59
59
60
60
@@ -77,6 +77,12 @@ def execute(
77
77
max_executions : int = 200 ,
78
78
custom_data_aggregator : Callable [[dict , dict ], dict ] = None ,
79
79
):
80
+ """ For this specific test case, collect the data, run the simulator, check for faults and return the result
81
+ and collected data
82
+ :param data_collector: An ObservationalDataCollector which gathers data relevant to the specified scenario
83
+ :param max_executions: Maximum number of executions
84
+ :param custom_data_aggregator:
85
+ :return: tuple containing SimulationResult or str, execution number and collected data """
80
86
data_collector .collect_data ()
81
87
82
88
for i in range (max_executions ):
@@ -112,6 +118,11 @@ def execute(
112
118
def generate_surrogates (
113
119
self , specification : CausalSpecification , data_collector : ObservationalDataCollector
114
120
) -> list [SearchFitnessFunction ]:
121
+ """ Generate a surrogate model for each edge of the dag that specifies it is included in the DAG metadata.
122
+ :param specification: The Causal Specification (combination of Scenario and Causal Dag)
123
+ :param data_collector: An ObservationalDataCollector which gathers data relevant to the specified scenario
124
+ :return: A list of surrogate models
125
+ """
115
126
surrogate_models = []
116
127
117
128
for u , v in specification .causal_dag .graph .edges :
0 commit comments