Interface Network
- All Superinterfaces:
Container<Network>
,Extendable<Network>
,Identifiable<Network>
- All Known Subinterfaces:
NetworkExt
- All Known Implementing Classes:
NetworkImpl
,SubnetworkImpl
Characteristics
Attribute | Type | Unit | Required | Defaut value | Description |
---|---|---|---|---|---|
Id | String | - | yes | - | Unique identifier of the network |
Name | String | - | yes | - | Human-readable name of the network |
CaseDate | DateTime | - | no | Now | The date of the case |
ForecastDistance | integer | - | no | 0 | The number of minutes between the date of the case generation and the date of the case |
Network n = Network.create("test", "test");
The network is initially created with one variant identified by
VariantManagerConstants.INITIAL_VARIANT_ID
. VariantManager
is
responsible for variant management and is accessible from the network thanks
to getVariantManager()
.
Instances of Network
are not thread safe except for attributes
depending of the variant (always specified in the javadoc) if
VariantManager.allowVariantMultiThreadAccess(boolean)
is set to true.
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A global bus/breaker view of the network.static interface
A global bus view of the network.static interface
Just being able to name method create et not createNetwork. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(NetworkListener listener) Add a listener on the network.void
allowReportNodeContextMultiThreadAccess
(boolean allow) AllowsReportNodeContext
to be accessed simultaneously by different threads.static Network
Create an empty network using default implementation.createSubnetwork
(String subnetworkId, String name, String sourceFormat) Create an empty subnetwork in the current network.detach()
Detach the current network (including its subnetworks) from its parent network.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.Get a bus/breaker view of the network.Get a bus view of the network.Get the date that the network represents.default Connectable<?>
getConnectable
(String id) Get a connectable by its ID or aliasdefault int
Count the connectables of the networkdefault <C extends Connectable>
intgetConnectableCount
(Class<C> clazz) Count the connectables of the network for a given typedefault Iterable<Connectable>
Get all connectables of the networkdefault <C extends Connectable>
Iterable<C>getConnectables
(Class<C> clazz) Get all connectables of the network for a given typedefault Stream<Connectable>
Get a stream of all connectables of the networkdefault <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.Get a dangling line.int
Get the dangling line count.default Iterable<DanglingLine>
Get all dangling lines.getDanglingLines
(DanglingLineFilter danglingLineFilter) Get all dangling lines corresponding to given filter.default Stream<DanglingLine>
Get all the dangling lines.getDanglingLineStream
(DanglingLineFilter danglingLineFilter) Get the dangling lines corresponding to given filter.int
Get the forecast distance in minutes.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.Get an HVDC converter station.int
Get HVDC converter stations count.Get all HVDC converter stations.Get all HVDC converter stations.default HvdcLine
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.Identifiable<?>
* Get an identifiable by its ID or aliasGet all identifiables of the network.default Stream<Identifiable<?>>
getIdentifiableStream
(IdentifiableType identifiableType) 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.Get a load.int
Get the load count.getLoads()
Get all loads.Get all loads.Get an overload management system.int
Get the overload management system count.Get all overload management systems.Get all overload management systems.Get theReportNodeContext
of the network.Get a compensator shunt.int
Get the shunt count.Get all compensator shunts.Get all compensator shunts.Get the source format.Get a static var compensator.int
Get the static var compensator count.Get all static var compensators.Get all static var compensators.default Network
getSubnetwork
(String id) default Collection<Network>
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.default IdentifiableType
getType()
Get identifiable type.default ValidationLevel
Return the network validation status.Get the variant manager of the network.Get voltage angle limit with idGet all voltageAngleLimits.Get all voltageAngleLimits.Get a substation voltage level.int
Get the voltage level count.Get all substation voltage levels.Get all substation voltage levels.Get an VSC converter station.int
Get VSC converter stations count.Get all VSC converter stations.Get all VSC converter stations.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 (withdetach()
).static Network
Create a network (using default implementation) as the result of the merge of the given networks.static Network
Create a network (using default implementation) as the result of the merge of the given networks.Get a builder to create a new HVDC line.newLine()
Get a builder to create a new AC line.Get a builder to create a new substation.Get a builder to create a new AC tie line.Get a builder to create a new VoltageAngleLimit.default VoltageLevelAdder
Get a builder to create a new voltage level (without substation).static Network
read
(ReadOnlyDataSource dataSource) static Network
read
(ReadOnlyDataSource... dataSources) static Network
read
(ReadOnlyDataSource dataSource, Properties properties) static Network
read
(ReadOnlyDataSource dataSource, Properties properties, ReportNode reportNode) static Network
Loads a network from the specified file path, seeread(Path)
.static Network
read
(String filename, InputStream data) Read a network from a raw input stream, trying to guess the format from the specified filename, and using importers and post processors defined as services.static Network
read
(String filename, InputStream data, ReportNode reportNode) Read a network from a raw input stream, trying to guess the format from the specified filename, and using importers and post processors defined as services.static Network
read
(String filename, InputStream data, ComputationManager computationManager) Read a network from a raw input stream, trying to guess the format from the specified filename, and using importers and post processors defined as services.static Network
read
(String filename, InputStream data, ComputationManager computationManager, ImportConfig config, Properties parameters) Read a network from a raw input stream, trying to guess the format from the specified filename, and using importers and post processors defined as services.static Network
read
(String filename, InputStream data, ComputationManager computationManager, ImportConfig config, Properties parameters, ImportersLoader loader) Read a network from a raw input stream, trying to guess the format from the specified filename.static Network
read
(String filename, InputStream data, ComputationManager computationManager, ImportConfig config, Properties parameters, ImportersLoader loader, ReportNode reportNode) Read a network from a raw input stream, trying to guess the format from the specified filename.static Network
read
(String filename, InputStream data, ComputationManager computationManager, ImportConfig config, Properties parameters, NetworkFactory networkFactory, ImportersLoader loader, ReportNode reportNode) Read a network from a raw input stream, trying to guess the format from the specified filename.static Network
Read a network from the specified file, trying to guess its format, and using importers and post processors defined as services.static Network
static Network
read
(Path file, ComputationManager computationManager, ImportConfig config, Properties parameters) Read a network from the specified file, trying to guess its format, and using importers and post processors defined as services.static Network
read
(Path file, ComputationManager computationManager, ImportConfig config, Properties parameters, ImportersLoader loader) Read a network from the specified file, trying to guess its format.static Network
read
(Path file, ComputationManager computationManager, ImportConfig config, Properties parameters, ImportersLoader loader, ReportNode reportNode) static Network
read
(Path file, ComputationManager computationManager, ImportConfig config, Properties parameters, NetworkFactory networkFactory, ImportersLoader loader, ReportNode reportNode) Read a network from the specified file, trying to guess its format.static Network
read
(List<ReadOnlyDataSource> dataSources) static Network
read
(List<ReadOnlyDataSource> dataSources, Properties properties) static Network
read
(List<ReadOnlyDataSource> dataSources, Properties properties, ReportNode reportNode) static void
readAll
(Path dir, boolean parallel, ComputationManager computationManager, ImportConfig config, Consumer<Network> consumer) static void
readAll
(Path dir, boolean parallel, ComputationManager computationManager, ImportConfig config, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) static void
readAll
(Path dir, boolean parallel, ComputationManager computationManager, ImportConfig config, Properties parameters, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) static void
readAll
(Path dir, boolean parallel, ImportersLoader loader, ComputationManager computationManager, ImportConfig config, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) static void
readAll
(Path dir, boolean parallel, ImportersLoader loader, ComputationManager computationManager, ImportConfig config, Properties parameters, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) static void
readAll
(Path dir, boolean parallel, ImportersLoader loader, ComputationManager computationManager, ImportConfig config, Properties parameters, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener, ReportNode reportNode) static void
readAll
(Path dir, boolean parallel, ImportersLoader loader, ComputationManager computationManager, ImportConfig config, Properties parameters, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener, NetworkFactory networkFactory, ReportNode reportNode) static void
static void
readAll
(Path dir, boolean parallel, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) static void
void
removeListener
(NetworkListener listener) Remove a listener from the network.default ValidationLevel
If network is valid, do nothing.
If network not valid, check if each network component is valid.default ValidationLevel
runValidationChecks
(boolean throwsException) If network is valid, do nothing.
If network not valid andthrowsException
istrue
, check if each network component is valid.default ValidationLevel
runValidationChecks
(boolean throwsException, ReportNode reportNode) If network is valid, do nothing.
If network not valid andthrowsException
istrue
, check if each network component is valid.setCaseDate
(ZonedDateTime date) Set the date that the network represents.setForecastDistance
(int forecastDistance) default Network
setMinimumAcceptableValidationLevel
(ValidationLevel validationLevel) static Network.PrettyNetworkFactory
Get network factory namedname
.default void
write
(ExportersLoader loader, String format, Properties parameters, DataSource dataSource) default void
write
(ExportersLoader loader, String format, Properties parameters, DataSource dataSource, ReportNode reportNode) Write the network to a given format.default void
write
(ExportersLoader loader, String format, Properties parameters, String directory, String basename) default void
write
(ExportersLoader loader, String format, Properties parameters, String directory, String baseName, ReportNode reportNode) Write the network to a given format.default void
write
(ExportersLoader loader, String format, Properties parameters, Path file) default void
write
(ExportersLoader loader, String format, Properties parameters, Path file, ReportNode reportNode) Write the network to a given format.default void
write
(String format, Properties parameters, DataSource dataSource) default void
write
(String format, Properties parameters, String directory, String baseName) default void
write
(String format, Properties parameters, Path file) Methods inherited from interface com.powsybl.iidm.network.Container
getContainerType
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, getNetwork, getOptionalName, getParentNetwork, getProperty, getProperty, getPropertyNames, hasAliases, hasProperty, hasProperty, isFictitious, removeAlias, removeProperty, setFictitious, setName, setProperty
-
Method Details
-
getSubnetworks
-
getSubnetwork
-
read
static Network read(Path file, ComputationManager computationManager, ImportConfig config, Properties parameters, NetworkFactory networkFactory, ImportersLoader loader, ReportNode reportNode) Read a network from the specified file, trying to guess its format.- Parameters:
file
- The file to be loaded.computationManager
- A computation manager which may be used by import post-processorsconfig
- The import config, in particular definition of post processorsparameters
- Import-specific parametersnetworkFactory
- Network factoryloader
- Provides the list of available importers and post-processorsreportNode
- The reportNode used for functional logs- Returns:
- The loaded network
-
read
static Network read(Path file, ComputationManager computationManager, ImportConfig config, Properties parameters, ImportersLoader loader, ReportNode reportNode) -
read
static Network read(Path file, ComputationManager computationManager, ImportConfig config, Properties parameters, ImportersLoader loader) Read a network from the specified file, trying to guess its format.- Parameters:
file
- The file to be loaded.computationManager
- A computation manager which may be used by import post-processorsconfig
- The import config, in particular definition of post processorsparameters
- Import-specific parametersloader
- Provides the list of available importers and post-processors- Returns:
- The loaded network
-
read
static Network read(Path file, ComputationManager computationManager, ImportConfig config, Properties parameters) Read a network from the specified file, trying to guess its format, and using importers and post processors defined as services.- Parameters:
file
- The file to be loaded.computationManager
- A computation manager which may be used by import post-processorsconfig
- The import config, in particular definition of post processorsparameters
- Import-specific parameters- Returns:
- The loaded network
-
read
Read a network from the specified file, trying to guess its format, and using importers and post processors defined as services. Import will be performed using import configuration defined in default platform config, and with no importer-specific parameters. Post processors will use the defaultLocalComputationManager
, as defined in default platform config.- Parameters:
file
- The file to be loaded.- Returns:
- The loaded network
-
read
Loads a network from the specified file path, seeread(Path)
.- Parameters:
file
- The file to be loaded.- Returns:
- The loaded network
-
read
static Network read(String filename, InputStream data, ComputationManager computationManager, ImportConfig config, Properties parameters, NetworkFactory networkFactory, ImportersLoader loader, ReportNode reportNode) Read a network from a raw input stream, trying to guess the format from the specified filename. Please note that the input stream must be from a simple file, not a zipped one.- Parameters:
filename
- The name of the file to be imported.data
- The raw data from which the network should be loadedcomputationManager
- A computation manager which may be used by import post-processorsconfig
- The import config, in particular definition of post processorsparameters
- Import-specific parametersnetworkFactory
- Network factoryloader
- Provides the list of available importers and post-processorsreportNode
- The reportNode used for functional logs- Returns:
- The loaded network
-
read
static Network read(String filename, InputStream data, ComputationManager computationManager, ImportConfig config, Properties parameters, ImportersLoader loader, ReportNode reportNode) Read a network from a raw input stream, trying to guess the format from the specified filename. Please note that the input stream must be from a simple file, not a zipped one.- Parameters:
filename
- The name of the file to be imported.data
- The raw data from which the network should be loadedcomputationManager
- A computation manager which may be used by import post-processorsconfig
- The import config, in particular definition of post processorsparameters
- Import-specific parametersloader
- Provides the list of available importers and post-processorsreportNode
- The reportNode used for functional logs- Returns:
- The loaded network
-
read
static Network read(String filename, InputStream data, ComputationManager computationManager, ImportConfig config, Properties parameters, ImportersLoader loader) Read a network from a raw input stream, trying to guess the format from the specified filename. Please note that the input stream must be from a simple file, not a zipped one.- Parameters:
filename
- The name of the file to be imported.data
- The raw data from which the network should be loadedcomputationManager
- A computation manager which may be used by import post-processorsconfig
- The import config, in particular definition of post processorsparameters
- Import-specific parametersloader
- Provides the list of available importers and post-processors- Returns:
- The loaded network
-
read
static Network read(String filename, InputStream data, ComputationManager computationManager, ImportConfig config, Properties parameters) Read a network from a raw input stream, trying to guess the format from the specified filename, and using importers and post processors defined as services. Please note that the input stream must be from a simple file, not a zipped one.- Parameters:
filename
- The name of the file to be imported.data
- The raw data from which the network should be loadedcomputationManager
- A computation manager which may be used by import post-processorsconfig
- The import config, in particular definition of post processorsparameters
- Import-specific parameters- Returns:
- The loaded network
-
read
Read a network from a raw input stream, trying to guess the format from the specified filename, and using importers and post processors defined as services. Import will be performed using import configuration defined in default platform config, and with no importer-specific parameters. Please note that the input stream must be from a simple file, not a zipped one.- Parameters:
filename
- The name of the file to be imported.data
- The raw data from which the network should be loadedcomputationManager
- A computation manager which may be used by import post-processors- Returns:
- The loaded network
-
read
Read a network from a raw input stream, trying to guess the format from the specified filename, and using importers and post processors defined as services. Import will be performed using import configuration defined in default platform config, and with no importer-specific parameters. Post processors will use the defaultLocalComputationManager
, as defined in default platform config. Please note that the input stream must be from a simple file, not a zipped one.- Parameters:
filename
- The name of the file to be imported.data
- The raw data from which the network should be loaded- Returns:
- The loaded network
-
read
Read a network from a raw input stream, trying to guess the format from the specified filename, and using importers and post processors defined as services. Import will be performed using import configuration defined in default platform config, and with no importer-specific parameters. Post processors will use the defaultLocalComputationManager
, as defined in default platform config. Please note that the input stream must be from a simple file, not a zipped one.- Parameters:
filename
- The name of the file to be imported.data
- The raw data from which the network should be loadedreportNode
- The reportNode used for functional logs- Returns:
- The loaded network
-
read
-
read
-
read
-
read
-
read
-
read
-
read
-
read
static Network read(List<ReadOnlyDataSource> dataSources, Properties properties, ReportNode reportNode) -
readAll
static void readAll(Path dir, boolean parallel, ImportersLoader loader, ComputationManager computationManager, ImportConfig config, Properties parameters, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener, NetworkFactory networkFactory, ReportNode reportNode) throws IOException, InterruptedException, ExecutionException -
readAll
static void readAll(Path dir, boolean parallel, ImportersLoader loader, ComputationManager computationManager, ImportConfig config, Properties parameters, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener, ReportNode reportNode) throws IOException, InterruptedException, ExecutionException -
readAll
static void readAll(Path dir, boolean parallel, ImportersLoader loader, ComputationManager computationManager, ImportConfig config, Properties parameters, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException -
readAll
static void readAll(Path dir, boolean parallel, ImportersLoader loader, ComputationManager computationManager, ImportConfig config, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException -
readAll
static void readAll(Path dir, boolean parallel, ComputationManager computationManager, ImportConfig config, Properties parameters, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException -
readAll
static void readAll(Path dir, boolean parallel, ComputationManager computationManager, ImportConfig config, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException -
readAll
static void readAll(Path dir, boolean parallel, ComputationManager computationManager, ImportConfig config, Consumer<Network> consumer) throws IOException, InterruptedException, ExecutionException -
readAll
static void readAll(Path dir, boolean parallel, Consumer<Network> consumer) throws IOException, InterruptedException, ExecutionException -
readAll
static void readAll(Path dir, boolean parallel, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException -
readAll
static void readAll(Path dir, Consumer<Network> consumer) throws IOException, InterruptedException, ExecutionException -
create
Create an empty network using default implementation.- Parameters:
id
- id of the networksourceFormat
- source format- Returns:
- an empty network
-
merge
Create a network (using default implementation) as the result of the merge of the given networks. Each given network is represented as a subnetwork in the resulting network. As a result of that merge, the given networks are empty at the end of the call. Note that, as no id is given, the id of the network created is generated.- Returns:
- the merged network with subnetworks inside.
-
merge
Create a network (using default implementation) as the result of the merge of the given networks. Each given network is represented as a subnetwork in the resulting network. As a result of that merge, the given networks are empty at the end of the call.- Parameters:
id
- id of the network to create- Returns:
- the merged network with subnetworks inside.
-
with
Get network factory namedname
.- Parameters:
name
- name of theNetworkFactory
- Returns:
- network factory with the given name
-
getCaseDate
ZonedDateTime getCaseDate()Get the date that the network represents. -
setCaseDate
Set the date that the network represents.- Throws:
IllegalArgumentException
- if date is null.
-
getForecastDistance
int getForecastDistance()Get the forecast distance in minutes.Example: 0 for a snapshot, 6*60 to 30*60 for a DACF.
-
setForecastDistance
-
getSourceFormat
String getSourceFormat()Get the source format.- Returns:
- the source format
-
getVariantManager
VariantManager getVariantManager()Get the variant manager of the network. -
allowReportNodeContextMultiThreadAccess
void allowReportNodeContextMultiThreadAccess(boolean allow) Allows
ReportNodeContext
to be accessed simultaneously by different threads.When this option is activated, the reportNode context can have a different content for each thread.
Note that to avoid memory leaks when in multi-thread configuration:
- each reportNode pushed in the ReportNodeContext should be popped in a "finally" section:
network.getReportNodeContext().pushReportNode(reportNode); try { // code that can throw an exception } finally { network.getReportNodeContext().popReportNode(); }
- the context should be set in mono-thread access when multi-threading policy is no more useful.
- Parameters:
allow
- allow multi-thread access to the ReportNodeContext
- each reportNode pushed in the ReportNodeContext should be popped in a "finally" section:
-
getReportNodeContext
ReportNodeContext getReportNodeContext()Get theReportNodeContext
of the network. -
getCountries
Get all countries. -
getCountryCount
int getCountryCount()Get the country count. -
newSubstation
SubstationAdder newSubstation()Get a builder to create a new substation.- Returns:
- a builder to create a new substation
-
getSubstations
Iterable<Substation> getSubstations()Get all substations. -
getSubstationStream
Stream<Substation> getSubstationStream()Get all substations. -
getSubstationCount
int getSubstationCount()Get the substation count. -
getSubstations
Get substation located in a specific county, TSO and marked with a list of geographical tag.- 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
Get substation located in a specific county, TSO and marked with a list of geographical tag.- 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
Get a substation.- Parameters:
id
- the id or an alias of the substation
-
newVoltageLevel
Get a builder to create a new voltage level (without substation). Note: if this method is not implemented, it will create an intermediary fictitiousSubstation
.- Returns:
- a builder to create a new voltage level
-
getVoltageLevels
Iterable<VoltageLevel> getVoltageLevels()Get all substation voltage levels. -
getVoltageLevelStream
Stream<VoltageLevel> getVoltageLevelStream()Get all substation voltage levels. -
getVoltageLevelCount
int getVoltageLevelCount()Get the voltage level count. -
getVoltageLevel
Get a substation voltage level.- Parameters:
id
- the id or an alias of the substation voltage level
-
newLine
LineAdder newLine()Get a builder to create a new AC line.- Returns:
- a builder to create a new line
-
getLines
Get all AC lines. -
getTieLines
Get all tie lines. -
getBranch
Get a branch- Parameters:
branchId
- the id of the branch
-
getBranches
Get all branches -
getBranchStream
Get all branches -
getBranchCount
int getBranchCount()Get the branch count. -
getLineStream
Get all AC lines. -
getTieLineStream
Get all tie lines. -
getLineCount
int getLineCount()Get the AC line count. -
getTieLineCount
int getTieLineCount()Get the tie line count. -
getLine
Get a AC line.- Parameters:
id
- the id or an alias of the AC line
-
getTieLine
Get a tie line.- Parameters:
id
- the id or an alias of the AC line
-
newTieLine
TieLineAdder newTieLine()Get a builder to create a new AC tie line.- Returns:
- a builder to create a new AC tie line
-
getTwoWindingsTransformers
Iterable<TwoWindingsTransformer> getTwoWindingsTransformers()Get all two windings transformers. -
getTwoWindingsTransformerStream
Stream<TwoWindingsTransformer> getTwoWindingsTransformerStream()Get all two windings transformers. -
getTwoWindingsTransformerCount
int getTwoWindingsTransformerCount()Get the two windings transformer count. -
getTwoWindingsTransformer
Get a two windings transformer.- Parameters:
id
- the id or an alias of the two windings transformer
-
getThreeWindingsTransformers
Iterable<ThreeWindingsTransformer> getThreeWindingsTransformers()Get all 3 windings transformers. -
getThreeWindingsTransformerStream
Stream<ThreeWindingsTransformer> getThreeWindingsTransformerStream()Get all 3 windings transformers. -
getThreeWindingsTransformerCount
int getThreeWindingsTransformerCount()Get the 3 windings transformer count. -
getThreeWindingsTransformer
Get a 3 windings transformer.- Parameters:
id
- the id or an alias of the 3 windings transformer
-
getOverloadManagementSystems
Iterable<OverloadManagementSystem> getOverloadManagementSystems()Get all overload management systems. -
getOverloadManagementSystemStream
Stream<OverloadManagementSystem> getOverloadManagementSystemStream()Get all overload management systems. -
getOverloadManagementSystemCount
int getOverloadManagementSystemCount()Get the overload management system count. -
getOverloadManagementSystem
Get an overload management system.- Parameters:
id
- the id or an alias of the overload management system
-
getGenerators
Get all generators. -
getGeneratorStream
Get all generators. -
getGeneratorCount
int getGeneratorCount()Get the generator count. -
getGenerator
Get a generator.- Parameters:
id
- the id or an alias of the generator
-
getBatteries
Get all batteries. -
getBatteryStream
Get all batteries. -
getBatteryCount
int getBatteryCount()Get the battery count. -
getBattery
Get a battery.- Parameters:
id
- the id or an alias of the battery
-
getLoads
Get all loads. -
getLoadStream
Get all loads. -
getLoadCount
int getLoadCount()Get the load count. -
getLoad
Get a load.- Parameters:
id
- the id or an alias of the load
-
getShuntCompensators
Iterable<ShuntCompensator> getShuntCompensators()Get all compensator shunts. -
getShuntCompensatorStream
Stream<ShuntCompensator> getShuntCompensatorStream()Get all compensator shunts. -
getShuntCompensatorCount
int getShuntCompensatorCount()Get the shunt count. -
getShuntCompensator
Get a compensator shunt.- Parameters:
id
- the id or an alias of the compensator shunt
-
getDanglingLines
Get all dangling lines corresponding to given filter. -
getDanglingLines
Get all dangling lines. -
getDanglingLineStream
Get the dangling lines corresponding to given filter. -
getDanglingLineStream
Get all the dangling lines. -
getDanglingLineCount
int getDanglingLineCount()Get the dangling line count. -
getDanglingLine
Get a dangling line.- Parameters:
id
- the id or an alias of the dangling line
-
getStaticVarCompensators
Iterable<StaticVarCompensator> getStaticVarCompensators()Get all static var compensators. -
getStaticVarCompensatorStream
Stream<StaticVarCompensator> getStaticVarCompensatorStream()Get all static var compensators. -
getStaticVarCompensatorCount
int getStaticVarCompensatorCount()Get the static var compensator count. -
getStaticVarCompensator
Get a static var compensator.- Parameters:
id
- the id or an alias of the static var compensator
-
getSwitch
Get a switch from its id or an alias.- Parameters:
id
- id or an alias of the switch- Returns:
- the switch
-
getSwitches
Get all switches.- Returns:
- all switches
-
getSwitchStream
Get all switches.- Returns:
- all switches
-
getSwitchCount
int getSwitchCount()Get the switch count.- Returns:
- the switch count
-
getBusbarSection
Get a busbar section from its id or an alias.- Parameters:
id
- the id or an alias of the busbar section- Returns:
- the busbar section
-
getBusbarSections
Iterable<BusbarSection> getBusbarSections()Get all busbar sections.- Returns:
- all busbar sections
-
getBusbarSectionStream
Stream<BusbarSection> getBusbarSectionStream()Get all busbar sections.- Returns:
- all busbar sections
-
getBusbarSectionCount
int getBusbarSectionCount()Get the busbar section count.- Returns:
- the busbar section count.
-
getHvdcConverterStations
Iterable<HvdcConverterStation<?>> getHvdcConverterStations()Get all HVDC converter stations.- Returns:
- all HVDC converter stations
-
getHvdcConverterStationStream
Stream<HvdcConverterStation<?>> getHvdcConverterStationStream()Get all HVDC converter stations.- Returns:
- all HVDC converter stations
-
getHvdcConverterStationCount
int getHvdcConverterStationCount()Get HVDC converter stations count.- Returns:
- HVDC converter station count
-
getHvdcConverterStation
Get an HVDC converter station.- Parameters:
id
- the id or an alias of the HVDC converter station- Returns:
- the HVDC converter station or null if not found
-
getLccConverterStations
Iterable<LccConverterStation> getLccConverterStations()Get all LCC converter stations.- Returns:
- all LCC converter stations
-
getLccConverterStationStream
Stream<LccConverterStation> getLccConverterStationStream()Get all LCC converter stations.- Returns:
- all LCC converter stations
-
getLccConverterStationCount
int getLccConverterStationCount()Get LCC converter stations count.- Returns:
- LCC converter station count
-
getLccConverterStation
Get an LCC converter station.- Parameters:
id
- the id or an alias of the LCC converter station- Returns:
- the LCC converter station or null if not found
-
getVscConverterStations
Iterable<VscConverterStation> getVscConverterStations()Get all VSC converter stations.- Returns:
- all VSC converter stations
-
getVscConverterStationStream
Stream<VscConverterStation> getVscConverterStationStream()Get all VSC converter stations.- Returns:
- all VSC converter stations
-
getVscConverterStationCount
int getVscConverterStationCount()Get VSC converter stations count.- Returns:
- VSC converter station count
-
getVscConverterStation
Get an VSC converter station.- Parameters:
id
- the id or an alias of the VSC converter station- Returns:
- the VSC converter station or null if not found
-
getHvdcLines
Get all HVDC lines.- Returns:
- all HVDC lines
-
getHvdcLineStream
Get all HVDC lines.- Returns:
- all HVDC lines
-
getHvdcLineCount
int getHvdcLineCount()Get HVDC lines count.- Returns:
- HVDC lines count
-
getHvdcLine
Get an HVDC line.- Parameters:
id
- the id or an alias of the HVDC line- Returns:
- the HVDC line or null if not found
-
getHvdcLine
Get an HVDC line from a converter station- Parameters:
converterStation
- a HVDC converter station- Returns:
- the HVDC line or null if not found
-
newHvdcLine
HvdcLineAdder newHvdcLine()Get a builder to create a new HVDC line.- Returns:
- a builder to create a new HVDC line
-
getGrounds
Get all grounds. -
getGroundStream
Get all grounds. -
getGroundCount
int getGroundCount()Get the ground count. -
getGround
Get a ground.- Parameters:
id
- the id or an alias of the ground
-
getIdentifiable
* Get an identifiable by its ID or alias- Parameters:
id
- the id or an alias of the identifiable
-
getIdentifiables
Collection<Identifiable<?>> getIdentifiables()Get all identifiables of the network.- Returns:
- all identifiables of the network
-
getConnectables
Get all connectables of the network for a given type- Parameters:
clazz
- connectable type class- Returns:
- all the connectables of the given type
-
getConnectableStream
Get a stream of all connectables of the network for a given type- Parameters:
clazz
- connectable type class- Returns:
- a stream of all the connectables of the given type
-
getConnectableCount
Count the connectables of the network for a given type- Parameters:
clazz
- connectable type class- Returns:
- the count of all the connectables of the given type
-
getConnectables
Get all connectables of the network- Returns:
- all the connectables
-
getConnectableStream
Get a stream of all connectables of the network- Returns:
- a stream of all the connectables
-
getConnectable
Get a connectable by its ID or alias- Parameters:
id
- the id or an alias of the equipment
-
getConnectableCount
default int getConnectableCount()Count the connectables of the network- Returns:
- the count of all the connectables
-
getBusBreakerView
Network.BusBreakerView getBusBreakerView()Get a bus/breaker view of the network. -
getBusView
Network.BusView getBusView()Get a bus view of the network. -
newVoltageAngleLimit
VoltageAngleLimitAdder newVoltageAngleLimit()Get a builder to create a new VoltageAngleLimit. -
getVoltageAngleLimits
Iterable<VoltageAngleLimit> getVoltageAngleLimits()Get all voltageAngleLimits. -
getVoltageAngleLimitsStream
Stream<VoltageAngleLimit> getVoltageAngleLimitsStream()Get all voltageAngleLimits. -
getVoltageAngleLimit
Get voltage angle limit with id -
createSubnetwork
Create an empty subnetwork in the current network.- Parameters:
subnetworkId
- id of the subnetworkname
- subnetwork's namesourceFormat
- source format- Returns:
- the created subnetwork
-
detach
Network 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.- Returns:
- a fully-independent network corresponding to the current network and its subnetworks.
-
isDetachable
boolean isDetachable()Check if the current network can be detached from its parent network (with
detach()
).- Returns:
- True if the network can be detached from its parent network.
-
getBoundaryElements
Set<Identifiable<?>> getBoundaryElements()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.- Returns:
- a set containing the boundary elements of the network.
-
isBoundaryElement
Check if an identifiable is a boundary element for the current network.- Parameters:
identifiable
- the identifiable to check- Returns:
- True if the identifiable is a boundary element for the current network
-
addListener
Add a listener on the network.
- Parameters:
listener
- the listener to add
-
removeListener
Remove a listener from the network.
- Parameters:
listener
- the listener to remove
-
getType
Description copied from interface:Identifiable
Get identifiable type.- Specified by:
getType
in interfaceIdentifiable<Network>
- Returns:
- the identifiable type
-
runValidationChecks
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. -
runValidationChecks
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. -
runValidationChecks
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. -
getValidationLevel
Return the network validation status. Do not run any validation check. -
setMinimumAcceptableValidationLevel
-
getIdentifiableStream
-
write
default void write(ExportersLoader loader, String format, Properties parameters, DataSource dataSource, ReportNode reportNode) Write the network to a given format.- Parameters:
format
- the export formatparameters
- some properties to configure the exportdataSource
- data sourcereportNode
- the reportNode used for functional logs
-
write
default void write(ExportersLoader loader, String format, Properties parameters, DataSource dataSource) -
write
-
write
default void write(ExportersLoader loader, String format, Properties parameters, Path file, ReportNode reportNode) Write the network to a given format.- Parameters:
format
- the export formatparameters
- some properties to configure the exportfile
- the network filereportNode
- the reportNode used for functional logs
-
write
-
write
-
write
default void write(ExportersLoader loader, String format, Properties parameters, String directory, String baseName, ReportNode reportNode) Write the network to a given format.- Parameters:
format
- the export formatparameters
- some properties to configure the exportdirectory
- the output directory where files are generatedbaseName
- a base name for all generated filesreportNode
- the reportNode used for functional logs
-
write
default void write(ExportersLoader loader, String format, Properties parameters, String directory, String basename) -
write
-