Changed names of insel generated output files
This commit is contained in:
parent
81bb8a1795
commit
702c8c4103
|
@ -23,7 +23,7 @@ class TestEnergySystemsFactory(TestCase):
|
|||
:return: None
|
||||
"""
|
||||
city_file = "../unittests/tests_data/C40_Final.gml"
|
||||
self._output_path = "../unittests/tests_data/user_output.csv"
|
||||
self._output_path = "../unittests/tests_data/as_user_output.csv"
|
||||
self._city = GeometryFactory('citygml', city_file).city
|
||||
EnergySystemsFactory('air source hp', self._city).enrich()
|
||||
|
||||
|
|
|
@ -7,13 +7,15 @@ from unittest import TestCase
|
|||
from imports.geometry_factory import GeometryFactory
|
||||
from imports.energy_systems_factory import EnergySystemsFactory
|
||||
from city_model_structure.energy_systems.water_to_water_hp import WaterToWaterHP
|
||||
from exports.energy_systems_factory import EnergySystemsExportFactory
|
||||
import pandas as pd
|
||||
|
||||
import os
|
||||
|
||||
|
||||
class TestEnergySystemsFactory(TestCase):
|
||||
"""
|
||||
TestBuilding TestCase 1
|
||||
TestEnergySystemsFactory for Water to Water HP
|
||||
"""
|
||||
|
||||
def setUp(self) -> None:
|
||||
|
@ -22,16 +24,41 @@ class TestEnergySystemsFactory(TestCase):
|
|||
:return: None
|
||||
"""
|
||||
city_file = "../unittests/tests_data/C40_Final.gml"
|
||||
self._output_path = "../unittests/tests_data/user_output.csv"
|
||||
self._output_path = "../unittests/tests_data/w2w_user_output.csv"
|
||||
self._city = GeometryFactory('citygml', city_file).city
|
||||
EnergySystemsFactory('water to water hp', self._city).enrich()
|
||||
|
||||
def test_air_source_heat_pump_import(self):
|
||||
def test_water_to_water_heat_pump_import(self):
|
||||
self.assertIsNotNone(self._city.energy_systems, 'City has energy systems')
|
||||
self.assertIsInstance(self._city.energy_systems[0].water_to_water_hp, WaterToWaterHP)
|
||||
self.assertEqual(self._city.energy_systems[0].water_to_water_hp.model, 'ClimateMaster 156 kW')
|
||||
self.assertEqual(self._city.energy_systems[2].water_to_water_hp.model, 'ClimateMaster 335 kW')
|
||||
|
||||
def test_water_to_water_heat_pump_export(self):
|
||||
# User defined paramenters
|
||||
user_input = {
|
||||
'StartYear': 2020,
|
||||
'EndYear': 2021,
|
||||
'MaximumHPEnergyInput': 8000,
|
||||
'HoursOfStorageAtMaxDemand': 1,
|
||||
'BuildingSuppTemp': 40,
|
||||
'TemperatureDifference': 15,
|
||||
'FuelLHV': 47100,
|
||||
'FuelPrice': 0.12,
|
||||
'FuelEF': 1887,
|
||||
'FuelDensity': 0.717,
|
||||
'HPSupTemp': 60,
|
||||
# parameters below depend on HPSupTem
|
||||
'HPDisactivationTemperature': 55,
|
||||
'HPReactivationTemperature': 42
|
||||
}
|
||||
|
||||
EnergySystemsExportFactory(self._city, user_input, 'ClimateMaster 156 kW', self._output_path).export('water')
|
||||
df = pd.read_csv(self._output_path)
|
||||
print(df.shape)
|
||||
#self.assertEqual(df.shape, (13, 3))
|
||||
#self.assertEqual(df.iloc[0, 1], 3045398.0)
|
||||
|
||||
def tearDown(self) -> None:
|
||||
try:
|
||||
os.remove(self._output_path)
|
||||
|
|
Loading…
Reference in New Issue
Block a user