Class NetworkImpl
- All Implemented Interfaces:
Extendable<Network>
,Container<Network>
,Identifiable<Network>
,MultiVariantObject
,NetworkExt
,VariantManagerHolder
,Network
,Validable
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.powsybl.iidm.network.Network
Network.BusBreakerView, Network.BusView, Network.PrettyNetworkFactory
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected String
protected String
protected final Properties
protected String
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an alias to the object.void
void
Add an alias to the object.void
void
addListener
(NetworkListener listener) Add a listener on the network.void
allocateVariantArrayElement
(int[] indexes, int sourceIndex) Called to allocate a variant array element.void
allowReporterContextMultiThreadAccess
(boolean allow) AllowsReporterContext
to be accessed simultaneously by different threads.createSubnetwork
(String subnetworkId, String name, String sourceFormat) Create an empty subnetwork in the current network.void
deleteVariantArrayElement
(int index) Called to delete a variant array element.detach()
Detach the current network (including its subnetworks) from its parent network.void
extendVariantArraySize
(int initVariantArraySize, int number, int sourceIndex) Called to extend the variant array.Get the aliases of the object.getAliasFromType
(String aliasType) Get the alias of the object with a given alias type if it exists.getAliasType
(String alias) Get the alias type of an alias if it exists, an empty optional otherwise.Get all batteries.getBattery
(String id) Get a battery.int
Get the battery count.Get all batteries.Set<Identifiable<?>>
Return all the boundary elements of the current network, i.e. the elements which link or might link this network to an external voltage level.Get a branchint
Get the branch count.Get all branchesGet all branchesGet a busbar section from its id or an alias.int
Get the busbar section count.Get all busbar sections.Get all busbar sections.com.powsybl.iidm.network.impl.NetworkImpl.BusBreakerViewImpl
Get a bus/breaker view of the network.com.powsybl.iidm.network.impl.NetworkImpl.BusViewImpl
Get a bus view of the network.Get the date that the network represents.Connectable<?>
getConnectable
(String id) Get a connectable by its ID or aliasint
Count the connectables of the network<C extends Connectable>
intgetConnectableCount
(Class<C> clazz) Count the connectables of the network for a given typeGet all connectables of the network<C extends Connectable>
Iterable<C>getConnectables
(Class<C> clazz) Get all connectables of the network for a given typeGet a stream of all connectables of the network<C extends Connectable>
Stream<C>getConnectableStream
(Class<C> clazz) Get a stream of all connectables of the network for a given typeGet all countries.int
Get the country count.com.powsybl.iidm.network.impl.DanglingLineImpl
Get a dangling line.int
Get the dangling line count.getDanglingLines
(DanglingLineFilter danglingLineFilter) Get all dangling lines corresponding to given filter.getDanglingLineStream
(DanglingLineFilter danglingLineFilter) Get the dangling lines corresponding to given filter.int
Get the forecast distance in minutes.com.powsybl.iidm.network.impl.GeneratorImpl
getGenerator
(String id) Get a generator.int
Get the generator count.Get all generators.Get all generators.Get a ground.int
Get the ground count.Get all grounds.Get all grounds.com.powsybl.iidm.network.impl.AbstractHvdcConverterStation<?>
Get an HVDC converter station.int
Get HVDC converter stations count.Get all HVDC converter stations.Get all HVDC converter stations.getHvdcLine
(HvdcConverterStation converterStation) Get an HVDC line from a converter stationgetHvdcLine
(String id) Get an HVDC line.int
Get HVDC lines count.Get all HVDC lines.Get all HVDC lines.getId()
Get the unique identifier of the object.Identifiable<?>
* Get an identifiable by its ID or aliasGet all identifiables of the network.com.powsybl.iidm.network.impl.NetworkIndex
getIndex()
com.powsybl.iidm.network.impl.LccConverterStationImpl
Get an LCC converter station.int
Get LCC converter stations count.Get all LCC converter stations.Get all LCC converter stations.Get a AC line.int
Get the AC line count.getLines()
Get all AC lines.Get all AC lines.com.powsybl.iidm.network.impl.LoadImpl
Get a load.int
Get the load count.getLoads()
Get all loads.Get all loads.Get the name of the object if it exists.Get the network associated to the object.Return an optional containing the name of the object if it exists.Get an overload management system.int
Get the overload management system count.Get all overload management systems.Get all overload management systems.Get the parent network, i.e. the smallest network containing the object.getProperty
(String key) Get property associated to specified key.getProperty
(String key, String defaultValue) Get property associated to specified key, with default value.Get properties key values.Get theReporterContext
of the network.Return the reference to the root network which is also used within the network elements.com.powsybl.iidm.network.impl.ShuntCompensatorImpl
Get a compensator shunt.int
Get the shunt count.Get all compensator shunts.Get all compensator shunts.Get the source format.com.powsybl.iidm.network.impl.StaticVarCompensatorImpl
Get a static var compensator.int
Get the static var compensator count.Get all static var compensators.Get all static var compensators.getSubnetwork
(String id) com.powsybl.iidm.network.impl.SubstationImpl
getSubstation
(String id) Get a substation.int
Get the substation count.Get all substations.getSubstations
(Country country, String tsoId, String... geographicalTags) Get substation located in a specific county, TSO and marked with a list of geographical tag.getSubstations
(String country, String tsoId, String... geographicalTags) Get substation located in a specific county, TSO and marked with a list of geographical tag.Get all substations.Get a switch from its id or an alias.int
Get the switch count.Get all switches.Get all switches.Get a 3 windings transformer.int
Get the 3 windings transformer count.Get all 3 windings transformers.Get all 3 windings transformers.getTieLine
(String id) Get a tie line.int
Get the tie line count.Get all tie lines.Get all tie lines.Get a two windings transformer.int
Get the two windings transformer count.Get all two windings transformers.Get all two windings transformers.protected String
Return the network validation status.int
Get the variant manager of the network.Get voltage angle limit with idGet all voltageAngleLimits.Get all voltageAngleLimits.com.powsybl.iidm.network.impl.VoltageLevelExt
Get a substation voltage level.int
Get the voltage level count.Get all substation voltage levels.Get all substation voltage levels.com.powsybl.iidm.network.impl.VscConverterStationImpl
Get an VSC converter station.int
Get VSC converter stations count.Get all VSC converter stations.Get all VSC converter stations.boolean
Return true if identifiable has aliases.boolean
Check that this object has some properties.boolean
hasProperty
(String key) Check that this object has property with specified name.boolean
isBoundaryElement
(Identifiable<?> identifiable) Check if an identifiable is a boundary element for the current network.boolean
Check if the current network can be detached from its parent network (withNetwork.detach()
).boolean
Get the fictitious statusGet a builder to create a new HVDC line.com.powsybl.iidm.network.impl.LineAdderImpl
newLine()
Get a builder to create a new AC line.Get a builder to create a new substation.com.powsybl.iidm.network.impl.TieLineAdderImpl
Get a builder to create a new AC tie line.Get a builder to create a new VoltageAngleLimit.Get a builder to create a new voltage level (without substation).void
reduceVariantArraySize
(int number) Called to reduce the variant array.void
removeAlias
(String alias) Remove an alias of the object.<E extends Extension<I>>
booleanremoveExtension
(Class<E> type) Remove an extension based on its class type.void
removeListener
(NetworkListener listener) Remove a listener from the network.boolean
removeProperty
(String key) Remove property with specified key.If network is valid, do nothing.
If network not valid, check if each network component is valid.runValidationChecks
(boolean throwsException) If network is valid, do nothing.
If network not valid andthrowsException
istrue
, check if each network component is valid.runValidationChecks
(boolean throwsException, Reporter reporter) If network is valid, do nothing.
If network not valid andthrowsException
istrue
, check if each network component is valid.setCaseDate
(ZonedDateTime caseDate) Set the date that the network represents.void
setFictitious
(boolean fictitious) Set the fictitious statussetForecastDistance
(int forecastDistance) setMinimumAcceptableValidationLevel
(ValidationLevel validationLevel) Update object name.setProperty
(String key, String value) Set property value associated to specified key.toString()
protected static void
transferExtensions
(Network from, Network to) Transfer the extensions of a network to another one.Methods inherited from class com.powsybl.commons.extensions.AbstractExtendable
addExtension, getExtension, getExtensionByName, getExtensions, getImplementationName, removeExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.powsybl.commons.extensions.Extendable
addExtension, getExtension, getExtensionByName, getExtensions, getImplementationName, newExtension, removeExtension
Methods inherited from interface com.powsybl.iidm.network.Identifiable
addAlias, addAlias, addAlias, addAlias, getAliases, getAliasFromType, getAliasType, getId, getNameOrId, getOptionalName, getProperty, getProperty, getPropertyNames, hasAliases, hasProperty, hasProperty, isFictitious, removeAlias, removeProperty, setFictitious, setName, setProperty
Methods inherited from interface com.powsybl.iidm.network.Network
getDanglingLines, getDanglingLineStream, getIdentifiableStream, getType, write, write, write, write, write, write, write, write, write
-
Field Details
-
sourceFormat
-
id
-
name
-
fictitious
protected boolean fictitious -
properties
-
-
Method Details
-
getSubnetworks
- Specified by:
getSubnetworks
in interfaceNetwork
-
getSubnetwork
- Specified by:
getSubnetwork
in interfaceNetwork
-
getRootNetworkRef
Description copied from interface:NetworkExt
Return the reference to the root network which is also used within the network elements. This is used to easily update the root network of network elements when merging networks or detaching subnetworks.- Specified by:
getRootNetworkRef
in interfaceNetworkExt
-
getListeners
-
getIndex
public com.powsybl.iidm.network.impl.NetworkIndex getIndex() -
getVoltageAngleLimitsIndex
-
getVoltageAngleLimit
Description copied from interface:Network
Get voltage angle limit with id- Specified by:
getVoltageAngleLimit
in interfaceNetwork
-
getVoltageAngleLimitsStream
Description copied from interface:Network
Get all voltageAngleLimits.- Specified by:
getVoltageAngleLimitsStream
in interfaceNetwork
-
getVoltageAngleLimits
Description copied from interface:Network
Get all voltageAngleLimits.- Specified by:
getVoltageAngleLimits
in interfaceNetwork
-
getNetwork
Description copied from interface:Identifiable
Get the network associated to the object.- Specified by:
getNetwork
in interfaceIdentifiable<Network>
-
getParentNetwork
Description copied from interface:Identifiable
Get the parent network, i.e. the smallest network containing the object.- Specified by:
getParentNetwork
in interfaceIdentifiable<Network>
-
getVariantManager
Description copied from interface:Network
Get the variant manager of the network.- Specified by:
getVariantManager
in interfaceNetwork
- Specified by:
getVariantManager
in interfaceVariantManagerHolder
-
allowReporterContextMultiThreadAccess
public void allowReporterContextMultiThreadAccess(boolean allow) Description copied from interface:Network
Allows
ReporterContext
to be accessed simultaneously by different threads.When this option is activated, the reporter context can have a different content for each thread.
Note that to avoid memory leaks when in multi-thread configuration:
- each reporter pushed in the ReporterContext should be popped in a "finally" section:
network.getReporterContext().pushReporter(reporter); try { // code that can throw an exception } finally { network.getReporterContext().popReporter(); }
- the context should be set in mono-thread access when multi-threading policy is no more useful.
- Specified by:
allowReporterContextMultiThreadAccess
in interfaceNetwork
- Parameters:
allow
- allow multi-thread access to the ReporterContext
- each reporter pushed in the ReporterContext should be popped in a "finally" section:
-
getReporterContext
Description copied from interface:Network
Get theReporterContext
of the network.- Specified by:
getReporterContext
in interfaceNetwork
-
getVariantIndex
public int getVariantIndex()- Specified by:
getVariantIndex
in interfaceVariantManagerHolder
-
getCountries
Description copied from interface:Network
Get all countries.- Specified by:
getCountries
in interfaceNetwork
-
getCountryCount
public int getCountryCount()Description copied from interface:Network
Get the country count.- Specified by:
getCountryCount
in interfaceNetwork
-
newSubstation
Description copied from interface:Network
Get a builder to create a new substation.- Specified by:
newSubstation
in interfaceNetwork
- Returns:
- a builder to create a new substation
-
getSubstations
Description copied from interface:Network
Get all substations.- Specified by:
getSubstations
in interfaceNetwork
-
getSubstationStream
Description copied from interface:Network
Get all substations.- Specified by:
getSubstationStream
in interfaceNetwork
-
getSubstationCount
public int getSubstationCount()Description copied from interface:Network
Get the substation count.- Specified by:
getSubstationCount
in interfaceNetwork
-
getSubstations
public Iterable<Substation> getSubstations(Country country, String tsoId, String... geographicalTags) Description copied from interface:Network
Get substation located in a specific county, TSO and marked with a list of geographical tag.- Specified by:
getSubstations
in interfaceNetwork
- Parameters:
country
- the country, ifnull
there is no filtering on countriestsoId
- the id of the TSO, ifnull
there is no filtering on TSOsgeographicalTags
- a list a geographical tags
-
getSubstations
public Iterable<Substation> getSubstations(String country, String tsoId, String... geographicalTags) Description copied from interface:Network
Get substation located in a specific county, TSO and marked with a list of geographical tag.- Specified by:
getSubstations
in interfaceNetwork
- Parameters:
country
- the country name, if empty string, the filtering will be on substations without country, ifnull
there is no filtering on countriestsoId
- the id of the TSO, ifnull
there is no filtering on TSOsgeographicalTags
- a list a geographical tags
-
getSubstation
Description copied from interface:Network
Get a substation.- Specified by:
getSubstation
in interfaceNetwork
- Parameters:
id
- the id or an alias of the substation
-
newVoltageLevel
Description copied from interface:Network
Get a builder to create a new voltage level (without substation). Note: if this method is not implemented, it will create an intermediary fictitiousSubstation
.- Specified by:
newVoltageLevel
in interfaceNetwork
- Returns:
- a builder to create a new voltage level
-
getVoltageLevels
Description copied from interface:Network
Get all substation voltage levels.- Specified by:
getVoltageLevels
in interfaceNetwork
-
getVoltageLevelStream
Description copied from interface:Network
Get all substation voltage levels.- Specified by:
getVoltageLevelStream
in interfaceNetwork
-
getVoltageLevelCount
public int getVoltageLevelCount()Description copied from interface:Network
Get the voltage level count.- Specified by:
getVoltageLevelCount
in interfaceNetwork
-
getVoltageLevel
Description copied from interface:Network
Get a substation voltage level.- Specified by:
getVoltageLevel
in interfaceNetwork
- Parameters:
id
- the id or an alias of the substation voltage level
-
newLine
public com.powsybl.iidm.network.impl.LineAdderImpl newLine()Description copied from interface:Network
Get a builder to create a new AC line. -
getLines
Description copied from interface:Network
Get all AC lines. -
getTieLines
Description copied from interface:Network
Get all tie lines.- Specified by:
getTieLines
in interfaceNetwork
-
getBranch
Description copied from interface:Network
Get a branch -
getBranches
Description copied from interface:Network
Get all branches- Specified by:
getBranches
in interfaceNetwork
-
getBranchStream
Description copied from interface:Network
Get all branches- Specified by:
getBranchStream
in interfaceNetwork
-
getBranchCount
public int getBranchCount()Description copied from interface:Network
Get the branch count.- Specified by:
getBranchCount
in interfaceNetwork
-
getLineStream
Description copied from interface:Network
Get all AC lines.- Specified by:
getLineStream
in interfaceNetwork
-
getTieLineStream
Description copied from interface:Network
Get all tie lines.- Specified by:
getTieLineStream
in interfaceNetwork
-
getLineCount
public int getLineCount()Description copied from interface:Network
Get the AC line count.- Specified by:
getLineCount
in interfaceNetwork
-
getTieLineCount
public int getTieLineCount()Description copied from interface:Network
Get the tie line count.- Specified by:
getTieLineCount
in interfaceNetwork
-
getLine
Description copied from interface:Network
Get a AC line. -
getTieLine
Description copied from interface:Network
Get a tie line.- Specified by:
getTieLine
in interfaceNetwork
- Parameters:
id
- the id or an alias of the AC line
-
newTieLine
public com.powsybl.iidm.network.impl.TieLineAdderImpl newTieLine()Description copied from interface:Network
Get a builder to create a new AC tie line.- Specified by:
newTieLine
in interfaceNetwork
- Returns:
- a builder to create a new AC tie line
-
getTwoWindingsTransformers
Description copied from interface:Network
Get all two windings transformers.- Specified by:
getTwoWindingsTransformers
in interfaceNetwork
-
getTwoWindingsTransformerStream
Description copied from interface:Network
Get all two windings transformers.- Specified by:
getTwoWindingsTransformerStream
in interfaceNetwork
-
getTwoWindingsTransformerCount
public int getTwoWindingsTransformerCount()Description copied from interface:Network
Get the two windings transformer count.- Specified by:
getTwoWindingsTransformerCount
in interfaceNetwork
-
getTwoWindingsTransformer
Description copied from interface:Network
Get a two windings transformer.- Specified by:
getTwoWindingsTransformer
in interfaceNetwork
- Parameters:
id
- the id or an alias of the two windings transformer
-
getThreeWindingsTransformers
Description copied from interface:Network
Get all 3 windings transformers.- Specified by:
getThreeWindingsTransformers
in interfaceNetwork
-
getThreeWindingsTransformerStream
Description copied from interface:Network
Get all 3 windings transformers.- Specified by:
getThreeWindingsTransformerStream
in interfaceNetwork
-
getThreeWindingsTransformerCount
public int getThreeWindingsTransformerCount()Description copied from interface:Network
Get the 3 windings transformer count.- Specified by:
getThreeWindingsTransformerCount
in interfaceNetwork
-
getThreeWindingsTransformer
Description copied from interface:Network
Get a 3 windings transformer.- Specified by:
getThreeWindingsTransformer
in interfaceNetwork
- Parameters:
id
- the id or an alias of the 3 windings transformer
-
getOverloadManagementSystems
Description copied from interface:Network
Get all overload management systems.- Specified by:
getOverloadManagementSystems
in interfaceNetwork
-
getOverloadManagementSystemStream
Description copied from interface:Network
Get all overload management systems.- Specified by:
getOverloadManagementSystemStream
in interfaceNetwork
-
getOverloadManagementSystemCount
public int getOverloadManagementSystemCount()Description copied from interface:Network
Get the overload management system count.- Specified by:
getOverloadManagementSystemCount
in interfaceNetwork
-
getOverloadManagementSystem
Description copied from interface:Network
Get an overload management system.- Specified by:
getOverloadManagementSystem
in interfaceNetwork
- Parameters:
id
- the id or an alias of the overload management system
-
getGenerators
Description copied from interface:Network
Get all generators.- Specified by:
getGenerators
in interfaceNetwork
-
getGeneratorStream
Description copied from interface:Network
Get all generators.- Specified by:
getGeneratorStream
in interfaceNetwork
-
getGeneratorCount
public int getGeneratorCount()Description copied from interface:Network
Get the generator count.- Specified by:
getGeneratorCount
in interfaceNetwork
-
getGenerator
Description copied from interface:Network
Get a generator.- Specified by:
getGenerator
in interfaceNetwork
- Parameters:
id
- the id or an alias of the generator
-
getBatteries
Description copied from interface:Network
Get all batteries.- Specified by:
getBatteries
in interfaceNetwork
-
getBatteryStream
Description copied from interface:Network
Get all batteries.- Specified by:
getBatteryStream
in interfaceNetwork
-
getBatteryCount
public int getBatteryCount()Description copied from interface:Network
Get the battery count.- Specified by:
getBatteryCount
in interfaceNetwork
-
getBattery
Description copied from interface:Network
Get a battery.- Specified by:
getBattery
in interfaceNetwork
- Parameters:
id
- the id or an alias of the battery
-
getLoads
Description copied from interface:Network
Get all loads. -
getLoadStream
Description copied from interface:Network
Get all loads.- Specified by:
getLoadStream
in interfaceNetwork
-
getLoadCount
public int getLoadCount()Description copied from interface:Network
Get the load count.- Specified by:
getLoadCount
in interfaceNetwork
-
getLoad
Description copied from interface:Network
Get a load. -
getShuntCompensators
Description copied from interface:Network
Get all compensator shunts.- Specified by:
getShuntCompensators
in interfaceNetwork
-
getShuntCompensatorStream
Description copied from interface:Network
Get all compensator shunts.- Specified by:
getShuntCompensatorStream
in interfaceNetwork
-
getShuntCompensatorCount
public int getShuntCompensatorCount()Description copied from interface:Network
Get the shunt count.- Specified by:
getShuntCompensatorCount
in interfaceNetwork
-
getShuntCompensator
Description copied from interface:Network
Get a compensator shunt.- Specified by:
getShuntCompensator
in interfaceNetwork
- Parameters:
id
- the id or an alias of the compensator shunt
-
getDanglingLines
Description copied from interface:Network
Get all dangling lines corresponding to given filter.- Specified by:
getDanglingLines
in interfaceNetwork
-
getDanglingLineStream
Description copied from interface:Network
Get the dangling lines corresponding to given filter.- Specified by:
getDanglingLineStream
in interfaceNetwork
-
getDanglingLineCount
public int getDanglingLineCount()Description copied from interface:Network
Get the dangling line count.- Specified by:
getDanglingLineCount
in interfaceNetwork
-
getDanglingLine
Description copied from interface:Network
Get a dangling line.- Specified by:
getDanglingLine
in interfaceNetwork
- Parameters:
id
- the id or an alias of the dangling line
-
getStaticVarCompensators
Description copied from interface:Network
Get all static var compensators.- Specified by:
getStaticVarCompensators
in interfaceNetwork
-
getStaticVarCompensatorStream
Description copied from interface:Network
Get all static var compensators.- Specified by:
getStaticVarCompensatorStream
in interfaceNetwork
-
getStaticVarCompensatorCount
public int getStaticVarCompensatorCount()Description copied from interface:Network
Get the static var compensator count.- Specified by:
getStaticVarCompensatorCount
in interfaceNetwork
-
getStaticVarCompensator
Description copied from interface:Network
Get a static var compensator.- Specified by:
getStaticVarCompensator
in interfaceNetwork
- Parameters:
id
- the id or an alias of the static var compensator
-
getSwitch
Description copied from interface:Network
Get a switch from its id or an alias. -
getSwitches
Description copied from interface:Network
Get all switches.- Specified by:
getSwitches
in interfaceNetwork
- Returns:
- all switches
-
getSwitchStream
Description copied from interface:Network
Get all switches.- Specified by:
getSwitchStream
in interfaceNetwork
- Returns:
- all switches
-
getSwitchCount
public int getSwitchCount()Description copied from interface:Network
Get the switch count.- Specified by:
getSwitchCount
in interfaceNetwork
- Returns:
- the switch count
-
getBusbarSection
Description copied from interface:Network
Get a busbar section from its id or an alias.- Specified by:
getBusbarSection
in interfaceNetwork
- Parameters:
id
- the id or an alias of the busbar section- Returns:
- the busbar section
-
getBusbarSections
Description copied from interface:Network
Get all busbar sections.- Specified by:
getBusbarSections
in interfaceNetwork
- Returns:
- all busbar sections
-
getBusbarSectionStream
Description copied from interface:Network
Get all busbar sections.- Specified by:
getBusbarSectionStream
in interfaceNetwork
- Returns:
- all busbar sections
-
getBusbarSectionCount
public int getBusbarSectionCount()Description copied from interface:Network
Get the busbar section count.- Specified by:
getBusbarSectionCount
in interfaceNetwork
- Returns:
- the busbar section count.
-
getHvdcConverterStation
public com.powsybl.iidm.network.impl.AbstractHvdcConverterStation<?> getHvdcConverterStation(String id) Description copied from interface:Network
Get an HVDC converter station.- Specified by:
getHvdcConverterStation
in interfaceNetwork
- Parameters:
id
- the id or an alias of the HVDC converter station- Returns:
- the HVDC converter station or null if not found
-
getHvdcConverterStationCount
public int getHvdcConverterStationCount()Description copied from interface:Network
Get HVDC converter stations count.- Specified by:
getHvdcConverterStationCount
in interfaceNetwork
- Returns:
- HVDC converter station count
-
getHvdcConverterStations
Description copied from interface:Network
Get all HVDC converter stations.- Specified by:
getHvdcConverterStations
in interfaceNetwork
- Returns:
- all HVDC converter stations
-
getHvdcConverterStationStream
Description copied from interface:Network
Get all HVDC converter stations.- Specified by:
getHvdcConverterStationStream
in interfaceNetwork
- Returns:
- all HVDC converter stations
-
getLccConverterStations
Description copied from interface:Network
Get all LCC converter stations.- Specified by:
getLccConverterStations
in interfaceNetwork
- Returns:
- all LCC converter stations
-
getLccConverterStationStream
Description copied from interface:Network
Get all LCC converter stations.- Specified by:
getLccConverterStationStream
in interfaceNetwork
- Returns:
- all LCC converter stations
-
getLccConverterStationCount
public int getLccConverterStationCount()Description copied from interface:Network
Get LCC converter stations count.- Specified by:
getLccConverterStationCount
in interfaceNetwork
- Returns:
- LCC converter station count
-
getLccConverterStation
Description copied from interface:Network
Get an LCC converter station.- Specified by:
getLccConverterStation
in interfaceNetwork
- Parameters:
id
- the id or an alias of the LCC converter station- Returns:
- the LCC converter station or null if not found
-
getVscConverterStations
Description copied from interface:Network
Get all VSC converter stations.- Specified by:
getVscConverterStations
in interfaceNetwork
- Returns:
- all VSC converter stations
-
getVscConverterStationStream
Description copied from interface:Network
Get all VSC converter stations.- Specified by:
getVscConverterStationStream
in interfaceNetwork
- Returns:
- all VSC converter stations
-
getVscConverterStationCount
public int getVscConverterStationCount()Description copied from interface:Network
Get VSC converter stations count.- Specified by:
getVscConverterStationCount
in interfaceNetwork
- Returns:
- VSC converter station count
-
getVscConverterStation
Description copied from interface:Network
Get an VSC converter station.- Specified by:
getVscConverterStation
in interfaceNetwork
- Parameters:
id
- the id or an alias of the VSC converter station- Returns:
- the VSC converter station or null if not found
-
getHvdcLine
Description copied from interface:Network
Get an HVDC line.- Specified by:
getHvdcLine
in interfaceNetwork
- Parameters:
id
- the id or an alias of the HVDC line- Returns:
- the HVDC line or null if not found
-
getHvdcLine
Description copied from interface:Network
Get an HVDC line from a converter station- Specified by:
getHvdcLine
in interfaceNetwork
- Parameters:
converterStation
- a HVDC converter station- Returns:
- the HVDC line or null if not found
-
getHvdcLineCount
public int getHvdcLineCount()Description copied from interface:Network
Get HVDC lines count.- Specified by:
getHvdcLineCount
in interfaceNetwork
- Returns:
- HVDC lines count
-
getHvdcLines
Description copied from interface:Network
Get all HVDC lines.- Specified by:
getHvdcLines
in interfaceNetwork
- Returns:
- all HVDC lines
-
getHvdcLineStream
Description copied from interface:Network
Get all HVDC lines.- Specified by:
getHvdcLineStream
in interfaceNetwork
- Returns:
- all HVDC lines
-
newHvdcLine
Description copied from interface:Network
Get a builder to create a new HVDC line.- Specified by:
newHvdcLine
in interfaceNetwork
- Returns:
- a builder to create a new HVDC line
-
getGround
Description copied from interface:Network
Get a ground. -
getGrounds
Description copied from interface:Network
Get all grounds.- Specified by:
getGrounds
in interfaceNetwork
-
getGroundStream
Description copied from interface:Network
Get all grounds.- Specified by:
getGroundStream
in interfaceNetwork
-
getGroundCount
public int getGroundCount()Description copied from interface:Network
Get the ground count.- Specified by:
getGroundCount
in interfaceNetwork
-
getIdentifiable
Description copied from interface:Network
* Get an identifiable by its ID or alias- Specified by:
getIdentifiable
in interfaceNetwork
- Parameters:
id
- the id or an alias of the identifiable
-
getIdentifiables
Description copied from interface:Network
Get all identifiables of the network.- Specified by:
getIdentifiables
in interfaceNetwork
- Returns:
- all identifiables of the network
-
getConnectables
Description copied from interface:Network
Get all connectables of the network for a given type- Specified by:
getConnectables
in interfaceNetwork
- Parameters:
clazz
- connectable type class- Returns:
- all the connectables of the given type
-
getConnectableStream
Description copied from interface:Network
Get a stream of all connectables of the network for a given type- Specified by:
getConnectableStream
in interfaceNetwork
- Parameters:
clazz
- connectable type class- Returns:
- a stream of all the connectables of the given type
-
getConnectableCount
Description copied from interface:Network
Count the connectables of the network for a given type- Specified by:
getConnectableCount
in interfaceNetwork
- Parameters:
clazz
- connectable type class- Returns:
- the count of all the connectables of the given type
-
getConnectables
Description copied from interface:Network
Get all connectables of the network- Specified by:
getConnectables
in interfaceNetwork
- Returns:
- all the connectables
-
getConnectableStream
Description copied from interface:Network
Get a stream of all connectables of the network- Specified by:
getConnectableStream
in interfaceNetwork
- Returns:
- a stream of all the connectables
-
getConnectable
Description copied from interface:Network
Get a connectable by its ID or alias- Specified by:
getConnectable
in interfaceNetwork
- Parameters:
id
- the id or an alias of the equipment
-
getConnectableCount
public int getConnectableCount()Description copied from interface:Network
Count the connectables of the network- Specified by:
getConnectableCount
in interfaceNetwork
- Returns:
- the count of all the connectables
-
newVoltageAngleLimit
Description copied from interface:Network
Get a builder to create a new VoltageAngleLimit.- Specified by:
newVoltageAngleLimit
in interfaceNetwork
-
getBusBreakerView
public com.powsybl.iidm.network.impl.NetworkImpl.BusBreakerViewImpl getBusBreakerView()Description copied from interface:Network
Get a bus/breaker view of the network.- Specified by:
getBusBreakerView
in interfaceNetwork
-
getBusView
public com.powsybl.iidm.network.impl.NetworkImpl.BusViewImpl getBusView()Description copied from interface:Network
Get a bus view of the network.- Specified by:
getBusView
in interfaceNetwork
-
extendVariantArraySize
public void extendVariantArraySize(int initVariantArraySize, int number, int sourceIndex) Description copied from interface:MultiVariantObject
Called to extend the variant array.- Specified by:
extendVariantArraySize
in interfaceMultiVariantObject
- Parameters:
initVariantArraySize
- initial variant array sizenumber
- number of element to addsourceIndex
- the variant index to use to initialize new variants
-
reduceVariantArraySize
public void reduceVariantArraySize(int number) Description copied from interface:MultiVariantObject
Called to reduce the variant array.- Specified by:
reduceVariantArraySize
in interfaceMultiVariantObject
- Parameters:
number
- number of element to remove
-
deleteVariantArrayElement
public void deleteVariantArrayElement(int index) Description copied from interface:MultiVariantObject
Called to delete a variant array element.- Specified by:
deleteVariantArrayElement
in interfaceMultiVariantObject
- Parameters:
index
- the index of the variant array to delete
-
allocateVariantArrayElement
public void allocateVariantArrayElement(int[] indexes, int sourceIndex) Description copied from interface:MultiVariantObject
Called to allocate a variant array element. All new variants will be initialize using values of the variant sourceIndex.- Specified by:
allocateVariantArrayElement
in interfaceMultiVariantObject
- Parameters:
indexes
- the indexes of the variant array to allocatesourceIndex
- the variant index to use to initialize new variants
-
createSubnetwork
Description copied from interface:Network
Create an empty subnetwork in the current network.- Specified by:
createSubnetwork
in interfaceNetwork
- Parameters:
subnetworkId
- id of the subnetworkname
- subnetwork's namesourceFormat
- source format- Returns:
- the created subnetwork
-
detach
Detach the current network (including its subnetworks) from its parent network.
Note that this operation is destructive: after it the current network's content couldn't be accessed from the parent network anymore.
The boundary elements, i.e. linking this network to an external voltage level are split if possible. A
PowsyblException
is thrown if some un-splittable boundary elements are detected. This detection is processed before any network modification. So if an un-splittable boundary element is detected, no destructive operation will be done.Since
NetworkImpl
instances are already independent networks, this method throws anIllegalStateException
. -
isDetachable
public boolean isDetachable()Check if the current network can be detached from its parent network (with
Network.detach()
).Since
NetworkImpl
instances are independent networks and can't thus be detached, this method returnsfalse
.- Specified by:
isDetachable
in interfaceNetwork
- Returns:
- false
-
getBoundaryElements
Description copied from interface:Network
Return all the boundary elements of the current network, i.e. the elements which link or might link this network to an external voltage level.- Specified by:
getBoundaryElements
in interfaceNetwork
- Returns:
- a set containing the boundary elements of the network.
-
isBoundaryElement
Description copied from interface:Network
Check if an identifiable is a boundary element for the current network.- Specified by:
isBoundaryElement
in interfaceNetwork
- Parameters:
identifiable
- the identifiable to check- Returns:
- True if the identifiable is a boundary element for the current network
-
addListener
Description copied from interface:Network
Add a listener on the network.
- Specified by:
addListener
in interfaceNetwork
- Parameters:
listener
- the listener to add
-
removeListener
Description copied from interface:Network
Remove a listener from the network.
- Specified by:
removeListener
in interfaceNetwork
- Parameters:
listener
- the listener to remove
-
runValidationChecks
Description copied from interface:Network
If network is valid, do nothing.
If network not valid, check if each network component is valid. AValidationException
is thrown with an explicit message if one network component is not valid.
If all network components are valid, network validation status is updated to true. Return the network validation status.- Specified by:
runValidationChecks
in interfaceNetwork
-
runValidationChecks
Description copied from interface:Network
If network is valid, do nothing.
If network not valid andthrowsException
istrue
, check if each network component is valid. AValidationException
is thrown with an explicit message if one network component is not valid.
If all network components are valid, network validation status is updated to true. Return the network validation status.- Specified by:
runValidationChecks
in interfaceNetwork
-
runValidationChecks
Description copied from interface:Network
If network is valid, do nothing.
If network not valid andthrowsException
istrue
, check if each network component is valid. AValidationException
is thrown with an explicit message if one network component is not valid.
If all network components are valid, network validation status is updated to true. Return the network validation status.- Specified by:
runValidationChecks
in interfaceNetwork
-
getValidationLevel
Description copied from interface:Network
Return the network validation status. Do not run any validation check.- Specified by:
getValidationLevel
in interfaceNetwork
-
setMinimumAcceptableValidationLevel
- Specified by:
setMinimumAcceptableValidationLevel
in interfaceNetwork
-
getContainerType
- Specified by:
getContainerType
in interfaceContainer<Network>
-
getCaseDate
Description copied from interface:Network
Get the date that the network represents.- Specified by:
getCaseDate
in interfaceNetwork
-
setCaseDate
Description copied from interface:Network
Set the date that the network represents.- Specified by:
setCaseDate
in interfaceNetwork
-
getForecastDistance
public int getForecastDistance()Description copied from interface:Network
Get the forecast distance in minutes.Example: 0 for a snapshot, 6*60 to 30*60 for a DACF.
- Specified by:
getForecastDistance
in interfaceNetwork
-
setForecastDistance
- Specified by:
setForecastDistance
in interfaceNetwork
-
getSourceFormat
Description copied from interface:Network
Get the source format.- Specified by:
getSourceFormat
in interfaceNetwork
- Returns:
- the source format
-
getTypeDescription
-
transferExtensions
Transfer the extensions of a network to another one.- Parameters:
from
- the network whose extensions must be transferredto
- the destination network
-
getId
Description copied from interface:Identifiable
Get the unique identifier of the object.- Specified by:
getId
in interfaceIdentifiable<I extends Identifiable<I>>
-
getOptionalName
Description copied from interface:Identifiable
Return an optional containing the name of the object if it exists. If not, return an empty optional.- Specified by:
getOptionalName
in interfaceIdentifiable<I extends Identifiable<I>>
-
getNameOrId
Description copied from interface:Identifiable
Get the name of the object if it exists. If not, get the unique identifier of the object.- Specified by:
getNameOrId
in interfaceIdentifiable<I extends Identifiable<I>>
-
setName
Description copied from interface:Identifiable
Update object name.- Specified by:
setName
in interfaceIdentifiable<I extends Identifiable<I>>
- Parameters:
name
- new name of the object (could be null to erase the name)- Returns:
- the object itself
-
getAliases
Description copied from interface:Identifiable
Get the aliases of the object.- Specified by:
getAliases
in interfaceIdentifiable<I extends Identifiable<I>>
-
getAliasType
Description copied from interface:Identifiable
Get the alias type of an alias if it exists, an empty optional otherwise. If the alias does not exist, return an empty optional.- Specified by:
getAliasType
in interfaceIdentifiable<I extends Identifiable<I>>
-
getAliasFromType
Description copied from interface:Identifiable
Get the alias of the object with a given alias type if it exists. Else return an empty optional.- Specified by:
getAliasFromType
in interfaceIdentifiable<I extends Identifiable<I>>
-
addAlias
Description copied from interface:Identifiable
Add an alias to the object. Aliases must be unique in associated Network, and different from any identifiable ID. No alias type is associated to this alias. If the alias already exists (i.e. is not unique) or equals an identifiable ID, throw aPowsyblException
- Specified by:
addAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
addAlias
- Specified by:
addAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
addAlias
Description copied from interface:Identifiable
Add an alias to the object. Aliases must be unique in associated Network, and different from any identifiable ID. This alias is associated to a given alias type. If the given alias type is null or empty, no alias type is considered associated to the alias. Only one alias can be associated to a non null given alias type for one object. If the alias already exists (i.e. is not unique) or equals an identifiable ID, throw aPowsyblException
If a given non null type already has an associated alias for this object, throw aPowsyblException
- Specified by:
addAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
addAlias
- Specified by:
addAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
removeAlias
Description copied from interface:Identifiable
Remove an alias of the object. If the alias does not exist for this object, throw aPowsyblException
- Specified by:
removeAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
hasAliases
public boolean hasAliases()Description copied from interface:Identifiable
Return true if identifiable has aliases.- Specified by:
hasAliases
in interfaceIdentifiable<I extends Identifiable<I>>
-
isFictitious
public boolean isFictitious()Description copied from interface:Identifiable
Get the fictitious status- Specified by:
isFictitious
in interfaceIdentifiable<I extends Identifiable<I>>
-
setFictitious
public void setFictitious(boolean fictitious) Description copied from interface:Identifiable
Set the fictitious status- Specified by:
setFictitious
in interfaceIdentifiable<I extends Identifiable<I>>
-
getMessageHeader
- Specified by:
getMessageHeader
in interfaceValidable
-
getProperties
-
hasProperty
public boolean hasProperty()Description copied from interface:Identifiable
Check that this object has some properties.- Specified by:
hasProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
hasProperty
Description copied from interface:Identifiable
Check that this object has property with specified name.- Specified by:
hasProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
getProperty
Description copied from interface:Identifiable
Get property associated to specified key.- Specified by:
getProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
getProperty
Description copied from interface:Identifiable
Get property associated to specified key, with default value.- Specified by:
getProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
setProperty
Description copied from interface:Identifiable
Set property value associated to specified key.- Specified by:
setProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
removeProperty
Description copied from interface:Identifiable
Remove property with specified key.- Specified by:
removeProperty
in interfaceIdentifiable<I extends Identifiable<I>>
- Parameters:
key
- the property key- Returns:
true
if property exists and has been removed,false
otherwise
-
getPropertyNames
Description copied from interface:Identifiable
Get properties key values.- Specified by:
getPropertyNames
in interfaceIdentifiable<I extends Identifiable<I>>
-
toString
-
removeExtension
Description copied from interface:Extendable
Remove an extension based on its class type.- Specified by:
removeExtension
in interfaceExtendable<I extends Identifiable<I>>
- Overrides:
removeExtension
in classAbstractExtendable<I extends Identifiable<I>>
- Type Parameters:
E
- the extension type- Parameters:
type
- the extension class type- Returns:
- true if the extension has been removed false if extension has not been found
-