From 0df3d9ced743ac3385dd710c7133a6cf369b051c Mon Sep 17 00:00:00 2001 From: Radu Nicolae Date: Mon, 16 Jun 2025 18:01:07 +0200 Subject: integrated M3SA, updated with tests and CpuPowerModels --- .../src/main/python/models/model.py | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 opendc-experiments/opendc-experiments-m3sa/src/main/python/models/model.py (limited to 'opendc-experiments/opendc-experiments-m3sa/src/main/python/models/model.py') diff --git a/opendc-experiments/opendc-experiments-m3sa/src/main/python/models/model.py b/opendc-experiments/opendc-experiments-m3sa/src/main/python/models/model.py new file mode 100644 index 00000000..bfffd090 --- /dev/null +++ b/opendc-experiments/opendc-experiments-m3sa/src/main/python/models/model.py @@ -0,0 +1,32 @@ +""" +A model is the output of simulator. It contains the data the simulator output, under a certain topology, seed, +workload, datacenter configuration, etc. A model is further used in the analyzer as part of the MultiModel class, +and further in the MetaModel class. + +:param sim: the simulation data of the model +""" +import json + + +class Model: + """ + Represents a single simulation output containing various data metrics collected under specific simulation conditions. + A Model object stores raw and processed simulation data and is designed to interact with higher-level structures like + MultiModel and MetaModel for complex data analysis. + """ + + def __init__(self, raw_sim_data, identifier: str): + self.raw_sim_data = raw_sim_data + self.id: str = str(identifier) + self.processed_sim_data = [] + self.cumulative_time_series_values = [] + self.cumulated: float = 0.0 + self.experiment_name: str = "" + self.margins_of_error = [] + self.topologies = [] + self.workloads = [] + self.allocation_policies = [] + self.carbon_trace_paths = [] + + def is_meta_model(self) -> bool: + return self.id == "M" -- cgit v1.2.3