Skip to content
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

solve_ac_powerflow! on a previously solved system can fail #47

Closed
GabrielKS opened this issue Aug 13, 2024 · 1 comment
Closed

solve_ac_powerflow! on a previously solved system can fail #47

GabrielKS opened this issue Aug 13, 2024 · 1 comment

Comments

@GabrielKS
Copy link
Contributor

If solve_ac_powerflow! is called on a system and succeeds, we would expect that calling solve_ac_powerflow! a second time on that solved system would succeed and, ideally, produce the same answer. The system produced by

function create_system()
    sys = with_logger(() -> build_system(PSISystems, "RTS_GMLC_DA_sys"), SimpleLogger(Error))  # suppress logging
    remove_component!(sys, only(get_components(TwoTerminalHVDCLine, sys)))  # HVDC power flow not implemented yet
    sys_mod = deepcopy(sys)
    # Modify some things so reactive power redistribution succeeds
    for (component_type, component_name, new_limits) in [
        (RenewableDispatch, "113_PV_1",    (min = -30.0, max =  30.0))
        (ThermalStandard,   "115_STEAM_3", (min = -50.0, max = 100.0))
        (ThermalStandard,   "207_CT_1",    (min = -70.0, max =  70.0))
        (RenewableDispatch, "215_PV_1",    (min = -40.0, max =  40.0))
        (ThermalStandard,   "307_CT_1",    (min = -70.0, max =  70.0))
        (ThermalStandard,   "315_CT_8",    (min =   0.0, max =  80.0))
    ]
        set_reactive_power_limits!(get_component(component_type, sys, component_name), new_limits)
    end
    return sys
end

succeeds the first time around, if you define

PowerSystems.get_reactive_power_limits(::RenewableNonDispatch) = (min = 0.0, max = 0.0)

as a quick fix for #39, but the second time there is an error:

Screenshot 2024-08-13 at 3 04 43 PM
@rodrigomha
Copy link
Collaborator

rodrigomha commented Aug 14, 2024

The problem is that in the RTS system, the Sync Condenser units have base_power = 0.0.

Here is a fix:

sync_cond_names = ["214_SYNC_COND_1", "314_SYNC_COND_1", "114_SYNC_COND_1"]
for name in sync_cond_names
        g = get_component(StaticInjection, sys, name)
        set_base_power!(g, 100.0)
 end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants