Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renewable containers #1809

Merged
merged 10 commits into from
Dec 27, 2023
Merged

Renewable containers #1809

merged 10 commits into from
Dec 27, 2023

Conversation

payetvin
Copy link
Contributor

@payetvin payetvin commented Dec 4, 2023

@pull-request-size pull-request-size bot added size/L and removed size/M labels Dec 5, 2023
@payetvin
Copy link
Contributor Author

waiting for PR #1813

Copy link

watermelon-copilot-for-code-review bot commented Dec 18, 2023

Watermelon AI Summary

AI Summary deactivated by payetvin

GitHub PRs

Antares_Simulator is an open repo and Watermelon will serve it for free.
🍉🫶
Why not invite more people to your team?

Copy link
Member

@flomnes flomnes left a comment

Choose a reason for hiding this comment

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

Please merge with the develop branch again, some YML files are broken in your version (see #1818)

This PR handles a part of issue #1487 (simplify and clarify cluster
lists) :


Co-authored-by: Guillaume PIERRE <guillaume.pierre@rte-france.com>
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

41 New issues
0 Security Hotspots
19.8% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@flomnes flomnes dismissed guilpier-code’s stale review December 27, 2023 13:05

Taken into account

@flomnes flomnes merged commit 3463529 into develop Dec 27, 2023
@flomnes flomnes deleted the fix/renew-lists branch December 27, 2023 13:06
JasonMarechal25 added a commit that referenced this pull request Feb 22, 2024
This PR follows the PR #1809 (about cleaning common cluster list and
renewable cluster list)
It aims at simplifying thermal cluster lists as much as possible.

**Goal** : 
Having only one list of thermal clusters.
This list would be **private**
Code would interact with this list through an interface. This interface
would contain functions returning **std::views** that would result in
filtering thermal clusters using a certain property of clusters :
enabled / disabled, must-run or not, a combination of these.

**What's done** : 
- [x] Simplifying the `ClusterList<T>::add()` method
- [x] Changing **std::map** `mapping` from class **ThermalClusterList**
into a **std::vector** (named `allClusters_`)
- [x] Removing **PartThermal::clusters** (often reached by
`area.thermal.clusters`)
- [x] Removing **PartThermal::mustrunList** (often reached by
`area.thermal.mustrunList`)
- [x] Removing **PartThermal::list** (often reached by
`area.thermal.list.clusters`)

**Before starting a review, one should know several things** : 
- what the old lists of clusters used to contain : 
    -  **area.thermal.list.mapping** : all clusters
- **area.thermal.mustrunList.clusters** : clusters must-run and enabled
    - **area.thermal.clusters** : enabled clusters
- **area.thermal.list.clusters** : list used to build the optimization
problem (clusters enabled and not must-run). Careful with that list :
when loading clusters from input, this list contains all clusters. Then
it is progressively cleared from disabled and must-run clusters. So its
content depends on where we are in the execution. This list is also used
from the **GUI**. In that case, it always contains all clusters : it is
**not** cleared from specific clusters.
- the list **area.thermal.list.clusters** is the only list used in the
**GUI**, and in that case, it contains all clusters.
- As said previously, all lists of clusters are removed, except
**area.thermal.list.mapping**, turned into a private **std::vector**
(**area.thermal.list.allClusters_**) containing all clusters, and
filtered to access only clusters of interest at any point of the code.
- **cluster indices** : any cluster (thermal / renewable) used to have 2
indices :
- **index** : it turns out to be an index regarding only enabled and not
must-run clusters. So this index never concerns renewable clusters. It
was moved down from parent class **Cluster** to class
**ThermalCluster**.
- **areaWideIndex** : index regarding only enabled clusters. Concerns
both thermal and renewable clusters
- the 2 lists **area.thermal.mustrunList.clusters** and
**area.thermal.list.clusters** are closely related (inter-dependent) to
the **renewable** cluster list, due to a common inheritance. So this
work deeply impacts the **renewable** cluster lists.

---------

Co-authored-by: Vincent Payet <vincent.payet@rte-france.com>
Co-authored-by: Jason Maréchal <45510813+JasonMarechal25@users.noreply.github.com>
Co-authored-by: Florian OMNES <26088210+flomnes@users.noreply.github.com>
Co-authored-by: payetvin <113102157+payetvin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants