Skip to content

feat(reserves): implement reserves for thermal clusters#3207

Open
TheoPascoli wants to merge 13 commits into
devfrom
feat/reserves-thermal
Open

feat(reserves): implement reserves for thermal clusters#3207
TheoPascoli wants to merge 13 commits into
devfrom
feat/reserves-thermal

Conversation

@TheoPascoli
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Member

@sylvlecl sylvlecl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants