Skip to content

Commit 46363d9

Browse files
committed
reduce max system size for big-M management if very large number is provided for ASHP max_ton
1 parent cb86bb2 commit 46363d9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/core/ashp.jl

+9-1
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ function ASHPSpaceHeater(;
209209
else
210210
max_ton = min(defaults["max_ton"], 10*maximum(heating_load ./ heating_cf))
211211
end
212+
else
213+
if can_serve_cooling
214+
max_ton = min(max_ton, 10*(maximum(heating_load ./ heating_cf)+maximum(cooling_load ./ cooling_cf)))
215+
else
216+
max_ton = min(max_ton, 10*maximum(heating_load ./ heating_cf))
217+
end
212218
max_ton = max(max_ton, min_ton)
213219
end
214220

@@ -371,9 +377,11 @@ function ASHPWaterHeater(;
371377

372378
if isnothing(max_ton)
373379
#these are in kW rathern than tons so will be larger as a measure of conservatism
374-
max_ton = max(max_ton, min_ton)
375380
max_ton = min(defaults["max_ton"], 10*maximum(heating_load ./ heating_cf))
381+
else
382+
max_ton = min(max_ton, 10*maximum(heating_load ./ heating_cf))
376383
end
384+
max_ton = max(max_ton, min_ton)
377385

378386
# Convert max sizes, cost factors from mmbtu_per_hour to kw
379387
min_kw = min_ton * KWH_THERMAL_PER_TONHOUR

0 commit comments

Comments
 (0)