feat(reserves): implement reserves for thermal clusters#3207
feat(reserves): implement reserves for thermal clusters#3207TheoPascoli wants to merge 13 commits into
Conversation
# Conflicts: # antarest/study/storage/rawstudy/model/filesystem/root/input/thermal/cluster/area/area.py
sylvlecl
left a comment
There was a problem hiding this comment.
Unfortunately the parsing of INI files does not match the spec!
In thermal cluster participations files, we have repeated sections with the reserve name as the section name, not cluster__section. Then the cluster appears as a property in the section.
| Returns ``None`` if the section name does not start with ``<cluster_name><sep>`` (which | ||
| happens for unrelated sections like ``[symmetries]``). | ||
| """ | ||
| prefix = f"{cluster_name}{SECTION_SEPARATOR}" |
There was a problem hiding this comment.
Unfortunately this is not how the format is specified !
The section is only the reserve name, then the thermal cluster ID is in the properties of that section.
This means that we will have duplicate section names, indeed, which is not possible with the INI reader such as implemented now.
So we will need to change the INI reader implementation to get something like a "multi-dict"
There was a problem hiding this comment.
We need to include a study in integration tests which will contain reserves, so that we ensure we know how to read actual data corresponding to the specified format.
| Examples | ||
| -------- | ||
|
|
||
| [gas_cluster__reserve_1] |
There was a problem hiding this comment.
See other comment: this is not the specified format
| } | ||
| for rid in reserve_ids: | ||
| if rid not in existing: | ||
| raise ThermalClusterReserveParticipationNotFound(area_id, thermal_id, rid) |
There was a problem hiding this comment.
This will raise for the wrong ID: if and ID has indeed been deleted in the first request, it will not appear anymore in the second request, whereas it was correctly deleted.
No description provided.