Просмотр исходного кода

Models can now be plotted over their number of atomic models and started work on improved memory plotting

Snej69420 9 месяцев назад
Родитель
Сommit
04e2445423
8 измененных файлов с 380 добавлено и 369 удалено
  1. 0 27
      .gitmodules
  2. 0 17
      annsim2023.py
  3. 0 17
      annsim2024.py
  4. 72 3
      benchmarks/compare.py
  5. 180 0
      benchmarks/compareMemory.py
  6. 0 280
      devstone_comparative.py
  7. 0 1
      events_devstone.txt
  8. 128 24
      plotting.md

+ 0 - 27
.gitmodules

@@ -1,27 +0,0 @@
-[submodule "cadmium"]
-	path = simulators/cadmium
-	url = https://github.com/SimulationEverywhere/cadmium.git
-[submodule "simulators/cadmium_v2"]
-	path = simulators/cadmium_v2
-	url = https://github.com/SimulationEverywhere/cadmium_v2.git
-[submodule "simulators/xdevs.rs"]
-	path = simulators/xdevs.rs
-	url = https://github.com/iscar-ucm/xdevs.rs.git
-[submodule "simulators/xdevs.c"]
-	path = simulators/xdevs.c
-	url = https://github.com/iscar-ucm/xdevs.c.git
-[submodule "simulators/xdevs.cpp"]
-	path = simulators/xdevs.cpp
-	url = https://github.com/iscar-ucm/xdevs.cpp.git
-[submodule "simulators/xdevs.java"]
-	path = simulators/xdevs.java
-	url = https://github.com/iscar-ucm/xdevs.java.git
-[submodule "simulators/xdevs.py"]
-	path = simulators/xdevs.py
-	url = https://github.com/iscar-ucm/xdevs.py.git
-[submodule "simulators/pythonpdevs"]
-	path = simulators/pythonpdevs
-	url = https://msdl.uantwerpen.be/git/yentl/PythonPDEVS.git
-[submodule "simulators/xdevs.rs-new"]
-	path = simulators/xdevs.rs-new
-	url = https://github.com/iscar-ucm/xdevs.rs.git

+ 0 - 17
annsim2023.py

@@ -1,17 +0,0 @@
-import subprocess
-
-
-if __name__ == '__main__':
-    a = "adevs,xdevs-c,xdevs-rs,xdevs-cpp,xdevs-java-sequential"
-    models = [['LI', 'HI', 'HO'], ['HOmod']]
-    sizes = [list(range(20, 401, 20)), list(range(5, 51, 5))]
-    for i, models in enumerate(models):
-        for m in models:
-            p = []
-            p.extend([f'{m}-{w}-{d}-0-0' for w in sizes[i] for d in sizes[i]])
-            p = ','.join(p)
-            n = 30
-            o = f"results_{m}.csv"
-
-            cmd = f"python3 devstone_comparative.py -a {a} -p {p} -n {n} -o {o}"
-            subprocess.run(cmd.split())

+ 0 - 17
annsim2024.py

@@ -1,17 +0,0 @@
-import subprocess
-
-
-if __name__ == '__main__':
-    a = "xdevs-rs"
-    models = [['LI', 'HI', 'HO'], ['HOmod']]
-    sizes = [list(range(20, 401, 20)), list(range(5, 51, 5))]
-    for i, models in enumerate(models):
-        for m in models:
-            p = []
-            p.extend([f'{m}-{w}-{d}-0-0' for w in sizes[i] for d in sizes[i]])
-            p = ','.join(p)
-            n = 30
-            o = f"results_{m}.csv"
-
-            cmd = f"python3 devstone_comparative.py -a {a} -p {p} -n {n} -o {o}"
-            subprocess.run(cmd.split())

+ 72 - 3
benchmarks/compare.py

@@ -1,10 +1,12 @@
 #!/usr/bin/env python3
 #!/usr/bin/env python3
 import os
 import os
 import argparse
 import argparse
+import numpy as np
 import pandas as pd
 import pandas as pd
 import matplotlib.pyplot as plt
 import matplotlib.pyplot as plt
 from pathlib import Path
 from pathlib import Path
 from itertools import cycle
 from itertools import cycle
