Skip to content

Commit

Permalink
Update model.py
Browse files Browse the repository at this point in the history
set income = 0 when not considering hydro
  • Loading branch information
Zhanwei-Liu authored Aug 5, 2023
1 parent c9b7f18 commit 8595233
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prepshot/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ def define_constraints(model, para):
model.init_storage_cons = Constraint(model.station_month_year_tuples, rule=rules.init_storage_rule, doc='Initial storage Constraints')
model.end_storage_cons = Constraint(model.station_month_year_tuples, rule=rules.end_storage_rule, doc='Terminal storage Constraints')
model.income_cons = Constraint(expr=model.income == sum([model.withdraw[s, h, m, y] * 3600 * para['dt'] * para['price'] for s, h, m, y in model.station_hour_month_year_tuples]))

else:
model.income_cons = Constraint(expr=model.income == 0)

def create_model(para):
"""
Expand Down

0 comments on commit 8595233

Please sign in to comment.