Skip to content

Commit

Permalink
add ProcessHeatLoadInputs to views and get_input_dict_from_run_uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
zolanaj committed May 7, 2024
1 parent f8cd01d commit dda4d3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions reoptjl/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7341,6 +7341,9 @@ def filter_none_and_empty_array(d:dict):
try: d["DomesticHotWaterLoad"] = filter_none_and_empty_array(meta.DomesticHotWaterLoadInputs.dict)
except: pass

try: d["ProcessHeatLoad"] = filter_none_and_empty_array(meta.ProcessHeatLoadInputs.dict)
except: pass

try: d["HotThermalStorage"] = filter_none_and_empty_array(meta.HotThermalStorageInputs.dict)
except: pass

Expand Down
6 changes: 5 additions & 1 deletion reoptjl/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
CoolingLoadOutputs, HeatingLoadOutputs, REoptjlMessageOutputs, HotThermalStorageInputs, HotThermalStorageOutputs,\
ColdThermalStorageInputs, ColdThermalStorageOutputs, AbsorptionChillerInputs, AbsorptionChillerOutputs,\
FinancialInputs, FinancialOutputs, UserUnlinkedRuns, BoilerInputs, BoilerOutputs, SteamTurbineInputs, \
SteamTurbineOutputs, GHPInputs, GHPOutputs
SteamTurbineOutputs, GHPInputs, GHPOutputs, ProcessHeatLoadInputs
import os
import requests
import numpy as np
Expand Down Expand Up @@ -53,6 +53,7 @@ def help(request):
d["ColdThermalStorage"] = ColdThermalStorageInputs.info_dict(ColdThermalStorageInputs)
d["SpaceHeatingLoad"] = SpaceHeatingLoadInputs.info_dict(SpaceHeatingLoadInputs)
d["DomesticHotWaterLoad"] = DomesticHotWaterLoadInputs.info_dict(DomesticHotWaterLoadInputs)
d["ProcessHeatLoad"] = ProcessHeatLoadInputs.info_dict(ProcessHeatLoadInputs)
d["Site"] = SiteInputs.info_dict(SiteInputs)
d["CHP"] = CHPInputs.info_dict(CHPInputs)
d["AbsorptionChiller"] = AbsorptionChillerInputs.info_dict(AbsorptionChillerInputs)
Expand Down Expand Up @@ -214,6 +215,9 @@ def results(request, run_uuid):
try: r["inputs"]["DomesticHotWaterLoad"] = meta.DomesticHotWaterLoadInputs.dict
except: pass

try: r["inputs"]["ProcessHeatLoad"] = meta.ProcessHeatLoadInputs.dict
except: pass

try: r["inputs"]["CHP"] = meta.CHPInputs.dict
except: pass

Expand Down

0 comments on commit dda4d3a

Please sign in to comment.