You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@constraint(m, [t in p.techs.water_power_turbines], m[:turbine_power_rating][t] == p.s.water_power.existing_kw_per_turbine)
162
162
else
163
+
print("\n ***** Adding the min and max turbine kw ratings")
164
+
print(", p.s.water_power.max_kw_turbine is $(p.s.water_power.max_kw_turbine)")
163
165
@constraint(m, [t in p.techs.water_power_turbines], m[:turbine_power_rating][t] >= p.s.water_power.min_kw_turbine)
164
166
@constraint(m, [t in p.techs.water_power_turbines], m[:turbine_power_rating][t] <= p.s.water_power.max_kw_turbine)
165
167
end
166
168
169
+
# Define the TurbinePowerGeneration variable
170
+
@variable(m, TurbinePowerGenerationMaximum[t in p.techs.water_power_turbines, ts in p.time_steps] >=0)
171
+
167
172
# Limit power output from the water_power turbines:
168
-
@constraint(m, [ts in p.time_steps, t in p.techs.water_power_turbines], m[:dvRatedProduction][t,ts] <= m[:binTurbineActive][t,ts]* m[:turbine_power_rating][t])
173
+
@constraint(m, [ts in p.time_steps, t in p.techs.water_power_turbines], m[:dvRatedProduction][t,ts] <= m[:TurbinePowerGenerationMaximum][t,ts])
169
174
175
+
# Method for linearizing the product of a binary variable and a continuous variable:
176
+
@constraint(m, [ts in p.time_steps, t in p.techs.water_power_turbines], m[:TurbinePowerGenerationMaximum][t,ts] <= m[:binTurbineActive][t,ts] *1000000)
177
+
@constraint(m, [ts in p.time_steps, t in p.techs.water_power_turbines], m[:TurbinePowerGenerationMaximum][t,ts] <= m[:turbine_power_rating][t])
178
+
@constraint(m, [ts in p.time_steps, t in p.techs.water_power_turbines], m[:TurbinePowerGenerationMaximum][t,ts] >= m[:turbine_power_rating][t] - (1000000*(1-m[:binTurbineActive][t,ts])))
179
+
@constraint(m, [ts in p.time_steps, t in p.techs.water_power_turbines], m[:TurbinePowerGenerationMaximum][t,ts] >=0)
180
+
170
181
# Limit the water flow through the spillway, if a value was input
@constraint(m, [t in p.techs.water_power_pumps, ts in p.time_steps], m[:dvPumpPowerInput][t, ts] <= m[:PumpPowerInputMaximum][t, ts])
255
+
256
+
# Method for linearizing the product of a binary variable and a continuous variable (PumpPowerInputMaximum * binPumpingWaterActive)
257
+
@constraint(m, [ts in p.time_steps, t in p.techs.water_power_pumps], m[:PumpPowerInputMaximum][t,ts] <= m[:binPumpingWaterActive][t,ts] *1000000)
258
+
@constraint(m, [ts in p.time_steps, t in p.techs.water_power_pumps], m[:PumpPowerInputMaximum][t,ts] <= m[:pump_power_rating][t])
259
+
@constraint(m, [ts in p.time_steps, t in p.techs.water_power_pumps], m[:PumpPowerInputMaximum][t,ts] >= m[:pump_power_rating][t] - (1000000*(1-m[:binPumpingWaterActive][t,ts])))
260
+
@constraint(m, [ts in p.time_steps, t in p.techs.water_power_pumps], m[:PumpPowerInputMaximum][t,ts] >=0)
261
+
244
262
if p.s.water_power.computation_type =="average_power_conversion"
245
263
246
264
# Conversion between pumped water flow rate and power input into the pump
0 commit comments