-
Notifications
You must be signed in to change notification settings - Fork 43
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
[CGMES export] UUID of fullModel on each file should be unique #2888
Conversation
The network was passed to the writeHeader method to provide a unique id based on the network id itself, the instance file profile, and the fact that the ID was made for "FullModel" output: modelId = "urn:uuid:" + context.getNamingStrategy().getCgmesId(refTyped(network), ref(subset), Part.FULL_MODEL); The call to If we want stable IDs for network models and instance files we must keep the existing way. if we need to export revisions of the same network model / instance files we could use the |
// The ref to build a unique model id must contain: | ||
// the network, the subset (EQ, SSH, SV, ...), and the FULL_MODEL part | ||
// If we use name-based UUIDs this ensures that the UUID for the model will be specific enough | ||
CgmesObjectReference[] modelRef = {refTyped(network), ref(subset), Part.FULL_MODEL}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not enough to have a unique id for several time step and different model version (when we re-import model after fixes):
- We need the case date somwhere ;
- We need the model version.
Where are these informations to generate a unique id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the full model identifier has to be dependent on the scenarioTime
and the version
, we can pass these references to the naming strategy, instead of building new random identifiers for every export.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both attributes are available in the method that is building the identifier for the full model object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could just add items to the list of object references that will be used as a seed for stable identifiers in the naming strategy:
CgmesObjectReference[] modelRef = {
refTyped(network),
ref(subset),
ref(DATE_TIME_FORMATTER.format(context.getScenarioTime())),
ref(format(modelDescription.getVersion())),
Part.FULL_MODEL};
String modelId = "urn:uuid:" + context.getNamingStrategy().getCgmesId(modelRef);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Business processes involving CGMES exports typically will require the exchanged data to be unique by:
- Effective date time (or scenario time).
- Business process (market, operation, ...).
- Sourcing actor (who is producing the file).
- Model part (our CGMES subset).
- Version of the file (sequential, as an integer).
If we consider that the IIDM network id includes information about the sourcing actor (is different for each sourcing actor), then with the lines above we would be covering the requirement for unique identifiers, with the exception of business process: we would be generating the same ID for all business processess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will open a new PR with the introduction of a parameter for the business process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, we do not use the sourcing actor really no? I am not sure that it is necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the purpose of generating unique model ids, I think we can rely on the IIDM network identifier to give different results for different sourcing actors; no need to explicitly use an additional reference to a sourcing actor
Signed-off-by: Luma <zamarrenolm@aia.es> Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
This reverts commit 7cbce1d. Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
…e FullModel UUID Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
1ebe4d6
to
7150d5c
Compare
Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
Signed-off-by: Luma <zamarrenolm@aia.es>
|
* CGMES post-processor to remove grounds (#2877) Signed-off-by: Luma <zamarrenolm@aia.es> Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com> * UUID of fullModel should be unique Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com> * Revert "UUID of fullModel should be unique" This reverts commit 7cbce1d. Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com> * Add scenario time and version in CgmesObjectReference used to generate FullModel UUID Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com> * [Shortcircuit API] Fix javadoc (#2887) Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com> * Fix checkstyle Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com> * unit test Signed-off-by: Luma <zamarrenolm@aia.es> * fix sonar issue Signed-off-by: Luma <zamarrenolm@aia.es> --------- Signed-off-by: Luma <zamarrenolm@aia.es> Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com> Co-authored-by: Luma <zamarrenolm@aia.es> (cherry picked from commit a22b33e)
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
When introducing the naming strategy for CGMES export, the creation of the
FullModel
UUIDs of each file (EQ, TP, SSH, SV) was changed to be persistent. They are always the same and based on the type of file.What is the new behavior (if this is a feature change)?
The creation of this UUID is now back as before so that we get a unique ID for each export for each file.
Does this PR introduce a breaking change or deprecate an API?