Package com.powsybl.iidm.mergingview
Class VscConverterStationAdapter
- java.lang.Object
-
- com.powsybl.iidm.mergingview.VscConverterStationAdapter
-
- All Implemented Interfaces:
Extendable<VscConverterStation>
,Connectable<VscConverterStation>
,HvdcConverterStation<VscConverterStation>
,Identifiable<VscConverterStation>
,Injection<VscConverterStation>
,ReactiveLimitsHolder
,VscConverterStation
public class VscConverterStationAdapter extends Object implements VscConverterStation
- Author:
- Thomas Adam
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.powsybl.iidm.network.HvdcConverterStation
HvdcConverterStation.HvdcType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAlias(String alias)
Add an alias to the object.void
addAlias(String alias, boolean ensureAliasUnicity)
void
addAlias(String alias, String aliasType)
Add an alias to the object.void
addAlias(String alias, String aliasType, boolean ensureAliasUnicity)
<E extends Extension<I>>
voidaddExtension(Class<? super E> type, E extension)
Add en extension to this extendable object.Set<String>
getAliases()
Get the aliases of the object.Optional<String>
getAliasFromType(String aliasType)
Get the alias of the object with a given alias type if it exists.Optional<String>
getAliasType(String alias)
Get the alias type of an alias if it exists, an empty optional otherwise.protected I
getDelegate()
<E extends Extension<I>>
EgetExtension(Class<? super E> type)
Get an extension based on its class type.<E extends Extension<I>>
EgetExtensionByName(String name)
Get an extension based on its name.<E extends Extension<I>>
Collection<E>getExtensions()
Get all extensions associated with this extendable object..HvdcLine
getHvdcLine()
Return the HVDC line attached to this station.HvdcConverterStation.HvdcType
getHvdcType()
Get HVDC type.String
getId()
Get the unique identifier of the object.String
getImplementationName()
Returns a name that is used to find matchingExtensionAdderProvider
s when selecting implementations of extensions inExtendable.newExtension(java.lang.Class<B>)
.protected com.powsybl.iidm.mergingview.MergingViewIndex
getIndex()
float
getLossFactor()
Get the loss factor.String
getNameOrId()
Get the name of the object if it exists.MergingView
getNetwork()
Get the network associated to the object.Optional<String>
getOptionalName()
Return an optional containing the name of the object if it exists.Optional<? extends HvdcConverterStation<?>>
getOtherConverterStation()
Get the converter station at the other side of the hvdc line.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.ReactiveLimits
getReactiveLimits()
Get reactive limits of the generator.<L extends ReactiveLimits>
LgetReactiveLimits(Class<L> type)
double
getReactivePowerSetpoint()
Get the reactive power setpoint (MVar).Terminal
getRegulatingTerminal()
Get the terminal used for regulation.Terminal
getTerminal()
Get the terminal.List<? extends Terminal>
getTerminals()
IdentifiableType
getType()
Get identifiable type.double
getVoltageSetpoint()
Get the voltage setpoint (Kv).boolean
hasAliases()
Return true if identifiable has aliases.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 statusboolean
isVoltageRegulatorOn()
Check if voltage regulator is on.<E extends Extension<I>,B extends ExtensionAdder<I,E>>
BnewExtension(Class<B> type)
Returns an extensionAdder to build and add an extension for this extendable.MinMaxReactiveLimitsAdder
newMinMaxReactiveLimits()
Get a builder to create and associate minimum and maximum reactive limits to this generator.ReactiveCapabilityCurveAdder
newReactiveCapabilityCurve()
Get a builder to create and associate a new reactive capability curve to this generator.void
remove()
Remove the connectable from the voltage level (dangling switches are kept).void
removeAlias(String alias)
Remove an alias of the object.<E extends Extension<I>>
booleanremoveExtension(Class<E> type)
Remove an extension based on its class type.boolean
removeProperty(String key)
Remove property with specified key.void
setFictitious(boolean fictitious)
Set the fictitious statusI
setLossFactor(float lossFactor)
Set the loss factorString
setProperty(String key, String value)
Set property value associated to specified key.VscConverterStation
setReactivePowerSetpoint(double reactivePowerSetpoint)
Set the reactive power setpoint (MVar).VscConverterStation
setRegulatingTerminal(Terminal regulatingTerminal)
VscConverterStation
setVoltageRegulatorOn(boolean voltageRegulatorOn)
Set voltage regulator status.VscConverterStation
setVoltageSetpoint(double voltageSetpoint)
Set the voltage setpoint (Kv).-
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.Connectable
getTerminals, remove
-
Methods inherited from interface com.powsybl.commons.extensions.Extendable
addExtension, getExtension, getExtensionByName, getExtensions, getImplementationName, newExtension, removeExtension
-
Methods inherited from interface com.powsybl.iidm.network.HvdcConverterStation
getHvdcLine, getHvdcType, getLossFactor, getOtherConverterStation, getType, setLossFactor
-
Methods inherited from interface com.powsybl.iidm.network.Identifiable
addAlias, addAlias, addAlias, addAlias, getAliases, getAliasFromType, getAliasType, getId, getName, getNameOrId, getNetwork, getOptionalName, getProperties, getProperty, getProperty, getPropertyNames, hasAliases, hasProperty, hasProperty, isFictitious, removeAlias, removeProperty, setFictitious, setName, setProperty
-
Methods inherited from interface com.powsybl.iidm.network.Injection
getTerminal
-
-
-
-
Method Detail
-
setVoltageRegulatorOn
public VscConverterStation setVoltageRegulatorOn(boolean voltageRegulatorOn)
Description copied from interface:VscConverterStation
Set voltage regulator status.- Specified by:
setVoltageRegulatorOn
in interfaceVscConverterStation
- Parameters:
voltageRegulatorOn
- the new voltage regulator status- Returns:
- the converter itself to allow method chaining
-
setVoltageSetpoint
public VscConverterStation setVoltageSetpoint(double voltageSetpoint)
Description copied from interface:VscConverterStation
Set the voltage setpoint (Kv).- Specified by:
setVoltageSetpoint
in interfaceVscConverterStation
- Parameters:
voltageSetpoint
- the voltage setpoint- Returns:
- the converter itself to allow method chaining
-
setReactivePowerSetpoint
public VscConverterStation setReactivePowerSetpoint(double reactivePowerSetpoint)
Description copied from interface:VscConverterStation
Set the reactive power setpoint (MVar).- Specified by:
setReactivePowerSetpoint
in interfaceVscConverterStation
- Parameters:
reactivePowerSetpoint
- the reactive power setpoint- Returns:
- the converter itself to allow method chaining
-
getReactiveLimits
public ReactiveLimits getReactiveLimits()
Description copied from interface:ReactiveLimitsHolder
Get reactive limits of the generator.- Specified by:
getReactiveLimits
in interfaceReactiveLimitsHolder
-
getReactiveLimits
public <L extends ReactiveLimits> L getReactiveLimits(Class<L> type)
- Specified by:
getReactiveLimits
in interfaceReactiveLimitsHolder
-
newReactiveCapabilityCurve
public ReactiveCapabilityCurveAdder newReactiveCapabilityCurve()
Description copied from interface:ReactiveLimitsHolder
Get a builder to create and associate a new reactive capability curve to this generator.- Specified by:
newReactiveCapabilityCurve
in interfaceReactiveLimitsHolder
-
newMinMaxReactiveLimits
public MinMaxReactiveLimitsAdder newMinMaxReactiveLimits()
Description copied from interface:ReactiveLimitsHolder
Get a builder to create and associate minimum and maximum reactive limits to this generator.- Specified by:
newMinMaxReactiveLimits
in interfaceReactiveLimitsHolder
-
isVoltageRegulatorOn
public boolean isVoltageRegulatorOn()
Description copied from interface:VscConverterStation
Check if voltage regulator is on.- Specified by:
isVoltageRegulatorOn
in interfaceVscConverterStation
- Returns:
- true if voltage regulator is on, false otherwise
-
getVoltageSetpoint
public double getVoltageSetpoint()
Description copied from interface:VscConverterStation
Get the voltage setpoint (Kv).- Specified by:
getVoltageSetpoint
in interfaceVscConverterStation
- Returns:
- the voltage setpoint
-
getReactivePowerSetpoint
public double getReactivePowerSetpoint()
Description copied from interface:VscConverterStation
Get the reactive power setpoint (MVar).- Specified by:
getReactivePowerSetpoint
in interfaceVscConverterStation
- Returns:
- the reactive power setpoint
-
setRegulatingTerminal
public VscConverterStation setRegulatingTerminal(Terminal regulatingTerminal)
- Specified by:
setRegulatingTerminal
in interfaceVscConverterStation
-
getRegulatingTerminal
public Terminal getRegulatingTerminal()
Description copied from interface:VscConverterStation
Get the terminal used for regulation.- Specified by:
getRegulatingTerminal
in interfaceVscConverterStation
- Returns:
- the terminal used for regulation
-
getHvdcLine
public HvdcLine getHvdcLine()
Description copied from interface:HvdcConverterStation
Return the HVDC line attached to this station.- Specified by:
getHvdcLine
in interfaceHvdcConverterStation<I extends HvdcConverterStation<I>>
- Returns:
- the HVDC line attached to this station or null.
-
setLossFactor
public I setLossFactor(float lossFactor)
Description copied from interface:HvdcConverterStation
Set the loss factor- Specified by:
setLossFactor
in interfaceHvdcConverterStation<I extends HvdcConverterStation<I>>
- Parameters:
lossFactor
- the loss factor- Returns:
- this station
-
getHvdcType
public HvdcConverterStation.HvdcType getHvdcType()
Description copied from interface:HvdcConverterStation
Get HVDC type.- Specified by:
getHvdcType
in interfaceHvdcConverterStation<I extends HvdcConverterStation<I>>
- Returns:
- HVDC type
-
getLossFactor
public float getLossFactor()
Description copied from interface:HvdcConverterStation
Get the loss factor.- Specified by:
getLossFactor
in interfaceHvdcConverterStation<I extends HvdcConverterStation<I>>
- Returns:
- the loss factor.
-
getOtherConverterStation
public Optional<? extends HvdcConverterStation<?>> getOtherConverterStation()
Description copied from interface:HvdcConverterStation
Get the converter station at the other side of the hvdc line.- Specified by:
getOtherConverterStation
in interfaceHvdcConverterStation<I extends HvdcConverterStation<I>>
- Returns:
- the other converter station
-
getTerminal
public final Terminal getTerminal()
Description copied from interface:Injection
Get the terminal.- Specified by:
getTerminal
in interfaceInjection<I extends Injection<I>>
-
getTerminals
public final List<? extends Terminal> getTerminals()
- Specified by:
getTerminals
in interfaceConnectable<I extends Connectable<I>>
-
remove
public final void remove()
Description copied from interface:Connectable
Remove the connectable from the voltage level (dangling switches are kept).- Specified by:
remove
in interfaceConnectable<I extends Connectable<I>>
-
getNetwork
public MergingView getNetwork()
Description copied from interface:Identifiable
Get the network associated to the object.- Specified by:
getNetwork
in interfaceIdentifiable<I extends Identifiable<I>>
-
getId
public String getId()
Description copied from interface:Identifiable
Get the unique identifier of the object.- Specified by:
getId
in interfaceIdentifiable<I extends Identifiable<I>>
-
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<I extends Identifiable<I>>
-
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<I extends Identifiable<I>>
-
hasProperty
public boolean hasProperty()
Description copied from interface:Identifiable
Check that this object has some properties.- Specified by:
hasProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
hasProperty
public boolean hasProperty(String key)
Description copied from interface:Identifiable
Check that this object has property with specified name.- Specified by:
hasProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
getProperty
public String getProperty(String key)
Description copied from interface:Identifiable
Get property associated to specified key.- Specified by:
getProperty
in interfaceIdentifiable<I extends Identifiable<I>>
-
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<I extends Identifiable<I>>
-
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<I extends Identifiable<I>>
-
removeProperty
public boolean removeProperty(String key)
Description copied from interface:Identifiable
Remove property with specified key.- Specified by:
removeProperty
in interfaceIdentifiable<I extends Identifiable<I>>
- Parameters:
key
- the property key- Returns:
true
if property exists and has been removed,false
otherwise
-
getPropertyNames
public Set<String> getPropertyNames()
Description copied from interface:Identifiable
Get properties key values.- Specified by:
getPropertyNames
in interfaceIdentifiable<I extends Identifiable<I>>
-
isFictitious
public boolean isFictitious()
Description copied from interface:Identifiable
Get the fictitious status- Specified by:
isFictitious
in interfaceIdentifiable<I extends Identifiable<I>>
-
setFictitious
public void setFictitious(boolean fictitious)
Description copied from interface:Identifiable
Set the fictitious status- Specified by:
setFictitious
in interfaceIdentifiable<I extends Identifiable<I>>
-
addExtension
public <E extends Extension<I>> 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<I extends Identifiable<I>>
- Type Parameters:
E
- the extension type- Parameters:
type
- the extension class typeextension
- the extension
-
getExtension
public <E extends Extension<I>> E getExtension(Class<? super E> type)
Description copied from interface:Extendable
Get an extension based on its class type.- Specified by:
getExtension
in interfaceExtendable<I extends Identifiable<I>>
- 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<I>> E getExtensionByName(String name)
Description copied from interface:Extendable
Get an extension based on its name.- Specified by:
getExtensionByName
in interfaceExtendable<I extends Identifiable<I>>
- Parameters:
name
- the extension name- Returns:
- the extension mapped to the name or null if not found
-
removeExtension
public <E extends Extension<I>> boolean removeExtension(Class<E> type)
Description copied from interface:Extendable
Remove an extension based on its class type.- Specified by:
removeExtension
in interfaceExtendable<I extends Identifiable<I>>
- Type Parameters:
E
- the extension type- Parameters:
type
- the extension class type- Returns:
- true if the extension has been removed false if extension has not been found
-
getExtensions
public <E extends Extension<I>> Collection<E> getExtensions()
Description copied from interface:Extendable
Get all extensions associated with this extendable object..- Specified by:
getExtensions
in interfaceExtendable<I extends Identifiable<I>>
- 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<I extends Identifiable<I>>
- Returns:
- the name
-
newExtension
public <E extends Extension<I>,B extends ExtensionAdder<I,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<I extends Identifiable<I>>
- Parameters:
type
- The interface of the ExtensionAdder- Returns:
- the adder
-
getAliases
public Set<String> getAliases()
Description copied from interface:Identifiable
Get the aliases of the object.- Specified by:
getAliases
in interfaceIdentifiable<I extends Identifiable<I>>
-
getAliasFromType
public Optional<String> getAliasFromType(String aliasType)
Description copied from interface:Identifiable
Get the alias of the object with a given alias type if it exists. Else return an empty optional.- Specified by:
getAliasFromType
in interfaceIdentifiable<I extends Identifiable<I>>
-
getAliasType
public Optional<String> getAliasType(String alias)
Description copied from interface:Identifiable
Get the alias type of an alias if it exists, an empty optional otherwise. If the alias does not exist, return an empty optional.- Specified by:
getAliasType
in interfaceIdentifiable<I extends Identifiable<I>>
-
addAlias
public void addAlias(String alias)
Description copied from interface:Identifiable
Add an alias to the object. Aliases must be unique in associated Network, and different from any identifiable ID. No alias type is associated to this alias. If the alias already exists (i.e. is not unique) or equals an identifiable ID, throw aPowsyblException
- Specified by:
addAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
addAlias
public void addAlias(String alias, boolean ensureAliasUnicity)
- Specified by:
addAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
addAlias
public void addAlias(String alias, String aliasType)
Description copied from interface:Identifiable
Add an alias to the object. Aliases must be unique in associated Network, and different from any identifiable ID. This alias is associated to a given alias type. If the given alias type is null or empty, no alias type is considered associated to the alias. Only one alias can be associated to a non null given alias type for one object. If the alias already exists (i.e. is not unique) or equals an identifiable ID, throw aPowsyblException
If a given non null type already has an associated alias for this object, throw aPowsyblException
- Specified by:
addAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
addAlias
public void addAlias(String alias, String aliasType, boolean ensureAliasUnicity)
- Specified by:
addAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
removeAlias
public void removeAlias(String alias)
Description copied from interface:Identifiable
Remove an alias of the object. If the alias does not exist for this object, throw aPowsyblException
- Specified by:
removeAlias
in interfaceIdentifiable<I extends Identifiable<I>>
-
hasAliases
public boolean hasAliases()
Description copied from interface:Identifiable
Return true if identifiable has aliases.- Specified by:
hasAliases
in interfaceIdentifiable<I extends Identifiable<I>>
-
getType
public IdentifiableType getType()
Description copied from interface:Identifiable
Get identifiable type.- Specified by:
getType
in interfaceIdentifiable<I extends Identifiable<I>>
- Returns:
- the identifiable type
-
getDelegate
protected I getDelegate()
-
getIndex
protected com.powsybl.iidm.mergingview.MergingViewIndex getIndex()
-
-