Commit 86e176e
docs(study_cases): correct SOC runtime semantics (independent fallback, no mirror)
Earlier commit 4290b24 still asserted that EMHASS auto-mirrors
soc_final = soc_init when only one is passed. That is wrong for the
real REST-API code path:
- src/emhass/utils.py lines 925-983 parses naive-mpc-optim runtimeparams.
Missing soc_init falls back to battery_target_state_of_charge (0.6)
independently of soc_final, and vice versa. No mirroring.
- The defensive mirror-block in src/emhass/optimization.py lines
2477-2487 only fires if perform_optimization is called directly with
one None value — never reached through the normal /action/ REST entry
point.
- dayahead-optim and perfect-optim do not read soc_init/soc_final from
runtimeparams at all (utils.py line 980 else branch); both always use
battery_target_state_of_charge.
Rewrote good_practices.md §4 and mpc.md note to describe the actual
behavior per action, with file:line references into the code.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 4290b24 commit 86e176e
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
0 commit comments