diff options
| author | Radu Nicolae <rnicolae04@gmail.com> | 2025-06-16 18:01:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-16 18:01:07 +0200 |
| commit | 0df3d9ced743ac3385dd710c7133a6cf369b051c (patch) | |
| tree | eff5d6d67c275643e229731ba08c5fe7dc4ccd0a /opendc-experiments/opendc-experiments-m3sa/src/main/python/m3sa | |
| parent | c7e303ad1b5217e2ff24cee9538ac841d6149706 (diff) | |
integrated M3SA, updated with tests and CpuPowerModels
Diffstat (limited to 'opendc-experiments/opendc-experiments-m3sa/src/main/python/m3sa')
| -rwxr-xr-x | opendc-experiments/opendc-experiments-m3sa/src/main/python/m3sa | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/opendc-experiments/opendc-experiments-m3sa/src/main/python/m3sa b/opendc-experiments/opendc-experiments-m3sa/src/main/python/m3sa new file mode 100755 index 00000000..06ecaaea --- /dev/null +++ b/opendc-experiments/opendc-experiments-m3sa/src/main/python/m3sa @@ -0,0 +1,19 @@ +#!/bin/sh + +my_path() { + cd -P -- "$(dirname -- "$(realpath "$(command -v -- "$0")")")" && pwd -P +} + +SRC_PATH="$(my_path)" +VENV_PATH="$SRC_PATH/venv" + +if [ ! -d "$VENV_PATH" ]; then + python3 -m venv "$VENV_PATH" || exit 1 + pip install --upgrade pip || exit 1 + pip install -r "$SRC_PATH/requirements.txt" || exit 1 +fi + +. "$VENV_PATH/bin/activate" +python3 "$SRC_PATH/main.py" "$@" + + |
