-
Notifications
You must be signed in to change notification settings - Fork 100
Add traits to static injectors about active power, reactive power, voltage control #1645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
1811203
118c731
2fc6c08
72065ed
18b43f6
d1d6190
09b672a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -380,3 +380,41 @@ end | |
| function supports_services(::AreaInterchange) | ||
| return true | ||
| end | ||
|
|
||
| # supports_active_power overrides for types without controllable active power | ||
| supports_active_power(::SynchronousCondenser) = false | ||
| supports_active_power(::FixedAdmittance) = false | ||
| supports_active_power(::SwitchedAdmittance) = false | ||
|
|
||
| # supports_reactive_power overrides for types without controllable reactive power | ||
| supports_reactive_power(::InterconnectingConverter) = false | ||
| supports_reactive_power(::FixedAdmittance) = false | ||
| supports_reactive_power(::SwitchedAdmittance) = false | ||
|
|
||
| # FACTSControlDevice reactive power and voltage control depend on control_mode. | ||
| # control_mode is nothing for uninitialized devices (e.g. FACTSControlDevice(nothing)). | ||
| _facts_is_active(d::FACTSControlDevice) = | ||
| (mode = get_control_mode(d); !isnothing(mode) && mode != FACTSOperationModes.OOS) | ||
|
|
||
| # In NML mode both Series and Shunt links operate, enabling active power control. | ||
| # In BYP mode the Series link is bypassed and the Shunt acts as a STATCOM (reactive only). | ||
| function supports_active_power(d::FACTSControlDevice) | ||
| mode = get_control_mode(d) | ||
| return !isnothing(mode) && mode == FACTSOperationModes.NML | ||
| end | ||
|
|
||
| supports_reactive_power(d::FACTSControlDevice) = _facts_is_active(d) | ||
|
|
||
| # supports_voltage_control overrides for types that can control voltage | ||
| supports_voltage_control(::Generator) = true | ||
| supports_voltage_control(::Source) = true | ||
| supports_voltage_control(::Storage) = true | ||
| supports_voltage_control(::StaticInjectionSubsystem) = true | ||
|
|
||
| supports_voltage_control(d::FACTSControlDevice) = _facts_is_active(d) | ||
|
|
||
| function supports_voltage_control(d::SynchronousCondenser) | ||
| bustype = get_bustype(get_bus(d)) | ||
| return !isnothing(bustype) && | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot the bus can't never be nothing change this check to be based on the bustype only
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 09b672a. Removed the |
||
| bustype ∈ (ACBusTypes.PV, ACBusTypes.REF, ACBusTypes.SLACK) | ||
| end | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot this device can control reactive power
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in d1d6190. Removed the
supports_reactive_power(::SwitchedAdmittance) = falseoverride so it now falls through to the defaulttrue.