Package com.powsybl.iidm.mergingview
Class MergingView
- java.lang.Object
-
- com.powsybl.iidm.mergingview.MergingView
-
- All Implemented Interfaces:
Extendable<Network>
,MultiVariantObject
,Container<Network>
,Identifiable<Network>
,Network
public final class MergingView extends Object implements Network, MultiVariantObject
Not destructive network merge.- Author:
- Thomas Adam
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.powsybl.iidm.network.Network
Network.BusBreakerView, Network.BusView, Network.PrettyNetworkFactory
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <E extends Extension<Network>>
voidaddExtension(Class<? super E> type, E extension)
Add en extension to this extendable object.void
addListener(NetworkListener listener)
void
cloneVariant(String sourceVariantId, List<String> targetVariantIds)
static MergingView
create(String id, String format)
Public constructorIterable<Battery>
getBatteries()
Get all batteries.Battery
getBattery(String id)
Get a battery.int
getBatteryCount()
Get the battery count.Stream<Battery>
getBatteryStream()
Get all batteries.Branch
getBranch(String id)
Get a branchint
getBranchCount()
Get the branch count.Iterable<Branch>
getBranches()
Get all branchesStream<Branch>
getBranchStream()
Get all branchesBusbarSection
getBusbarSection(String id)
Get a busbar section from its id or an alias.int
getBusbarSectionCount()
Get the busbar section count.Iterable<BusbarSection>
getBusbarSections()
Get all busbar sections.Stream<BusbarSection>
getBusbarSectionStream()
Get all busbar sections.Network.BusBreakerView
getBusBreakerView()
Get a bus/breaker view of the network.Network.BusView
getBusView()
Get a bus view of the network.org.joda.time.DateTime
getCaseDate()
Get the date that the network represents.Connectable<?>
getConnectable(String id)
Get a connectable by its ID or aliasint
getConnectableCount()
Count the connectables of the network<C extends Connectable>
intgetConnectableCount(Class<C> clazz)
Count the connectables of the network for a given typeIterable<Connectable>
getConnectables()
Get all connectables of the network<C extends Connectable>
Iterable<C>getConnectables(Class<C> clazz)
Get all connectables of the network for a given typeStream<Connectable>
getConnectableStream()
Get 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 typeContainerType
getContainerType()
Set<Country>
getCountries()
Get all countries.int
getCountryCount()
Get the country count.DanglingLine
getDanglingLine(String id)
Get a dangling line.int
getDanglingLineCount()
Get the dangling line count.Iterable<DanglingLine>
getDanglingLines(DanglingLineFilter danglingLineFilter)
Get all dangling lines corresponding to given filter.Stream<DanglingLine>
getDanglingLineStream(DanglingLineFilter danglingLineFilter)
Get the dangling lines corresponding to given filter.<E extends Extension<Network>>
EgetExtension(Class<? super E> type)
Get an extension based on its class type.<E extends Extension<Network>>
EgetExtensionByName(String name)
Get an extension based on its name.<E extends Extension<Network>>
Collection<E>getExtensions()
Get all extensions associated with this extendable object..int
getForecastDistance()
Get the forecast distance in minutes.Generator
getGenerator(String id)
Get a generator.int
getGeneratorCount()
Get the generator count.Iterable<Generator>
getGenerators()
Get all generators.Stream<Generator>
getGeneratorStream()
Get all generators.HvdcConverterStation<?>
getHvdcConverterStation(String id)
Get an HVDC converter station.int
getHvdcConverterStationCount()
Get HVDC converter stations count.Iterable<HvdcConverterStation<?>>
getHvdcConverterStations()
Get all HVDC converter stations.Stream<HvdcConverterStation<?>>
getHvdcConverterStationStream()
Get all HVDC converter stations.HvdcLine
getHvdcLine(String id)
Get an HVDC line.int
getHvdcLineCount()
Get HVDC lines count.Iterable<HvdcLine>
getHvdcLines()
Get all HVDC lines.Stream<HvdcLine>
getHvdcLineStream()
Get all HVDC lines.String
getId()
Get the unique identifier of the object.Identifiable<?>
getIdentifiable(String id)
Get an equipment by its ID or aliasCollection<Identifiable<?>>
getIdentifiables()
Get all identifiables of the network.String
getImplementationName()
Returns a name that is used to find matchingExtensionAdderProvider
s when selecting implementations of extensions inExtendable.newExtension(java.lang.Class<B>)
.LccConverterStation
getLccConverterStation(String id)
Get an LCC converter station.int
getLccConverterStationCount()
Get LCC converter stations count.Iterable<LccConverterStation>
getLccConverterStations()
Get all LCC converter stations.Stream<LccConverterStation>
getLccConverterStationStream()
Get all LCC converter stations.Line
getLine(String id)
Get a AC line.int
getLineCount()
Get the AC line count.Iterable<Line>
getLines()
Get all AC lines.Stream<Line>
getLineStream()
Get all AC lines.Load
getLoad(String id)
Get a load.int
getLoadCount()
Get the load count.Iterable<Load>
getLoads()
Get all loads.Stream<Load>
getLoadStream()
Get all loads.String
getNameOrId()
Get the name of the object if it exists.Network
getNetwork()
Get the network associated to the object.Network
getNetwork(String id)
Optional<String>
getOptionalName()
Return an optional containing the name of the object if it exists.String
getProperty(String key)
Get property associated to specified key.String
getProperty(String key, String defaultValue)
Get property associated to specified key, with default value.Set<String>
getPropertyNames()
Get properties key values.ShuntCompensator
getShuntCompensator(String id)
Get a compensator shunt.int
getShuntCompensatorCount()
Get the shunt count.Iterable<ShuntCompensator>
getShuntCompensators()
Get all compensator shunts.Stream<ShuntCompensator>
getShuntCompensatorStream()
Get all compensator shunts.String
getSourceFormat()
Get the source format.StaticVarCompensator
getStaticVarCompensator(String id)
Get a static var compensator.int
getStaticVarCompensatorCount()
Get the static var compensator count.Iterable<StaticVarCompensator>
getStaticVarCompensators()
Get all static var compensators.Stream<StaticVarCompensator>
getStaticVarCompensatorStream()
Get all static var compensators.Substation
getSubstation(String id)
Get a substation.int
getSubstationCount()
Get the substation count.Iterable<Substation>
getSubstations()
Get all substations.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.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.Stream<Substation>
getSubstationStream()
Get all substations.Switch
getSwitch(String id)
Get a switch from its id or an alias.int
getSwitchCount()
Get the switch count.Iterable<Switch>
getSwitches()
Get all switches.Stream<Switch>
getSwitchStream()
Get all switches.ThreeWindingsTransformer
getThreeWindingsTransformer(String id)
Get a 3 windings transformer.int
getThreeWindingsTransformerCount()
Get the 3 windings transformer count.Iterable<ThreeWindingsTransformer>
getThreeWindingsTransformers()
Get all 3 windings transformers.Stream<ThreeWindingsTransformer>
getThreeWindingsTransformerStream()
Get all 3 windings transformers.TieLine
getTieLine(String id)
Get a tie line.int
getTieLineCount()
Get the tie line count.Iterable<TieLine>
getTieLines()
Get all tie lines.Stream<TieLine>
getTieLineStream()
Get all tie lines.TwoWindingsTransformer
getTwoWindingsTransformer(String id)
Get a two windings transformer.int
getTwoWindingsTransformerCount()
Get the two windings transformer count.Iterable<TwoWindingsTransformer>
getTwoWindingsTransformers()
Get all two windings transformers.Stream<TwoWindingsTransformer>
getTwoWindingsTransformerStream()
Get all two windings transformers.ValidationLevel
getValidationLevel()
Return the network validation status.VariantManager
getVariantManager()
Get the variant manager of the network.VoltageLevel
getVoltageLevel(String id)
Get a substation voltage level.int
getVoltageLevelCount()
Get the voltage level count.Iterable<VoltageLevel>
getVoltageLevels()
Get all substation voltage levels.Stream<VoltageLevel>
getVoltageLevelStream()
Get all substation voltage levels.VscConverterStation
getVscConverterStation(String id)
Get an VSC converter station.int
getVscConverterStationCount()
Get VSC converter stations count.Iterable<VscConverterStation>
getVscConverterStations()
Get all VSC converter stations.Stream<VscConverterStation>
getVscConverterStationStream()
Get all VSC converter stations.boolean
hasProperty()
Check that this object has some properties.boolean
hasProperty(String key)
Check that this object has property with specified name.boolean
isFictitious()
Get the fictitious statusvoid
merge(Network other)
Merge with an other network.void
merge(Network... others)
<E extends Extension<Network>,B extends ExtensionAdder<Network,E>>
BnewExtension(Class<B> type)
Returns an extensionAdder to build and add an extension for this extendable.HvdcLineAdder
newHvdcLine()
Get a builder to create a new HVDC line.LineAdder
newLine()
Get a builder to create a new AC line.com.powsybl.iidm.mergingview.SubstationAdderAdapter
newSubstation()
Get a builder to create a new substation.TieLineAdder
newTieLine()
Get a builder to create a new AC tie line.<E extends Extension<Network>>
booleanremoveExtension(Class<E> type)
Remove an extension based on its class type.void
removeListener(NetworkListener listener)
boolean
removeProperty(String key)
Remove property with specified key.void
removeVariant(String variantId)
ValidationLevel
runValidationChecks()
If network is valid, do nothing.
If network not valid, check if each network component is valid.ValidationLevel
runValidationChecks(boolean throwsException)
If network is valid, do nothing.
If network not valid andthrowsException
istrue
, check if each network component is valid.ValidationLevel
runValidationChecks(boolean throwsException, Reporter reporter)
If network is valid, do nothing.
If network not valid andthrowsException
istrue
, check if each network component is valid.Network
setCaseDate(org.joda.time.DateTime date)
Set the date that the network represents.void
setFictitious(boolean fictitious)
Set the fictitious statusNetwork
setForecastDistance(int forecastDistance)
String
setProperty(String key, String value)
Set property value associated to specified key.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.powsybl.iidm.network.Identifiable
addAlias, addAlias, addAlias, addAlias, getAliases, getAliasFromType, getAliasType, getName, getProperties, hasAliases, removeAlias, setName
-
Methods inherited from interface com.powsybl.iidm.network.Network
getDanglingLines, getDanglingLineStream, getHvdcLine, getIdentifiableStream, getType, newThreeWindingsTransformer, newTwoWindingsTransformer, newVoltageLevel, setMinimumAcceptableValidationLevel, write, write, write, write, write, write, write, write, write
-
-
-
-
Method Detail
-
create
public static MergingView create(String id, String format)
Public constructor- Parameters:
id
- id of the networkformat
- source format- Returns:
- an empty network
-
merge
public void merge(Network other)
Description copied from interface:Network
Merge with an other network. At the end of the merge the other network is empty.
-
getContainerType
public ContainerType getContainerType()
- Specified by:
getContainerType
in interfaceContainer<Network>
-
getId
public String getId()
Description copied from interface:Identifiable
Get the unique identifier of the object.- Specified by:
getId
in interfaceIdentifiable<Network>
-
getOptionalName
public Optional<String> 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<Network>
-
getNameOrId
public String 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<Network>
-
getCaseDate
public org.joda.time.DateTime getCaseDate()
Description copied from interface:Network
Get the date that the network represents.- Specified by:
getCaseDate
in interfaceNetwork
-
setCaseDate
public Network setCaseDate(org.joda.time.DateTime date)
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
public Network setForecastDistance(int forecastDistance)
- Specified by:
setForecastDistance
in interfaceNetwork
-
getNetwork
public Network getNetwork()
Description copied from interface:Identifiable
Get the network associated to the object.- Specified by:
getNetwork
in interfaceIdentifiable<Network>
-
hasProperty
public boolean hasProperty()
Description copied from interface:Identifiable
Check that this object has some properties.- Specified by:
hasProperty
in interfaceIdentifiable<Network>
-
hasProperty
public boolean hasProperty(String key)
Description copied from interface:Identifiable
Check that this object has property with specified name.- Specified by:
hasProperty
in interfaceIdentifiable<Network>
-
getProperty
public String getProperty(String key)
Description copied from interface:Identifiable
Get property associated to specified key.- Specified by:
getProperty
in interfaceIdentifiable<Network>
-
getProperty
public String getProperty(String key, String defaultValue)
Description copied from interface:Identifiable
Get property associated to specified key, with default value.- Specified by:
getProperty
in interfaceIdentifiable<Network>
-
setProperty
public String setProperty(String key, String value)
Description copied from interface:Identifiable
Set property value associated to specified key.- Specified by:
setProperty
in interfaceIdentifiable<Network>
-
removeProperty
public boolean removeProperty(String key)
Description copied from interface:Identifiable
Remove property with specified key.- Specified by:
removeProperty
in interfaceIdentifiable<Network>
- Parameters:
key
- the property key- Returns:
true
if property exists and has been removed,false
otherwise
-
getPropertyNames
public Set<String> getPropertyNames()
Description copied from interface:Identifiable
Get properties key values.- Specified by:
getPropertyNames
in interfaceIdentifiable<Network>
-
isFictitious
public boolean isFictitious()
Description copied from interface:Identifiable
Get the fictitious status- Specified by:
isFictitious
in interfaceIdentifiable<Network>
-
setFictitious
public void setFictitious(boolean fictitious)
Description copied from interface:Identifiable
Set the fictitious status- Specified by:
setFictitious
in interfaceIdentifiable<Network>
-
getSourceFormat
public String getSourceFormat()
Description copied from interface:Network
Get the source format.- Specified by:
getSourceFormat
in interfaceNetwork
- Returns:
- the source format
-
getCountries
public Set<Country> 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
-
getIdentifiable
public Identifiable<?> getIdentifiable(String id)
Description copied from interface:Network
Get an equipment by its ID or alias- Specified by:
getIdentifiable
in interfaceNetwork
- Parameters:
id
- the id or an alias of the equipment
-
getIdentifiables
public Collection<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
public <C extends Connectable> Iterable<C> getConnectables(Class<C> clazz)
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
public <C extends Connectable> Stream<C> getConnectableStream(Class<C> clazz)
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
public <C extends Connectable> int getConnectableCount(Class<C> clazz)
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
public Iterable<Connectable> getConnectables()
Description copied from interface:Network
Get all connectables of the network- Specified by:
getConnectables
in interfaceNetwork
- Returns:
- all the connectables
-
getConnectableStream
public Stream<Connectable> 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
public Connectable<?> getConnectable(String id)
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
-
newSubstation
public com.powsybl.iidm.mergingview.SubstationAdderAdapter newSubstation()
Description copied from interface:Network
Get a builder to create a new substation.- Specified by:
newSubstation
in interfaceNetwork
-
getSubstations
public Iterable<Substation> getSubstations()
Description copied from interface:Network
Get all substations.- Specified by:
getSubstations
in interfaceNetwork
-
getSubstationStream
public Stream<Substation> 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
public Substation getSubstation(String id)
Description copied from interface:Network
Get a substation.- Specified by:
getSubstation
in interfaceNetwork
- Parameters:
id
- the id or an alias of the substation
-
getVoltageLevels
public Iterable<VoltageLevel> getVoltageLevels()
Description copied from interface:Network
Get all substation voltage levels.- Specified by:
getVoltageLevels
in interfaceNetwork
-
getVoltageLevelStream
public Stream<VoltageLevel> 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
public VoltageLevel getVoltageLevel(String id)
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
-
getBatteries
public Iterable<Battery> getBatteries()
Description copied from interface:Network
Get all batteries.- Specified by:
getBatteries
in interfaceNetwork
-
getBatteryStream
public Stream<Battery> 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
public Battery getBattery(String id)
Description copied from interface:Network
Get a battery.- Specified by:
getBattery
in interfaceNetwork
- Parameters:
id
- the id or an alias of the battery
-
getVscConverterStations
public Iterable<VscConverterStation> getVscConverterStations()
Description copied from interface:Network
Get all VSC converter stations.- Specified by:
getVscConverterStations
in interfaceNetwork
- Returns:
- all VSC converter stations
-
getVscConverterStationStream
public Stream<VscConverterStation> 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
public VscConverterStation getVscConverterStation(String id)
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
-
getTwoWindingsTransformers
public Iterable<TwoWindingsTransformer> getTwoWindingsTransformers()
Description copied from interface:Network
Get all two windings transformers.- Specified by:
getTwoWindingsTransformers
in interfaceNetwork
-
getTwoWindingsTransformerStream
public Stream<TwoWindingsTransformer> 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
public TwoWindingsTransformer getTwoWindingsTransformer(String id)
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
-
getSwitch
public Switch getSwitch(String id)
Description copied from interface:Network
Get a switch from its id or an alias.
-
getSwitches
public Iterable<Switch> getSwitches()
Description copied from interface:Network
Get all switches.- Specified by:
getSwitches
in interfaceNetwork
- Returns:
- all switches
-
getSwitchStream
public Stream<Switch> 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
-
getStaticVarCompensators
public Iterable<StaticVarCompensator> getStaticVarCompensators()
Description copied from interface:Network
Get all static var compensators.- Specified by:
getStaticVarCompensators
in interfaceNetwork
-
getStaticVarCompensatorStream
public Stream<StaticVarCompensator> 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
public StaticVarCompensator getStaticVarCompensator(String id)
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
-
getShuntCompensators
public Iterable<ShuntCompensator> getShuntCompensators()
Description copied from interface:Network
Get all compensator shunts.- Specified by:
getShuntCompensators
in interfaceNetwork
-
getShuntCompensatorStream
public Stream<ShuntCompensator> 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
public ShuntCompensator getShuntCompensator(String id)
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
-
getLoadStream
public Stream<Load> 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
-
getGenerators
public Iterable<Generator> getGenerators()
Description copied from interface:Network
Get all generators.- Specified by:
getGenerators
in interfaceNetwork
-
getGeneratorStream
public Stream<Generator> 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
public Generator getGenerator(String id)
Description copied from interface:Network
Get a generator.- Specified by:
getGenerator
in interfaceNetwork
- Parameters:
id
- the id or an alias of the generator
-
getBusbarSection
public BusbarSection getBusbarSection(String id)
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
public Iterable<BusbarSection> getBusbarSections()
Description copied from interface:Network
Get all busbar sections.- Specified by:
getBusbarSections
in interfaceNetwork
- Returns:
- all busbar sections
-
getBusbarSectionStream
public Stream<BusbarSection> 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.
-
getLccConverterStations
public Iterable<LccConverterStation> getLccConverterStations()
Description copied from interface:Network
Get all LCC converter stations.- Specified by:
getLccConverterStations
in interfaceNetwork
- Returns:
- all LCC converter stations
-
getLccConverterStationStream
public Stream<LccConverterStation> 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
public LccConverterStation getLccConverterStation(String id)
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
-
getHvdcConverterStations
public Iterable<HvdcConverterStation<?>> getHvdcConverterStations()
Description copied from interface:Network
Get all HVDC converter stations.- Specified by:
getHvdcConverterStations
in interfaceNetwork
- Returns:
- all HVDC converter stations
-
getHvdcConverterStationStream
public Stream<HvdcConverterStation<?>> getHvdcConverterStationStream()
Description copied from interface:Network
Get all HVDC converter stations.- Specified by:
getHvdcConverterStationStream
in interfaceNetwork
- Returns:
- all HVDC converter stations
-
getHvdcConverterStationCount
public int getHvdcConverterStationCount()
Description copied from interface:Network
Get HVDC converter stations count.- Specified by:
getHvdcConverterStationCount
in interfaceNetwork
- Returns:
- HVDC converter station count
-
getHvdcConverterStation
public HvdcConverterStation<?> 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
-
getBranch
public Branch getBranch(String id)
Description copied from interface:Network
Get a branch
-
getBranches
public Iterable<Branch> getBranches()
Description copied from interface:Network
Get all branches- Specified by:
getBranches
in interfaceNetwork
-
getBranchStream
public Stream<Branch> 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
-
getThreeWindingsTransformers
public Iterable<ThreeWindingsTransformer> getThreeWindingsTransformers()
Description copied from interface:Network
Get all 3 windings transformers.- Specified by:
getThreeWindingsTransformers
in interfaceNetwork
-
getThreeWindingsTransformerStream
public Stream<ThreeWindingsTransformer> 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
public ThreeWindingsTransformer getThreeWindingsTransformer(String id)
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
-
newLine
public LineAdder newLine()
Description copied from interface:Network
Get a builder to create a new AC line.
-
getLines
public Iterable<Line> getLines()
Description copied from interface:Network
Get all AC lines.
-
getTieLines
public Iterable<TieLine> getTieLines()
Description copied from interface:Network
Get all tie lines.- Specified by:
getTieLines
in interfaceNetwork
-
getLineStream
public Stream<Line> getLineStream()
Description copied from interface:Network
Get all AC lines.- Specified by:
getLineStream
in interfaceNetwork
-
getTieLineStream
public Stream<TieLine> 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
-
getTieLine
public TieLine getTieLine(String id)
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
-
getDanglingLines
public Iterable<DanglingLine> getDanglingLines(DanglingLineFilter danglingLineFilter)
Description copied from interface:Network
Get all dangling lines corresponding to given filter.- Specified by:
getDanglingLines
in interfaceNetwork
-
getDanglingLineStream
public Stream<DanglingLine> getDanglingLineStream(DanglingLineFilter danglingLineFilter)
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
public DanglingLine getDanglingLine(String id)
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
-
newHvdcLine
public HvdcLineAdder 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
-
getHvdcLines
public Iterable<HvdcLine> getHvdcLines()
Description copied from interface:Network
Get all HVDC lines.- Specified by:
getHvdcLines
in interfaceNetwork
- Returns:
- all HVDC lines
-
getHvdcLineStream
public Stream<HvdcLine> getHvdcLineStream()
Description copied from interface:Network
Get all HVDC lines.- Specified by:
getHvdcLineStream
in interfaceNetwork
- Returns:
- all HVDC lines
-
getHvdcLineCount
public int getHvdcLineCount()
Description copied from interface:Network
Get HVDC lines count.- Specified by:
getHvdcLineCount
in interfaceNetwork
- Returns:
- HVDC lines count
-
getHvdcLine
public HvdcLine getHvdcLine(String id)
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
-
getBusBreakerView
public Network.BusBreakerView getBusBreakerView()
Description copied from interface:Network
Get a bus/breaker view of the network.- Specified by:
getBusBreakerView
in interfaceNetwork
-
getBusView
public Network.BusView getBusView()
Description copied from interface:Network
Get a bus view of the network.- Specified by:
getBusView
in interfaceNetwork
-
addExtension
public <E extends Extension<Network>> void addExtension(Class<? super E> type, E extension)
Description copied from interface:Extendable
Add en extension to this extendable object.- Specified by:
addExtension
in interfaceExtendable<Network>
- Type Parameters:
E
- the extension type- Parameters:
type
- the extension class typeextension
- the extension
-
getExtension
public <E extends Extension<Network>> E getExtension(Class<? super E> type)
Description copied from interface:Extendable
Get an extension based on its class type.- Specified by:
getExtension
in interfaceExtendable<Network>
- Type Parameters:
E
- the extension type- Parameters:
type
- the extension class type- Returns:
- the extension mapped to the class type or null if not found
-
getExtensionByName
public <E extends Extension<Network>> E getExtensionByName(String name)
Description copied from interface:Extendable
Get an extension based on its name.- Specified by:
getExtensionByName
in interfaceExtendable<Network>
- Parameters:
name
- the extension name- Returns:
- the extension mapped to the name or null if not found
-
removeExtension
public <E extends Extension<Network>> boolean removeExtension(Class<E> type)
Description copied from interface:Extendable
Remove an extension based on its class type.- Specified by:
removeExtension
in interfaceExtendable<Network>
- 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
-
getExtensions
public <E extends Extension<Network>> Collection<E> getExtensions()
Description copied from interface:Extendable
Get all extensions associated with this extendable object..- Specified by:
getExtensions
in interfaceExtendable<Network>
- Returns:
- all extensions associated to this extendable object.
-
getImplementationName
public String getImplementationName()
Description copied from interface:Extendable
Returns a name that is used to find matchingExtensionAdderProvider
s when selecting implementations of extensions inExtendable.newExtension(java.lang.Class<B>)
. This is meant to be overriden by extendables when multiple implementations exist.- Specified by:
getImplementationName
in interfaceExtendable<Network>
- Returns:
- the name
-
newExtension
public <E extends Extension<Network>,B extends ExtensionAdder<Network,E>> B newExtension(Class<B> type)
Description copied from interface:Extendable
Returns an extensionAdder to build and add an extension for this extendable.The extension implementation is selected at runtime based on matching the
Extendable.getImplementationName()
of this extendable to theExtensionAdderProvider.getImplementationName()
of a provider. Implementations are loaded with java'sServiceLoader
using the ExtensionAdderProvider interface.- Specified by:
newExtension
in interfaceExtendable<Network>
- Parameters:
type
- The interface of the ExtensionAdder- Returns:
- the adder
-
getVariantManager
public VariantManager getVariantManager()
Description copied from interface:Network
Get the variant manager of the network.- Specified by:
getVariantManager
in interfaceNetwork
-
cloneVariant
public void cloneVariant(String sourceVariantId, List<String> targetVariantIds)
- Specified by:
cloneVariant
in interfaceMultiVariantObject
-
removeVariant
public void removeVariant(String variantId)
- Specified by:
removeVariant
in interfaceMultiVariantObject
-
newTieLine
public TieLineAdder newTieLine()
Description copied from interface:Network
Get a builder to create a new AC tie line.- Specified by:
newTieLine
in interfaceNetwork
-
addListener
public void addListener(NetworkListener listener)
- Specified by:
addListener
in interfaceNetwork
-
removeListener
public void removeListener(NetworkListener listener)
- Specified by:
removeListener
in interfaceNetwork
-
runValidationChecks
public ValidationLevel 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
public ValidationLevel runValidationChecks(boolean throwsException)
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
public ValidationLevel runValidationChecks(boolean throwsException, Reporter reporter)
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
public ValidationLevel getValidationLevel()
Description copied from interface:Network
Return the network validation status. Do not run any validation check.- Specified by:
getValidationLevel
in interfaceNetwork
-
-