Skip to content

Commit

Permalink
Update OPF_model_creator_v01.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinRigoni authored Feb 24, 2020
1 parent d5d3f66 commit a3c68cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Main_packages/OPF_model_creator_v01.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def Q_flow_receiving_rule(model, l, s, t): # Q receiving flow
return -1.0 *(model.Vim[model.Lines_i[l],s,t] * model.Iflow_re[l,s,t] - model.Vre[model.Lines_i[l],s,t] * model.Iflow_im[l,s,t])
model.Q_flow_receiving = pyo.Expression(model.Lines,model.Phases_abc,model.time, rule=Q_flow_receiving_rule)
# Losses
if 1==0: # Only model the variables that you are using in the optimization problem (in objective function or constraints)
if 1==1: # Only model the variables that you are using in the optimization problem (in objective function or constraints)
# Losses for this time step per line and phase
def P_losses_rule(model, l, s, t): # Active power losses Watts!
return model.P_flow_sending[l,s,t] + model.P_flow_receiving[l,s,t]
Expand Down

0 comments on commit a3c68cc

Please sign in to comment.