Skip to content

Be able to update an Identifiable id #3844

@alicecaron

Description

@alicecaron

Describe the current behavior

An Identifiable id cannot be updated.

Describe the expected behavior

An Identifiable id can be updated.

Describe the motivation

For some use cases, for instance to follow a naming strategy, when a voltage level structure is changed, some identifiable id should be updated to follow a given naming strategy. For that we need a function to be able to update its id.

It is needed for any Identifiable class.

We can also think about a utility method that could be called to clean the naming of the identifiables according to a given naming strategy (or the default one). For instance to be called after a voltage level topology is completely changed.

  • at least add a setId method (this behavior is already implemented in BoundaryLineImpl - see replaceId)
  • add TCK tests for the custom IIDM implementations (such as powsybl-network-store)

Extra Information

A AbstractIdentifiable::replaceId method already exists but is only implemented in BoundaryLineImpl.
We can replace this method by:

  • renaming it to setId
  • move it to the Identifiable interface
  • implement it in the AbstractIdentifiable class

Need to add TCK tests to be sure to implement it also in the network-store or other implementation.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    Status
    Issues in progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions