Interface Network

All Superinterfaces:
Container<Network>, Extendable<Network>, Identifiable<Network>
All Known Subinterfaces:
NetworkExt
All Known Implementing Classes:
NetworkImpl, SubnetworkImpl

public interface Network extends Container<Network>
A power network model.

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
To create a new empty network with default implementation:
    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:
  • Method Details

    • getSubnetworks

      default Collection<Network> getSubnetworks()
    • getSubnetwork

      default Network getSubnetwork(String id)
    • 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-processors
      config - The import config, in particular definition of post processors
      parameters - Import-specific parameters
      networkFactory - Network factory
      loader - Provides the list of available importers and post-processors
      reportNode - 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-processors
      config - The import config, in particular definition of post processors
      parameters - Import-specific parameters
      loader - 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-processors
      config - The import config, in particular definition of post processors
      parameters - Import-specific parameters
      Returns:
      The loaded network
    • read

      static Network read(Path file)
      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 default LocalComputationManager, as defined in default platform config.
      Parameters:
      file - The file to be loaded.
      Returns:
      The loaded network
    • read

      static Network read(String file)
      Loads a network from the specified file path, see read(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 loaded
      computationManager - A computation manager which may be used by import post-processors
      config - The import config, in particular definition of post processors
      parameters - Import-specific parameters
      networkFactory - Network factory
      loader - Provides the list of available importers and post-processors
      reportNode - 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 loaded
      computationManager - A computation manager which may be used by import post-processors
      config - The import config, in particular definition of post processors
      parameters - Import-specific parameters
      loader - Provides the list of available importers and post-processors
      reportNode - 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 loaded
      computationManager - A computation manager which may be used by import post-processors
      config - The import config, in particular definition of post processors
      parameters - Import-specific parameters
      loader - 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 loaded
      computationManager - A computation manager which may be used by import post-processors
      config - The import config, in particular definition of post processors
      parameters - Import-specific parameters
      Returns:
      The loaded network
    • read

      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. 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 loaded
      computationManager - A computation manager which may be used by import post-processors
      Returns:
      The loaded network
    • read

      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. Import will be performed using import configuration defined in default platform config, and with no importer-specific parameters. Post processors will use the default LocalComputationManager, 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

      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. Import will be performed using import configuration defined in default platform config, and with no importer-specific parameters. Post processors will use the default LocalComputationManager, 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
      reportNode - The reportNode used for functional logs
      Returns:
      The loaded network
    • read

      static Network read(ReadOnlyDataSource dataSource)
    • read

      static Network read(ReadOnlyDataSource dataSource, Properties properties)
    • read

      static Network read(ReadOnlyDataSource dataSource, Properties properties, ReportNode reportNode)
    • read

      static Network read(ReadOnlyDataSource... dataSources)
    • read

      static Network read(Path... files)
    • read

      static Network read(List<ReadOnlyDataSource> dataSources)
    • read

      static Network read(List<ReadOnlyDataSource> dataSources, Properties properties)
    • 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
      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
      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
      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
      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
      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
      Throws:
      IOException
      InterruptedException
      ExecutionException
    • readAll

      static void readAll(Path dir, boolean parallel, ComputationManager computationManager, ImportConfig config, Consumer<Network> consumer) throws IOException, InterruptedException, ExecutionException
      Throws:
      IOException
      InterruptedException
      ExecutionException
    • readAll

      static void readAll(Path dir, boolean parallel, Consumer<Network> consumer) throws IOException, InterruptedException, ExecutionException
      Throws:
      IOException
      InterruptedException
      ExecutionException
    • readAll

      static void readAll(Path dir, boolean parallel, Consumer<Network> consumer, Consumer<ReadOnlyDataSource> listener) throws IOException, InterruptedException, ExecutionException
      Throws:
      IOException
      InterruptedException
      ExecutionException
    • readAll

      static void readAll(Path dir, Consumer<Network> consumer) throws IOException, InterruptedException, ExecutionException
      Throws:
      IOException
      InterruptedException
      ExecutionException
    • create

      static Network create(String id, String sourceFormat)
      Create an empty network using default implementation.
      Parameters:
      id - id of the network
      sourceFormat - source format
      Returns:
      an empty network
    • merge

      static Network merge(Network... networks)
      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

      static Network merge(String id, Network... networks)
      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 named name.
      Parameters:
      name - name of the NetworkFactory
      Returns:
      network factory with the given name
    • getCaseDate

      ZonedDateTime getCaseDate()
      Get the date that the network represents.
    • setCaseDate

      Network setCaseDate(ZonedDateTime date)
      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

      Network setForecastDistance(int forecastDistance)
    • 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
    • getReportNodeContext

      ReportNodeContext getReportNodeContext()
      Get the ReportNodeContext of the network.
    • getCountries

      Set<Country> 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

      Iterable<Substation> getSubstations(Country country, String tsoId, String... geographicalTags)
      Get substation located in a specific county, TSO and marked with a list of geographical tag.
      Parameters:
      country - the country, if null there is no filtering on countries
      tsoId - the id of the TSO, if null there is no filtering on TSOs
      geographicalTags - a list a geographical tags
    • getSubstations

      Iterable<Substation> getSubstations(String country, String tsoId, String... geographicalTags)
      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, if null there is no filtering on countries
      tsoId - the id of the TSO, if null there is no filtering on TSOs
      geographicalTags - a list a geographical tags
    • getSubstation

      Substation getSubstation(String id)
      Get a substation.
      Parameters:
      id - the id or an alias of the substation
    • newVoltageLevel

      default VoltageLevelAdder newVoltageLevel()
      Get a builder to create a new voltage level (without substation). Note: if this method is not implemented, it will create an intermediary fictitious Substation.
      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

      VoltageLevel getVoltageLevel(String id)
      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

      Iterable<Line> getLines()
      Get all AC lines.
    • getTieLines

      Iterable<TieLine> getTieLines()
      Get all tie lines.
    • getBranch

      Branch getBranch(String branchId)
      Get a branch
      Parameters:
      branchId - the id of the branch
    • getBranches

      Iterable<Branch> getBranches()
      Get all branches
    • getBranchStream

      Stream<Branch> getBranchStream()
      Get all branches
    • getBranchCount

      int getBranchCount()
      Get the branch count.
    • getLineStream

      Stream<Line> getLineStream()
      Get all AC lines.
    • getTieLineStream

      Stream<TieLine> getTieLineStream()
      Get all tie lines.
    • getLineCount

      int getLineCount()
      Get the AC line count.
    • getTieLineCount

      int getTieLineCount()
      Get the tie line count.
    • getLine

      Line getLine(String id)
      Get a AC line.
      Parameters:
      id - the id or an alias of the AC line
    • getTieLine

      TieLine getTieLine(String id)
      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

      TwoWindingsTransformer getTwoWindingsTransformer(String id)
      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

      ThreeWindingsTransformer getThreeWindingsTransformer(String id)
      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

      OverloadManagementSystem getOverloadManagementSystem(String id)
      Get an overload management system.
      Parameters:
      id - the id or an alias of the overload management system
    • getGenerators

      Iterable<Generator> getGenerators()
      Get all generators.
    • getGeneratorStream

      Stream<Generator> getGeneratorStream()
      Get all generators.
    • getGeneratorCount

      int getGeneratorCount()
      Get the generator count.
    • getGenerator

      Generator getGenerator(String id)
      Get a generator.
      Parameters:
      id - the id or an alias of the generator
    • getBatteries

      Iterable<Battery> getBatteries()
      Get all batteries.
    • getBatteryStream

      Stream<Battery> getBatteryStream()
      Get all batteries.
    • getBatteryCount

      int getBatteryCount()
      Get the battery count.
    • getBattery

      Battery getBattery(String id)
      Get a battery.
      Parameters:
      id - the id or an alias of the battery
    • getLoads

      Iterable<Load> getLoads()
      Get all loads.
    • getLoadStream

      Stream<Load> getLoadStream()
      Get all loads.
    • getLoadCount

      int getLoadCount()
      Get the load count.
    • getLoad

      Load getLoad(String id)
      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

      ShuntCompensator getShuntCompensator(String id)
      Get a compensator shunt.
      Parameters:
      id - the id or an alias of the compensator shunt
    • getDanglingLines

      Iterable<DanglingLine> getDanglingLines(DanglingLineFilter danglingLineFilter)
      Get all dangling lines corresponding to given filter.
    • getDanglingLines

      default Iterable<DanglingLine> getDanglingLines()
      Get all dangling lines.
    • getDanglingLineStream

      Stream<DanglingLine> getDanglingLineStream(DanglingLineFilter danglingLineFilter)
      Get the dangling lines corresponding to given filter.
    • getDanglingLineStream

      default Stream<DanglingLine> getDanglingLineStream()
      Get all the dangling lines.
    • getDanglingLineCount

      int getDanglingLineCount()
      Get the dangling line count.
    • getDanglingLine

      DanglingLine getDanglingLine(String id)
      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

      StaticVarCompensator getStaticVarCompensator(String id)
      Get a static var compensator.
      Parameters:
      id - the id or an alias of the static var compensator
    • getSwitch

      Switch getSwitch(String id)
      Get a switch from its id or an alias.
      Parameters:
      id - id or an alias of the switch
      Returns:
      the switch
    • getSwitches

      Iterable<Switch> getSwitches()
      Get all switches.
      Returns:
      all switches
    • getSwitchStream

      Stream<Switch> getSwitchStream()
      Get all switches.
      Returns:
      all switches
    • getSwitchCount

      int getSwitchCount()
      Get the switch count.
      Returns:
      the switch count
    • getBusbarSection

      BusbarSection getBusbarSection(String id)
      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

      HvdcConverterStation<?> getHvdcConverterStation(String id)
      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

      LccConverterStation getLccConverterStation(String id)
      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

      VscConverterStation getVscConverterStation(String id)
      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

      Iterable<HvdcLine> getHvdcLines()
      Get all HVDC lines.
      Returns:
      all HVDC lines
    • getHvdcLineStream

      Stream<HvdcLine> getHvdcLineStream()
      Get all HVDC lines.
      Returns:
      all HVDC lines
    • getHvdcLineCount

      int getHvdcLineCount()
      Get HVDC lines count.
      Returns:
      HVDC lines count
    • getHvdcLine

      HvdcLine getHvdcLine(String id)
      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

      default HvdcLine getHvdcLine(HvdcConverterStation converterStation)
      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

      Iterable<Ground> getGrounds()
      Get all grounds.
    • getGroundStream

      Stream<Ground> getGroundStream()
      Get all grounds.
    • getGroundCount

      int getGroundCount()
      Get the ground count.
    • getGround

      Ground getGround(String id)
      Get a ground.
      Parameters:
      id - the id or an alias of the ground
    • getIdentifiable

      Identifiable<?> getIdentifiable(String id)
      * 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

      default <C extends Connectable> Iterable<C> getConnectables(Class<C> clazz)
      Get all connectables of the network for a given type
      Parameters:
      clazz - connectable type class
      Returns:
      all the connectables of the given type
    • getConnectableStream

      default <C extends Connectable> Stream<C> getConnectableStream(Class<C> clazz)
      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

      default <C extends Connectable> int getConnectableCount(Class<C> clazz)
      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

      default Iterable<Connectable> getConnectables()
      Get all connectables of the network
      Returns:
      all the connectables
    • getConnectableStream

      default Stream<Connectable> getConnectableStream()
      Get a stream of all connectables of the network
      Returns:
      a stream of all the connectables
    • getConnectable

      default Connectable<?> getConnectable(String id)
      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

      VoltageAngleLimit getVoltageAngleLimit(String id)
      Get voltage angle limit with id
    • createSubnetwork

      Network createSubnetwork(String subnetworkId, String name, String sourceFormat)
      Create an empty subnetwork in the current network.
      Parameters:
      subnetworkId - id of the subnetwork
      name - subnetwork's name
      sourceFormat - 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

      boolean isBoundaryElement(Identifiable<?> identifiable)
      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

      void addListener(NetworkListener listener)

      Add a listener on the network.

      Parameters:
      listener - the listener to add
    • removeListener

      void removeListener(NetworkListener listener)

      Remove a listener from the network.

      Parameters:
      listener - the listener to remove
    • getType

      default IdentifiableType getType()
      Description copied from interface: Identifiable
      Get identifiable type.
      Specified by:
      getType in interface Identifiable<Network>
      Returns:
      the identifiable type
    • runValidationChecks

      default ValidationLevel runValidationChecks()
      If network is valid, do nothing.
      If network not valid, check if each network component is valid. A ValidationException 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

      default ValidationLevel runValidationChecks(boolean throwsException)
      If network is valid, do nothing.
      If network not valid and throwsException is true, check if each network component is valid. A ValidationException 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

      default ValidationLevel runValidationChecks(boolean throwsException, ReportNode reportNode)
      If network is valid, do nothing.
      If network not valid and throwsException is true, check if each network component is valid. A ValidationException 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

      default ValidationLevel getValidationLevel()
      Return the network validation status. Do not run any validation check.
    • setMinimumAcceptableValidationLevel

      default Network setMinimumAcceptableValidationLevel(ValidationLevel validationLevel)
    • getIdentifiableStream

      default Stream<Identifiable<?>> getIdentifiableStream(IdentifiableType identifiableType)
    • 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 format
      parameters - some properties to configure the export
      dataSource - data source
      reportNode - the reportNode used for functional logs
    • write

      default void write(ExportersLoader loader, String format, Properties parameters, DataSource dataSource)
    • write

      default void write(String format, Properties parameters, DataSource dataSource)
    • 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 format
      parameters - some properties to configure the export
      file - the network file
      reportNode - the reportNode used for functional logs
    • write

      default void write(ExportersLoader loader, String format, Properties parameters, Path file)
    • write

      default void write(String format, Properties parameters, Path file)
    • 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 format
      parameters - some properties to configure the export
      directory - the output directory where files are generated
      baseName - a base name for all generated files
      reportNode - the reportNode used for functional logs
    • write

      default void write(ExportersLoader loader, String format, Properties parameters, String directory, String basename)
    • write

      default void write(String format, Properties parameters, String directory, String baseName)