🚧 Implement continous simulation

This commit is contained in:
Jonas Bengtsson
2026-10-04 14:50:57 +02:00
parent eb36a2d947
commit 263afc9c1e
13 changed files with 1914 additions and 42 deletions
+170
View File
@@ -1306,6 +1306,176 @@
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "wago-sim: pytest continuous",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"-m",
"pytest",
"tests/test_continuous.py",
"-q",
"--tb=short"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "wago-sim: pytest continuous2",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"-m",
"pytest",
"tests/test_continuous.py",
"-q",
"--tb=short"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "wago-sim: pytest all continuous",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"-m",
"pytest",
"tests",
"-q",
"--tb=short"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "wago-sim: validate soak",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"-m",
"wago_sim.cli",
"validate",
"--scenario",
"scenarios/pump_soak.example.yaml"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "debug validate",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"-c",
"import yaml; from wago_sim.scenario.dsl import validate_scenario; s = yaml.safe_load(open('scenarios/pump_soak.example.yaml', encoding='utf-8')); print('on value:', s['degradation']['pump_capacity'].get('on')); print('outputs:', list(s.get('outputs', {}))); print(validate_scenario(s))"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "wago-sim: validate soak2",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"-m",
"wago_sim.cli",
"validate",
"--scenario",
"scenarios/pump_soak.example.yaml"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "gen inflow csv",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"-c",
"import pathlib; d = pathlib.Path('data'); d.mkdir(exist_ok=True); (d / 'inflow_day.csv').write_text('time,tank_level\\n0.0,1000\\n' + '\\n'.join(f'{t},{1000 + t * 50}' for t in range(1, 65)) + '\\n', encoding='utf-8'); print('csv written:', len((d / 'inflow_day.csv').read_text()), 'bytes')"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "wago-sim: run soak smoke",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"-m",
"wago_sim.cli",
"run",
"--node",
"config/pump_node.yaml",
"--scenario",
"scenarios/soak_smoke.yaml",
"--report-jsonl",
"out/soak_smoke.jsonl"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "clean soak artifacts",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"-c",
"import pathlib; pathlib.Path('scenarios/soak_smoke.yaml').unlink(); pathlib.Path('data/inflow_day.csv').unlink(); pathlib.Path('data').rmdir(); pathlib.Path('out/soak_smoke.jsonl').unlink(); print('cleaned')"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "wago-sim: pytest final continuous",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"-m",
"pytest",
"tests",
"-q",
"--tb=short"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "wago-sim: pytest final2",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"-m",
"pytest",
"tests",
"-q",
"--tb=short"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "mark phase3 done",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"scripts\\mark_phase3.py"
],
"isBackground": false,
"problemMatcher": []
},
{
"label": "remove mark script",
"type": "shell",
"command": ".venv\\Scripts\\python.exe",
"args": [
"-c",
"import pathlib; pathlib.Path('scripts/mark_phase3.py').unlink(); print('ok')"
],
"isBackground": false,
"problemMatcher": []
}
]
}