Class CgmesMetadataModel

java.lang.Object
com.powsybl.cgmes.model.CgmesMetadataModel

public class CgmesMetadataModel extends Object

In each CGMES instance file there is a unique Model object that holds metadata information.

The model contents are specified by profiles: equipment, power flow initial values, power flow results, etc.

Each model can contain data from multiple profiles and is produced by a modeling authority.

A model may have relationships to other models. Two kind of relationships are considered: "dependent on" and "supersedes".

A "dependent on" is a reference to an other required model. As an example: a load flow solution depends on the topology model it was computed from.

When a model is updated, the resulting model "supersedes" the models that were used as basis for the update.

As an example: when building a Common Grid Model (CGM) from Individual Grid Models (IGM), the power flow initial assumptions (SSH) of each IGM might be adjusted as part of the merging process and area interchange control, thus updated SSH instance files are created. Each updated SSH model "supersedes" the original one.

More information can be found in the IEC-61970-552.

Author:
Luma ZamarreƱo <zamarrenolm at aia.es>
  • Constructor Details

    • CgmesMetadataModel

      public CgmesMetadataModel(CgmesSubset subset, String modelingAuthoritySet)
  • Method Details

    • getSubset

      public CgmesSubset getSubset()
      The CGMES instance file (subset) that the model refers to: EQ, SSH, ...
      Returns:
      the subset of the CGMES the model refers to
    • getId

      public String getId()
      The unique identifier for the model. A model identifier should change if the data contained in the model has changed.
      Returns:
      the identifier of the model
    • getDescription

      public String getDescription()
      A description for the model.
      Returns:
      the description of the model
    • getVersion

      public int getVersion()
      The version number for the model. The version number should change if the data contained in the model has changed.
      Returns:
      the version number of the model
    • getModelingAuthoritySet

      public String getModelingAuthoritySet()
      A reference to the organisation role / modeling authority set responsible for producing the model contents. It is a URN/URI.
      Returns:
      the URN/URI of the modeling authority set producing the model
    • getProfiles

      public Set<String> getProfiles()

      References to the profiles used in the model. Each profile defines semantics data that may appear inside the model. A model may contain data from multiple profiles.

      As an example, "http://iec.ch/TC57/61970-456/SteadyStateHypothesis/2/0" refers to power flow inputs in CGMES 3.

      In CGMES 2.4, the model for the EQ subset may contain two profiles: "http://iec.ch/TC57/2013/61970-452/EquipmentCore/4" to describe the equipment core and "http://iec.ch/TC57/2013/61970-452/EquipmentOperation/4" if the model is defined at node/braker level.

      Returns:
      the URN/URIs of profiles describing the data in the model
    • getDependentOn

      public Set<String> getDependentOn()
      References to other models that the model depends on.
      Returns:
      the identifiers of the models the model depends on
    • getSupersedes

      public Set<String> getSupersedes()
      References to other models that are superseded by this model.
      Returns:
      the identifiers of the models this model supersedes
    • setVersion

      public CgmesMetadataModel setVersion(int version)
      Set the given model version.
      Parameters:
      version - The version to set for the model.
      Returns:
      The model with the new version set.
    • setId

      public CgmesMetadataModel setId(String id)
      Set the given model id.
      Parameters:
      id - The id to set for the model.
      Returns:
      The model with the new id set.
    • setProfile

      public CgmesMetadataModel setProfile(String profile)
      Remove any existing profile and set the given model profile.
      Parameters:
      profile - The profile to set for the model.
      Returns:
      The model with the new profile set.
    • addProfiles

      public CgmesMetadataModel addProfiles(Collection<String> profiles)
      Extend model profiles with the given ones.
      Parameters:
      profiles - The profiles to add for the model.
      Returns:
      The model with the new profiles added.
    • setDescription

      public CgmesMetadataModel setDescription(String description)
      Set the given model description.
      Parameters:
      description - The description to set for the model.
      Returns:
      The model with the new description set.
    • addSupersedes

      public CgmesMetadataModel addSupersedes(String id)
      Add the given model id to the set of ids this model supersedes
      Parameters:
      id - The additional model id this model should supersede.
      Returns:
      The model with an updated set of values this model supersedes.
    • addDependentOn

      public CgmesMetadataModel addDependentOn(String id)
      Add the given model id to the set of ids this model depends on.
      Parameters:
      id - The additional model id this model should depend on.
      Returns:
      The model with an updated set of values this model depends on.
    • addDependentOn

      public CgmesMetadataModel addDependentOn(Collection<String> dependentOn)
      Add the given model ids to the set of ids this model depends on.
      Parameters:
      dependentOn - The additional model ids this model should depend on.
      Returns:
      The model with an updated set of values this model depends on.
    • addSupersedes

      public CgmesMetadataModel addSupersedes(Collection<String> supersedes)
      Add the given model ids to the set of ids this model supersedes.
      Parameters:
      supersedes - The additional model ids this model should supersede.
      Returns:
      The model with an updated set of values this model supersedes.
    • setModelingAuthoritySet

      public CgmesMetadataModel setModelingAuthoritySet(String modelingAuthoritySet)
      Set the given modeling authority set.
      Parameters:
      modelingAuthoritySet - The modeling authority set to set for the model.
      Returns:
      The model with the new modeling authority set defined.
    • clearDependencies

      public CgmesMetadataModel clearDependencies()
      Remove all the model ids this model depends on.
      Returns:
      The model with an empty set of values this model depends on.