Skip to content

Commit a3c68cc

Browse files
Update OPF_model_creator_v01.py
1 parent d5d3f66 commit a3c68cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Main_packages/OPF_model_creator_v01.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def Q_flow_receiving_rule(model, l, s, t): # Q receiving flow
166166
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])
167167
model.Q_flow_receiving = pyo.Expression(model.Lines,model.Phases_abc,model.time, rule=Q_flow_receiving_rule)
168168
# Losses
169-
if 1==0: # Only model the variables that you are using in the optimization problem (in objective function or constraints)
169+
if 1==1: # Only model the variables that you are using in the optimization problem (in objective function or constraints)
170170
# Losses for this time step per line and phase
171171
def P_losses_rule(model, l, s, t): # Active power losses Watts!
172172
return model.P_flow_sending[l,s,t] + model.P_flow_receiving[l,s,t]

0 commit comments

Comments
 (0)