@@ -23,6 +23,7 @@ ASHPSpaceHeater has the following attributes:
23
23
cooling_cf::Array{<:Real,1} # ASHP's cooling capacity factor curves
24
24
can_serve_cooling::Bool # If ASHP can supply heat to the cooling load
25
25
force_into_system::Bool # force into system to serve all space heating loads if true
26
+ force_dispatch::Bool # force ASHP to meet load or maximize output if true
26
27
back_up_temp_threshold_degF::Real # Degree in F that system switches from ASHP to resistive heater
27
28
avoided_capex_by_ashp_present_value::Real # avoided capital expenditure due to presence of ASHP system vs. defaults heating and cooling techs
28
29
max_ton::Real # maximum allowable thermal power (tons)
@@ -48,6 +49,7 @@ struct ASHP <: AbstractThermalTech
48
49
can_serve_process_heat:: Bool
49
50
can_serve_cooling:: Bool
50
51
force_into_system:: Bool
52
+ force_dispatch:: Bool
51
53
back_up_temp_threshold_degF:: Real
52
54
avoided_capex_by_ashp_present_value:: Real
53
55
max_ton:: Real
@@ -81,6 +83,7 @@ function ASHPSpaceHeater(;
81
83
macrs_bonus_fraction::Real = 0.0, # Fraction of upfront project costs to depreciate under MACRS
82
84
can_serve_cooling::Union{Bool, Nothing} = nothing # If ASHP can supply heat to the cooling load
83
85
force_into_system::Bool = false # force into system to serve all space heating loads if true
86
+ force_dispatch::Bool = false # force ASHP to meet load or maximize output if true
84
87
avoided_capex_by_ashp_present_value::Real = 0.0 # avoided capital expenditure due to presence of ASHP system vs. defaults heating and cooling techs
85
88
86
89
#The following inputs are used to create the attributes heating_cop and heating cf:
@@ -103,7 +106,7 @@ function ASHPSpaceHeater(;
103
106
"""
104
107
function ASHPSpaceHeater (;
105
108
min_ton:: Real = 0.0 ,
106
- max_ton:: Real = BIG_NUMBER ,
109
+ max_ton:: Union{ Real, Nothing} = nothing ,
107
110
min_allowable_ton:: Union{Real, Nothing} = nothing ,
108
111
min_allowable_peak_capacity_fraction:: Union{Real, Nothing} = nothing ,
109
112
sizing_factor:: Union{Real, Nothing} = nothing ,
@@ -114,6 +117,7 @@ function ASHPSpaceHeater(;
114
117
avoided_capex_by_ashp_present_value:: Real = 0.0 ,
115
118
can_serve_cooling:: Union{Bool, Nothing} = nothing ,
116
119
force_into_system:: Bool = false ,
120
+ force_dispatch:: Bool = false ,
117
121
heating_cop_reference:: Array{<:Real,1} = Real[],
118
122
heating_cf_reference:: Array{<:Real,1} = Real[],
119
123
heating_reference_temps_degF:: Array{<:Real,1} = Real[],
@@ -144,9 +148,6 @@ function ASHPSpaceHeater(;
144
148
if isnothing (back_up_temp_threshold_degF)
145
149
back_up_temp_threshold_degF = defaults[" back_up_temp_threshold_degF" ]
146
150
end
147
- if isnothing (max_ton)
148
- max_ton = defaults[" max_ton" ]
149
- end
150
151
if isnothing (sizing_factor)
151
152
sizing_factor = defaults[" sizing_factor" ]
152
153
end
@@ -177,11 +178,6 @@ function ASHPSpaceHeater(;
177
178
can_serve_process_heat = defaults[" can_serve_process_heat" ]
178
179
179
180
180
- # Convert max sizes, cost factors from mmbtu_per_hour to kw
181
- min_kw = min_ton * KWH_THERMAL_PER_TONHOUR
182
- max_kw = max_ton * KWH_THERMAL_PER_TONHOUR
183
-
184
-
185
181
installed_cost_per_kw = installed_cost_per_ton / KWH_THERMAL_PER_TONHOUR
186
182
om_cost_per_kw = om_cost_per_ton / KWH_THERMAL_PER_TONHOUR
187
183
@@ -206,6 +202,26 @@ function ASHPSpaceHeater(;
206
202
cooling_cf = Float64[]
207
203
end
208
204
205
+ if isnothing (max_ton)
206
+ if can_serve_cooling
207
+ # these are in kW rathern than tons so will be larger as a measure of conservatism
208
+ max_ton = min (defaults[" max_ton" ], 10 * (maximum (heating_load ./ heating_cf)+ maximum (cooling_load ./ cooling_cf)))
209
+ else
210
+ max_ton = min (defaults[" max_ton" ], 10 * maximum (heating_load ./ heating_cf))
211
+ 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
218
+ max_ton = max (max_ton, min_ton)
219
+ end
220
+
221
+ # Convert max sizes, cost factors from mmbtu_per_hour to kw
222
+ min_kw = min_ton * KWH_THERMAL_PER_TONHOUR
223
+ max_kw = max_ton * KWH_THERMAL_PER_TONHOUR
224
+
209
225
if ! isnothing (min_allowable_ton) && ! isnothing (min_allowable_peak_capacity_fraction)
210
226
throw (@error (" at most one of min_allowable_ton and min_allowable_peak_capacity_fraction may be input." ))
211
227
elseif ! isnothing (min_allowable_ton)
@@ -244,6 +260,7 @@ function ASHPSpaceHeater(;
244
260
can_serve_process_heat,
245
261
can_serve_cooling,
246
262
force_into_system,
263
+ force_dispatch,
247
264
back_up_temp_threshold_degF,
248
265
avoided_capex_by_ashp_present_value,
249
266
max_ton,
@@ -278,6 +295,7 @@ function ASHPWaterHeater(;
278
295
can_supply_steam_turbine::Union{Bool, nothing} = nothing # If the boiler can supply steam to the steam turbine for electric production
279
296
avoided_capex_by_ashp_present_value::Real = 0.0 # avoided capital expenditure due to presence of ASHP system vs. defaults heating and cooling techs
280
297
force_into_system::Bool = false # force into system to serve all hot water loads if true
298
+ force_dispatch::Bool = false # force ASHP to meet load or maximize output if true
281
299
282
300
#The following inputs are used to create the attributes heating_cop and heating cf:
283
301
heating_cop_reference::Array{<:Real,1}, # COP of the heating (i.e., thermal produced / electricity consumed)
@@ -293,7 +311,7 @@ function ASHPWaterHeater(;
293
311
"""
294
312
function ASHPWaterHeater (;
295
313
min_ton:: Real = 0.0 ,
296
- max_ton:: Real = BIG_NUMBER ,
314
+ max_ton:: Union{ Real, Nothing} = nothing ,
297
315
min_allowable_ton:: Union{Real, Nothing} = nothing ,
298
316
min_allowable_peak_capacity_fraction:: Union{Real, Nothing} = nothing ,
299
317
sizing_factor:: Union{Real, Nothing} = nothing ,
@@ -303,6 +321,7 @@ function ASHPWaterHeater(;
303
321
macrs_bonus_fraction:: Real = 0.0 ,
304
322
avoided_capex_by_ashp_present_value:: Real = 0.0 ,
305
323
force_into_system:: Bool = false ,
324
+ force_dispatch:: Bool = false ,
306
325
heating_cop_reference:: Array{<:Real,1} = Real[],
307
326
heating_cf_reference:: Array{<:Real,1} = Real[],
308
327
heating_reference_temps_degF:: Array{<:Real,1} = Real[],
@@ -323,9 +342,6 @@ function ASHPWaterHeater(;
323
342
if isnothing (back_up_temp_threshold_degF)
324
343
back_up_temp_threshold_degF = defaults[" back_up_temp_threshold_degF" ]
325
344
end
326
- if isnothing (max_ton)
327
- max_ton = defaults[" max_ton" ]
328
- end
329
345
if isnothing (sizing_factor)
330
346
sizing_factor = defaults[" sizing_factor" ]
331
347
end
@@ -347,10 +363,6 @@ function ASHPWaterHeater(;
347
363
can_serve_process_heat = defaults[" can_serve_process_heat" ]
348
364
can_serve_cooling = defaults[" can_serve_cooling" ]
349
365
350
- # Convert max sizes, cost factors from mmbtu_per_hour to kw
351
- min_kw = min_ton * KWH_THERMAL_PER_TONHOUR
352
- max_kw = max_ton * KWH_THERMAL_PER_TONHOUR
353
-
354
366
installed_cost_per_kw = installed_cost_per_ton / KWH_THERMAL_PER_TONHOUR
355
367
om_cost_per_kw = om_cost_per_ton / KWH_THERMAL_PER_TONHOUR
356
368
@@ -363,6 +375,18 @@ function ASHPWaterHeater(;
363
375
364
376
heating_cf[heating_cop .== 1 ] .= 1
365
377
378
+ if isnothing (max_ton)
379
+ # these are in kW rathern than tons so will be larger as a measure of conservatism
380
+ 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))
383
+ end
384
+ max_ton = max (max_ton, min_ton)
385
+
386
+ # Convert max sizes, cost factors from mmbtu_per_hour to kw
387
+ min_kw = min_ton * KWH_THERMAL_PER_TONHOUR
388
+ max_kw = max_ton * KWH_THERMAL_PER_TONHOUR
389
+
366
390
if ! isnothing (min_allowable_ton) && ! isnothing (min_allowable_peak_capacity_fraction)
367
391
throw (@error (" at most one of min_allowable_ton and min_allowable_peak_capacity_fraction may be input." ))
368
392
elseif ! isnothing (min_allowable_ton)
@@ -398,6 +422,7 @@ function ASHPWaterHeater(;
398
422
can_serve_process_heat,
399
423
can_serve_cooling,
400
424
force_into_system,
425
+ force_dispatch,
401
426
back_up_temp_threshold_degF,
402
427
avoided_capex_by_ashp_present_value,
403
428
max_ton,
0 commit comments