Skip to content

Initialize HPWHsim presets from embedded CBOR #551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
- name: Get number of CPU cores # Can replace when CMake is upgraded to 3.29
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
run: uv python install
- name: Build CSE
uses: ./.github/actions/build-cse
with:
Expand Down
6 changes: 3 additions & 3 deletions src/dhwcalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4690,9 +4690,9 @@ RC DHWHEATER::wh_HPWHInit() // initialize HPWH model
// Temporarily turn off warnings (to avoid excessive messages during iteration)
auto courier = dynamic_cast<CSERecordCourier*>(wh_HPWH.hw_pHPWH->get_courier().get());
courier->set_message_level(MSGTY::msgtyERROR);
// Adjust COP coefficients to match UEF
wh_HPWH.hw_pHPWH->makeGenericUEF(wh_UEF);

// Adjust tier3 COP coefficients to match UEF
wh_HPWH.hw_pHPWH->makeGenericUEF(wh_UEF, HPWH::PerformancePolySet::tier3);

courier->restore_message_level();
}
Expand Down
12 changes: 6 additions & 6 deletions test/ref-macos64-appleclang/BGTEST.REP
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ Energy (kBtu + into the zone, except E = Energy Consumed) for Fri 10-Jul

! Log for Run 001:

! CSE 0.925.0+concat.45b7b13a.25 for Win32 console
! CSE 0.925.0+init-presets-from-cbor-hpwh.5e2a5f51.37 for Win32 console



Expand Down Expand Up @@ -1752,18 +1752,18 @@ Input for Run 001:



! CSE 0.925.0+concat.45b7b13a.25 for Win32 console run(s) done: Tue 20-May-25 9:12:15 pm
! CSE 0.925.0+init-presets-from-cbor-hpwh.5e2a5f51.37 for Win32 console run(s) done: Tue 03-Jun-25 11:49:29 pm

! Executable: /users/runner/work/cse/cse/build/cse-appleclang-64
! ? (enExeInfo fail) (HPWH 1.25.0+HEAD.cc0bb806.445)
! ? (enExeInfo fail) (HPWH 1.25.0+HEAD.88a57cab.576)
! Command line: -x! -b -t1 bgtest
! Input file: /Users/runner/work/cse/cse/test/bgtest.cse
! Report file: /USERS/RUNNER/WORK/CSE/CSE/TEST/BGTEST.REP

! Timing info --

! Input: Time = 0.04 Calls = 1 T/C = 0.0360
! Input: Time = 0.04 Calls = 1 T/C = 0.0390
! AutoSizing: Time = 0.00 Calls = 0 T/C = 0.0000
! Simulation: Time = 8.55 Calls = 1 T/C = 8.5550
! Simulation: Time = 8.89 Calls = 1 T/C = 8.8940
! Reports: Time = 0.00 Calls = 1 T/C = 0.0010
! Total: Time = 8.59 Calls = 1 T/C = 8.5930
! Total: Time = 8.94 Calls = 1 T/C = 8.9350
7,810 changes: 3,905 additions & 3,905 deletions test/ref-macos64-appleclang/CHDHW.REP

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions test/ref-macos64-appleclang/DHWDU.rep
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

! Log for Run 001:

! CSE 0.925.0+concat.45b7b13a.25 for Win32 console
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console



Expand Down Expand Up @@ -60102,7 +60102,7 @@ Hourly Cond Report, Thu 31-Dec

! Log for Run 002:

! CSE 0.925.0+concat.45b7b13a.25 for Win32 console
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console



Expand Down Expand Up @@ -61520,18 +61520,18 @@ Input for Run 001:



! CSE 0.925.0+concat.45b7b13a.25 for Win32 console run(s) done: Tue 20-May-25 9:12:26 pm
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console run(s) done: Wed 04-Jun-25 6:12:56 pm

