lanl-ansi / GasPowerModels.jl

Julia packages for joint optimization of natural gas and power transmission networks
https://lanl-ansi.github.io/GasPowerModels.jl/stable/
Other
24 stars 10 forks source link

Fix variable #46

Closed wenjingsu16 closed 4 years ago

wenjingsu16 commented 4 years ago

Hi,

May I ask if there is a way to fix a variable when run the gas power model? For example, the active power and reactive power flow on transmission line connecting node 6 to node 13 are fixed at 0. Thanks.

tasseff commented 4 years ago

This sounds like it could be accomplished by redefining the bounds or component statuses within the input data. @rb004f, any suggestions?

rb004f commented 4 years ago

Depends on what effect you are trying to achieve

  1. If you want the voltages on either side to be such that the flow across the line would be 0, you'd want to set the bounds on the line to be 0. Essentially, the voltages would be forced to be roughly the same at 6 and 13.

  2. If you don't want flow and you want the voltages to be free, then you'd want to set the status of that edge to be 0, which will remove the edge from the network

wenjingsu16 commented 4 years ago

I am trying to achieve the second type of effect. So I need to create parameters that represent the status of the edges and set the status of that edge to 0. Does the model currently have binary variables or parameters that represent the status of existing components?

rb004f commented 4 years ago

In the branch table of the power system input file there is a column for "status". You can change the status of the line from 1 to 0 and you should get the effect you want. The code will ignore that edge

wenjingsu16 commented 4 years ago

I will do that. Thanks.