+from model_properties import model_properties
 
 
 SIMULATOR_MAPPING = {
 SIMULATOR_MAPPING = {
     "minimal": "(m)",
     "minimal": "(m)",
@@ -41,6 +43,47 @@ def clean_data(df):
     # Single-pass boolean indexing (extremely fast)
     # Single-pass boolean indexing (extremely fast)
     return df[(df["total_time"] >= lower) & (df["total_time"] <= upper)]
     return df[(df["total_time"] >= lower) & (df["total_time"] <= upper)]
 
 
+
+def get_spaced_indices(series, n_markers):
+    """
+    Returns a list of indices that are roughly equidistant in terms of value,
+    rather than index. This prevents marker clustering in dense data regions.
+    """
+    if len(series) <= n_markers:
+        return None  # Plot all markers if we have few points
+
+    values = series.values
+    min_v, max_v = values.min(), values.max()
+
+    if min_v == max_v:
+        return [0]
+
+    # Create target values evenly spaced across the range
+    targets = np.linspace(min_v, max_v, n_markers)
+
+    indices = []
+    # Find the index of the value closest to each target
+    # Since 'grouped' is sorted by param, values are sorted.
+    # We use searchsorted to find insertion points, then check neighbors.
+    import bisect
+
+    val_list = values.tolist()
+
+    for t in targets:
+        # bisect finds the insertion point to maintain order
+        idx = bisect.bisect_left(val_list, t)
+
+        # Check if the previous index is actually closer
+        if idx > 0:
+            if idx == len(val_list) or abs(val_list[idx - 1] - t) < abs(val_list[idx] - t):
+                idx = idx - 1
+
+        if idx < len(val_list):
+            indices.append(idx)
+
+    # Deduplicate and sort
+    return sorted(list(set(indices)))
+
 def plot_time_vs_param(csv_files, param, fixed_param=None, fixed_value=None, max_value=0, o_path="", name="", bw=False):
 def plot_time_vs_param(csv_files, param, fixed_param=None, fixed_value=None, max_value=0, o_path="", name="", bw=False):
     results = {}
     results = {}
     models = []
     models = []
@@ -53,6 +96,19 @@ def plot_time_vs_param(csv_files, param, fixed_param=None, fixed_value=None, max
         df = clean_data(df)
         df = clean_data(df)
         if fixed_param and fixed_value is not None:
         if fixed_param and fixed_value is not None:
             df = df[df[fixed_param] == fixed_value]
             df = df[df[fixed_param] == fixed_value]
+
+        df = df.copy()
+        if param == "#Models":
+            df["#Models"] = df.apply(
+                lambda row: model_properties(
+                    str(row["model_type"]),
+                    int(row["width"]),
+                    int(row["depth"])
+                ).get("Atomic Models", 0),
+                axis=1
+            )
+            df = df.sort_values(by=param)
+
         if max_value > 0:
         if max_value > 0:
             df = df[df[param] <= max_value]
             df = df[df[param] <= max_value]
 
 
@@ -78,6 +134,11 @@ def plot_time_vs_param(csv_files, param, fixed_param=None, fixed_value=None, max
 
 
     for label, df in results.items():
     for label, df in results.items():
         color, lstyle, marker = next(style_cycle)
         color, lstyle, marker = next(style_cycle)
+
+        mark = 1
+        if param == "#Models":
+            mark = get_spaced_indices(df[param], 20)
+
         plt.plot(
         plt.plot(
             df[param],
             df[param],
             df["total_time"],
             df["total_time"],
@@ -85,7 +146,8 @@ def plot_time_vs_param(csv_files, param, fixed_param=None, fixed_value=None, max
             color=color,
             color=color,
             linestyle=lstyle,
             linestyle=lstyle,
             marker=marker,
             marker=marker,
-            markersize=6
+            markersize=6,
+            markevery=mark,
         )
         )
 
 
     title = f"Average Simulation Time vs {param.capitalize()}"
     title = f"Average Simulation Time vs {param.capitalize()}"
@@ -101,9 +163,7 @@ def plot_time_vs_param(csv_files, param, fixed_param=None, fixed_value=None, max
     script_dir = Path(__file__).resolve().parent
     script_dir = Path(__file__).resolve().parent
     output_dir = script_dir / "Plots"
     output_dir = script_dir / "Plots"
     if o_path:
     if o_path:
-        print(f"Output directory: {output_dir}")
         output_dir = output_dir / o_path
         output_dir = output_dir / o_path
-        print(f"Output directory: {output_dir}")
 
 
     output_dir.mkdir(parents=True, exist_ok=True)
     output_dir.mkdir(parents=True, exist_ok=True)
 
 
@@ -135,6 +195,13 @@ def main():
     parser_tvn.add_argument("-p", "--path", type=str, default="", help="the subdirectory where the plots will be stored")
     parser_tvn.add_argument("-p", "--path", type=str, default="", help="the subdirectory where the plots will be stored")
     parser_tvn.add_argument("-n", "--name", type=str, help="Name of output file")
     parser_tvn.add_argument("-n", "--name", type=str, help="Name of output file")
 
 
+    # Subcommand: total (Atomic Models)
+    parser_tot = subparsers.add_parser("total", help="Plot total time vs number of atomic models")
+    parser_tot.add_argument("--bw", action="store_true", help="Black and white / Colorblind friendly mode")
+    parser_tot.add_argument("csv_files", nargs="+", type=Path, help="CSV files to process")
+    parser_tot.add_argument("-p", "--path", type=str, default="", help="the subdirectory where the plots will be stored")
+    parser_tot.add_argument("-n", "--name", type=str, help="Name of output file")
+
     args = parser.parse_args()
     args = parser.parse_args()
 
 
     if args.command == "param":
     if args.command == "param":
@@ -149,6 +216,8 @@ def main():
                            max_value=args.max, o_path=args.path, name=args.name, bw=args.bw)
                            max_value=args.max, o_path=args.path, name=args.name, bw=args.bw)
     elif args.command == "number":
     elif args.command == "number":
         plot_time_vs_param(args.csv_files, param="number", o_path=args.path, name=args.name, bw=args.bw)
         plot_time_vs_param(args.csv_files, param="number", o_path=args.path, name=args.name, bw=args.bw)
+    elif args.command == "total":
+        plot_time_vs_param(args.csv_files, param="#Models", max_value=False, o_path=args.path, name=args.name, bw=args.bw)
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
     main()
     main()

+ 180 - 0
benchmarks/compareMemory.py

@@ -0,0 +1,180 @@
+#!/usr/bin/env python3
+import sqlite3
+import pandas as pd
+import matplotlib.pyplot as plt
+import argparse
+from pathlib import Path
+from itertools import cycle
+
+# Standard Linux page size in bytes
+PAGE_SIZE = 4096
+
+SIMULATOR_MAPPING = {
+    "minimal": "(m)",
+    "classic": "(c)",
+    "parallel": "(p)",
+    "dynamic": "(d)",
+    "dynamic-classic": "(dc)",
+}
+
+UNITS = {
+    "Bytes": 1,
+    "KB": 1000,
+    "MB": 1000 ** 2,
+    "GB": 1000 ** 3,
+    "KiB": 1024,
+    "MiB": 1024 ** 2,
+    "GiB": 1024 ** 3
+}
+
+
+def get_memory_trace(db_path):
+    """
+    Connects to the SQLite database and retrieves the memory trace
+    for processes named 'python3'.
+    """
+
+    if not db_path.exists():
+        print(f"Error: File {db_path} does not exist.")
+        return None
+
+    if db_path.stat().st_size == 0:
+        print(f"Error: File {db_path} is empty (0 bytes).")
+        return None
+
+    try:
+        with sqlite3.connect(db_path) as conn:
+            cursor = conn.cursor()
+
+            cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='record';")
+            if not cursor.fetchone():
+                print(f"Warning: Table 'record' not found in {db_path} Skipping.")
+                return None
+
+            # Query data: timestamp and RSS for python3 processes
+            query = """
+                    SELECT ts, stat_rss
+                    FROM record
+                    WHERE stat_comm = 'python3'
+                    ORDER BY ts ASC \
+                    """
+            df = pd.read_sql_query(query, conn)
+
+            if df.empty:
+                print(f"Warning: No 'python3' records found in {db_path}.")
+                return None
+
+            return df
+    except sqlite3.Error as e:
+        print(f"Error reading {db_path}: {e}")
+        return None
+
+
+def process_data(df, unit):
+    """
+    Converts timestamps to relative time (seconds) and RSS to the specified unit.
+    """
+    # Convert timestamps to relative time in seconds
+    # Assuming ts is in nanoseconds or similar if it's large float,
+    # but usually standard unix timestamps are seconds.
+    # Let's check the magnitude from the sample provided earlier (1.77e9).
+    # This is seconds (Unix epoch).
+
+    start_time = df["ts"].iloc[0]
+    df["relative_time"] = df["ts"] - start_time
+
+    # specific fix for the user's data if ts is high precision float
+    # If the relative time is extremely small (e.g. all 0), it might be high frequency.
+    # But usually simple subtraction works.
+
+    # Convert RSS from Pages to the target unit
+    # stat_rss is in pages (usually 4KB)
+    df["memory"] = (df["stat_rss"] * PAGE_SIZE) / UNITS[unit]
+
+    return df
+
+
+def plot_traces(files, unit="MB", path="", name="", title=None, bw=False):
+    plt.figure(figsize=(10, 6))
+
+    # Styling
+    colors = plt.rcParams['axes.prop_cycle'].by_key()['color'] if not bw else ['black']
+    line_styles = ['-', '--', '-.', ':']
+
+    style_cycle = cycle(zip(cycle(colors), cycle(line_styles)))
+
+    plotted_any = False
+
+    models = []
+    for db_file in files:
+        file = Path(db_file).resolve()
+        df = get_memory_trace(file)
+        if df is None:
+            continue
+        models.append(file.stem)
+        df = process_data(df, unit)
+
+        color, linestyle = next(style_cycle)
+        label = Path(file).stem
+
+        plt.plot(
+            df["relative_time"],
+            df["memory"],
+            label=label,
+            color=color,
+            linestyle=linestyle,
+            linewidth=1.5
+        )
+        plotted_any = True
+
+    if not plotted_any:
+        print("No valid data found to plot.")
+        return
+
+    # Labels and Title
+    plt.xlabel("Time (s)")
+    plt.ylabel(f"Resident Set Size ({unit})")
+
+    if not name:
+        unique_models = "|".join(set(models))
+        final_name = f"{unique_models}"
+    else:
+        final_name = name
+
+    if title:
+        plt.title(title)
+    else:
+        plt.title("Memory Usage over Time")
+
+    plt.legend()
+    plt.grid(True, linestyle=':', alpha=0.6)
+
+    # Save output
+    output_path = Path(path)
+    # Ensure directory exists
+    if output_path.parent != Path('.'):
+        output_path.parent.mkdir(parents=True, exist_ok=True)
+
+    plt.tight_layout()
+    plt.savefig(output_path, dpi=300)
+    print(f"Saved plot to {output_path / final_name}")
+
+
+def main():
+    parser = argparse.ArgumentParser(description="Plot Resident Set Size (RSS) from SQLite memory traces.")
+
+    parser.add_argument("files", nargs="+", type=str, help="SQLite database files to plot.")
+    parser.add_argument("-u", "--unit", type=str, default="MB", choices=UNITS.keys(),
+                        help="Unit for memory usage (default: MB).")
+    parser.add_argument("-p", "--path", type=str, default="", help="Output image file path.")
+    parser.add_argument("-n", "--name", type=str, default="", help="Output image file name.")
+    parser.add_argument("-t", "--title", type=str, help="Custom title for the plot.")
+    parser.add_argument("--bw", action="store_true", help="Black and white mode.")
+
+    args = parser.parse_args()
+
+    plot_traces(args.files, args.unit, args.path, args.name, args.title, args.bw)
+
+
+if __name__ == "__main__":
+    main()

+ 0 - 280
devstone_comparative.py

@@ -1,280 +0,0 @@
-from __future__ import annotations
-import argparse
-import csv
-import re
-import subprocess
-import sys
-import time
-
-
-DEFAULT_PARAMS = ((300, 10, 0, 0), (10, 300, 0, 0), (300, 300, 0, 0))
-DEFAULT_MODEL_TYPES = ("LI", "HI", "HO", "HOmod")
-DEFAULT_MAX_TIME = 1e10
-DEFAULT_NUM_REPS = 30
-
-PRELAUNCH_TASKS = {
-    "adevs": [
-        "cmake -S devstone/adevs/ -B devstone/adevs/build/ -D CMAKE_BUILD_TYPE=Release",
-        "cmake --build devstone/adevs/build/ --target devstone",
-    ],
-    "cadmium": {
-        "v1": [
-            "cmake -S devstone/cadmium/ -B devstone/cadmium/build/ -D CMAKE_BUILD_TYPE=Release",
-            "cmake --build devstone/cadmium/build/ --target devstone",
-        ],
-        "v2": {
-            "sequential": [
-                "cmake -S simulators/cadmium_v2/ -B simulators/cadmium_v2/build/ -D CMAKE_BUILD_TYPE=Release",
-                "cmake --build simulators/cadmium_v2/build/ --target main_devstone",
-            ],
-            "parallel": [
-                "cmake -S simulators/cadmium_v2/ -B simulators/cadmium_v2/build/ -D CMAKE_BUILD_TYPE=Release",
-                "cmake --build simulators/cadmium_v2/build/ --target parallel_main_devstone",
-            ],
-        },
-    },
-    "xdevs": {
-        "c": ["cd simulators/xdevs.c/ && make"],
-        "cpp": ["cd simulators/xdevs.cpp/ && make"],
-        "java": {
-            "sequential": ["cd simulators/xdevs.java/ && mvn clean && mvn compile && mvn package"],
-            "parallel": ["cd simulators/xdevs.java/ && mvn clean && mvn compile && mvn package"],
-        },
-        "rs": {
-            "old": ["cargo build --manifest-path simulators/xdevs.rs/Cargo.toml --release"],
-            "new": {
-                "sequential": ["cargo build --manifest-path simulators/xdevs.rs-new/Cargo.toml --release  --example devstone"],
-                "parallel": ["cargo build --manifest-path simulators/xdevs.rs-new/Cargo.toml --release --features par_all_no_couplings --example devstone"],
-                "fullparallel": ["cargo build --manifest-path simulators/xdevs.rs-new/Cargo.toml --release --features par_all --example devstone"],
-            }
-        },
-    },
-}
-
-COMMANDS = {
-    "adevs": "devstone/adevs/bin/devstone {model_type} {width} {depth} {int_cycles} {ext_cycles}",
-    "cadmium": {
-        "v1": "devstone/cadmium/build/cadmium-dynamic-devstone --kind={model_type} --width={width} --depth={depth} --int-cycles={int_cycles} --ext-cycles={ext_cycles}",
-        "v2": {
-            "sequential": "simulators/cadmium_v2/bin/main_devstone {model_type} {width} {depth} {int_cycles} {ext_cycles}",
-            "parallel": "simulators/cadmium_v2/bin/parallel_main_devstone {model_type} {width} {depth} {int_cycles} {ext_cycles}",
-        },
-    },
-    "pypdevs": {
-        "standard": {
-            "python": "python3 devstone/pythonpdevs/main.py -m {model_type} -w {width} -d {depth} -i {int_cycles} -e {ext_cycles}",
-            "pypy": "pypy3 devstone/pythonpdevs/main.py -m {model_type} -w {width} -d {depth} -i {int_cycles} -e {ext_cycles}",
-        },
-        "minimal": {
-            "python": "python3 devstone/pythonpdevs-minimal/main.py -m {model_type} -d {depth} -w {width} -i {int_cycles} -e {ext_cycles}",
-            "pypy": "pypy3 devstone/pythonpdevs-minimal/main.py -m {model_type} -d {depth} -w {width} -i {int_cycles} -e {ext_cycles}",
-        },
-    },
-    "xdevs": {
-        "c": "simulators/xdevs.c/examples/devstone/devstone -w {width} -d {depth} -b {model_type} -m 1",
-        "cpp": "simulators/xdevs.cpp/src/xdevs/examples/DevStone/DevStone -w {width} -d {depth} -b {model_type} -m 1",
-        # "go": ,  # TODO add this
-        "java": {
-            "sequential": "java -cp simulators/xdevs.java/target/xdevs-2.0.3-jar-with-dependencies.jar xdevs.lib.performance.DevStoneSimulation --model={model_type} --width={width} --depth={depth} --delay-distribution=Constant-{int_cycles} --coordinator=Coordinator",
-            "parallel": "java -cp simulators/xdevs.java/target/xdevs-2.0.3-jar-with-dependencies.jar xdevs.lib.performance.DevStoneSimulation --model={model_type} --width={width} --depth={depth} --delay-distribution=Constant-{int_cycles} --coordinator=CoordinatorParallel",
-        },
-        "py": "python3 simulators/xdevs.py/xdevs/examples/devstone/devstone.py {model_type} {width} {depth} {int_cycles} {ext_cycles}",
-        "rs": {
-            "old": "simulators/xdevs.rs/target/release/xdevs {model_type} {width} {depth} {int_cycles} {ext_cycles}",
-            "new": {
-                "sequential": "simulators/xdevs.rs-new/target/release/examples/devstone {model_type} {width} {depth} {int_cycles} {ext_cycles}",
-                "parallel": "simulators/xdevs.rs-new/target/release/examples/devstone {model_type} {width} {depth} {int_cycles} {ext_cycles}",
-                "fullparallel": "simulators/xdevs.rs-new/target/release/examples/devstone {model_type} {width} {depth} {int_cycles} {ext_cycles}",
-            }
-        },
-    },
-}
-
-DEFAULT_RE = r"model creation time(?:[ \(s\)]*): ?([0-9.e-]+)([ nuµms]*).*(?:engine|simulator) (?:set ?up|creation) time(?:[ \(s\)]*): ?([0-9.e-]+)([ nuµms]*).*simulation time(?:[ \(s\)]*): ?([0-9.e-]+)([ nuµms]*)"
-
-CUSTOM_RE = {}
-
-
-def serialize_simengines(res: list[str], prefix: str, flavors: str | dict):
-    if isinstance(flavors, str):
-        res.append(prefix)
-    else:
-        for key, val in flavors.items():
-            new_prefix = f'{prefix}-{key}' if prefix else key
-            serialize_simengines(res, new_prefix, val)
-
-
-def parse_args():
-    parser = argparse.ArgumentParser(description='Script to compare DEVStone implementations with different engines')
-    parser.add_argument('-m', '--model-types', help='DEVStone model type (LI, HI, HO, HOmod)')
-    parser.add_argument('-w', '--width', type=int, help='Width of each coupled model.')
-    parser.add_argument('-d', '--depth', type=int, help='Number of recursive levels of the model.')
-    parser.add_argument('-i', '--int-cycles', type=int, help='Dhrystone cycles executed in internal transitions')
-    parser.add_argument('-e', '--ext-cycles', type=int, help='Dhrystone cycles executed in external transitions')
-    parser.add_argument('-n', '--num-rep', type=int, help='Number of repetitions per each engine and configuration')
-    parser.add_argument('-a', '--include_engines', help='Add specific engines to perform the comparative')
-    parser.add_argument('-r', '--exclude_engines', help='Exclude specific engines from the comparative')
-    parser.add_argument('-o', '--out-file', help='Output file path')
-    parser.add_argument('-p', '--params', help='Specify params in a condensed form: w1-d1-ic1-ec1, w2-d2-ic2-ec2...')
-
-    args = parser.parse_args()
-
-    if args.model_types:
-        args.model_types = [x.strip() for x in args.model_types.split(",")]
-    else:
-        args.model_types = list(DEFAULT_MODEL_TYPES)
-
-    if args.params:
-        params = [x.strip().split("-") for x in args.params.split(",")]
-        # args.params = [x.strip().split("-") for x in args.params.split(",")]
-    elif args.depth and args.width:
-        int_cycles = args.int_cycles or 0
-        ext_cycles = args.ext_cycles or 0
-        params = [(args.width, args.depth, int_cycles, ext_cycles)]
-        # args.params = ((args.depth, args.width, int_cycles, ext_cycles),)
-    else:
-        params = list(DEFAULT_PARAMS)
-    args.params = []
-    for param in params:
-        if len(param) == 5:
-            args.params.append(param)
-        elif len(param) == 4:
-            for model in args.model_types:
-                args.params.append((model, *param))
-        else:
-            raise ValueError(f'invalid number of params ({param})')
-
-    engines = args.include_engines.split(',') if args.include_engines else list(COMMANDS.keys())
-    args.include_engines = []
-    for eng in engines:
-        commands = COMMANDS
-        for s in eng.split('-'):
-            commands = commands.get(s, dict())
-        subengines = []
-        serialize_simengines(subengines, '', commands)
-        if not subengines:
-            raise RuntimeError(f'unknown simulation engine {eng}')
-        subengines = [f'{eng}-{x}' if x else f'{eng}' for x in subengines]
-        args.include_engines.extend(subengines)
-
-    if args.exclude_engines:
-        args.include_engines = [x for x in args.include_engines if x not in args.exclude_engines.split(",")]
-
-    args.prelaunch = {}
-    args.commands = {}
-    args.regex = {}
-    for eng in args.include_engines:
-        prelaunch = PRELAUNCH_TASKS
-        cmd = COMMANDS
-        regex = CUSTOM_RE
-        for s in eng.split('-'):
-            if isinstance(prelaunch, dict):
-                prelaunch = prelaunch.get(s, dict())
-            cmd = cmd.get(s, dict())
-            if not isinstance(regex, str):
-                regex = regex.get(s, DEFAULT_RE)
-        if isinstance(prelaunch, dict):
-            prelaunch = None
-        if not cmd:
-            raise RuntimeError(f'unknown simulation engine {eng}')
-        if isinstance(cmd, dict):
-            # TODO instead of this, serialize all the flavors of the engine
-            raise RuntimeError(f'There are more than one flavor for the engine {eng}')
-        else:
-            args.prelaunch[eng] = prelaunch
-            args.commands[eng] = cmd
-            args.regex[eng] = regex
-
-    if not args.num_rep:
-        args.num_rep = DEFAULT_NUM_REPS
-
-    if not args.out_file:
-        args.out_file = "devstone_%de_%dp_%d.csv" % (len(args.include_engines), len(args.params), int(time.time()))
-
-    return args
-
-
-def execute_prelaunch(cmd):
-    try:
-        result = subprocess.run(cmd.split(), stdout=subprocess.PIPE)
-    except Exception as e:
-        print(f"Error executing prelaunch command. ({str(e)})")
-        return
-    print(result.stdout)
-
-
-def execute_cmd(cmd, regex, csv_writer):
-    # Execute simulation
-    try:
-        result = subprocess.run(cmd.split(), stdout=subprocess.PIPE)
-    except Exception as e:
-        print(f"{engine}: Error executing simulation. ({str(e)})")
-        return
-
-    # Read data from output
-    res_out = result.stdout.decode('UTF-8').strip()
-    if not res_out:
-        res_out = str(result.stderr).strip()
-    res_out.replace("\n", " ")
-    found = re.search(regex, res_out, flags=re.IGNORECASE | re.DOTALL)
-    if not found:
-        print(f"{engine}: Simulation execution times could not be extracted.")
-        print(result.stdout)
-        return
-    groups = found.groups()
-    if len(groups) == 3:
-        model_time, engine_time, sim_time = tuple(map(float, found.groups()))
-    elif len(groups) == 6:
-        times = list(map(float, (groups[0], groups[2], groups[4])))
-        units = (groups[1], groups[3], groups[5])
-        for i in range(3):
-            if units[i]:
-                unit = units[i].strip()
-                if unit.startswith('s'):
-                    pass
-                elif unit.startswith('ms'):
-                    times[i] *= 1e-3
-                elif unit.startswith('us') or unit.startswith('µs'):
-                    times[i] *= 1e-6
-                elif unit.startswith('ns'):
-                    times[i] *= 1e-9
-                else:
-                    raise Exception(f"unknown time units: {unit}")
-        times = tuple(times)
-        model_time, engine_time, sim_time = times
-    total_time = sum((model_time, engine_time, sim_time))
-
-    # Write results into output file
-    row = (engine, i_exec, model_type, width, depth, int_cycles, ext_cycles, model_time, engine_time, sim_time, total_time)
-    csv_writer.writerow(row)
-
-
-if __name__ == "__main__":
-    sys.setrecursionlimit(10000)
-
-    args = parse_args()
-
-    if not args.include_engines:
-        raise RuntimeError("No engines were selected.")
-
-    with open(args.out_file, "w") as csv_file:
-        csv_writer = csv.writer(csv_file, delimiter=';')
-        csv_writer.writerow(("engine", "iter", "model", "width", "depth", "int_delay", "ext_delay", "model_time", "runner_time", "sim_time", "total_time"))
-
-        for engine, engine_cmd in args.commands.items():
-            engine_prelaunch = args.prelaunch[engine]
-            if engine_prelaunch is not None:
-                print(f'({engine}) executing prelaunch tasks...')
-                for prelaunch_cmd in engine_prelaunch:
-                    execute_prelaunch(prelaunch_cmd)
-            engine_regex = args.regex[engine]
-            for params in args.params:
-                model_type, width, depth, int_cycles, ext_cycles = params
-                engine_cmd_f = engine_cmd.format(model_type=model_type, width=width, depth=depth,
-                                                 int_cycles=int_cycles, ext_cycles=ext_cycles)
-                if not engine_cmd_f:
-                    continue
-                for i_exec in range(args.num_rep):
-                    print(f'({i_exec}) {engine_cmd_f}')
-                    execute_cmd(engine_cmd_f, engine_regex, csv_writer)
-                csv_file.flush()

+ 0 - 1
events_devstone.txt

@@ -1 +0,0 @@
-0 0

+ 128 - 24
plotting.md

@@ -1,36 +1,133 @@
 # Plotting different models against each other
 # Plotting different models against each other
 ## Dynamic
 ## Dynamic
+
+### Regular Models vs Dynamic Models
+```bash
+src=./benchmarks/Results-PyPDEVS/Time/dynamic
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv -w 100 -p dynamic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv -d 100 -p dynamic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/LI.csv $src/dLI.csv -p dynamic > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv -w 100 -p dynamic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv -d 100 -p dynamic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HI.csv $src/dHI.csv -p dynamic > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv -w 100 -p dynamic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv -d 100 -p dynamic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HO.csv $src/dHO.csv -p dynamic > /dev/null 2>&1 &
+```
+
+### Multi-Gen Dynamic
+```bash
+src=./benchmarks/Results-PyPDEVS/Time/dynamic
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/dLI-2.csv -w 100 -p dynamic/multi-gen > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/dLI-2.csv -d 100 -p dynamic/multi-gen > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/LI.csv $src/dLI.csv $src/dLI-2.csv -p dynamic/multi-gen > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/dHI-2.csv -w 100 -p dynamic/multi-gen > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/dHI-2.csv -d 100 -p dynamic/multi-gen > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HI.csv $src/dHI.csv $src/dHI-2.csv -p dynamic/multi-gen > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/dHO-2.csv -w 100 -p dynamic/multi-gen > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/dHO-2.csv -d 100 -p dynamic/multi-gen > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HO.csv $src/dHO.csv $src/dHO-2.csv -p dynamic/multi-gen > /dev/null 2>&1 &
+```
+
+### Modified Dynamic
 ```bash
 ```bash
 src=./benchmarks/Results-PyPDEVS/Time/dynamic
 src=./benchmarks/Results-PyPDEVS/Time/dynamic
-nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/dLI-2.csv -w 100 -p dynamic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/dLI-2.csv -d 100 -p dynamic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/mdLI.csv -w 100 -p dynamic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/mdLI.csv -d 100 -p dynamic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/dHI-2.csv -w 100 -p dynamic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/dHI-2.csv -d 100 -p dynamic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/mdHI.csv -w 100 -p dynamic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/mdHI.csv -d 100 -p dynamic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/dHO-2.csv -w 100 -p dynamic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/dHO-2.csv -d 100 -p dynamic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/mdHO.csv -w 100 -p dynamic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/mdHO.csv -d 100 -p dynamic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/mdLI.csv -w 100 -p dynamic/modified > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/mdLI.csv -d 100 -p dynamic/modified > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/LI.csv $src/dLI.csv $src/mdLI.csv -p dynamic/modified > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/mdHI.csv -w 100 -p dynamic/modified > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/mdHI.csv -d 100 -p dynamic/modified > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HI.csv $src/dHI.csv $src/mdHI.csv -p dynamic/modified > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/mdHO.csv -w 100 -p dynamic/modified > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/mdHO.csv -d 100 -p dynamic/modified > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HO.csv $src/dHO.csv $src/mdHO.csv -p dynamic/modified > /dev/null 2>&1 &
+```
+
+### Compared
+```bash
+src=./benchmarks/Results-PyPDEVS/Time/dynamic
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/dLI-2.csv $src/mdLI.csv -w 100 -p dynamic/compared > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/dLI-2.csv $src/mdLI.csv -d 100 -p dynamic/compared > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/LI.csv $src/dLI.csv $src/dLI-2.csv $src/mdLI.csv -p dynamic/compared > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/dHI-2.csv $src/mdHI.csv -w 100 -p dynamic/compared > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/dHI-2.csv $src/mdHI.csv -d 100 -p dynamic/compared > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HI.csv $src/dHI.csv $src/dHI-2.csv $src/mdHI.csv -p dynamic/compared > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/dHO-2.csv $src/mdHO.csv -w 100 -p dynamic/compared > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/dHO-2.csv $src/mdHO.csv -d 100 -p dynamic/compared > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HO.csv $src/dHO.csv $src/dHO-2.csv $src/mdHO.csv -p dynamic/compared > /dev/null 2>&1 &
 ```
 ```
 
 
 ## Dynamic Classic
 ## Dynamic Classic
+### Regular Models vs Dynamic Models
+```bash
+src=./benchmarks/Results-PyPDEVS/Time/dynamic-classic
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv -w 100 -p dynamic-classic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv -d 100 -p dynamic-classic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/LI.csv $src/dLI.csv -p dynamic-classic > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv -w 100 -p dynamic-classic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv -d 100 -p dynamic-classic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HI.csv $src/dHI.csv -p dynamic-classic > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv -w 100 -p dynamic-classic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv -d 100 -p dynamic-classic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HO.csv $src/dHO.csv -p dynamic-classic > /dev/null 2>&1 &
+```
+
+### Multi-Gen Dynamic
+```bash
+src=./benchmarks/Results-PyPDEVS/Time/dynamic-classic
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/dLI-2.csv -w 100 -p dynamic-classic/multi-gen > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/dLI-2.csv -d 100 -p dynamic-classic/multi-gen > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/LI.csv $src/dLI.csv $src/dLI-2.csv -p dynamic-classic/multi-gen > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/dHI-2.csv -w 100 -p dynamic-classic/multi-gen > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/dHI-2.csv -d 100 -p dynamic-classic/multi-gen > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HI.csv $src/dHI.csv $src/dHI-2.csv -p dynamic-classic/multi-gen > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/dHO-2.csv -w 100 -p dynamic-classic/multi-gen > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/dHO-2.csv -d 100 -p dynamic-classic/multi-gen > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HO.csv $src/dHO.csv $src/dHO-2.csv -p dynamic-classic/multi-gen > /dev/null 2>&1 &
+```
+
+### Modified Dynamic
 ```bash
 ```bash
 src=./benchmarks/Results-PyPDEVS/Time/dynamic-classic
 src=./benchmarks/Results-PyPDEVS/Time/dynamic-classic
-nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/dLI-2.csv -w 100 -p dynamic-classic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/dLI-2.csv -d 100 -p dynamic-classic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/mdLI.csv -w 100 -p dynamic-classic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/mdLI.csv -d 100 -p dynamic-classic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/dHI-2.csv -w 100 -p dynamic-classic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/dHI-2.csv -d 100 -p dynamic-classic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/mdHI.csv -w 100 -p dynamic-classic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/mdHI.csv -d 100 -p dynamic-classic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/dHO-2.csv -w 100 -p dynamic-classic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/dHO-2.csv -d 100 -p dynamic-classic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/mdHO.csv -w 100 -p dynamic-classic > /dev/null 2>&1 &
-nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/mdHO.csv -d 100 -p dynamic-classic > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/mdLI.csv -w 100 -p dynamic-classic/modified > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/mdLI.csv -d 100 -p dynamic-classic/modified > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/LI.csv $src/dLI.csv $src/mdLI.csv -p dynamic-classic/modified > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/mdHI.csv -w 100 -p dynamic-classic/modified > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/mdHI.csv -d 100 -p dynamic-classic/modified > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HI.csv $src/dHI.csv $src/mdHI.csv dynamic-classic/modified > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/mdHO.csv -w 100 -p dynamic-classic/modified > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/mdHO.csv -d 100 -p dynamic-classic/modified > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HO.csv $src/dHO.csv $src/mdHO.csv -p dynamic-classic/modified > /dev/null 2>&1 &
+```
+
+### Compared
+```bash
+src=./benchmarks/Results-PyPDEVS/Time/dynamic-classic
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/dLI-2.csv $src/mdLI.csv -w 100 -p dynamic-classic/compared > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/LI.csv $src/dLI.csv $src/dLI-2.csv $src/mdLI.csv -d 100 -p dynamic-classic/compared > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/LI.csv $src/dLI.csv $src/dLI-2.csv $src/mdLI.csv -p dynamic-classic/compared > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/dHI-2.csv $src/mdHI.csv -w 100 -p dynamic-classic/compared > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HI.csv $src/dHI.csv $src/dHI-2.csv $src/mdHI.csv -d 100 -p dynamic-classic/compared > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HI.csv $src/dHI.csv $src/dHI-2.csv $src/mdHI.csv -p dynamic-classic/compared > /dev/null 2>&1 &
+
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/dHO-2.csv $src/mdHO.csv -w 100 -p dynamic-classic/compared > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py param $src/HO.csv $src/dHO.csv $src/dHO-2.csv $src/mdHO.csv -d 100 -p dynamic-classic/compared > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $src/HO.csv $src/dHO.csv $src/dHO-2.csv $src/mdHO.csv -p dynamic-classic/compared > /dev/null 2>&1 &
 ```
 ```
 
 
 ## Comparison between Simulators
 ## Comparison between Simulators
@@ -41,10 +138,17 @@ d=./benchmarks/Results-PyPDEVS/Time/dynamic
 dc=./benchmarks/Results-PyPDEVS/Time/dynamic-classic
 dc=./benchmarks/Results-PyPDEVS/Time/dynamic-classic
 nohup uv run benchmarks/compare.py param $m/LI.csv $p/LI.csv $d/LI.csv $dc/LI.csv -w 100 -p LI > /dev/null 2>&1 &
 nohup uv run benchmarks/compare.py param $m/LI.csv $p/LI.csv $d/LI.csv $dc/LI.csv -w 100 -p LI > /dev/null 2>&1 &
 nohup uv run benchmarks/compare.py param $m/LI.csv $p/LI.csv $d/LI.csv $dc/LI.csv -d 100 -p LI > /dev/null 2>&1 &
 nohup uv run benchmarks/compare.py param $m/LI.csv $p/LI.csv $d/LI.csv $dc/LI.csv -d 100 -p LI > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $m/LI.csv $p/LI.csv $d/LI.csv $dc/LI.csv -p LI > /dev/null 2>&1 &
+
 nohup uv run benchmarks/compare.py param $m/HI.csv $p/HI.csv $d/HI.csv $dc/HI.csv -w 100 -p HI > /dev/null 2>&1 &
 nohup uv run benchmarks/compare.py param $m/HI.csv $p/HI.csv $d/HI.csv $dc/HI.csv -w 100 -p HI > /dev/null 2>&1 &
 nohup uv run benchmarks/compare.py param $m/HI.csv $p/HI.csv $d/HI.csv $dc/HI.csv -d 100 -p HI > /dev/null 2>&1 &
 nohup uv run benchmarks/compare.py param $m/HI.csv $p/HI.csv $d/HI.csv $dc/HI.csv -d 100 -p HI > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $m/HI.csv $p/HI.csv $d/HI.csv $dc/HI.csv -p HI > /dev/null 2>&1 &
+
 nohup uv run benchmarks/compare.py param $m/HO.csv $p/HO.csv $d/HO.csv $dc/HO.csv -w 100 -p HO > /dev/null 2>&1 &
 nohup uv run benchmarks/compare.py param $m/HO.csv $p/HO.csv $d/HO.csv $dc/HO.csv -w 100 -p HO > /dev/null 2>&1 &
 nohup uv run benchmarks/compare.py param $m/HO.csv $p/HO.csv $d/HO.csv $dc/HO.csv -d 100 -p HO > /dev/null 2>&1 &
 nohup uv run benchmarks/compare.py param $m/HO.csv $p/HO.csv $d/HO.csv $dc/HO.csv -d 100 -p HO > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $m/HO.csv $p/HO.csv $d/HO.csv $dc/HO.csv -p HO > /dev/null 2>&1 &
+
 nohup uv run benchmarks/compare.py param $m/HOmod.csv $p/HOmod.csv $d/HOmod.csv $dc/HOmod.csv -w 30 -p HOmod > /dev/null 2>&1 &
 nohup uv run benchmarks/compare.py param $m/HOmod.csv $p/HOmod.csv $d/HOmod.csv $dc/HOmod.csv -w 30 -p HOmod > /dev/null 2>&1 &
 nohup uv run benchmarks/compare.py param $m/HOmod.csv $p/HOmod.csv $d/HOmod.csv $dc/HOmod.csv -d 30 -p HOmod > /dev/null 2>&1 &
 nohup uv run benchmarks/compare.py param $m/HOmod.csv $p/HOmod.csv $d/HOmod.csv $dc/HOmod.csv -d 30 -p HOmod > /dev/null 2>&1 &
+nohup uv run benchmarks/compare.py total $m/HOmod.csv $p/HOmod.csv $d/HOmod.csv $dc/HOmod.csv -p HOmod > /dev/null 2>&1 &
 ```
 ```