! Executable: /users/runner/work/cse/cse/build/cse-appleclang-64
! ? (enExeInfo fail) (HPWH 1.25.0+HEAD.cc0bb806.445)
! ? (enExeInfo fail) (HPWH 1.25.0+HEAD.2a1da388.578)
! Command line: -x! -b -t1 dhwDU
! Input file: /Users/runner/work/cse/cse/test/dhwDU.cse
! Report file: /USERS/RUNNER/WORK/CSE/CSE/TEST/DHWDU.REP

! Timing info --

! Input: Time = 0.15 Calls = 3 T/C = 0.0500
! AutoSizing: Time = 0.23 Calls = 1 T/C = 0.2340
! Simulation: Time = 4.02 Calls = 2 T/C = 2.0095
! Reports: Time = 0.05 Calls = 2 T/C = 0.0230
! Total: Time = 4.45 Calls = 1 T/C = 4.4490
! Input: Time = 0.18 Calls = 3 T/C = 0.0603
! AutoSizing: Time = 0.32 Calls = 1 T/C = 0.3210
! Simulation: Time = 4.42 Calls = 2 T/C = 2.2105
! Reports: Time = 0.05 Calls = 2 T/C = 0.0240
! Total: Time = 4.97 Calls = 1 T/C = 4.9730
16 changes: 8 additions & 8 deletions test/ref-macos64-appleclang/DHW_AQUATHERMAIRE.REP
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ DHWSYS (kBtu)

! Log for Run 001:

! CSE 0.925.0+concat.45b7b13a.25 for Win32 console
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console



Expand Down Expand Up @@ -3741,7 +3741,7 @@ DHWSYS (kBtu)

! Log for Run 002:

! CSE 0.925.0+concat.45b7b13a.25 for Win32 console
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console



Expand All @@ -3760,18 +3760,18 @@ Input for Run 002:



! CSE 0.925.0+concat.45b7b13a.25 for Win32 console run(s) done: Tue 20-May-25 9:12:37 pm
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console run(s) done: Wed 04-Jun-25 6:13:07 pm

! Executable: /users/runner/work/cse/cse/build/cse-appleclang-64
! ? (enExeInfo fail) (HPWH 1.25.0+HEAD.cc0bb806.445)
! ? (enExeInfo fail) (HPWH 1.25.0+HEAD.2a1da388.578)
! Command line: -x! -b -t1 dhw_aquathermaire
! Input file: /Users/runner/work/cse/cse/test/dhw_aquathermaire.cse
! Report file: /USERS/RUNNER/WORK/CSE/CSE/TEST/DHW_AQUATHERMAIRE.REP

! Timing info --

! Input: Time = 0.14 Calls = 2 T/C = 0.0700
! Input: Time = 0.21 Calls = 2 T/C = 0.1050
! AutoSizing: Time = 0.00 Calls = 0 T/C = 0.0000
! Simulation: Time = 6.53 Calls = 2 T/C = 3.2665
! Reports: Time = 0.00 Calls = 2 T/C = 0.0015
! Total: Time = 6.68 Calls = 1 T/C = 6.6760
! Simulation: Time = 6.39 Calls = 2 T/C = 3.1970
! Reports: Time = 0.00 Calls = 2 T/C = 0.0005
! Total: Time = 6.61 Calls = 1 T/C = 6.6060
12 changes: 6 additions & 6 deletions test/ref-macos64-appleclang/DHW_C.REP
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ Yr 0 0 0 0 0 0 0

! Log for Run 001:

! CSE 0.925.0+concat.45b7b13a.25 for Win32 console
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console



Expand Down Expand Up @@ -1771,18 +1771,18 @@ Input for Run 001:



! CSE 0.925.0+concat.45b7b13a.25 for Win32 console run(s) done: Tue 20-May-25 9:12:25 pm
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console run(s) done: Wed 04-Jun-25 6:12:55 pm

