From e173347692b29f8b1d52b4c6bcc981969946c81b Mon Sep 17 00:00:00 2001 From: mcosovic Date: Tue, 15 Oct 2024 09:35:42 +0200 Subject: [PATCH] include support for custom variable names in OPF models --- src/optimalPowerFlow/acOptimalPowerFlow.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/optimalPowerFlow/acOptimalPowerFlow.jl b/src/optimalPowerFlow/acOptimalPowerFlow.jl index e16e1d2a9..b745d7bed 100644 --- a/src/optimalPowerFlow/acOptimalPowerFlow.jl +++ b/src/optimalPowerFlow/acOptimalPowerFlow.jl @@ -69,9 +69,7 @@ function acOptimalPowerFlow( active = @variable(jump, active[i = 1:gen.number], base_name = active) reactive = @variable(jump, reactive[i = 1:gen.number], base_name = reactive) magnitude = @variable(jump, magnitude[i = 1:bus.number], base_name = magnitude) - @time angle = @variable(jump, angle[i = 1:bus.number], base_name = angle) - - + angle = @variable(jump, angle[i = 1:bus.number], base_name = angle) fix(angle[bus.layout.slack], bus.voltage.angle[bus.layout.slack]) slack = Dict(bus.layout.slack => FixRef(angle[bus.layout.slack]))