Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Jan 21, 2024
1 parent c190035 commit cf88483
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jump.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ function solve_opf(file_name)
JuMP.@variable(model, -ref[:branch][l]["rate_a"] <= p[(l,i,j) in ref[:arcs]] <= ref[:branch][l]["rate_a"])
JuMP.@variable(model, -ref[:branch][l]["rate_a"] <= q[(l,i,j) in ref[:arcs]] <= ref[:branch][l]["rate_a"])
for (l, i, j) in ref[:arcs]
JuMP.set_name(va[(l, i, j)], "p_$(l)_$(i)_$(j)")
JuMP.set_name(vm[(l, i, j)], "q_$(l)_$(i)_$(j)")
JuMP.set_name(p[(l, i, j)], "p_$(l)_$(i)_$(j)")
JuMP.set_name(q[(l, i, j)], "q_$(l)_$(i)_$(j)")
end
JuMP.@objective(model, Min, sum(gen["cost"][1]*pg[i]^2 + gen["cost"][2]*pg[i] + gen["cost"][3] for (i,gen) in ref[:gen]))

Expand Down

0 comments on commit cf88483

Please sign in to comment.