-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created TestHGTRVHPModelSoftATemperature.
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
test/javasrc/localtest/TestHGTRVHPModelSoftATemperature.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
Copyright (c) 2023, Damon Hart-Davis | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package localtest; | ||
|
||
import org.hd.d.TRVmodel.hg.HGTRVHPMModelParameterised; | ||
import org.hd.d.TRVmodel.hg.HGTRVHPMModelParameterised.DemandWithoutAndWithSetback; | ||
|
||
import junit.framework.TestCase; | ||
|
||
/**Test the parameterised Heat Geek TRV-with-HP model with soft A-room temperatures. */ | ||
public final class TestHGTRVHPModelSoftATemperature extends TestCase | ||
{ | ||
/**Test with 'fix' parameters but otherwise original setup. */ | ||
public static void testWithFixParameters() | ||
{ | ||
final HGTRVHPMModelParameterised.ModelParameters fixParams = HGTRVHPMModelParameterised.ModelParameters.FIXES_APPLIED; | ||
final DemandWithoutAndWithSetback originalBungalowDemand = HGTRVHPMModelParameterised.computeBungalowDemandW(fixParams); | ||
// final DemandWithoutAndWithSetback detachedDemand = HGTRVHPMModelParameterised.computeDetachedDemandW(fixParams); | ||
final DemandWithoutAndWithSetback softBungalowDemand = HGTRVHPMModelParameterised.computeSoftATempDemandW(fixParams, true); | ||
// final DemandWithoutAndWithSetback softDetachedDemand = HGTRVHPMModelParameterised.computeSoftATempDemandW(fixParams, true); | ||
|
||
// Both heat demand and heat-pump electricity demand are expected to be identical to the original | ||
// without B rooms set back. | ||
assertEquals(originalBungalowDemand.noSetback().heatDemand(), softBungalowDemand.noSetback().heatDemand(), 1.0); | ||
assertEquals(originalBungalowDemand.noSetback().heatPumpElectricity(), softBungalowDemand.noSetback().heatPumpElectricity(), 1.0); | ||
|
||
|
||
// Both heat demand and heat-pump electricity demand are expected to be strictly lower than the original | ||
// when B rooms are set back and A rooms have soft temperature regulation (weather compensation). | ||
// assertTrue(softBungalowDemand. | ||
|
||
|
||
} | ||
|
||
} |