-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_sim.py
More file actions
31 lines (23 loc) · 756 Bytes
/
run_sim.py
File metadata and controls
31 lines (23 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import argparse
import json
from pathlib import Path
from modules.simulator.runner import run_from_config
def load_config(path: Path):
with open(path, "r") as f:
return json.load(f)
def main():
parser = argparse.ArgumentParser(description="Run SimLKAS simulation via config")
parser.add_argument(
"-c", "--config",
type=str,
default="configs/demo.json",
help="Path to configuration JSON (default: configs/demo.json)",
)
args = parser.parse_args()
config_path = Path(args.config)
if not config_path.exists():
raise FileNotFoundError(f"Config not found: {config_path}")
config = load_config(config_path)
run_from_config(config)
if __name__ == "__main__":
main()