! Executable: /users/runner/work/cse/cse/build/cse-appleclang-64
! ? (enExeInfo fail) (HPWH 1.25.0+HEAD.cc0bb806.445)
! ? (enExeInfo fail) (HPWH 1.25.0+HEAD.2a1da388.578)
! Command line: -x! -b -t1 dhw_C
! Input file: /Users/runner/work/cse/cse/test/dhw_C.cse
! Report file: /USERS/RUNNER/WORK/CSE/CSE/TEST/DHW_C.REP

! Timing info --

! Input: Time = 0.10 Calls = 1 T/C = 0.1020
! Input: Time = 0.10 Calls = 1 T/C = 0.1040
! AutoSizing: Time = 0.00 Calls = 0 T/C = 0.0000
! Simulation: Time = 1.11 Calls = 1 T/C = 1.1120
! Simulation: Time = 1.82 Calls = 1 T/C = 1.8250
! Reports: Time = 0.00 Calls = 1 T/C = 0.0010
! Total: Time = 1.22 Calls = 1 T/C = 1.2160
! Total: Time = 1.93 Calls = 1 T/C = 1.9310
22 changes: 11 additions & 11 deletions test/ref-macos64-appleclang/DHW_DR.REP
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ Day 39.430 0 0 0 10.206 25.961 0 0 0 0 0

! Log for Run 001:

! CSE 0.925.0+concat.45b7b13a.25 for Win32 console
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console



Expand Down Expand Up @@ -5471,7 +5471,7 @@ Day 35.682 0 0 0 11.241 21.202 0 0 0 0 0

! Log for Run 002:

! CSE 0.925.0+concat.45b7b13a.25 for Win32 console
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console



Expand Down Expand Up @@ -5868,7 +5868,7 @@ Day 36.089 0 0 0 11.375 22.382 0 0 0 0 0

! Log for Run 003:

! CSE 0.925.0+concat.45b7b13a.25 for Win32 console
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console



Expand Down Expand Up @@ -6265,7 +6265,7 @@ Day 31.636 0 0 0 12.737 15.399 0 0 0 0 0

! Log for Run 004:

! CSE 0.925.0+concat.45b7b13a.25 for Win32 console
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console



Expand Down Expand Up @@ -6662,7 +6662,7 @@ Day 28.734 0 0 0 13.654 12.446 0 0 0 0 0

! Log for Run 005:

! CSE 0.925.0+concat.45b7b13a.25 for Win32 console
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console



Expand All @@ -6678,18 +6678,18 @@ Input for Run 005:



! CSE 0.925.0+concat.45b7b13a.25 for Win32 console run(s) done: Tue 20-May-25 9:12:29 pm
! CSE 0.925.0+init-presets-from-cbor-hpwh.a4215d7d.42 for Win32 console run(s) done: Wed 04-Jun-25 6:13:00 pm

! Executable: /users/runner/work/cse/cse/build/cse-appleclang-64
! ? (enExeInfo fail) (HPWH 1.25.0+HEAD.cc0bb806.445)
! ? (enExeInfo fail) (HPWH 1.25.0+HEAD.2a1da388.578)
! Command line: -x! -b -t1 dhw_dr
! Input file: /Users/runner/work/cse/cse/test/dhw_dr.cse
! Report file: /USERS/RUNNER/WORK/CSE/CSE/TEST/DHW_DR.REP

! Timing info --

! Input: Time = 0.79 Calls = 5 T/C = 0.1578
! Input: Time = 0.60 Calls = 5 T/C = 0.1204
! AutoSizing: Time = 0.00 Calls = 0 T/C = 0.0000
! Simulation: Time = 2.54 Calls = 5 T/C = 0.5074
! Reports: Time = 0.01 Calls = 5 T/C = 0.0010
! Total: Time = 3.33 Calls = 1 T/C = 3.3340
! Simulation: Time = 3.65 Calls = 5 T/C = 0.7290
! Reports: Time = 0.01 Calls = 5 T/C = 0.0026
! Total: Time = 4.26 Calls = 1 T/C = 4.2620
Loading