Conversation
|
This PR changes variable/meter and node numbering and broke all unit tests that rely on hard-coded numbers for these, a few for meters, many more for nodes. I have been able to fix most of these, but a few remain:
I tried a few fixes in one of the tests (I think the first one) and they didn't work for reasons that I couldn't parse.
Cannot get these to reproduce locally (mac arm64). Strangely, my local build had some other broken unit tests (e.g., in
This test uses very strange node number arithmetic that makes no sense to me. I tried to fix it both the way it was and the way I thought it should have been and neither of them worked. There is also a broken integration test that I need some advice on how to approach. |
|
@amirroth I fixed the AFN unit test that output the most useful information on the failure on Windows, the others will take a little bit more digging but seem to be somewhat similar so far. |
It looks like the coil was previously underspecified but wasn't hitting the validation in the test.
This one was failing on an infinite loop, there's protection against that now but may have unintended consequences.
|
|
jasondegraw
left a comment
There was a problem hiding this comment.
I've fixed the four failing AFN unit tests with changes that are mainly OK. I made a couple of comments on the fixes. The branch seems to have a whitespace problem, git was a bit confused about changes, but Windows may not have helped with that.
| }); | ||
|
|
||
| ASSERT_TRUE(process_idf(idf_objects)); | ||
| state->init_state(*state); |
There was a problem hiding this comment.
This change may run counter to the purpose of this branch, but I'll argue that the purpose of the unit test is (most likely) to check all of the AFN checks that happen in the test and not that the other parts of the model are set up correctly. Because they probably aren't.
| DuctSizingSBFlag = true; | ||
| } | ||
| while (NodeNum1 != NodeSplitter) { | ||
| bool foundNextDuct = false; |
There was a problem hiding this comment.
Added this boolean as part of a trapdoor to prevent an infinite loop failure. This came up in one of the failing unit tests, it then failed more normally, but the approach itself is risky.
The coil API refactor continues. Here, the various
GetCoilInputfunctions are moved toinit_state()and hilarity/madness ensues.