diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index c1abe84e..67318eb9 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -30,19 +30,12 @@ jobs: cxx: cl experimental: false - os: macos - os_ver: "12" + os_ver: "13" config: Release coverage: false cc: clang cxx: clang++ experimental: false - - os: macos - os_ver: "11" - config: Release - coverage: false - cc: clang - cxx: clang++ - experimental: true - os: ubuntu os_ver: "20.04" config: Debug diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/ashrae205.h b/hpwh_data_model/cpp/include/hpwh_data_model/ashrae205.h index 5fcc70dd..c951385b 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/ashrae205.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/ashrae205.h @@ -9,188 +9,222 @@ /// @note This class has been auto-generated. Local changes will not be saved! -namespace hpwh_data_model { - namespace ashrae205_ns { - enum class SchemaType { - RS0001, - RS0002, - RS0003, - RS0004, - RS0005, - RS0006, - RS0007, - RSINTEGRATEDWATERHEATER, - RSTANK, - RSRESISTANCEWATERHEATSOURCE, - RSCONDENSERWATERHEATSOURCE, - HPWHSIMINPUT, - UNKNOWN - }; - const static std::unordered_map SchemaType_info { - {SchemaType::RS0001, {"RS0001", "RS0001", "Liquid-Cooled Chiller"}}, - {SchemaType::RS0002, {"RS0002", "RS0002", "Unitary Cooling Air-Conditioning Equipment"}}, - {SchemaType::RS0003, {"RS0003", "RS0003", "Fan Assembly"}}, - {SchemaType::RS0004, {"RS0004", "RS0004", "Air-to-Air Direct Expansion Refrigerant Coil System"}}, - {SchemaType::RS0005, {"RS0005", "RS0005", "Motor"}}, - {SchemaType::RS0006, {"RS0006", "RS0006", "Electronic Motor Drive"}}, - {SchemaType::RS0007, {"RS0007", "RS0007", "Mechanical Drive"}}, - {SchemaType::RSINTEGRATEDWATERHEATER, {"RSINTEGRATEDWATERHEATER", "RSINTEGRATEDWATERHEATER", "Integrated Heat-Pump Water Heater"}}, - {SchemaType::RSTANK, {"RSTANK", "RSTANK", "Water Tank"}}, - {SchemaType::RSRESISTANCEWATERHEATSOURCE, {"RSRESISTANCEWATERHEATSOURCE", "RSRESISTANCEWATERHEATSOURCE", "Resistance Water Heat Source"}}, - {SchemaType::RSCONDENSERWATERHEATSOURCE, {"RSCONDENSERWATERHEATSOURCE", "RSCONDENSERWATERHEATSOURCE", "Condenser Water Heat Source"}}, - {SchemaType::HPWHSIMINPUT, {"HPWHSIMINPUT", "HPWHSIMINPUT", "Input required to describe a heat pump water heating system in HPWHsim"}}, - {SchemaType::UNKNOWN, {"UNKNOWN", "None", "None"}} - }; - enum class CompressorType { - RECIPROCATING, - SCREW, - CENTRIFUGAL, - ROTARY, - SCROLL, - UNKNOWN - }; - const static std::unordered_map CompressorType_info { - {CompressorType::RECIPROCATING, {"RECIPROCATING", "Reciprocating", "Reciprocating compressor"}}, - {CompressorType::SCREW, {"SCREW", "Screw", "Screw compressor"}}, - {CompressorType::CENTRIFUGAL, {"CENTRIFUGAL", "Centrifugal", "Centrifugal compressor"}}, - {CompressorType::ROTARY, {"ROTARY", "Rotary", "Rotary compressor"}}, - {CompressorType::SCROLL, {"SCROLL", "Scroll", "Scroll compressor"}}, - {CompressorType::UNKNOWN, {"UNKNOWN", "None", "None"}} - }; - enum class CompressorSpeedControlType { - DISCRETE, - CONTINUOUS, - UNKNOWN - }; - const static std::unordered_map CompressorSpeedControlType_info { - {CompressorSpeedControlType::DISCRETE, {"DISCRETE", "Discrete", "Compressor loading is controlled by cycling between one or more discrete stages"}}, - {CompressorSpeedControlType::CONTINUOUS, {"CONTINUOUS", "Continuous", "Compressor loading is controlled by continuously varying the speed of the compressor"}}, - {CompressorSpeedControlType::UNKNOWN, {"UNKNOWN", "None", "None"}} - }; - enum class CondenserType { - AIR, - LIQUID, - EVAPORATIVE, - UNKNOWN - }; - const static std::unordered_map CondenserType_info { - {CondenserType::AIR, {"AIR", "Air", "Air-cooled condenser"}}, - {CondenserType::LIQUID, {"LIQUID", "Liquid", "Liquid-cooled condenser"}}, - {CondenserType::EVAPORATIVE, {"EVAPORATIVE", "Evaporative", "Evaporative condenser"}}, - {CondenserType::UNKNOWN, {"UNKNOWN", "None", "None"}} - }; - enum class LiquidConstituent { - WATER, - PROPYLENE_GLYCOL, - ETHYLENE_GLYCOL, - SODIUM_CHLORIDE, - CALCIUM_CHLORIDE, - ETHANOL, - METHANOL, - UNKNOWN - }; - const static std::unordered_map LiquidConstituent_info { - {LiquidConstituent::WATER, {"WATER", "Water", "Water"}}, - {LiquidConstituent::PROPYLENE_GLYCOL, {"PROPYLENE_GLYCOL", "Propylene Glycol", "Propylene glycol"}}, - {LiquidConstituent::ETHYLENE_GLYCOL, {"ETHYLENE_GLYCOL", "Ethylene Glycol", "Ethylene glycol"}}, - {LiquidConstituent::SODIUM_CHLORIDE, {"SODIUM_CHLORIDE", "Sodium Chloride", "Sodium chloride"}}, - {LiquidConstituent::CALCIUM_CHLORIDE, {"CALCIUM_CHLORIDE", "Calcium Chloride", "Calcium chloride"}}, - {LiquidConstituent::ETHANOL, {"ETHANOL", "Ethanol", "Ethanol"}}, - {LiquidConstituent::METHANOL, {"METHANOL", "Methanol", "Methanol"}}, - {LiquidConstituent::UNKNOWN, {"UNKNOWN", "None", "None"}} - }; - enum class ConcentrationType { - BY_VOLUME, - BY_MASS, - UNKNOWN - }; - const static std::unordered_map ConcentrationType_info { - {ConcentrationType::BY_VOLUME, {"BY_VOLUME", "By Volume", "Concentration is defined as a fraction of total liquid mixture volume"}}, - {ConcentrationType::BY_MASS, {"BY_MASS", "By Mass", "Concentration is defined as a fraction of total liquid mixture mass"}}, - {ConcentrationType::UNKNOWN, {"UNKNOWN", "None", "None"}} - }; - inline std::shared_ptr logger; - void set_logger(std::shared_ptr value); - struct Schema { - const static std::string_view schema_title; - const static std::string_view schema_version; - const static std::string_view schema_description; - }; - struct LiquidComponent { - ashrae205_ns::LiquidConstituent liquid_constituent; - double concentration; - bool liquid_constituent_is_set; - bool concentration_is_set; - const static std::string_view liquid_constituent_units; - const static std::string_view concentration_units; - const static std::string_view liquid_constituent_description; - const static std::string_view concentration_description; - const static std::string_view liquid_constituent_name; - const static std::string_view concentration_name; - }; - struct LiquidMixture { - std::vector liquid_components; - ashrae205_ns::ConcentrationType concentration_type; - bool liquid_components_is_set; - bool concentration_type_is_set; - const static std::string_view liquid_components_units; - const static std::string_view concentration_type_units; - const static std::string_view liquid_components_description; - const static std::string_view concentration_type_description; - const static std::string_view liquid_components_name; - const static std::string_view concentration_type_name; - }; - NLOHMANN_JSON_SERIALIZE_ENUM (SchemaType, { - {SchemaType::UNKNOWN, "UNKNOWN"}, - {SchemaType::RS0001, "RS0001"}, - {SchemaType::RS0002, "RS0002"}, - {SchemaType::RS0003, "RS0003"}, - {SchemaType::RS0004, "RS0004"}, - {SchemaType::RS0005, "RS0005"}, - {SchemaType::RS0006, "RS0006"}, - {SchemaType::RS0007, "RS0007"}, - {SchemaType::RSINTEGRATEDWATERHEATER, "RSINTEGRATEDWATERHEATER"}, - {SchemaType::RSTANK, "RSTANK"}, - {SchemaType::RSRESISTANCEWATERHEATSOURCE, "RSRESISTANCEWATERHEATSOURCE"}, - {SchemaType::RSCONDENSERWATERHEATSOURCE, "RSCONDENSERWATERHEATSOURCE"}, - {SchemaType::HPWHSIMINPUT, "HPWHSIMINPUT"}, - }) - NLOHMANN_JSON_SERIALIZE_ENUM (CompressorType, { - {CompressorType::UNKNOWN, "UNKNOWN"}, - {CompressorType::RECIPROCATING, "RECIPROCATING"}, - {CompressorType::SCREW, "SCREW"}, - {CompressorType::CENTRIFUGAL, "CENTRIFUGAL"}, - {CompressorType::ROTARY, "ROTARY"}, - {CompressorType::SCROLL, "SCROLL"}, - }) - NLOHMANN_JSON_SERIALIZE_ENUM (CompressorSpeedControlType, { - {CompressorSpeedControlType::UNKNOWN, "UNKNOWN"}, - {CompressorSpeedControlType::DISCRETE, "DISCRETE"}, - {CompressorSpeedControlType::CONTINUOUS, "CONTINUOUS"}, - }) - NLOHMANN_JSON_SERIALIZE_ENUM (CondenserType, { - {CondenserType::UNKNOWN, "UNKNOWN"}, - {CondenserType::AIR, "AIR"}, - {CondenserType::LIQUID, "LIQUID"}, - {CondenserType::EVAPORATIVE, "EVAPORATIVE"}, - }) - NLOHMANN_JSON_SERIALIZE_ENUM (LiquidConstituent, { - {LiquidConstituent::UNKNOWN, "UNKNOWN"}, - {LiquidConstituent::WATER, "WATER"}, - {LiquidConstituent::PROPYLENE_GLYCOL, "PROPYLENE_GLYCOL"}, - {LiquidConstituent::ETHYLENE_GLYCOL, "ETHYLENE_GLYCOL"}, - {LiquidConstituent::SODIUM_CHLORIDE, "SODIUM_CHLORIDE"}, - {LiquidConstituent::CALCIUM_CHLORIDE, "CALCIUM_CHLORIDE"}, - {LiquidConstituent::ETHANOL, "ETHANOL"}, - {LiquidConstituent::METHANOL, "METHANOL"}, - }) - NLOHMANN_JSON_SERIALIZE_ENUM (ConcentrationType, { - {ConcentrationType::UNKNOWN, "UNKNOWN"}, - {ConcentrationType::BY_VOLUME, "BY_VOLUME"}, - {ConcentrationType::BY_MASS, "BY_MASS"}, - }) - void from_json(const nlohmann::json& j, LiquidMixture& x); - void from_json(const nlohmann::json& j, LiquidComponent& x); - } -} +namespace hpwh_data_model +{ +namespace ashrae205_ns +{ +enum class SchemaType +{ + RS0001, + RS0002, + RS0003, + RS0004, + RS0005, + RS0006, + RS0007, + RSINTEGRATEDWATERHEATER, + RSTANK, + RSRESISTANCEWATERHEATSOURCE, + RSCONDENSERWATERHEATSOURCE, + HPWHSIMINPUT, + UNKNOWN +}; +const static std::unordered_map SchemaType_info { + {SchemaType::RS0001, {"RS0001", "RS0001", "Liquid-Cooled Chiller"}}, + {SchemaType::RS0002, {"RS0002", "RS0002", "Unitary Cooling Air-Conditioning Equipment"}}, + {SchemaType::RS0003, {"RS0003", "RS0003", "Fan Assembly"}}, + {SchemaType::RS0004, + {"RS0004", "RS0004", "Air-to-Air Direct Expansion Refrigerant Coil System"}}, + {SchemaType::RS0005, {"RS0005", "RS0005", "Motor"}}, + {SchemaType::RS0006, {"RS0006", "RS0006", "Electronic Motor Drive"}}, + {SchemaType::RS0007, {"RS0007", "RS0007", "Mechanical Drive"}}, + {SchemaType::RSINTEGRATEDWATERHEATER, + {"RSINTEGRATEDWATERHEATER", "RSINTEGRATEDWATERHEATER", "Integrated Heat-Pump Water Heater"}}, + {SchemaType::RSTANK, {"RSTANK", "RSTANK", "Water Tank"}}, + {SchemaType::RSRESISTANCEWATERHEATSOURCE, + {"RSRESISTANCEWATERHEATSOURCE", + "RSRESISTANCEWATERHEATSOURCE", + "Resistance Water Heat Source"}}, + {SchemaType::RSCONDENSERWATERHEATSOURCE, + {"RSCONDENSERWATERHEATSOURCE", "RSCONDENSERWATERHEATSOURCE", "Condenser Water Heat Source"}}, + {SchemaType::HPWHSIMINPUT, + {"HPWHSIMINPUT", + "HPWHSIMINPUT", + "Input required to describe a heat pump water heating system in HPWHsim"}}, + {SchemaType::UNKNOWN, {"UNKNOWN", "None", "None"}}}; +enum class CompressorType +{ + RECIPROCATING, + SCREW, + CENTRIFUGAL, + ROTARY, + SCROLL, + UNKNOWN +}; +const static std::unordered_map CompressorType_info { + {CompressorType::RECIPROCATING, {"RECIPROCATING", "Reciprocating", "Reciprocating compressor"}}, + {CompressorType::SCREW, {"SCREW", "Screw", "Screw compressor"}}, + {CompressorType::CENTRIFUGAL, {"CENTRIFUGAL", "Centrifugal", "Centrifugal compressor"}}, + {CompressorType::ROTARY, {"ROTARY", "Rotary", "Rotary compressor"}}, + {CompressorType::SCROLL, {"SCROLL", "Scroll", "Scroll compressor"}}, + {CompressorType::UNKNOWN, {"UNKNOWN", "None", "None"}}}; +enum class CompressorSpeedControlType +{ + DISCRETE, + CONTINUOUS, + UNKNOWN +}; +const static std::unordered_map + CompressorSpeedControlType_info { + {CompressorSpeedControlType::DISCRETE, + {"DISCRETE", + "Discrete", + "Compressor loading is controlled by cycling between one or more discrete stages"}}, + {CompressorSpeedControlType::CONTINUOUS, + {"CONTINUOUS", + "Continuous", + "Compressor loading is controlled by continuously varying the speed of the compressor"}}, + {CompressorSpeedControlType::UNKNOWN, {"UNKNOWN", "None", "None"}}}; +enum class CondenserType +{ + AIR, + LIQUID, + EVAPORATIVE, + UNKNOWN +}; +const static std::unordered_map CondenserType_info { + {CondenserType::AIR, {"AIR", "Air", "Air-cooled condenser"}}, + {CondenserType::LIQUID, {"LIQUID", "Liquid", "Liquid-cooled condenser"}}, + {CondenserType::EVAPORATIVE, {"EVAPORATIVE", "Evaporative", "Evaporative condenser"}}, + {CondenserType::UNKNOWN, {"UNKNOWN", "None", "None"}}}; +enum class LiquidConstituent +{ + WATER, + PROPYLENE_GLYCOL, + ETHYLENE_GLYCOL, + SODIUM_CHLORIDE, + CALCIUM_CHLORIDE, + ETHANOL, + METHANOL, + UNKNOWN +}; +const static std::unordered_map LiquidConstituent_info { + {LiquidConstituent::WATER, {"WATER", "Water", "Water"}}, + {LiquidConstituent::PROPYLENE_GLYCOL, + {"PROPYLENE_GLYCOL", "Propylene Glycol", "Propylene glycol"}}, + {LiquidConstituent::ETHYLENE_GLYCOL, {"ETHYLENE_GLYCOL", "Ethylene Glycol", "Ethylene glycol"}}, + {LiquidConstituent::SODIUM_CHLORIDE, {"SODIUM_CHLORIDE", "Sodium Chloride", "Sodium chloride"}}, + {LiquidConstituent::CALCIUM_CHLORIDE, + {"CALCIUM_CHLORIDE", "Calcium Chloride", "Calcium chloride"}}, + {LiquidConstituent::ETHANOL, {"ETHANOL", "Ethanol", "Ethanol"}}, + {LiquidConstituent::METHANOL, {"METHANOL", "Methanol", "Methanol"}}, + {LiquidConstituent::UNKNOWN, {"UNKNOWN", "None", "None"}}}; +enum class ConcentrationType +{ + BY_VOLUME, + BY_MASS, + UNKNOWN +}; +const static std::unordered_map ConcentrationType_info { + {ConcentrationType::BY_VOLUME, + {"BY_VOLUME", + "By Volume", + "Concentration is defined as a fraction of total liquid mixture volume"}}, + {ConcentrationType::BY_MASS, + {"BY_MASS", "By Mass", "Concentration is defined as a fraction of total liquid mixture mass"}}, + {ConcentrationType::UNKNOWN, {"UNKNOWN", "None", "None"}}}; +inline std::shared_ptr logger; +void set_logger(std::shared_ptr value); +struct Schema +{ + const static std::string_view schema_title; + const static std::string_view schema_version; + const static std::string_view schema_description; +}; +struct LiquidComponent +{ + ashrae205_ns::LiquidConstituent liquid_constituent; + double concentration; + bool liquid_constituent_is_set; + bool concentration_is_set; + const static std::string_view liquid_constituent_units; + const static std::string_view concentration_units; + const static std::string_view liquid_constituent_description; + const static std::string_view concentration_description; + const static std::string_view liquid_constituent_name; + const static std::string_view concentration_name; +}; +struct LiquidMixture +{ + std::vector liquid_components; + ashrae205_ns::ConcentrationType concentration_type; + bool liquid_components_is_set; + bool concentration_type_is_set; + const static std::string_view liquid_components_units; + const static std::string_view concentration_type_units; + const static std::string_view liquid_components_description; + const static std::string_view concentration_type_description; + const static std::string_view liquid_components_name; + const static std::string_view concentration_type_name; +}; +NLOHMANN_JSON_SERIALIZE_ENUM( + SchemaType, + { + {SchemaType::UNKNOWN, "UNKNOWN"}, + {SchemaType::RS0001, "RS0001"}, + {SchemaType::RS0002, "RS0002"}, + {SchemaType::RS0003, "RS0003"}, + {SchemaType::RS0004, "RS0004"}, + {SchemaType::RS0005, "RS0005"}, + {SchemaType::RS0006, "RS0006"}, + {SchemaType::RS0007, "RS0007"}, + {SchemaType::RSINTEGRATEDWATERHEATER, "RSINTEGRATEDWATERHEATER"}, + {SchemaType::RSTANK, "RSTANK"}, + {SchemaType::RSRESISTANCEWATERHEATSOURCE, "RSRESISTANCEWATERHEATSOURCE"}, + {SchemaType::RSCONDENSERWATERHEATSOURCE, "RSCONDENSERWATERHEATSOURCE"}, + {SchemaType::HPWHSIMINPUT, "HPWHSIMINPUT"}, + }) +NLOHMANN_JSON_SERIALIZE_ENUM(CompressorType, + { + {CompressorType::UNKNOWN, "UNKNOWN"}, + {CompressorType::RECIPROCATING, "RECIPROCATING"}, + {CompressorType::SCREW, "SCREW"}, + {CompressorType::CENTRIFUGAL, "CENTRIFUGAL"}, + {CompressorType::ROTARY, "ROTARY"}, + {CompressorType::SCROLL, "SCROLL"}, + }) +NLOHMANN_JSON_SERIALIZE_ENUM(CompressorSpeedControlType, + { + {CompressorSpeedControlType::UNKNOWN, "UNKNOWN"}, + {CompressorSpeedControlType::DISCRETE, "DISCRETE"}, + {CompressorSpeedControlType::CONTINUOUS, "CONTINUOUS"}, + }) +NLOHMANN_JSON_SERIALIZE_ENUM(CondenserType, + { + {CondenserType::UNKNOWN, "UNKNOWN"}, + {CondenserType::AIR, "AIR"}, + {CondenserType::LIQUID, "LIQUID"}, + {CondenserType::EVAPORATIVE, "EVAPORATIVE"}, + }) +NLOHMANN_JSON_SERIALIZE_ENUM(LiquidConstituent, + { + {LiquidConstituent::UNKNOWN, "UNKNOWN"}, + {LiquidConstituent::WATER, "WATER"}, + {LiquidConstituent::PROPYLENE_GLYCOL, "PROPYLENE_GLYCOL"}, + {LiquidConstituent::ETHYLENE_GLYCOL, "ETHYLENE_GLYCOL"}, + {LiquidConstituent::SODIUM_CHLORIDE, "SODIUM_CHLORIDE"}, + {LiquidConstituent::CALCIUM_CHLORIDE, "CALCIUM_CHLORIDE"}, + {LiquidConstituent::ETHANOL, "ETHANOL"}, + {LiquidConstituent::METHANOL, "METHANOL"}, + }) +NLOHMANN_JSON_SERIALIZE_ENUM(ConcentrationType, + { + {ConcentrationType::UNKNOWN, "UNKNOWN"}, + {ConcentrationType::BY_VOLUME, "BY_VOLUME"}, + {ConcentrationType::BY_MASS, "BY_MASS"}, + }) +void from_json(const nlohmann::json& j, LiquidMixture& x); +void from_json(const nlohmann::json& j, LiquidComponent& x); +} // namespace ashrae205_ns +} // namespace hpwh_data_model #endif diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/centralwaterheatingsystem.h b/hpwh_data_model/cpp/include/hpwh_data_model/centralwaterheatingsystem.h index 20f7d4ad..cffebb4a 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/centralwaterheatingsystem.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/centralwaterheatingsystem.h @@ -10,53 +10,57 @@ /// @note This class has been auto-generated. Local changes will not be saved! -namespace hpwh_data_model { - namespace central_water_heating_system_ns { - inline std::shared_ptr logger; - void set_logger(std::shared_ptr value); - struct Schema { - const static std::string_view schema_title; - const static std::string_view schema_version; - const static std::string_view schema_description; - }; - struct CentralWaterHeatingSystem { - rstank_ns::RSTANK tank; - std::vector heat_source_configurations; - std::string primary_heat_source_id; - double standby_power; - double external_inlet_height; - double external_outlet_height; - double multipass_flow_rate; - bool tank_is_set; - bool heat_source_configurations_is_set; - bool primary_heat_source_id_is_set; - bool standby_power_is_set; - bool external_inlet_height_is_set; - bool external_outlet_height_is_set; - bool multipass_flow_rate_is_set; - const static std::string_view tank_units; - const static std::string_view heat_source_configurations_units; - const static std::string_view primary_heat_source_id_units; - const static std::string_view standby_power_units; - const static std::string_view external_inlet_height_units; - const static std::string_view external_outlet_height_units; - const static std::string_view multipass_flow_rate_units; - const static std::string_view tank_description; - const static std::string_view heat_source_configurations_description; - const static std::string_view primary_heat_source_id_description; - const static std::string_view standby_power_description; - const static std::string_view external_inlet_height_description; - const static std::string_view external_outlet_height_description; - const static std::string_view multipass_flow_rate_description; - const static std::string_view tank_name; - const static std::string_view heat_source_configurations_name; - const static std::string_view primary_heat_source_id_name; - const static std::string_view standby_power_name; - const static std::string_view external_inlet_height_name; - const static std::string_view external_outlet_height_name; - const static std::string_view multipass_flow_rate_name; - }; - void from_json(const nlohmann::json& j, CentralWaterHeatingSystem& x); - } -} +namespace hpwh_data_model +{ +namespace central_water_heating_system_ns +{ +inline std::shared_ptr logger; +void set_logger(std::shared_ptr value); +struct Schema +{ + const static std::string_view schema_title; + const static std::string_view schema_version; + const static std::string_view schema_description; +}; +struct CentralWaterHeatingSystem +{ + rstank_ns::RSTANK tank; + std::vector heat_source_configurations; + std::string primary_heat_source_id; + double standby_power; + double external_inlet_height; + double external_outlet_height; + double multipass_flow_rate; + bool tank_is_set; + bool heat_source_configurations_is_set; + bool primary_heat_source_id_is_set; + bool standby_power_is_set; + bool external_inlet_height_is_set; + bool external_outlet_height_is_set; + bool multipass_flow_rate_is_set; + const static std::string_view tank_units; + const static std::string_view heat_source_configurations_units; + const static std::string_view primary_heat_source_id_units; + const static std::string_view standby_power_units; + const static std::string_view external_inlet_height_units; + const static std::string_view external_outlet_height_units; + const static std::string_view multipass_flow_rate_units; + const static std::string_view tank_description; + const static std::string_view heat_source_configurations_description; + const static std::string_view primary_heat_source_id_description; + const static std::string_view standby_power_description; + const static std::string_view external_inlet_height_description; + const static std::string_view external_outlet_height_description; + const static std::string_view multipass_flow_rate_description; + const static std::string_view tank_name; + const static std::string_view heat_source_configurations_name; + const static std::string_view primary_heat_source_id_name; + const static std::string_view standby_power_name; + const static std::string_view external_inlet_height_name; + const static std::string_view external_outlet_height_name; + const static std::string_view multipass_flow_rate_name; +}; +void from_json(const nlohmann::json& j, CentralWaterHeatingSystem& x); +} // namespace central_water_heating_system_ns +} // namespace hpwh_data_model #endif diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/core.h b/hpwh_data_model/cpp/include/hpwh_data_model/core.h index d4349af1..92e5800e 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/core.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/core.h @@ -9,72 +9,76 @@ /// @note This class has been auto-generated. Local changes will not be saved! -namespace hpwh_data_model { - namespace core_ns { - typedef std::string UUID; - typedef std::string Date; - typedef std::string Timestamp; - typedef std::string Version; - inline std::shared_ptr logger; - void set_logger(std::shared_ptr value); - struct Schema { - const static std::string_view schema_title; - const static std::string_view schema_version; - const static std::string_view schema_description; - }; - struct Metadata { - std::string schema_author; - ashrae205_ns::SchemaType schema; - std::string schema_version; - std::string description; - std::string timestamp; - std::string id; - int version; - std::string data_source; - std::string disclaimer; - std::string notes; - bool schema_author_is_set; - bool schema_is_set; - bool schema_version_is_set; - bool description_is_set; - bool timestamp_is_set; - bool id_is_set; - bool version_is_set; - bool data_source_is_set; - bool disclaimer_is_set; - bool notes_is_set; - const static std::string_view schema_author_units; - const static std::string_view schema_units; - const static std::string_view schema_version_units; - const static std::string_view description_units; - const static std::string_view timestamp_units; - const static std::string_view id_units; - const static std::string_view version_units; - const static std::string_view data_source_units; - const static std::string_view disclaimer_units; - const static std::string_view notes_units; - const static std::string_view schema_author_description; - const static std::string_view schema_description; - const static std::string_view schema_version_description; - const static std::string_view description_description; - const static std::string_view timestamp_description; - const static std::string_view id_description; - const static std::string_view version_description; - const static std::string_view data_source_description; - const static std::string_view disclaimer_description; - const static std::string_view notes_description; - const static std::string_view schema_author_name; - const static std::string_view schema_name; - const static std::string_view schema_version_name; - const static std::string_view description_name; - const static std::string_view timestamp_name; - const static std::string_view id_name; - const static std::string_view version_name; - const static std::string_view data_source_name; - const static std::string_view disclaimer_name; - const static std::string_view notes_name; - }; - void from_json(const nlohmann::json& j, Metadata& x); - } -} +namespace hpwh_data_model +{ +namespace core_ns +{ +typedef std::string UUID; +typedef std::string Date; +typedef std::string Timestamp; +typedef std::string Version; +inline std::shared_ptr logger; +void set_logger(std::shared_ptr value); +struct Schema +{ + const static std::string_view schema_title; + const static std::string_view schema_version; + const static std::string_view schema_description; +}; +struct Metadata +{ + std::string schema_author; + ashrae205_ns::SchemaType schema; + std::string schema_version; + std::string description; + std::string timestamp; + std::string id; + int version; + std::string data_source; + std::string disclaimer; + std::string notes; + bool schema_author_is_set; + bool schema_is_set; + bool schema_version_is_set; + bool description_is_set; + bool timestamp_is_set; + bool id_is_set; + bool version_is_set; + bool data_source_is_set; + bool disclaimer_is_set; + bool notes_is_set; + const static std::string_view schema_author_units; + const static std::string_view schema_units; + const static std::string_view schema_version_units; + const static std::string_view description_units; + const static std::string_view timestamp_units; + const static std::string_view id_units; + const static std::string_view version_units; + const static std::string_view data_source_units; + const static std::string_view disclaimer_units; + const static std::string_view notes_units; + const static std::string_view schema_author_description; + const static std::string_view schema_description; + const static std::string_view schema_version_description; + const static std::string_view description_description; + const static std::string_view timestamp_description; + const static std::string_view id_description; + const static std::string_view version_description; + const static std::string_view data_source_description; + const static std::string_view disclaimer_description; + const static std::string_view notes_description; + const static std::string_view schema_author_name; + const static std::string_view schema_name; + const static std::string_view schema_version_name; + const static std::string_view description_name; + const static std::string_view timestamp_name; + const static std::string_view id_name; + const static std::string_view version_name; + const static std::string_view data_source_name; + const static std::string_view disclaimer_name; + const static std::string_view notes_name; +}; +void from_json(const nlohmann::json& j, Metadata& x); +} // namespace core_ns +} // namespace hpwh_data_model #endif diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/enum-info.h b/hpwh_data_model/cpp/include/hpwh_data_model/enum-info.h index 44f3aaf8..b06ae512 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/enum-info.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/enum-info.h @@ -3,14 +3,15 @@ #include -namespace hpwh_data_model { +namespace hpwh_data_model +{ - struct enum_info - { - std::string_view enumerant_name; - std::string_view display_text; - std::string_view description; - }; -} +struct enum_info +{ + std::string_view enumerant_name; + std::string_view display_text; + std::string_view description; +}; +} // namespace hpwh_data_model #endif diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/heat-source-template.h b/hpwh_data_model/cpp/include/hpwh_data_model/heat-source-template.h index 55fd199c..75ead1bc 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/heat-source-template.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/heat-source-template.h @@ -1,6 +1,7 @@ #ifndef HEATSOURCETEMPLATE_H_ #define HEATSOURCETEMPLATE_H_ -struct HeatSourceTemplate { - virtual ~HeatSourceTemplate() = default; +struct HeatSourceTemplate +{ + virtual ~HeatSourceTemplate() = default; }; #endif diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/heating-logic-template.h b/hpwh_data_model/cpp/include/hpwh_data_model/heating-logic-template.h index 72f95999..95747823 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/heating-logic-template.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/heating-logic-template.h @@ -1,6 +1,7 @@ #ifndef HEATINGLOGICTEMPLATE_H_ #define HEATINGLOGICTEMPLATE_H_ -struct HeatingLogicTemplate { - virtual ~HeatingLogicTemplate() = default; +struct HeatingLogicTemplate +{ + virtual ~HeatingLogicTemplate() = default; }; #endif diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/heatsourceconfiguration.h b/hpwh_data_model/cpp/include/hpwh_data_model/heatsourceconfiguration.h index 88e4092b..ffdf8d34 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/heatsourceconfiguration.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/heatsourceconfiguration.h @@ -13,210 +13,231 @@ /// @note This class has been auto-generated. Local changes will not be saved! -namespace hpwh_data_model { - namespace heat_source_configuration_ns { - enum class HeatSourceType { - RESISTANCE, - CONDENSER, - UNKNOWN - }; - const static std::unordered_map HeatSourceType_info { - {HeatSourceType::RESISTANCE, {"RESISTANCE", "Resistance", "Heat sources that operate by electrical resistance"}}, - {HeatSourceType::CONDENSER, {"CONDENSER", "Condenser", "Heat sources that operate by coolant condenser systems"}}, - {HeatSourceType::UNKNOWN, {"UNKNOWN", "None", "None"}} - }; - enum class HeatingLogicType { - STATE_OF_CHARGE_BASED, - TEMPERATURE_BASED, - UNKNOWN - }; - const static std::unordered_map HeatingLogicType_info { - {HeatingLogicType::STATE_OF_CHARGE_BASED, {"STATE_OF_CHARGE_BASED", "STATE_OF_CHARGE_BASED", "State-of-charge based"}}, - {HeatingLogicType::TEMPERATURE_BASED, {"TEMPERATURE_BASED", "TEMPERATURE_BASED", "Temperature based"}}, - {HeatingLogicType::UNKNOWN, {"UNKNOWN", "None", "None"}} - }; - enum class StandbyTemperatureLocation { - TOP_OF_TANK, - BOTTOM_OF_TANK, - UNKNOWN - }; - const static std::unordered_map StandbyTemperatureLocation_info { - {StandbyTemperatureLocation::TOP_OF_TANK, {"TOP_OF_TANK", "Top of tank", "Refers to top of tank."}}, - {StandbyTemperatureLocation::BOTTOM_OF_TANK, {"BOTTOM_OF_TANK", "Bottom of tank", "Refers to bottom of tank."}}, - {StandbyTemperatureLocation::UNKNOWN, {"UNKNOWN", "None", "None"}} - }; - enum class ComparisonType { - GREATER_THAN, - LESS_THAN, - UNKNOWN - }; - const static std::unordered_map ComparisonType_info { - {ComparisonType::GREATER_THAN, {"GREATER_THAN", "Greater than", "Decision value is greater than reference value"}}, - {ComparisonType::LESS_THAN, {"LESS_THAN", "Less than", "Decision value is less than reference value"}}, - {ComparisonType::UNKNOWN, {"UNKNOWN", "None", "None"}} - }; - inline std::shared_ptr logger; - void set_logger(std::shared_ptr value); - struct Schema { - const static std::string_view schema_title; - const static std::string_view schema_version; - const static std::string_view schema_description; - }; - struct HeatingLogic { - heat_source_configuration_ns::HeatingLogicType heating_logic_type; - std::unique_ptr heating_logic; - heat_source_configuration_ns::ComparisonType comparison_type; - bool heating_logic_type_is_set; - bool heating_logic_is_set; - bool comparison_type_is_set; - const static std::string_view heating_logic_type_units; - const static std::string_view heating_logic_units; - const static std::string_view comparison_type_units; - const static std::string_view heating_logic_type_description; - const static std::string_view heating_logic_description; - const static std::string_view comparison_type_description; - const static std::string_view heating_logic_type_name; - const static std::string_view heating_logic_name; - const static std::string_view comparison_type_name; - }; - struct HeatSourceConfiguration { - std::string id; - heat_source_configuration_ns::HeatSourceType heat_source_type; - std::unique_ptr heat_source; - std::vector heat_distribution; - std::vector turn_on_logic; - std::vector shut_off_logic; - heat_source_configuration_ns::HeatingLogic standby_logic; - std::string backup_heat_source_id; - std::string followed_by_heat_source_id; - std::string companion_heat_source_id; - bool id_is_set; - bool heat_source_type_is_set; - bool heat_source_is_set; - bool heat_distribution_is_set; - bool turn_on_logic_is_set; - bool shut_off_logic_is_set; - bool standby_logic_is_set; - bool backup_heat_source_id_is_set; - bool followed_by_heat_source_id_is_set; - bool companion_heat_source_id_is_set; - const static std::string_view id_units; - const static std::string_view heat_source_type_units; - const static std::string_view heat_source_units; - const static std::string_view heat_distribution_units; - const static std::string_view turn_on_logic_units; - const static std::string_view shut_off_logic_units; - const static std::string_view standby_logic_units; - const static std::string_view backup_heat_source_id_units; - const static std::string_view followed_by_heat_source_id_units; - const static std::string_view companion_heat_source_id_units; - const static std::string_view id_description; - const static std::string_view heat_source_type_description; - const static std::string_view heat_source_description; - const static std::string_view heat_distribution_description; - const static std::string_view turn_on_logic_description; - const static std::string_view shut_off_logic_description; - const static std::string_view standby_logic_description; - const static std::string_view backup_heat_source_id_description; - const static std::string_view followed_by_heat_source_id_description; - const static std::string_view companion_heat_source_id_description; - const static std::string_view id_name; - const static std::string_view heat_source_type_name; - const static std::string_view heat_source_name; - const static std::string_view heat_distribution_name; - const static std::string_view turn_on_logic_name; - const static std::string_view shut_off_logic_name; - const static std::string_view standby_logic_name; - const static std::string_view backup_heat_source_id_name; - const static std::string_view followed_by_heat_source_id_name; - const static std::string_view companion_heat_source_id_name; - }; - struct WeightedDistribution { - std::vector normalized_height; - std::vector weight; - bool normalized_height_is_set; - bool weight_is_set; - const static std::string_view normalized_height_units; - const static std::string_view weight_units; - const static std::string_view normalized_height_description; - const static std::string_view weight_description; - const static std::string_view normalized_height_name; - const static std::string_view weight_name; - }; - struct TemperatureBasedHeatingLogic : HeatingLogicTemplate { - double absolute_temperature; - double differential_temperature; - heat_source_configuration_ns::StandbyTemperatureLocation standby_temperature_location; - std::vector temperature_weight_distribution; - bool absolute_temperature_is_set; - bool differential_temperature_is_set; - bool standby_temperature_location_is_set; - bool temperature_weight_distribution_is_set; - const static std::string_view absolute_temperature_units; - const static std::string_view differential_temperature_units; - const static std::string_view standby_temperature_location_units; - const static std::string_view temperature_weight_distribution_units; - const static std::string_view absolute_temperature_description; - const static std::string_view differential_temperature_description; - const static std::string_view standby_temperature_location_description; - const static std::string_view temperature_weight_distribution_description; - const static std::string_view absolute_temperature_name; - const static std::string_view differential_temperature_name; - const static std::string_view standby_temperature_location_name; - const static std::string_view temperature_weight_distribution_name; - }; - struct StateOfChargeBasedHeatingLogic : HeatingLogicTemplate { - double decision_point; - double minimum_useful_temperature; - double hysteresis_fraction; - bool uses_constant_mains; - double constant_mains_temperature; - bool decision_point_is_set; - bool minimum_useful_temperature_is_set; - bool hysteresis_fraction_is_set; - bool uses_constant_mains_is_set; - bool constant_mains_temperature_is_set; - const static std::string_view decision_point_units; - const static std::string_view minimum_useful_temperature_units; - const static std::string_view hysteresis_fraction_units; - const static std::string_view uses_constant_mains_units; - const static std::string_view constant_mains_temperature_units; - const static std::string_view decision_point_description; - const static std::string_view minimum_useful_temperature_description; - const static std::string_view hysteresis_fraction_description; - const static std::string_view uses_constant_mains_description; - const static std::string_view constant_mains_temperature_description; - const static std::string_view decision_point_name; - const static std::string_view minimum_useful_temperature_name; - const static std::string_view hysteresis_fraction_name; - const static std::string_view uses_constant_mains_name; - const static std::string_view constant_mains_temperature_name; - }; - NLOHMANN_JSON_SERIALIZE_ENUM (HeatSourceType, { - {HeatSourceType::UNKNOWN, "UNKNOWN"}, - {HeatSourceType::RESISTANCE, "RESISTANCE"}, - {HeatSourceType::CONDENSER, "CONDENSER"}, - }) - NLOHMANN_JSON_SERIALIZE_ENUM (HeatingLogicType, { - {HeatingLogicType::UNKNOWN, "UNKNOWN"}, - {HeatingLogicType::STATE_OF_CHARGE_BASED, "STATE_OF_CHARGE_BASED"}, - {HeatingLogicType::TEMPERATURE_BASED, "TEMPERATURE_BASED"}, - }) - NLOHMANN_JSON_SERIALIZE_ENUM (StandbyTemperatureLocation, { - {StandbyTemperatureLocation::UNKNOWN, "UNKNOWN"}, - {StandbyTemperatureLocation::TOP_OF_TANK, "TOP_OF_TANK"}, - {StandbyTemperatureLocation::BOTTOM_OF_TANK, "BOTTOM_OF_TANK"}, - }) - NLOHMANN_JSON_SERIALIZE_ENUM (ComparisonType, { - {ComparisonType::UNKNOWN, "UNKNOWN"}, - {ComparisonType::GREATER_THAN, "GREATER_THAN"}, - {ComparisonType::LESS_THAN, "LESS_THAN"}, - }) - void from_json(const nlohmann::json& j, HeatSourceConfiguration& x); - void from_json(const nlohmann::json& j, WeightedDistribution& x); - void from_json(const nlohmann::json& j, HeatingLogic& x); - void from_json(const nlohmann::json& j, TemperatureBasedHeatingLogic& x); - void from_json(const nlohmann::json& j, StateOfChargeBasedHeatingLogic& x); - } -} +namespace hpwh_data_model +{ +namespace heat_source_configuration_ns +{ +enum class HeatSourceType +{ + RESISTANCE, + CONDENSER, + UNKNOWN +}; +const static std::unordered_map HeatSourceType_info { + {HeatSourceType::RESISTANCE, + {"RESISTANCE", "Resistance", "Heat sources that operate by electrical resistance"}}, + {HeatSourceType::CONDENSER, + {"CONDENSER", "Condenser", "Heat sources that operate by coolant condenser systems"}}, + {HeatSourceType::UNKNOWN, {"UNKNOWN", "None", "None"}}}; +enum class HeatingLogicType +{ + STATE_OF_CHARGE_BASED, + TEMPERATURE_BASED, + UNKNOWN +}; +const static std::unordered_map HeatingLogicType_info { + {HeatingLogicType::STATE_OF_CHARGE_BASED, + {"STATE_OF_CHARGE_BASED", "STATE_OF_CHARGE_BASED", "State-of-charge based"}}, + {HeatingLogicType::TEMPERATURE_BASED, + {"TEMPERATURE_BASED", "TEMPERATURE_BASED", "Temperature based"}}, + {HeatingLogicType::UNKNOWN, {"UNKNOWN", "None", "None"}}}; +enum class StandbyTemperatureLocation +{ + TOP_OF_TANK, + BOTTOM_OF_TANK, + UNKNOWN +}; +const static std::unordered_map + StandbyTemperatureLocation_info { + {StandbyTemperatureLocation::TOP_OF_TANK, + {"TOP_OF_TANK", "Top of tank", "Refers to top of tank."}}, + {StandbyTemperatureLocation::BOTTOM_OF_TANK, + {"BOTTOM_OF_TANK", "Bottom of tank", "Refers to bottom of tank."}}, + {StandbyTemperatureLocation::UNKNOWN, {"UNKNOWN", "None", "None"}}}; +enum class ComparisonType +{ + GREATER_THAN, + LESS_THAN, + UNKNOWN +}; +const static std::unordered_map ComparisonType_info { + {ComparisonType::GREATER_THAN, + {"GREATER_THAN", "Greater than", "Decision value is greater than reference value"}}, + {ComparisonType::LESS_THAN, + {"LESS_THAN", "Less than", "Decision value is less than reference value"}}, + {ComparisonType::UNKNOWN, {"UNKNOWN", "None", "None"}}}; +inline std::shared_ptr logger; +void set_logger(std::shared_ptr value); +struct Schema +{ + const static std::string_view schema_title; + const static std::string_view schema_version; + const static std::string_view schema_description; +}; +struct WeightedDistribution +{ + std::vector normalized_height; + std::vector weight; + bool normalized_height_is_set; + bool weight_is_set; + const static std::string_view normalized_height_units; + const static std::string_view weight_units; + const static std::string_view normalized_height_description; + const static std::string_view weight_description; + const static std::string_view normalized_height_name; + const static std::string_view weight_name; +}; +struct HeatingLogic +{ + heat_source_configuration_ns::HeatingLogicType heating_logic_type; + std::unique_ptr heating_logic; + heat_source_configuration_ns::ComparisonType comparison_type; + bool heating_logic_type_is_set; + bool heating_logic_is_set; + bool comparison_type_is_set; + const static std::string_view heating_logic_type_units; + const static std::string_view heating_logic_units; + const static std::string_view comparison_type_units; + const static std::string_view heating_logic_type_description; + const static std::string_view heating_logic_description; + const static std::string_view comparison_type_description; + const static std::string_view heating_logic_type_name; + const static std::string_view heating_logic_name; + const static std::string_view comparison_type_name; +}; +struct HeatSourceConfiguration +{ + std::string id; + heat_source_configuration_ns::HeatSourceType heat_source_type; + std::unique_ptr heat_source; + heat_source_configuration_ns::WeightedDistribution heat_distribution; + std::vector turn_on_logic; + std::vector shut_off_logic; + heat_source_configuration_ns::HeatingLogic standby_logic; + std::string backup_heat_source_id; + std::string followed_by_heat_source_id; + std::string companion_heat_source_id; + bool id_is_set; + bool heat_source_type_is_set; + bool heat_source_is_set; + bool heat_distribution_is_set; + bool turn_on_logic_is_set; + bool shut_off_logic_is_set; + bool standby_logic_is_set; + bool backup_heat_source_id_is_set; + bool followed_by_heat_source_id_is_set; + bool companion_heat_source_id_is_set; + const static std::string_view id_units; + const static std::string_view heat_source_type_units; + const static std::string_view heat_source_units; + const static std::string_view heat_distribution_units; + const static std::string_view turn_on_logic_units; + const static std::string_view shut_off_logic_units; + const static std::string_view standby_logic_units; + const static std::string_view backup_heat_source_id_units; + const static std::string_view followed_by_heat_source_id_units; + const static std::string_view companion_heat_source_id_units; + const static std::string_view id_description; + const static std::string_view heat_source_type_description; + const static std::string_view heat_source_description; + const static std::string_view heat_distribution_description; + const static std::string_view turn_on_logic_description; + const static std::string_view shut_off_logic_description; + const static std::string_view standby_logic_description; + const static std::string_view backup_heat_source_id_description; + const static std::string_view followed_by_heat_source_id_description; + const static std::string_view companion_heat_source_id_description; + const static std::string_view id_name; + const static std::string_view heat_source_type_name; + const static std::string_view heat_source_name; + const static std::string_view heat_distribution_name; + const static std::string_view turn_on_logic_name; + const static std::string_view shut_off_logic_name; + const static std::string_view standby_logic_name; + const static std::string_view backup_heat_source_id_name; + const static std::string_view followed_by_heat_source_id_name; + const static std::string_view companion_heat_source_id_name; +}; +struct TemperatureBasedHeatingLogic : HeatingLogicTemplate +{ + double absolute_temperature; + double differential_temperature; + heat_source_configuration_ns::StandbyTemperatureLocation standby_temperature_location; + heat_source_configuration_ns::WeightedDistribution temperature_weight_distribution; + bool absolute_temperature_is_set; + bool differential_temperature_is_set; + bool standby_temperature_location_is_set; + bool temperature_weight_distribution_is_set; + const static std::string_view absolute_temperature_units; + const static std::string_view differential_temperature_units; + const static std::string_view standby_temperature_location_units; + const static std::string_view temperature_weight_distribution_units; + const static std::string_view absolute_temperature_description; + const static std::string_view differential_temperature_description; + const static std::string_view standby_temperature_location_description; + const static std::string_view temperature_weight_distribution_description; + const static std::string_view absolute_temperature_name; + const static std::string_view differential_temperature_name; + const static std::string_view standby_temperature_location_name; + const static std::string_view temperature_weight_distribution_name; +}; +struct StateOfChargeBasedHeatingLogic : HeatingLogicTemplate +{ + double decision_point; + double minimum_useful_temperature; + double hysteresis_fraction; + bool uses_constant_mains; + double constant_mains_temperature; + bool decision_point_is_set; + bool minimum_useful_temperature_is_set; + bool hysteresis_fraction_is_set; + bool uses_constant_mains_is_set; + bool constant_mains_temperature_is_set; + const static std::string_view decision_point_units; + const static std::string_view minimum_useful_temperature_units; + const static std::string_view hysteresis_fraction_units; + const static std::string_view uses_constant_mains_units; + const static std::string_view constant_mains_temperature_units; + const static std::string_view decision_point_description; + const static std::string_view minimum_useful_temperature_description; + const static std::string_view hysteresis_fraction_description; + const static std::string_view uses_constant_mains_description; + const static std::string_view constant_mains_temperature_description; + const static std::string_view decision_point_name; + const static std::string_view minimum_useful_temperature_name; + const static std::string_view hysteresis_fraction_name; + const static std::string_view uses_constant_mains_name; + const static std::string_view constant_mains_temperature_name; +}; +NLOHMANN_JSON_SERIALIZE_ENUM(HeatSourceType, + { + {HeatSourceType::UNKNOWN, "UNKNOWN"}, + {HeatSourceType::RESISTANCE, "RESISTANCE"}, + {HeatSourceType::CONDENSER, "CONDENSER"}, + }) +NLOHMANN_JSON_SERIALIZE_ENUM(HeatingLogicType, + { + {HeatingLogicType::UNKNOWN, "UNKNOWN"}, + {HeatingLogicType::STATE_OF_CHARGE_BASED, "STATE_OF_CHARGE_BASED"}, + {HeatingLogicType::TEMPERATURE_BASED, "TEMPERATURE_BASED"}, + }) +NLOHMANN_JSON_SERIALIZE_ENUM(StandbyTemperatureLocation, + { + {StandbyTemperatureLocation::UNKNOWN, "UNKNOWN"}, + {StandbyTemperatureLocation::TOP_OF_TANK, "TOP_OF_TANK"}, + {StandbyTemperatureLocation::BOTTOM_OF_TANK, "BOTTOM_OF_TANK"}, + }) +NLOHMANN_JSON_SERIALIZE_ENUM(ComparisonType, + { + {ComparisonType::UNKNOWN, "UNKNOWN"}, + {ComparisonType::GREATER_THAN, "GREATER_THAN"}, + {ComparisonType::LESS_THAN, "LESS_THAN"}, + }) +void from_json(const nlohmann::json& j, HeatSourceConfiguration& x); +void from_json(const nlohmann::json& j, WeightedDistribution& x); +void from_json(const nlohmann::json& j, HeatingLogic& x); +void from_json(const nlohmann::json& j, TemperatureBasedHeatingLogic& x); +void from_json(const nlohmann::json& j, StateOfChargeBasedHeatingLogic& x); +} // namespace heat_source_configuration_ns +} // namespace hpwh_data_model #endif diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/hpwhsiminput.h b/hpwh_data_model/cpp/include/hpwh_data_model/hpwhsiminput.h index 0eacd087..36a32524 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/hpwhsiminput.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/hpwhsiminput.h @@ -12,68 +12,73 @@ /// @note This class has been auto-generated. Local changes will not be saved! -namespace hpwh_data_model { - namespace hpwh_sim_input_ns { - enum class HPWHSystemType { - INTEGRATED, - CENTRAL, - UNKNOWN - }; - const static std::unordered_map HPWHSystemType_info { - {HPWHSystemType::INTEGRATED, {"INTEGRATED", "Integrated", "Integrated Heat Pump Water Heater"}}, - {HPWHSystemType::CENTRAL, {"CENTRAL", "Central", "Integrated Heat Pump Water Heater"}}, - {HPWHSystemType::UNKNOWN, {"UNKNOWN", "None", "None"}} - }; - inline std::shared_ptr logger; - void set_logger(std::shared_ptr value); - struct Schema { - const static std::string_view schema_title; - const static std::string_view schema_version; - const static std::string_view schema_description; - }; - struct HPWHSimInput { - int number_of_nodes; - bool depresses_temperature; - bool fixed_volume; - double standard_setpoint; - hpwh_sim_input_ns::HPWHSystemType system_type; - rsintegratedwaterheater_ns::RSINTEGRATEDWATERHEATER integrated_system; - central_water_heating_system_ns::CentralWaterHeatingSystem central_system; - bool number_of_nodes_is_set; - bool depresses_temperature_is_set; - bool fixed_volume_is_set; - bool standard_setpoint_is_set; - bool system_type_is_set; - bool integrated_system_is_set; - bool central_system_is_set; - const static std::string_view number_of_nodes_units; - const static std::string_view depresses_temperature_units; - const static std::string_view fixed_volume_units; - const static std::string_view standard_setpoint_units; - const static std::string_view system_type_units; - const static std::string_view integrated_system_units; - const static std::string_view central_system_units; - const static std::string_view number_of_nodes_description; - const static std::string_view depresses_temperature_description; - const static std::string_view fixed_volume_description; - const static std::string_view standard_setpoint_description; - const static std::string_view system_type_description; - const static std::string_view integrated_system_description; - const static std::string_view central_system_description; - const static std::string_view number_of_nodes_name; - const static std::string_view depresses_temperature_name; - const static std::string_view fixed_volume_name; - const static std::string_view standard_setpoint_name; - const static std::string_view system_type_name; - const static std::string_view integrated_system_name; - const static std::string_view central_system_name; - }; - NLOHMANN_JSON_SERIALIZE_ENUM (HPWHSystemType, { - {HPWHSystemType::UNKNOWN, "UNKNOWN"}, - {HPWHSystemType::INTEGRATED, "INTEGRATED"}, - {HPWHSystemType::CENTRAL, "CENTRAL"}, - }) - void from_json(const nlohmann::json& j, HPWHSimInput& x); - } -} +namespace hpwh_data_model +{ +namespace hpwh_sim_input_ns +{ +enum class HPWHSystemType +{ + INTEGRATED, + CENTRAL, + UNKNOWN +}; +const static std::unordered_map HPWHSystemType_info { + {HPWHSystemType::INTEGRATED, {"INTEGRATED", "Integrated", "Integrated Heat Pump Water Heater"}}, + {HPWHSystemType::CENTRAL, {"CENTRAL", "Central", "Integrated Heat Pump Water Heater"}}, + {HPWHSystemType::UNKNOWN, {"UNKNOWN", "None", "None"}}}; +inline std::shared_ptr logger; +void set_logger(std::shared_ptr value); +struct Schema +{ + const static std::string_view schema_title; + const static std::string_view schema_version; + const static std::string_view schema_description; +}; +struct HPWHSimInput +{ + int number_of_nodes; + bool depresses_temperature; + bool fixed_volume; + double standard_setpoint; + hpwh_sim_input_ns::HPWHSystemType system_type; + rsintegratedwaterheater_ns::RSINTEGRATEDWATERHEATER integrated_system; + central_water_heating_system_ns::CentralWaterHeatingSystem central_system; + bool number_of_nodes_is_set; + bool depresses_temperature_is_set; + bool fixed_volume_is_set; + bool standard_setpoint_is_set; + bool system_type_is_set; + bool integrated_system_is_set; + bool central_system_is_set; + const static std::string_view number_of_nodes_units; + const static std::string_view depresses_temperature_units; + const static std::string_view fixed_volume_units; + const static std::string_view standard_setpoint_units; + const static std::string_view system_type_units; + const static std::string_view integrated_system_units; + const static std::string_view central_system_units; + const static std::string_view number_of_nodes_description; + const static std::string_view depresses_temperature_description; + const static std::string_view fixed_volume_description; + const static std::string_view standard_setpoint_description; + const static std::string_view system_type_description; + const static std::string_view integrated_system_description; + const static std::string_view central_system_description; + const static std::string_view number_of_nodes_name; + const static std::string_view depresses_temperature_name; + const static std::string_view fixed_volume_name; + const static std::string_view standard_setpoint_name; + const static std::string_view system_type_name; + const static std::string_view integrated_system_name; + const static std::string_view central_system_name; +}; +NLOHMANN_JSON_SERIALIZE_ENUM(HPWHSystemType, + { + {HPWHSystemType::UNKNOWN, "UNKNOWN"}, + {HPWHSystemType::INTEGRATED, "INTEGRATED"}, + {HPWHSystemType::CENTRAL, "CENTRAL"}, + }) +void from_json(const nlohmann::json& j, HPWHSimInput& x); +} // namespace hpwh_sim_input_ns +} // namespace hpwh_data_model #endif diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/load-object.h b/hpwh_data_model/cpp/include/hpwh_data_model/load-object.h index a832162b..df978eed 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/load-object.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/load-object.h @@ -6,73 +6,78 @@ #include #include -namespace hpwh_data_model { +namespace hpwh_data_model +{ - inline void read_binary_file(const char *filename, std::vector &bytes) +inline void read_binary_file(const char* filename, std::vector& bytes) +{ + std::ifstream is(filename, std::ifstream::binary); + if (is) { - std::ifstream is(filename, std::ifstream::binary); - if (is) { - // get length of file: - is.seekg(0, is.end); - size_t length = static_cast(is.tellg()); - is.seekg(0, is.beg); + // get length of file: + is.seekg(0, is.end); + size_t length = static_cast(is.tellg()); + is.seekg(0, is.beg); - bytes.resize(length); - // read data as a block: - is.read(bytes.data(), length); + bytes.resize(length); + // read data as a block: + is.read(bytes.data(), length); - is.close(); - } + is.close(); } +} - inline nlohmann::json load_json(const char *input_file) - { - std::string filename(input_file); - std::string::size_type idx = filename.rfind('.'); +inline nlohmann::json load_json(const char* input_file) +{ + std::string filename(input_file); + std::string::size_type idx = filename.rfind('.'); - using namespace nlohmann; + using namespace nlohmann; - json j; + json j; - if (idx != std::string::npos) { - std::string extension = filename.substr(idx + 1); + if (idx != std::string::npos) + { + std::string extension = filename.substr(idx + 1); - if (extension == "cbor") { - std::vector bytearray; - read_binary_file(input_file, bytearray); - j = json::from_cbor(bytearray); - } - else if (extension == "json") { - std::string schema(input_file); - std::ifstream in(schema); - in >> j; - } + if (extension == "cbor") + { + std::vector bytearray; + read_binary_file(input_file, bytearray); + j = json::from_cbor(bytearray); + } + else if (extension == "json") + { + std::string schema(input_file); + std::ifstream in(schema); + in >> j; } - return j; } + return j; +} - template - void json_get(nlohmann::json j, - Courier::Courier* logger, - const char *subnode, - T& object, - bool& object_is_set, - bool required = false) +template +void json_get(nlohmann::json j, + Courier::Courier* logger, + const char* subnode, + T& object, + bool& object_is_set, + bool required = false) +{ + try { - try - { - object = j.at(subnode).get(); - object_is_set = true; - } - catch (nlohmann::json::out_of_range & ex) + object = j.at(subnode).get(); + object_is_set = true; + } + catch (nlohmann::json::out_of_range& ex) + { + object_is_set = false; + if (required) { - object_is_set = false; - if (required) - { - logger->send_warning(ex.what()); - } + logger->send_warning(ex.what()); } } } +} // namespace hpwh_data_model #endif diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/rscondenserwaterheatsource.h b/hpwh_data_model/cpp/include/hpwh_data_model/rscondenserwaterheatsource.h index b441442c..fb9c6e94 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/rscondenserwaterheatsource.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/rscondenserwaterheatsource.h @@ -12,9 +12,12 @@ /// @note This class has been auto-generated. Local changes will not be saved! -namespace hpwh_data_model { -namespace rscondenserwaterheatsource_ns { -enum class CoilConfiguration { +namespace hpwh_data_model +{ +namespace rscondenserwaterheatsource_ns +{ +enum class CoilConfiguration +{ SUBMERGED, WRAPPED, EXTERNAL, @@ -22,18 +25,20 @@ enum class CoilConfiguration { }; const static std::unordered_map CoilConfiguration_info { {CoilConfiguration::SUBMERGED, {"SUBMERGED", "Submerged", "Coil is submerged within the tank"}}, - {CoilConfiguration::WRAPPED, {"WRAPPED", "Wrapped", "Coil is wrapped around the tank interior"}}, + {CoilConfiguration::WRAPPED, + {"WRAPPED", "Wrapped", "Coil is wrapped around the tank interior"}}, {CoilConfiguration::EXTERNAL, {"EXTERNAL", "External", "Coil is external to the tank"}}, - {CoilConfiguration::UNKNOWN, {"UNKNOWN", "None", "None"}} -}; + {CoilConfiguration::UNKNOWN, {"UNKNOWN", "None", "None"}}}; inline std::shared_ptr logger; void set_logger(std::shared_ptr value); -struct Schema { +struct Schema +{ const static std::string_view schema_title; const static std::string_view schema_version; const static std::string_view schema_description; }; -struct ProductInformation { +struct ProductInformation +{ std::string manufacturer; std::string model_number; bool manufacturer_is_set; @@ -45,14 +50,16 @@ struct ProductInformation { const static std::string_view manufacturer_name; const static std::string_view model_number_name; }; -struct Description { +struct Description +{ rscondenserwaterheatsource_ns::ProductInformation product_information; bool product_information_is_set; const static std::string_view product_information_units; const static std::string_view product_information_description; const static std::string_view product_information_name; }; -struct GridVariables { +struct GridVariables +{ std::vector evaporator_environment_dry_bulb_temperature; std::vector heat_source_temperature; std::vector outlet_temperature; @@ -69,7 +76,8 @@ struct GridVariables { const static std::string_view heat_source_temperature_name; const static std::string_view outlet_temperature_name; }; -struct LookupVariables { +struct LookupVariables +{ std::vector input_power; std::vector heating_capacity; bool input_power_is_set; @@ -81,7 +89,8 @@ struct LookupVariables { const static std::string_view input_power_name; const static std::string_view heating_capacity_name; }; -struct PerformanceMap { +struct PerformanceMap +{ rscondenserwaterheatsource_ns::GridVariables grid_variables; rscondenserwaterheatsource_ns::LookupVariables lookup_variables; bool grid_variables_is_set; @@ -93,7 +102,8 @@ struct PerformanceMap { const static std::string_view grid_variables_name; const static std::string_view lookup_variables_name; }; -struct SecondaryHeatExchanger { +struct SecondaryHeatExchanger +{ double cold_side_temperature_offset; double hot_side_temperature_offset; double extra_pump_power; @@ -110,7 +120,8 @@ struct SecondaryHeatExchanger { const static std::string_view hot_side_temperature_offset_name; const static std::string_view extra_pump_power_name; }; -struct Performance { +struct Performance +{ rscondenserwaterheatsource_ns::PerformanceMap performance_map; double standby_power; rscondenserwaterheatsource_ns::CoilConfiguration coil_configuration; @@ -157,7 +168,8 @@ struct Performance { const static std::string_view use_defrost_map_name; const static std::string_view secondary_heat_exchanger_name; }; -struct RSCONDENSERWATERHEATSOURCE : HeatSourceTemplate { +struct RSCONDENSERWATERHEATSOURCE : HeatSourceTemplate +{ core_ns::Metadata metadata; rscondenserwaterheatsource_ns::Description description; rscondenserwaterheatsource_ns::Performance performance; @@ -174,12 +186,13 @@ struct RSCONDENSERWATERHEATSOURCE : HeatSourceTemplate { const static std::string_view description_name; const static std::string_view performance_name; }; -NLOHMANN_JSON_SERIALIZE_ENUM (CoilConfiguration, { - {CoilConfiguration::UNKNOWN, "UNKNOWN"}, - {CoilConfiguration::SUBMERGED, "SUBMERGED"}, - {CoilConfiguration::WRAPPED, "WRAPPED"}, - {CoilConfiguration::EXTERNAL, "EXTERNAL"}, - }) +NLOHMANN_JSON_SERIALIZE_ENUM(CoilConfiguration, + { + {CoilConfiguration::UNKNOWN, "UNKNOWN"}, + {CoilConfiguration::SUBMERGED, "SUBMERGED"}, + {CoilConfiguration::WRAPPED, "WRAPPED"}, + {CoilConfiguration::EXTERNAL, "EXTERNAL"}, + }) void from_json(const nlohmann::json& j, RSCONDENSERWATERHEATSOURCE& x); void from_json(const nlohmann::json& j, Description& x); void from_json(const nlohmann::json& j, ProductInformation& x); @@ -188,6 +201,6 @@ void from_json(const nlohmann::json& j, PerformanceMap& x); void from_json(const nlohmann::json& j, GridVariables& x); void from_json(const nlohmann::json& j, LookupVariables& x); void from_json(const nlohmann::json& j, SecondaryHeatExchanger& x); -} -} +} // namespace rscondenserwaterheatsource_ns +} // namespace hpwh_data_model #endif diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/rsintegratedwaterheater.h b/hpwh_data_model/cpp/include/hpwh_data_model/rsintegratedwaterheater.h index 92f8b749..863d2dda 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/rsintegratedwaterheater.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/rsintegratedwaterheater.h @@ -15,77 +15,84 @@ /// @note This class has been auto-generated. Local changes will not be saved! -namespace hpwh_data_model { - namespace rsintegratedwaterheater_ns { - inline std::shared_ptr logger; - void set_logger(std::shared_ptr value); - struct Schema { - const static std::string_view schema_title; - const static std::string_view schema_version; - const static std::string_view schema_description; - }; - struct ProductInformation { - std::string manufacturer; - std::string model_number; - bool manufacturer_is_set; - bool model_number_is_set; - const static std::string_view manufacturer_units; - const static std::string_view model_number_units; - const static std::string_view manufacturer_description; - const static std::string_view model_number_description; - const static std::string_view manufacturer_name; - const static std::string_view model_number_name; - }; - struct Description { - rsintegratedwaterheater_ns::ProductInformation product_information; - bool product_information_is_set; - const static std::string_view product_information_units; - const static std::string_view product_information_description; - const static std::string_view product_information_name; - }; - struct Performance { - rstank_ns::RSTANK tank; - std::vector heat_source_configurations; - std::string primary_heat_source_id; - double standby_power; - bool tank_is_set; - bool heat_source_configurations_is_set; - bool primary_heat_source_id_is_set; - bool standby_power_is_set; - const static std::string_view tank_units; - const static std::string_view heat_source_configurations_units; - const static std::string_view primary_heat_source_id_units; - const static std::string_view standby_power_units; - const static std::string_view tank_description; - const static std::string_view heat_source_configurations_description; - const static std::string_view primary_heat_source_id_description; - const static std::string_view standby_power_description; - const static std::string_view tank_name; - const static std::string_view heat_source_configurations_name; - const static std::string_view primary_heat_source_id_name; - const static std::string_view standby_power_name; - }; - struct RSINTEGRATEDWATERHEATER { - core_ns::Metadata metadata; - rsintegratedwaterheater_ns::Description description; - rsintegratedwaterheater_ns::Performance performance; - bool metadata_is_set; - bool description_is_set; - bool performance_is_set; - const static std::string_view metadata_units; - const static std::string_view description_units; - const static std::string_view performance_units; - const static std::string_view metadata_description; - const static std::string_view description_description; - const static std::string_view performance_description; - const static std::string_view metadata_name; - const static std::string_view description_name; - const static std::string_view performance_name; - }; - void from_json(const nlohmann::json& j, RSINTEGRATEDWATERHEATER& x); - void from_json(const nlohmann::json& j, Description& x); - void from_json(const nlohmann::json& j, ProductInformation& x); - void from_json(const nlohmann::json& j, Performance& x); - } -} +namespace hpwh_data_model +{ +namespace rsintegratedwaterheater_ns +{ +inline std::shared_ptr logger; +void set_logger(std::shared_ptr value); +struct Schema +{ + const static std::string_view schema_title; + const static std::string_view schema_version; + const static std::string_view schema_description; +}; +struct ProductInformation +{ + std::string manufacturer; + std::string model_number; + bool manufacturer_is_set; + bool model_number_is_set; + const static std::string_view manufacturer_units; + const static std::string_view model_number_units; + const static std::string_view manufacturer_description; + const static std::string_view model_number_description; + const static std::string_view manufacturer_name; + const static std::string_view model_number_name; +}; +struct Description +{ + rsintegratedwaterheater_ns::ProductInformation product_information; + bool product_information_is_set; + const static std::string_view product_information_units; + const static std::string_view product_information_description; + const static std::string_view product_information_name; +}; +struct Performance +{ + rstank_ns::RSTANK tank; + std::vector heat_source_configurations; + std::string primary_heat_source_id; + double standby_power; + bool tank_is_set; + bool heat_source_configurations_is_set; + bool primary_heat_source_id_is_set; + bool standby_power_is_set; + const static std::string_view tank_units; + const static std::string_view heat_source_configurations_units; + const static std::string_view primary_heat_source_id_units; + const static std::string_view standby_power_units; + const static std::string_view tank_description; + const static std::string_view heat_source_configurations_description; + const static std::string_view primary_heat_source_id_description; + const static std::string_view standby_power_description; + const static std::string_view tank_name; + const static std::string_view heat_source_configurations_name; + const static std::string_view primary_heat_source_id_name; + const static std::string_view standby_power_name; +}; +struct RSINTEGRATEDWATERHEATER +{ + core_ns::Metadata metadata; + rsintegratedwaterheater_ns::Description description; + rsintegratedwaterheater_ns::Performance performance; + bool metadata_is_set; + bool description_is_set; + bool performance_is_set; + const static std::string_view metadata_units; + const static std::string_view description_units; + const static std::string_view performance_units; + const static std::string_view metadata_description; + const static std::string_view description_description; + const static std::string_view performance_description; + const static std::string_view metadata_name; + const static std::string_view description_name; + const static std::string_view performance_name; +}; +void from_json(const nlohmann::json& j, RSINTEGRATEDWATERHEATER& x); +void from_json(const nlohmann::json& j, Description& x); +void from_json(const nlohmann::json& j, ProductInformation& x); +void from_json(const nlohmann::json& j, Performance& x); +} // namespace rsintegratedwaterheater_ns +} // namespace hpwh_data_model #endif diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/rsresistancewaterheatsource.h b/hpwh_data_model/cpp/include/hpwh_data_model/rsresistancewaterheatsource.h index ee178890..023609a5 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/rsresistancewaterheatsource.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/rsresistancewaterheatsource.h @@ -12,62 +12,69 @@ /// @note This class has been auto-generated. Local changes will not be saved! -namespace hpwh_data_model { - namespace rsresistancewaterheatsource_ns { - inline std::shared_ptr logger; - void set_logger(std::shared_ptr value); - struct Schema { - const static std::string_view schema_title; - const static std::string_view schema_version; - const static std::string_view schema_description; - }; - struct ProductInformation { - std::string manufacturer; - std::string model_number; - bool manufacturer_is_set; - bool model_number_is_set; - const static std::string_view manufacturer_units; - const static std::string_view model_number_units; - const static std::string_view manufacturer_description; - const static std::string_view model_number_description; - const static std::string_view manufacturer_name; - const static std::string_view model_number_name; - }; - struct Description { - rsresistancewaterheatsource_ns::ProductInformation product_information; - bool product_information_is_set; - const static std::string_view product_information_units; - const static std::string_view product_information_description; - const static std::string_view product_information_name; - }; - struct Performance { - double input_power; - bool input_power_is_set; - const static std::string_view input_power_units; - const static std::string_view input_power_description; - const static std::string_view input_power_name; - }; - struct RSRESISTANCEWATERHEATSOURCE : HeatSourceTemplate { - core_ns::Metadata metadata; - rsresistancewaterheatsource_ns::Description description; - rsresistancewaterheatsource_ns::Performance performance; - bool metadata_is_set; - bool description_is_set; - bool performance_is_set; - const static std::string_view metadata_units; - const static std::string_view description_units; - const static std::string_view performance_units; - const static std::string_view metadata_description; - const static std::string_view description_description; - const static std::string_view performance_description; - const static std::string_view metadata_name; - const static std::string_view description_name; - const static std::string_view performance_name; - }; - void from_json(const nlohmann::json& j, RSRESISTANCEWATERHEATSOURCE& x); - void from_json(const nlohmann::json& j, Description& x); - void from_json(const nlohmann::json& j, ProductInformation& x); - void from_json(const nlohmann::json& j, Performance& x); - } -} +namespace hpwh_data_model +{ +namespace rsresistancewaterheatsource_ns +{ +inline std::shared_ptr logger; +void set_logger(std::shared_ptr value); +struct Schema +{ + const static std::string_view schema_title; + const static std::string_view schema_version; + const static std::string_view schema_description; +}; +struct ProductInformation +{ + std::string manufacturer; + std::string model_number; + bool manufacturer_is_set; + bool model_number_is_set; + const static std::string_view manufacturer_units; + const static std::string_view model_number_units; + const static std::string_view manufacturer_description; + const static std::string_view model_number_description; + const static std::string_view manufacturer_name; + const static std::string_view model_number_name; +}; +struct Description +{ + rsresistancewaterheatsource_ns::ProductInformation product_information; + bool product_information_is_set; + const static std::string_view product_information_units; + const static std::string_view product_information_description; + const static std::string_view product_information_name; +}; +struct Performance +{ + double input_power; + bool input_power_is_set; + const static std::string_view input_power_units; + const static std::string_view input_power_description; + const static std::string_view input_power_name; +}; +struct RSRESISTANCEWATERHEATSOURCE : HeatSourceTemplate +{ + core_ns::Metadata metadata; + rsresistancewaterheatsource_ns::Description description; + rsresistancewaterheatsource_ns::Performance performance; + bool metadata_is_set; + bool description_is_set; + bool performance_is_set; + const static std::string_view metadata_units; + const static std::string_view description_units; + const static std::string_view performance_units; + const static std::string_view metadata_description; + const static std::string_view description_description; + const static std::string_view performance_description; + const static std::string_view metadata_name; + const static std::string_view description_name; + const static std::string_view performance_name; +}; +void from_json(const nlohmann::json& j, RSRESISTANCEWATERHEATSOURCE& x); +void from_json(const nlohmann::json& j, Description& x); +void from_json(const nlohmann::json& j, ProductInformation& x); +void from_json(const nlohmann::json& j, Performance& x); +} // namespace rsresistancewaterheatsource_ns +} // namespace hpwh_data_model #endif diff --git a/hpwh_data_model/cpp/include/hpwh_data_model/rstank.h b/hpwh_data_model/cpp/include/hpwh_data_model/rstank.h index ca318cfb..4c7ed1ed 100644 --- a/hpwh_data_model/cpp/include/hpwh_data_model/rstank.h +++ b/hpwh_data_model/cpp/include/hpwh_data_model/rstank.h @@ -11,87 +11,94 @@ /// @note This class has been auto-generated. Local changes will not be saved! -namespace hpwh_data_model { - namespace rstank_ns { - inline std::shared_ptr logger; - void set_logger(std::shared_ptr value); - struct Schema { - const static std::string_view schema_title; - const static std::string_view schema_version; - const static std::string_view schema_description; - }; - struct ProductInformation { - std::string manufacturer; - std::string model_number; - bool manufacturer_is_set; - bool model_number_is_set; - const static std::string_view manufacturer_units; - const static std::string_view model_number_units; - const static std::string_view manufacturer_description; - const static std::string_view model_number_description; - const static std::string_view manufacturer_name; - const static std::string_view model_number_name; - }; - struct Description { - rstank_ns::ProductInformation product_information; - bool product_information_is_set; - const static std::string_view product_information_units; - const static std::string_view product_information_description; - const static std::string_view product_information_name; - }; - struct Performance { - double volume; - double diameter; - double ua; - double fittings_ua; - double bottom_fraction_of_tank_mixing_on_draw; - double heat_exchanger_effectiveness; - bool volume_is_set; - bool diameter_is_set; - bool ua_is_set; - bool fittings_ua_is_set; - bool bottom_fraction_of_tank_mixing_on_draw_is_set; - bool heat_exchanger_effectiveness_is_set; - const static std::string_view volume_units; - const static std::string_view diameter_units; - const static std::string_view ua_units; - const static std::string_view fittings_ua_units; - const static std::string_view bottom_fraction_of_tank_mixing_on_draw_units; - const static std::string_view heat_exchanger_effectiveness_units; - const static std::string_view volume_description; - const static std::string_view diameter_description; - const static std::string_view ua_description; - const static std::string_view fittings_ua_description; - const static std::string_view bottom_fraction_of_tank_mixing_on_draw_description; - const static std::string_view heat_exchanger_effectiveness_description; - const static std::string_view volume_name; - const static std::string_view diameter_name; - const static std::string_view ua_name; - const static std::string_view fittings_ua_name; - const static std::string_view bottom_fraction_of_tank_mixing_on_draw_name; - const static std::string_view heat_exchanger_effectiveness_name; - }; - struct RSTANK { - core_ns::Metadata metadata; - rstank_ns::Description description; - rstank_ns::Performance performance; - bool metadata_is_set; - bool description_is_set; - bool performance_is_set; - const static std::string_view metadata_units; - const static std::string_view description_units; - const static std::string_view performance_units; - const static std::string_view metadata_description; - const static std::string_view description_description; - const static std::string_view performance_description; - const static std::string_view metadata_name; - const static std::string_view description_name; - const static std::string_view performance_name; - }; - void from_json(const nlohmann::json& j, RSTANK& x); - void from_json(const nlohmann::json& j, Description& x); - void from_json(const nlohmann::json& j, ProductInformation& x); - void from_json(const nlohmann::json& j, Performance& x); - } -} +namespace hpwh_data_model +{ +namespace rstank_ns +{ +inline std::shared_ptr logger; +void set_logger(std::shared_ptr value); +struct Schema +{ + const static std::string_view schema_title; + const static std::string_view schema_version; + const static std::string_view schema_description; +}; +struct ProductInformation +{ + std::string manufacturer; + std::string model_number; + bool manufacturer_is_set; + bool model_number_is_set; + const static std::string_view manufacturer_units; + const static std::string_view model_number_units; + const static std::string_view manufacturer_description; + const static std::string_view model_number_description; + const static std::string_view manufacturer_name; + const static std::string_view model_number_name; +}; +struct Description +{ + rstank_ns::ProductInformation product_information; + bool product_information_is_set; + const static std::string_view product_information_units; + const static std::string_view product_information_description; + const static std::string_view product_information_name; +}; +struct Performance +{ + double volume; + double diameter; + double ua; + double fittings_ua; + double bottom_fraction_of_tank_mixing_on_draw; + double heat_exchanger_effectiveness; + bool volume_is_set; + bool diameter_is_set; + bool ua_is_set; + bool fittings_ua_is_set; + bool bottom_fraction_of_tank_mixing_on_draw_is_set; + bool heat_exchanger_effectiveness_is_set; + const static std::string_view volume_units; + const static std::string_view diameter_units; + const static std::string_view ua_units; + const static std::string_view fittings_ua_units; + const static std::string_view bottom_fraction_of_tank_mixing_on_draw_units; + const static std::string_view heat_exchanger_effectiveness_units; + const static std::string_view volume_description; + const static std::string_view diameter_description; + const static std::string_view ua_description; + const static std::string_view fittings_ua_description; + const static std::string_view bottom_fraction_of_tank_mixing_on_draw_description; + const static std::string_view heat_exchanger_effectiveness_description; + const static std::string_view volume_name; + const static std::string_view diameter_name; + const static std::string_view ua_name; + const static std::string_view fittings_ua_name; + const static std::string_view bottom_fraction_of_tank_mixing_on_draw_name; + const static std::string_view heat_exchanger_effectiveness_name; +}; +struct RSTANK +{ + core_ns::Metadata metadata; + rstank_ns::Description description; + rstank_ns::Performance performance; + bool metadata_is_set; + bool description_is_set; + bool performance_is_set; + const static std::string_view metadata_units; + const static std::string_view description_units; + const static std::string_view performance_units; + const static std::string_view metadata_description; + const static std::string_view description_description; + const static std::string_view performance_description; + const static std::string_view metadata_name; + const static std::string_view description_name; + const static std::string_view performance_name; +}; +void from_json(const nlohmann::json& j, RSTANK& x); +void from_json(const nlohmann::json& j, Description& x); +void from_json(const nlohmann::json& j, ProductInformation& x); +void from_json(const nlohmann::json& j, Performance& x); +} // namespace rstank_ns +} // namespace hpwh_data_model #endif diff --git a/hpwh_data_model/cpp/src/centralwaterheatingsystem.cpp b/hpwh_data_model/cpp/src/centralwaterheatingsystem.cpp index 46333c97..53a05f50 100644 --- a/hpwh_data_model/cpp/src/centralwaterheatingsystem.cpp +++ b/hpwh_data_model/cpp/src/centralwaterheatingsystem.cpp @@ -1,69 +1,110 @@ #include #include -namespace hpwh_data_model { - - namespace central_water_heating_system_ns { - - void set_logger (std::shared_ptr value) { logger = value; } - - const std::string_view Schema::schema_title = "Central Water Heating System"; - - const std::string_view Schema::schema_version = "0.1.0"; - - const std::string_view Schema::schema_description = "Components that make up a central water heating system"; - - void from_json(const nlohmann::json& j, CentralWaterHeatingSystem& x) { - json_get(j, logger.get(), "tank", x.tank, x.tank_is_set, true); - json_get>(j, logger.get(), "heat_source_configurations", x.heat_source_configurations, x.heat_source_configurations_is_set, false); - json_get(j, logger.get(), "primary_heat_source_id", x.primary_heat_source_id, x.primary_heat_source_id_is_set, false); - json_get(j, logger.get(), "standby_power", x.standby_power, x.standby_power_is_set, false); - json_get(j, logger.get(), "external_inlet_height", x.external_inlet_height, x.external_inlet_height_is_set, false); - json_get(j, logger.get(), "external_outlet_height", x.external_outlet_height, x.external_outlet_height_is_set, false); - json_get(j, logger.get(), "multipass_flow_rate", x.multipass_flow_rate, x.multipass_flow_rate_is_set, false); - } - const std::string_view CentralWaterHeatingSystem::tank_units = ""; - - const std::string_view CentralWaterHeatingSystem::heat_source_configurations_units = ""; +namespace hpwh_data_model +{ + +namespace central_water_heating_system_ns +{ + +void set_logger(std::shared_ptr value) { logger = value; } + +const std::string_view Schema::schema_title = "Central Water Heating System"; + +const std::string_view Schema::schema_version = "0.1.0"; + +const std::string_view Schema::schema_description = + "Components that make up a central water heating system"; + +void from_json(const nlohmann::json& j, CentralWaterHeatingSystem& x) +{ + json_get(j, logger.get(), "tank", x.tank, x.tank_is_set, true); + json_get>( + j, + logger.get(), + "heat_source_configurations", + x.heat_source_configurations, + x.heat_source_configurations_is_set, + false); + json_get(j, + logger.get(), + "primary_heat_source_id", + x.primary_heat_source_id, + x.primary_heat_source_id_is_set, + false); + json_get( + j, logger.get(), "standby_power", x.standby_power, x.standby_power_is_set, false); + json_get(j, + logger.get(), + "external_inlet_height", + x.external_inlet_height, + x.external_inlet_height_is_set, + false); + json_get(j, + logger.get(), + "external_outlet_height", + x.external_outlet_height, + x.external_outlet_height_is_set, + false); + json_get(j, + logger.get(), + "multipass_flow_rate", + x.multipass_flow_rate, + x.multipass_flow_rate_is_set, + false); +} +const std::string_view CentralWaterHeatingSystem::tank_units = ""; - const std::string_view CentralWaterHeatingSystem::primary_heat_source_id_units = ""; +const std::string_view CentralWaterHeatingSystem::heat_source_configurations_units = ""; - const std::string_view CentralWaterHeatingSystem::standby_power_units = ""; +const std::string_view CentralWaterHeatingSystem::primary_heat_source_id_units = ""; - const std::string_view CentralWaterHeatingSystem::external_inlet_height_units = ""; +const std::string_view CentralWaterHeatingSystem::standby_power_units = ""; - const std::string_view CentralWaterHeatingSystem::external_outlet_height_units = ""; +const std::string_view CentralWaterHeatingSystem::external_inlet_height_units = ""; - const std::string_view CentralWaterHeatingSystem::multipass_flow_rate_units = ""; +const std::string_view CentralWaterHeatingSystem::external_outlet_height_units = ""; - const std::string_view CentralWaterHeatingSystem::tank_description = "The corresponding Standard 205 tank representation"; +const std::string_view CentralWaterHeatingSystem::multipass_flow_rate_units = ""; - const std::string_view CentralWaterHeatingSystem::heat_source_configurations_description = "Describes how the heat sources are configured within the tank"; +const std::string_view CentralWaterHeatingSystem::tank_description = + "The corresponding Standard 205 tank representation"; - const std::string_view CentralWaterHeatingSystem::primary_heat_source_id_description = "Turns on independently of other heat sources"; +const std::string_view CentralWaterHeatingSystem::heat_source_configurations_description = + "Describes how the heat sources are configured within the tank"; - const std::string_view CentralWaterHeatingSystem::standby_power_description = "Power drawn when system is in standby mode"; +const std::string_view CentralWaterHeatingSystem::primary_heat_source_id_description = + "Turns on independently of other heat sources"; - const std::string_view CentralWaterHeatingSystem::external_inlet_height_description = "Fractional tank height of inlet"; +const std::string_view CentralWaterHeatingSystem::standby_power_description = + "Power drawn when system is in standby mode"; - const std::string_view CentralWaterHeatingSystem::external_outlet_height_description = "Fractional tank height of outlet"; +const std::string_view CentralWaterHeatingSystem::external_inlet_height_description = + "Fractional tank height of inlet"; - const std::string_view CentralWaterHeatingSystem::multipass_flow_rate_description = "Flow rate, if multipass system"; +const std::string_view CentralWaterHeatingSystem::external_outlet_height_description = + "Fractional tank height of outlet"; - const std::string_view CentralWaterHeatingSystem::tank_name = "tank"; +const std::string_view CentralWaterHeatingSystem::multipass_flow_rate_description = + "Flow rate, if multipass system"; - const std::string_view CentralWaterHeatingSystem::heat_source_configurations_name = "heat_source_configurations"; +const std::string_view CentralWaterHeatingSystem::tank_name = "tank"; - const std::string_view CentralWaterHeatingSystem::primary_heat_source_id_name = "primary_heat_source_id"; +const std::string_view CentralWaterHeatingSystem::heat_source_configurations_name = + "heat_source_configurations"; - const std::string_view CentralWaterHeatingSystem::standby_power_name = "standby_power"; +const std::string_view CentralWaterHeatingSystem::primary_heat_source_id_name = + "primary_heat_source_id"; - const std::string_view CentralWaterHeatingSystem::external_inlet_height_name = "external_inlet_height"; +const std::string_view CentralWaterHeatingSystem::standby_power_name = "standby_power"; - const std::string_view CentralWaterHeatingSystem::external_outlet_height_name = "external_outlet_height"; +const std::string_view CentralWaterHeatingSystem::external_inlet_height_name = + "external_inlet_height"; - const std::string_view CentralWaterHeatingSystem::multipass_flow_rate_name = "multipass_flow_rate"; +const std::string_view CentralWaterHeatingSystem::external_outlet_height_name = + "external_outlet_height"; - } -} +const std::string_view CentralWaterHeatingSystem::multipass_flow_rate_name = "multipass_flow_rate"; +} // namespace central_water_heating_system_ns +} // namespace hpwh_data_model diff --git a/hpwh_data_model/cpp/src/core.cpp b/hpwh_data_model/cpp/src/core.cpp index 7a4e4af7..d4689f8d 100644 --- a/hpwh_data_model/cpp/src/core.cpp +++ b/hpwh_data_model/cpp/src/core.cpp @@ -1,90 +1,100 @@ #include #include -namespace hpwh_data_model { - - namespace core_ns { - - void set_logger (std::shared_ptr value) { logger = value; } - - const std::string_view Schema::schema_title = "Core"; - - const std::string_view Schema::schema_version = "0.1.0"; - - const std::string_view Schema::schema_description = "Common Data Types, String Types, Enumerations, and Data Groups"; - - void from_json(const nlohmann::json& j, Metadata& x) { - json_get(j, logger.get(), "schema_author", x.schema_author, x.schema_author_is_set, true); - json_get(j, logger.get(), "schema", x.schema, x.schema_is_set, true); - json_get(j, logger.get(), "schema_version", x.schema_version, x.schema_version_is_set, true); - json_get(j, logger.get(), "description", x.description, x.description_is_set, true); - json_get(j, logger.get(), "timestamp", x.timestamp, x.timestamp_is_set, true); - json_get(j, logger.get(), "id", x.id, x.id_is_set, false); - json_get(j, logger.get(), "version", x.version, x.version_is_set, false); - json_get(j, logger.get(), "data_source", x.data_source, x.data_source_is_set, false); - json_get(j, logger.get(), "disclaimer", x.disclaimer, x.disclaimer_is_set, false); - json_get(j, logger.get(), "notes", x.notes, x.notes_is_set, false); - } - const std::string_view Metadata::schema_author_units = ""; - - const std::string_view Metadata::schema_units = ""; +namespace hpwh_data_model +{ + +namespace core_ns +{ + +void set_logger(std::shared_ptr value) { logger = value; } + +const std::string_view Schema::schema_title = "Core"; + +const std::string_view Schema::schema_version = "0.1.0"; + +const std::string_view Schema::schema_description = + "Common Data Types, String Types, Enumerations, and Data Groups"; + +void from_json(const nlohmann::json& j, Metadata& x) +{ + json_get( + j, logger.get(), "schema_author", x.schema_author, x.schema_author_is_set, true); + json_get(j, logger.get(), "schema", x.schema, x.schema_is_set, true); + json_get( + j, logger.get(), "schema_version", x.schema_version, x.schema_version_is_set, true); + json_get( + j, logger.get(), "description", x.description, x.description_is_set, true); + json_get(j, logger.get(), "timestamp", x.timestamp, x.timestamp_is_set, true); + json_get(j, logger.get(), "id", x.id, x.id_is_set, false); + json_get(j, logger.get(), "version", x.version, x.version_is_set, false); + json_get( + j, logger.get(), "data_source", x.data_source, x.data_source_is_set, false); + json_get(j, logger.get(), "disclaimer", x.disclaimer, x.disclaimer_is_set, false); + json_get(j, logger.get(), "notes", x.notes, x.notes_is_set, false); +} +const std::string_view Metadata::schema_author_units = ""; - const std::string_view Metadata::schema_version_units = ""; +const std::string_view Metadata::schema_units = ""; - const std::string_view Metadata::description_units = ""; +const std::string_view Metadata::schema_version_units = ""; - const std::string_view Metadata::timestamp_units = ""; +const std::string_view Metadata::description_units = ""; - const std::string_view Metadata::id_units = ""; +const std::string_view Metadata::timestamp_units = ""; - const std::string_view Metadata::version_units = ""; +const std::string_view Metadata::id_units = ""; - const std::string_view Metadata::data_source_units = ""; +const std::string_view Metadata::version_units = ""; - const std::string_view Metadata::disclaimer_units = ""; +const std::string_view Metadata::data_source_units = ""; - const std::string_view Metadata::notes_units = ""; +const std::string_view Metadata::disclaimer_units = ""; - const std::string_view Metadata::schema_author_description = "Name of the schema author"; +const std::string_view Metadata::notes_units = ""; - const std::string_view Metadata::schema_description = "Schema name or identifier"; +const std::string_view Metadata::schema_author_description = "Name of the schema author"; - const std::string_view Metadata::schema_version_description = "Version of the root schema this data complies with"; +const std::string_view Metadata::schema_description = "Schema name or identifier"; - const std::string_view Metadata::description_description = "Description of data content (suitable for display)"; +const std::string_view Metadata::schema_version_description = + "Version of the root schema this data complies with"; - const std::string_view Metadata::timestamp_description = "Date of data publication"; +const std::string_view Metadata::description_description = + "Description of data content (suitable for display)"; - const std::string_view Metadata::id_description = "Unique data set identifier"; +const std::string_view Metadata::timestamp_description = "Date of data publication"; - const std::string_view Metadata::version_description = "Integer version identifier for the data"; +const std::string_view Metadata::id_description = "Unique data set identifier"; - const std::string_view Metadata::data_source_description = "Source(s) of the data"; +const std::string_view Metadata::version_description = "Integer version identifier for the data"; - const std::string_view Metadata::disclaimer_description = "Characterization of accuracy, limitations, and applicability of this data"; +const std::string_view Metadata::data_source_description = "Source(s) of the data"; - const std::string_view Metadata::notes_description = "Additional Information"; +const std::string_view Metadata::disclaimer_description = + "Characterization of accuracy, limitations, and applicability of this data"; - const std::string_view Metadata::schema_author_name = "schema_author"; +const std::string_view Metadata::notes_description = "Additional Information"; - const std::string_view Metadata::schema_name = "schema"; +const std::string_view Metadata::schema_author_name = "schema_author"; - const std::string_view Metadata::schema_version_name = "schema_version"; +const std::string_view Metadata::schema_name = "schema"; - const std::string_view Metadata::description_name = "description"; +const std::string_view Metadata::schema_version_name = "schema_version"; - const std::string_view Metadata::timestamp_name = "timestamp"; +const std::string_view Metadata::description_name = "description"; - const std::string_view Metadata::id_name = "id"; +const std::string_view Metadata::timestamp_name = "timestamp"; - const std::string_view Metadata::version_name = "version"; +const std::string_view Metadata::id_name = "id"; - const std::string_view Metadata::data_source_name = "data_source"; +const std::string_view Metadata::version_name = "version"; - const std::string_view Metadata::disclaimer_name = "disclaimer"; +const std::string_view Metadata::data_source_name = "data_source"; - const std::string_view Metadata::notes_name = "notes"; +const std::string_view Metadata::disclaimer_name = "disclaimer"; - } -} +const std::string_view Metadata::notes_name = "notes"; +} // namespace core_ns +} // namespace hpwh_data_model diff --git a/hpwh_data_model/cpp/src/heatsourceconfiguration.cpp b/hpwh_data_model/cpp/src/heatsourceconfiguration.cpp index 7f8465b9..7c4582ae 100644 --- a/hpwh_data_model/cpp/src/heatsourceconfiguration.cpp +++ b/hpwh_data_model/cpp/src/heatsourceconfiguration.cpp @@ -1,218 +1,357 @@ #include #include -namespace hpwh_data_model { +namespace hpwh_data_model +{ - namespace heat_source_configuration_ns { - - void set_logger (std::shared_ptr value) { logger = value; } +namespace heat_source_configuration_ns +{ - const std::string_view Schema::schema_title = "ASHRAE 205"; +void set_logger(std::shared_ptr value) { logger = value; } - const std::string_view Schema::schema_version = "0.2.0"; +const std::string_view Schema::schema_title = "ASHRAE 205"; - const std::string_view Schema::schema_description = "Base schema for ASHRAE 205 representations"; +const std::string_view Schema::schema_version = "0.2.0"; - void from_json(const nlohmann::json& j, HeatingLogic& x) { - json_get(j, logger.get(), "heating_logic_type", x.heating_logic_type, x.heating_logic_type_is_set, true); - if (x.heating_logic_type == heat_source_configuration_ns::HeatingLogicType::STATE_OF_CHARGE_BASED) { - x.heating_logic = std::make_unique(); - if (x.heating_logic) { - from_json(j.at("heating_logic"), *dynamic_cast(x.heating_logic.get())); - } - } - if (x.heating_logic_type == heat_source_configuration_ns::HeatingLogicType::TEMPERATURE_BASED) { - x.heating_logic = std::make_unique(); - if (x.heating_logic) { - from_json(j.at("heating_logic"), *dynamic_cast(x.heating_logic.get())); - } - } - json_get(j, logger.get(), "comparison_type", x.comparison_type, x.comparison_type_is_set, true); - } - const std::string_view HeatingLogic::heating_logic_type_units = ""; +const std::string_view Schema::schema_description = "Base schema for ASHRAE 205 representations"; - const std::string_view HeatingLogic::heating_logic_units = ""; - - const std::string_view HeatingLogic::comparison_type_units = ""; - - const std::string_view HeatingLogic::heating_logic_type_description = "Type of heating logic"; - - const std::string_view HeatingLogic::heating_logic_description = "Specific heating logic"; - - const std::string_view HeatingLogic::comparison_type_description = "Result of comparison for activation"; - - const std::string_view HeatingLogic::heating_logic_type_name = "heating_logic_type"; - - const std::string_view HeatingLogic::heating_logic_name = "heating_logic"; - - const std::string_view HeatingLogic::comparison_type_name = "comparison_type"; - - void from_json(const nlohmann::json& j, HeatSourceConfiguration& x) { - json_get(j, logger.get(), "id", x.id, x.id_is_set, true); - json_get(j, logger.get(), "heat_source_type", x.heat_source_type, x.heat_source_type_is_set, true); - if (x.heat_source_type == heat_source_configuration_ns::HeatSourceType::RESISTANCE) { - x.heat_source = std::make_unique(); - if (x.heat_source) { - from_json(j.at("heat_source"), *dynamic_cast(x.heat_source.get())); - } - } - if (x.heat_source_type == heat_source_configuration_ns::HeatSourceType::CONDENSER) { - x.heat_source = std::make_unique(); - if (x.heat_source) { - from_json(j.at("heat_source"), *dynamic_cast(x.heat_source.get())); - } - } - json_get>(j, logger.get(), "heat_distribution", x.heat_distribution, x.heat_distribution_is_set, true); - json_get>(j, logger.get(), "turn_on_logic", x.turn_on_logic, x.turn_on_logic_is_set, true); - json_get>(j, logger.get(), "shut_off_logic", x.shut_off_logic, x.shut_off_logic_is_set, false); - json_get(j, logger.get(), "standby_logic", x.standby_logic, x.standby_logic_is_set, false); - json_get(j, logger.get(), "backup_heat_source_id", x.backup_heat_source_id, x.backup_heat_source_id_is_set, false); - json_get(j, logger.get(), "followed_by_heat_source_id", x.followed_by_heat_source_id, x.followed_by_heat_source_id_is_set, false); - json_get(j, logger.get(), "companion_heat_source_id", x.companion_heat_source_id, x.companion_heat_source_id_is_set, false); - } - const std::string_view HeatSourceConfiguration::id_units = ""; - - const std::string_view HeatSourceConfiguration::heat_source_type_units = ""; - - const std::string_view HeatSourceConfiguration::heat_source_units = ""; - - const std::string_view HeatSourceConfiguration::heat_distribution_units = ""; - - const std::string_view HeatSourceConfiguration::turn_on_logic_units = ""; - - const std::string_view HeatSourceConfiguration::shut_off_logic_units = ""; - - const std::string_view HeatSourceConfiguration::standby_logic_units = ""; - - const std::string_view HeatSourceConfiguration::backup_heat_source_id_units = ""; - - const std::string_view HeatSourceConfiguration::followed_by_heat_source_id_units = ""; - - const std::string_view HeatSourceConfiguration::companion_heat_source_id_units = ""; - - const std::string_view HeatSourceConfiguration::id_description = "Identifier for reference"; - - const std::string_view HeatSourceConfiguration::heat_source_type_description = "Type of heat source"; - - const std::string_view HeatSourceConfiguration::heat_source_description = "A corresponding Standard 205 heat-source representation"; - - const std::string_view HeatSourceConfiguration::heat_distribution_description = "Weighted distribution of heat from the heat source along the height of the tank"; - - const std::string_view HeatSourceConfiguration::turn_on_logic_description = "An array of logic conditions that define when the heat source turns on if it is currently off"; - - const std::string_view HeatSourceConfiguration::shut_off_logic_description = "An array of logic conditions that define when the heat source shuts off if it is currently on"; - - const std::string_view HeatSourceConfiguration::standby_logic_description = "Checks that bottom is below a temperature to prevent short cycling"; - - const std::string_view HeatSourceConfiguration::backup_heat_source_id_description = "Reference to the `HeatSourceConfiguration` that engages if this one cannot meet the setpoint"; - - const std::string_view HeatSourceConfiguration::followed_by_heat_source_id_description = "Reference to the `HeatSourceConfiguration` that should always engage after this one"; - - const std::string_view HeatSourceConfiguration::companion_heat_source_id_description = "Reference to the `HeatSourceConfiguration` that should always engage concurrently with this one"; +void from_json(const nlohmann::json& j, WeightedDistribution& x) +{ + json_get>(j, + logger.get(), + "normalized_height", + x.normalized_height, + x.normalized_height_is_set, + true); + json_get>(j, logger.get(), "weight", x.weight, x.weight_is_set, true); +} +const std::string_view WeightedDistribution::normalized_height_units = "-"; + +const std::string_view WeightedDistribution::weight_units = "-"; + +const std::string_view WeightedDistribution::normalized_height_description = + "Normalized heights within the tank where the weight is defined between the bottom (0.0), and " + "the top (1.0)"; + +const std::string_view WeightedDistribution::weight_description = + "Weight at the corresponding normalized height"; + +const std::string_view WeightedDistribution::normalized_height_name = "normalized_height"; + +const std::string_view WeightedDistribution::weight_name = "weight"; + +void from_json(const nlohmann::json& j, HeatingLogic& x) +{ + json_get(j, + logger.get(), + "heating_logic_type", + x.heating_logic_type, + x.heating_logic_type_is_set, + true); + if (x.heating_logic_type == + heat_source_configuration_ns::HeatingLogicType::STATE_OF_CHARGE_BASED) + { + x.heating_logic = + std::make_unique(); + if (x.heating_logic) + { + from_json(j.at("heating_logic"), + *dynamic_cast( + x.heating_logic.get())); + } + } + if (x.heating_logic_type == heat_source_configuration_ns::HeatingLogicType::TEMPERATURE_BASED) + { + x.heating_logic = + std::make_unique(); + if (x.heating_logic) + { + from_json(j.at("heating_logic"), + *dynamic_cast( + x.heating_logic.get())); + } + } + json_get( + j, logger.get(), "comparison_type", x.comparison_type, x.comparison_type_is_set, true); +} +const std::string_view HeatingLogic::heating_logic_type_units = ""; + +const std::string_view HeatingLogic::heating_logic_units = ""; + +const std::string_view HeatingLogic::comparison_type_units = ""; + +const std::string_view HeatingLogic::heating_logic_type_description = "Type of heating logic"; + +const std::string_view HeatingLogic::heating_logic_description = "Specific heating logic"; + +const std::string_view HeatingLogic::comparison_type_description = + "Result of comparison for activation"; + +const std::string_view HeatingLogic::heating_logic_type_name = "heating_logic_type"; + +const std::string_view HeatingLogic::heating_logic_name = "heating_logic"; + +const std::string_view HeatingLogic::comparison_type_name = "comparison_type"; + +void from_json(const nlohmann::json& j, HeatSourceConfiguration& x) +{ + json_get(j, logger.get(), "id", x.id, x.id_is_set, true); + json_get( + j, logger.get(), "heat_source_type", x.heat_source_type, x.heat_source_type_is_set, true); + if (x.heat_source_type == heat_source_configuration_ns::HeatSourceType::RESISTANCE) + { + x.heat_source = + std::make_unique(); + if (x.heat_source) + { + from_json(j.at("heat_source"), + *dynamic_cast( + x.heat_source.get())); + } + } + if (x.heat_source_type == heat_source_configuration_ns::HeatSourceType::CONDENSER) + { + x.heat_source = + std::make_unique(); + if (x.heat_source) + { + from_json(j.at("heat_source"), + *dynamic_cast( + x.heat_source.get())); + } + } + json_get(j, + logger.get(), + "heat_distribution", + x.heat_distribution, + x.heat_distribution_is_set, + true); + json_get>( + j, logger.get(), "turn_on_logic", x.turn_on_logic, x.turn_on_logic_is_set, true); + json_get>( + j, logger.get(), "shut_off_logic", x.shut_off_logic, x.shut_off_logic_is_set, false); + json_get( + j, logger.get(), "standby_logic", x.standby_logic, x.standby_logic_is_set, false); + json_get(j, + logger.get(), + "backup_heat_source_id", + x.backup_heat_source_id, + x.backup_heat_source_id_is_set, + false); + json_get(j, + logger.get(), + "followed_by_heat_source_id", + x.followed_by_heat_source_id, + x.followed_by_heat_source_id_is_set, + false); + json_get(j, + logger.get(), + "companion_heat_source_id", + x.companion_heat_source_id, + x.companion_heat_source_id_is_set, + false); +} +const std::string_view HeatSourceConfiguration::id_units = ""; - const std::string_view HeatSourceConfiguration::id_name = "id"; +const std::string_view HeatSourceConfiguration::heat_source_type_units = ""; - const std::string_view HeatSourceConfiguration::heat_source_type_name = "heat_source_type"; +const std::string_view HeatSourceConfiguration::heat_source_units = ""; - const std::string_view HeatSourceConfiguration::heat_source_name = "heat_source"; +const std::string_view HeatSourceConfiguration::heat_distribution_units = ""; - const std::string_view HeatSourceConfiguration::heat_distribution_name = "heat_distribution"; +const std::string_view HeatSourceConfiguration::turn_on_logic_units = ""; - const std::string_view HeatSourceConfiguration::turn_on_logic_name = "turn_on_logic"; +const std::string_view HeatSourceConfiguration::shut_off_logic_units = ""; - const std::string_view HeatSourceConfiguration::shut_off_logic_name = "shut_off_logic"; +const std::string_view HeatSourceConfiguration::standby_logic_units = ""; - const std::string_view HeatSourceConfiguration::standby_logic_name = "standby_logic"; +const std::string_view HeatSourceConfiguration::backup_heat_source_id_units = ""; - const std::string_view HeatSourceConfiguration::backup_heat_source_id_name = "backup_heat_source_id"; +const std::string_view HeatSourceConfiguration::followed_by_heat_source_id_units = ""; - const std::string_view HeatSourceConfiguration::followed_by_heat_source_id_name = "followed_by_heat_source_id"; +const std::string_view HeatSourceConfiguration::companion_heat_source_id_units = ""; - const std::string_view HeatSourceConfiguration::companion_heat_source_id_name = "companion_heat_source_id"; +const std::string_view HeatSourceConfiguration::id_description = "Identifier for reference"; - void from_json(const nlohmann::json& j, WeightedDistribution& x) { - json_get>(j, logger.get(), "normalized_height", x.normalized_height, x.normalized_height_is_set, true); - json_get>(j, logger.get(), "weight", x.weight, x.weight_is_set, true); - } - const std::string_view WeightedDistribution::normalized_height_units = "-"; +const std::string_view HeatSourceConfiguration::heat_source_type_description = + "Type of heat source"; - const std::string_view WeightedDistribution::weight_units = "-"; +const std::string_view HeatSourceConfiguration::heat_source_description = + "A corresponding Standard 205 heat-source representation"; - const std::string_view WeightedDistribution::normalized_height_description = "Normalized heights within the tank where the weight is defined between the bottom (0.0), and the top (1.0)"; +const std::string_view HeatSourceConfiguration::heat_distribution_description = + "Weighted distribution of heat from the heat source along the height of the tank"; - const std::string_view WeightedDistribution::weight_description = "Fraction of weight at the corresponding normalized height"; +const std::string_view HeatSourceConfiguration::turn_on_logic_description = + "An array of logic conditions that define when the heat source turns on if it is currently off"; - const std::string_view WeightedDistribution::normalized_height_name = "normalized_height"; +const std::string_view HeatSourceConfiguration::shut_off_logic_description = + "An array of logic conditions that define when the heat source shuts off if it is currently on"; - const std::string_view WeightedDistribution::weight_name = "weight"; +const std::string_view HeatSourceConfiguration::standby_logic_description = + "Checks that bottom is below a temperature to prevent short cycling"; - void from_json(const nlohmann::json& j, TemperatureBasedHeatingLogic& x) { - json_get(j, logger.get(), "absolute_temperature", x.absolute_temperature, x.absolute_temperature_is_set, true); - json_get(j, logger.get(), "differential_temperature", x.differential_temperature, x.differential_temperature_is_set, true); - json_get(j, logger.get(), "standby_temperature_location", x.standby_temperature_location, x.standby_temperature_location_is_set, true); - json_get>(j, logger.get(), "temperature_weight_distribution", x.temperature_weight_distribution, x.temperature_weight_distribution_is_set, true); - } - const std::string_view TemperatureBasedHeatingLogic::absolute_temperature_units = "K"; +const std::string_view HeatSourceConfiguration::backup_heat_source_id_description = + "Reference to the `HeatSourceConfiguration` that engages if this one cannot meet the setpoint"; - const std::string_view TemperatureBasedHeatingLogic::differential_temperature_units = "K"; +const std::string_view HeatSourceConfiguration::followed_by_heat_source_id_description = + "Reference to the `HeatSourceConfiguration` that should always engage after this one"; - const std::string_view TemperatureBasedHeatingLogic::standby_temperature_location_units = ""; +const std::string_view HeatSourceConfiguration::companion_heat_source_id_description = + "Reference to the `HeatSourceConfiguration` that should always engage concurrently with this " + "one"; - const std::string_view TemperatureBasedHeatingLogic::temperature_weight_distribution_units = ""; +const std::string_view HeatSourceConfiguration::id_name = "id"; - const std::string_view TemperatureBasedHeatingLogic::absolute_temperature_description = "Absolute temperature for activation"; +const std::string_view HeatSourceConfiguration::heat_source_type_name = "heat_source_type"; - const std::string_view TemperatureBasedHeatingLogic::differential_temperature_description = "Temperature difference for activation"; +const std::string_view HeatSourceConfiguration::heat_source_name = "heat_source"; - const std::string_view TemperatureBasedHeatingLogic::standby_temperature_location_description = "Standby temperature location"; +const std::string_view HeatSourceConfiguration::heat_distribution_name = "heat_distribution"; - const std::string_view TemperatureBasedHeatingLogic::temperature_weight_distribution_description = "Weighted distribution for comparison, by division, in order"; +const std::string_view HeatSourceConfiguration::turn_on_logic_name = "turn_on_logic"; - const std::string_view TemperatureBasedHeatingLogic::absolute_temperature_name = "absolute_temperature"; +const std::string_view HeatSourceConfiguration::shut_off_logic_name = "shut_off_logic"; - const std::string_view TemperatureBasedHeatingLogic::differential_temperature_name = "differential_temperature"; +const std::string_view HeatSourceConfiguration::standby_logic_name = "standby_logic"; - const std::string_view TemperatureBasedHeatingLogic::standby_temperature_location_name = "standby_temperature_location"; +const std::string_view HeatSourceConfiguration::backup_heat_source_id_name = + "backup_heat_source_id"; - const std::string_view TemperatureBasedHeatingLogic::temperature_weight_distribution_name = "temperature_weight_distribution"; +const std::string_view HeatSourceConfiguration::followed_by_heat_source_id_name = + "followed_by_heat_source_id"; - void from_json(const nlohmann::json& j, StateOfChargeBasedHeatingLogic& x) { - json_get(j, logger.get(), "decision_point", x.decision_point, x.decision_point_is_set, true); - json_get(j, logger.get(), "minimum_useful_temperature", x.minimum_useful_temperature, x.minimum_useful_temperature_is_set, false); - json_get(j, logger.get(), "hysteresis_fraction", x.hysteresis_fraction, x.hysteresis_fraction_is_set, false); - json_get(j, logger.get(), "uses_constant_mains", x.uses_constant_mains, x.uses_constant_mains_is_set, true); - json_get(j, logger.get(), "constant_mains_temperature", x.constant_mains_temperature, x.constant_mains_temperature_is_set, true); - } - const std::string_view StateOfChargeBasedHeatingLogic::decision_point_units = ""; +const std::string_view HeatSourceConfiguration::companion_heat_source_id_name = + "companion_heat_source_id"; - const std::string_view StateOfChargeBasedHeatingLogic::minimum_useful_temperature_units = ""; +void from_json(const nlohmann::json& j, TemperatureBasedHeatingLogic& x) +{ + json_get(j, + logger.get(), + "absolute_temperature", + x.absolute_temperature, + x.absolute_temperature_is_set, + true); + json_get(j, + logger.get(), + "differential_temperature", + x.differential_temperature, + x.differential_temperature_is_set, + true); + json_get( + j, + logger.get(), + "standby_temperature_location", + x.standby_temperature_location, + x.standby_temperature_location_is_set, + true); + json_get( + j, + logger.get(), + "temperature_weight_distribution", + x.temperature_weight_distribution, + x.temperature_weight_distribution_is_set, + true); +} +const std::string_view TemperatureBasedHeatingLogic::absolute_temperature_units = "K"; + +const std::string_view TemperatureBasedHeatingLogic::differential_temperature_units = "K"; + +const std::string_view TemperatureBasedHeatingLogic::standby_temperature_location_units = ""; + +const std::string_view TemperatureBasedHeatingLogic::temperature_weight_distribution_units = ""; + +const std::string_view TemperatureBasedHeatingLogic::absolute_temperature_description = + "Absolute temperature for activation"; + +const std::string_view TemperatureBasedHeatingLogic::differential_temperature_description = + "Temperature difference for activation"; + +const std::string_view TemperatureBasedHeatingLogic::standby_temperature_location_description = + "Standby temperature location"; + +const std::string_view TemperatureBasedHeatingLogic::temperature_weight_distribution_description = + "Weighted distribution for comparison, by division, in order"; + +const std::string_view TemperatureBasedHeatingLogic::absolute_temperature_name = + "absolute_temperature"; + +const std::string_view TemperatureBasedHeatingLogic::differential_temperature_name = + "differential_temperature"; + +const std::string_view TemperatureBasedHeatingLogic::standby_temperature_location_name = + "standby_temperature_location"; + +const std::string_view TemperatureBasedHeatingLogic::temperature_weight_distribution_name = + "temperature_weight_distribution"; + +void from_json(const nlohmann::json& j, StateOfChargeBasedHeatingLogic& x) +{ + json_get( + j, logger.get(), "decision_point", x.decision_point, x.decision_point_is_set, true); + json_get(j, + logger.get(), + "minimum_useful_temperature", + x.minimum_useful_temperature, + x.minimum_useful_temperature_is_set, + false); + json_get(j, + logger.get(), + "hysteresis_fraction", + x.hysteresis_fraction, + x.hysteresis_fraction_is_set, + false); + json_get(j, + logger.get(), + "uses_constant_mains", + x.uses_constant_mains, + x.uses_constant_mains_is_set, + true); + json_get(j, + logger.get(), + "constant_mains_temperature", + x.constant_mains_temperature, + x.constant_mains_temperature_is_set, + true); +} +const std::string_view StateOfChargeBasedHeatingLogic::decision_point_units = ""; - const std::string_view StateOfChargeBasedHeatingLogic::hysteresis_fraction_units = "-"; +const std::string_view StateOfChargeBasedHeatingLogic::minimum_useful_temperature_units = ""; - const std::string_view StateOfChargeBasedHeatingLogic::uses_constant_mains_units = ""; +const std::string_view StateOfChargeBasedHeatingLogic::hysteresis_fraction_units = "-"; - const std::string_view StateOfChargeBasedHeatingLogic::constant_mains_temperature_units = "K"; +const std::string_view StateOfChargeBasedHeatingLogic::uses_constant_mains_units = ""; - const std::string_view StateOfChargeBasedHeatingLogic::decision_point_description = "Decision point"; +const std::string_view StateOfChargeBasedHeatingLogic::constant_mains_temperature_units = "K"; - const std::string_view StateOfChargeBasedHeatingLogic::minimum_useful_temperature_description = "Minimum useful temperature"; +const std::string_view StateOfChargeBasedHeatingLogic::decision_point_description = + "Decision point"; - const std::string_view StateOfChargeBasedHeatingLogic::hysteresis_fraction_description = "Hysteresis fraction"; +const std::string_view StateOfChargeBasedHeatingLogic::minimum_useful_temperature_description = + "Minimum useful temperature"; - const std::string_view StateOfChargeBasedHeatingLogic::uses_constant_mains_description = "Uses constant mains"; +const std::string_view StateOfChargeBasedHeatingLogic::hysteresis_fraction_description = + "Hysteresis fraction"; - const std::string_view StateOfChargeBasedHeatingLogic::constant_mains_temperature_description = "Constant mains temperature"; +const std::string_view StateOfChargeBasedHeatingLogic::uses_constant_mains_description = + "Uses constant mains"; - const std::string_view StateOfChargeBasedHeatingLogic::decision_point_name = "decision_point"; +const std::string_view StateOfChargeBasedHeatingLogic::constant_mains_temperature_description = + "Constant mains temperature"; - const std::string_view StateOfChargeBasedHeatingLogic::minimum_useful_temperature_name = "minimum_useful_temperature"; +const std::string_view StateOfChargeBasedHeatingLogic::decision_point_name = "decision_point"; - const std::string_view StateOfChargeBasedHeatingLogic::hysteresis_fraction_name = "hysteresis_fraction"; +const std::string_view StateOfChargeBasedHeatingLogic::minimum_useful_temperature_name = + "minimum_useful_temperature"; - const std::string_view StateOfChargeBasedHeatingLogic::uses_constant_mains_name = "uses_constant_mains"; +const std::string_view StateOfChargeBasedHeatingLogic::hysteresis_fraction_name = + "hysteresis_fraction"; - const std::string_view StateOfChargeBasedHeatingLogic::constant_mains_temperature_name = "constant_mains_temperature"; +const std::string_view StateOfChargeBasedHeatingLogic::uses_constant_mains_name = + "uses_constant_mains"; - } -} +const std::string_view StateOfChargeBasedHeatingLogic::constant_mains_temperature_name = + "constant_mains_temperature"; +} // namespace heat_source_configuration_ns +} // namespace hpwh_data_model diff --git a/hpwh_data_model/cpp/src/hpwhsiminput.cpp b/hpwh_data_model/cpp/src/hpwhsiminput.cpp index b6ea61a0..96e13b34 100644 --- a/hpwh_data_model/cpp/src/hpwhsiminput.cpp +++ b/hpwh_data_model/cpp/src/hpwhsiminput.cpp @@ -1,69 +1,94 @@ #include #include -namespace hpwh_data_model { - - namespace hpwh_sim_input_ns { - - void set_logger (std::shared_ptr value) { logger = value; } - - const std::string_view Schema::schema_title = "HPWHsim Input"; - - const std::string_view Schema::schema_version = "0.1.0"; - - const std::string_view Schema::schema_description = "Input required to describe a heat pump water heating system in HPWHsim"; - - void from_json(const nlohmann::json& j, HPWHSimInput& x) { - json_get(j, logger.get(), "number_of_nodes", x.number_of_nodes, x.number_of_nodes_is_set, false); - json_get(j, logger.get(), "depresses_temperature", x.depresses_temperature, x.depresses_temperature_is_set, false); - json_get(j, logger.get(), "fixed_volume", x.fixed_volume, x.fixed_volume_is_set, false); - json_get(j, logger.get(), "standard_setpoint", x.standard_setpoint, x.standard_setpoint_is_set, false); - json_get(j, logger.get(), "system_type", x.system_type, x.system_type_is_set, true); - json_get(j, logger.get(), "integrated_system", x.integrated_system, x.integrated_system_is_set, true); - json_get(j, logger.get(), "central_system", x.central_system, x.central_system_is_set, true); - } - const std::string_view HPWHSimInput::number_of_nodes_units = ""; - - const std::string_view HPWHSimInput::depresses_temperature_units = ""; +namespace hpwh_data_model +{ + +namespace hpwh_sim_input_ns +{ + +void set_logger(std::shared_ptr value) { logger = value; } + +const std::string_view Schema::schema_title = "HPWHsim Input"; + +const std::string_view Schema::schema_version = "0.1.0"; + +const std::string_view Schema::schema_description = + "Input required to describe a heat pump water heating system in HPWHsim"; + +void from_json(const nlohmann::json& j, HPWHSimInput& x) +{ + json_get( + j, logger.get(), "number_of_nodes", x.number_of_nodes, x.number_of_nodes_is_set, false); + json_get(j, + logger.get(), + "depresses_temperature", + x.depresses_temperature, + x.depresses_temperature_is_set, + false); + json_get(j, logger.get(), "fixed_volume", x.fixed_volume, x.fixed_volume_is_set, false); + json_get(j, + logger.get(), + "standard_setpoint", + x.standard_setpoint, + x.standard_setpoint_is_set, + false); + json_get( + j, logger.get(), "system_type", x.system_type, x.system_type_is_set, true); + json_get(j, + logger.get(), + "integrated_system", + x.integrated_system, + x.integrated_system_is_set, + true); + json_get( + j, logger.get(), "central_system", x.central_system, x.central_system_is_set, true); +} +const std::string_view HPWHSimInput::number_of_nodes_units = ""; - const std::string_view HPWHSimInput::fixed_volume_units = ""; +const std::string_view HPWHSimInput::depresses_temperature_units = ""; - const std::string_view HPWHSimInput::standard_setpoint_units = ""; +const std::string_view HPWHSimInput::fixed_volume_units = ""; - const std::string_view HPWHSimInput::system_type_units = ""; +const std::string_view HPWHSimInput::standard_setpoint_units = ""; - const std::string_view HPWHSimInput::integrated_system_units = ""; +const std::string_view HPWHSimInput::system_type_units = ""; - const std::string_view HPWHSimInput::central_system_units = ""; +const std::string_view HPWHSimInput::integrated_system_units = ""; - const std::string_view HPWHSimInput::number_of_nodes_description = "Number of tank nodes used for simulation"; +const std::string_view HPWHSimInput::central_system_units = ""; - const std::string_view HPWHSimInput::depresses_temperature_description = "Depresses space temperature when activated"; +const std::string_view HPWHSimInput::number_of_nodes_description = + "Number of tank nodes used for simulation"; - const std::string_view HPWHSimInput::fixed_volume_description = ""; +const std::string_view HPWHSimInput::depresses_temperature_description = + "Depresses space temperature when activated"; - const std::string_view HPWHSimInput::standard_setpoint_description = "Standard setpoint"; +const std::string_view HPWHSimInput::fixed_volume_description = ""; - const std::string_view HPWHSimInput::system_type_description = "System Type"; +const std::string_view HPWHSimInput::standard_setpoint_description = "Standard setpoint"; - const std::string_view HPWHSimInput::integrated_system_description = "The corresponding Standard 205 integrated water heater system"; +const std::string_view HPWHSimInput::system_type_description = "System Type"; - const std::string_view HPWHSimInput::central_system_description = "The corresponding data group containing Standard 205 system component representations"; +const std::string_view HPWHSimInput::integrated_system_description = + "The corresponding Standard 205 integrated water heater system"; - const std::string_view HPWHSimInput::number_of_nodes_name = "number_of_nodes"; +const std::string_view HPWHSimInput::central_system_description = + "The corresponding data group containing Standard 205 system component representations"; - const std::string_view HPWHSimInput::depresses_temperature_name = "depresses_temperature"; +const std::string_view HPWHSimInput::number_of_nodes_name = "number_of_nodes"; - const std::string_view HPWHSimInput::fixed_volume_name = "fixed_volume"; +const std::string_view HPWHSimInput::depresses_temperature_name = "depresses_temperature"; - const std::string_view HPWHSimInput::standard_setpoint_name = "standard_setpoint"; +const std::string_view HPWHSimInput::fixed_volume_name = "fixed_volume"; - const std::string_view HPWHSimInput::system_type_name = "system_type"; +const std::string_view HPWHSimInput::standard_setpoint_name = "standard_setpoint"; - const std::string_view HPWHSimInput::integrated_system_name = "integrated_system"; +const std::string_view HPWHSimInput::system_type_name = "system_type"; - const std::string_view HPWHSimInput::central_system_name = "central_system"; +const std::string_view HPWHSimInput::integrated_system_name = "integrated_system"; - } -} +const std::string_view HPWHSimInput::central_system_name = "central_system"; +} // namespace hpwh_sim_input_ns +} // namespace hpwh_data_model diff --git a/hpwh_data_model/cpp/src/rscondenserwaterheatsource.cpp b/hpwh_data_model/cpp/src/rscondenserwaterheatsource.cpp index 4858479a..e12ada57 100644 --- a/hpwh_data_model/cpp/src/rscondenserwaterheatsource.cpp +++ b/hpwh_data_model/cpp/src/rscondenserwaterheatsource.cpp @@ -1,21 +1,27 @@ #include #include -namespace hpwh_data_model { +namespace hpwh_data_model +{ -namespace rscondenserwaterheatsource_ns { +namespace rscondenserwaterheatsource_ns +{ -void set_logger (std::shared_ptr value) { logger = value; } +void set_logger(std::shared_ptr value) { logger = value; } const std::string_view Schema::schema_title = "Condenser Water Heat Source"; const std::string_view Schema::schema_version = "0.1.0"; -const std::string_view Schema::schema_description = "Schema for ASHRAE 205 annex RSCONDENSERWATERHEATSOURCE: Condenser heat source"; +const std::string_view Schema::schema_description = + "Schema for ASHRAE 205 annex RSCONDENSERWATERHEATSOURCE: Condenser heat source"; -void from_json(const nlohmann::json& j, ProductInformation& x) { - json_get(j, logger.get(), "manufacturer", x.manufacturer, x.manufacturer_is_set, true); - json_get(j, logger.get(), "model_number", x.model_number, x.model_number_is_set, true); +void from_json(const nlohmann::json& j, ProductInformation& x) +{ + json_get( + j, logger.get(), "manufacturer", x.manufacturer, x.manufacturer_is_set, true); + json_get( + j, logger.get(), "model_number", x.model_number, x.model_number_is_set, true); } const std::string_view ProductInformation::manufacturer_units = ""; @@ -29,19 +35,42 @@ const std::string_view ProductInformation::manufacturer_name = "manufacturer"; const std::string_view ProductInformation::model_number_name = "model_number"; -void from_json(const nlohmann::json& j, Description& x) { - json_get(j, logger.get(), "product_information", x.product_information, x.product_information_is_set, false); +void from_json(const nlohmann::json& j, Description& x) +{ + json_get(j, + logger.get(), + "product_information", + x.product_information, + x.product_information_is_set, + false); } const std::string_view Description::product_information_units = ""; -const std::string_view Description::product_information_description = "Data group describing product information"; +const std::string_view Description::product_information_description = + "Data group describing product information"; const std::string_view Description::product_information_name = "product_information"; -void from_json(const nlohmann::json& j, GridVariables& x) { - json_get>(j, logger.get(), "evaporator_environment_dry_bulb_temperature", x.evaporator_environment_dry_bulb_temperature, x.evaporator_environment_dry_bulb_temperature_is_set, true); - json_get>(j, logger.get(), "heat_source_temperature", x.heat_source_temperature, x.heat_source_temperature_is_set, true); - json_get>(j, logger.get(), "outlet_temperature", x.outlet_temperature, x.outlet_temperature_is_set, false); +void from_json(const nlohmann::json& j, GridVariables& x) +{ + json_get>(j, + logger.get(), + "evaporator_environment_dry_bulb_temperature", + x.evaporator_environment_dry_bulb_temperature, + x.evaporator_environment_dry_bulb_temperature_is_set, + true); + json_get>(j, + logger.get(), + "heat_source_temperature", + x.heat_source_temperature, + x.heat_source_temperature_is_set, + true); + json_get>(j, + logger.get(), + "outlet_temperature", + x.outlet_temperature, + x.outlet_temperature_is_set, + false); } const std::string_view GridVariables::evaporator_environment_dry_bulb_temperature_units = "K"; @@ -49,60 +78,110 @@ const std::string_view GridVariables::heat_source_temperature_units = "K"; const std::string_view GridVariables::outlet_temperature_units = "K"; -const std::string_view GridVariables::evaporator_environment_dry_bulb_temperature_description = "Dry bulb temperature of the air entering the evaporator coil"; +const std::string_view GridVariables::evaporator_environment_dry_bulb_temperature_description = + "Dry bulb temperature of the air entering the evaporator coil"; -const std::string_view GridVariables::heat_source_temperature_description = "Average water temperature at the heat source"; +const std::string_view GridVariables::heat_source_temperature_description = + "Average water temperature at the heat source"; -const std::string_view GridVariables::outlet_temperature_description = "Outlet temperature used by single-pass central water-heating systems"; +const std::string_view GridVariables::outlet_temperature_description = + "Outlet temperature used by single-pass central water-heating systems"; -const std::string_view GridVariables::evaporator_environment_dry_bulb_temperature_name = "evaporator_environment_dry_bulb_temperature"; +const std::string_view GridVariables::evaporator_environment_dry_bulb_temperature_name = + "evaporator_environment_dry_bulb_temperature"; const std::string_view GridVariables::heat_source_temperature_name = "heat_source_temperature"; const std::string_view GridVariables::outlet_temperature_name = "outlet_temperature"; -void from_json(const nlohmann::json& j, LookupVariables& x) { - json_get>(j, logger.get(), "input_power", x.input_power, x.input_power_is_set, true); - json_get>(j, logger.get(), "heating_capacity", x.heating_capacity, x.heating_capacity_is_set, true); +void from_json(const nlohmann::json& j, LookupVariables& x) +{ + json_get>( + j, logger.get(), "input_power", x.input_power, x.input_power_is_set, true); + json_get>( + j, logger.get(), "heating_capacity", x.heating_capacity, x.heating_capacity_is_set, true); } const std::string_view LookupVariables::input_power_units = "W"; const std::string_view LookupVariables::heating_capacity_units = "W"; -const std::string_view LookupVariables::input_power_description = "Power draw from the compressor, evaporator fan, and any auxiliary power used by the units controls"; +const std::string_view LookupVariables::input_power_description = + "Power draw from the compressor, evaporator fan, and any auxiliary power used by the units " + "controls"; -const std::string_view LookupVariables::heating_capacity_description = "Total heat added by the condenser to the adjacent water"; +const std::string_view LookupVariables::heating_capacity_description = + "Total heat added by the condenser to the adjacent water"; const std::string_view LookupVariables::input_power_name = "input_power"; const std::string_view LookupVariables::heating_capacity_name = "heating_capacity"; -void from_json(const nlohmann::json& j, PerformanceMap& x) { - json_get(j, logger.get(), "grid_variables", x.grid_variables, x.grid_variables_is_set, true); - json_get(j, logger.get(), "lookup_variables", x.lookup_variables, x.lookup_variables_is_set, true); +void from_json(const nlohmann::json& j, PerformanceMap& x) +{ + json_get( + j, logger.get(), "grid_variables", x.grid_variables, x.grid_variables_is_set, true); + json_get( + j, logger.get(), "lookup_variables", x.lookup_variables, x.lookup_variables_is_set, true); } const std::string_view PerformanceMap::grid_variables_units = ""; const std::string_view PerformanceMap::lookup_variables_units = ""; -const std::string_view PerformanceMap::grid_variables_description = "Data group defining the grid variables for heating performance"; +const std::string_view PerformanceMap::grid_variables_description = + "Data group defining the grid variables for heating performance"; -const std::string_view PerformanceMap::lookup_variables_description = "Data group defining the lookup variables for heating performance"; +const std::string_view PerformanceMap::lookup_variables_description = + "Data group defining the lookup variables for heating performance"; const std::string_view PerformanceMap::grid_variables_name = "grid_variables"; const std::string_view PerformanceMap::lookup_variables_name = "lookup_variables"; -void from_json(const nlohmann::json& j, Performance& x) { - json_get(j, logger.get(), "performance_map", x.performance_map, x.performance_map_is_set, true); - json_get(j, logger.get(), "standby_power", x.standby_power, x.standby_power_is_set, false); - json_get(j, logger.get(), "coil_configuration", x.coil_configuration, x.coil_configuration_is_set, true); - json_get(j, logger.get(), "maximum_refrigerant_temperature", x.maximum_refrigerant_temperature, x.maximum_refrigerant_temperature_is_set, false); - json_get(j, logger.get(), "maximum_temperature", x.maximum_temperature, x.maximum_temperature_is_set, false); - json_get(j, logger.get(), "minimum_temperature", x.minimum_temperature, x.minimum_temperature_is_set, false); - json_get(j, logger.get(), "compressor_lockout_temperature_hysteresis", x.compressor_lockout_temperature_hysteresis, x.compressor_lockout_temperature_hysteresis_is_set, false); - json_get(j, logger.get(), "use_defrost_map", x.use_defrost_map, x.use_defrost_map_is_set, false); - json_get(j, logger.get(), "secondary_heat_exchanger", x.secondary_heat_exchanger, x.secondary_heat_exchanger_is_set, false); +void from_json(const nlohmann::json& j, Performance& x) +{ + json_get( + j, logger.get(), "performance_map", x.performance_map, x.performance_map_is_set, true); + json_get( + j, logger.get(), "standby_power", x.standby_power, x.standby_power_is_set, false); + json_get(j, + logger.get(), + "coil_configuration", + x.coil_configuration, + x.coil_configuration_is_set, + true); + json_get(j, + logger.get(), + "maximum_refrigerant_temperature", + x.maximum_refrigerant_temperature, + x.maximum_refrigerant_temperature_is_set, + false); + json_get(j, + logger.get(), + "maximum_temperature", + x.maximum_temperature, + x.maximum_temperature_is_set, + false); + json_get(j, + logger.get(), + "minimum_temperature", + x.minimum_temperature, + x.minimum_temperature_is_set, + false); + json_get(j, + logger.get(), + "compressor_lockout_temperature_hysteresis", + x.compressor_lockout_temperature_hysteresis, + x.compressor_lockout_temperature_hysteresis_is_set, + false); + json_get( + j, logger.get(), "use_defrost_map", x.use_defrost_map, x.use_defrost_map_is_set, false); + json_get( + j, + logger.get(), + "secondary_heat_exchanger", + x.secondary_heat_exchanger, + x.secondary_heat_exchanger_is_set, + false); } const std::string_view Performance::performance_map_units = ""; @@ -128,17 +207,22 @@ const std::string_view Performance::standby_power_description = ""; const std::string_view Performance::coil_configuration_description = "Coil configuration"; -const std::string_view Performance::maximum_refrigerant_temperature_description = "Maximum temperature of the refrigerant entering the condenser"; +const std::string_view Performance::maximum_refrigerant_temperature_description = + "Maximum temperature of the refrigerant entering the condenser"; -const std::string_view Performance::maximum_temperature_description = "Maximum external temperature"; +const std::string_view Performance::maximum_temperature_description = + "Maximum external temperature"; -const std::string_view Performance::minimum_temperature_description = "Minimum external temperature"; +const std::string_view Performance::minimum_temperature_description = + "Minimum external temperature"; -const std::string_view Performance::compressor_lockout_temperature_hysteresis_description = "Hysteresis for compressor lockout"; +const std::string_view Performance::compressor_lockout_temperature_hysteresis_description = + "Hysteresis for compressor lockout"; const std::string_view Performance::use_defrost_map_description = "Use defrost map"; -const std::string_view Performance::secondary_heat_exchanger_description = "Secondary heat exchanger"; +const std::string_view Performance::secondary_heat_exchanger_description = + "Secondary heat exchanger"; const std::string_view Performance::performance_map_name = "performance_map"; @@ -146,22 +230,27 @@ const std::string_view Performance::standby_power_name = "standby_power"; const std::string_view Performance::coil_configuration_name = "coil_configuration"; -const std::string_view Performance::maximum_refrigerant_temperature_name = "maximum_refrigerant_temperature"; +const std::string_view Performance::maximum_refrigerant_temperature_name = + "maximum_refrigerant_temperature"; const std::string_view Performance::maximum_temperature_name = "maximum_temperature"; const std::string_view Performance::minimum_temperature_name = "minimum_temperature"; -const std::string_view Performance::compressor_lockout_temperature_hysteresis_name = "compressor_lockout_temperature_hysteresis"; +const std::string_view Performance::compressor_lockout_temperature_hysteresis_name = + "compressor_lockout_temperature_hysteresis"; const std::string_view Performance::use_defrost_map_name = "use_defrost_map"; const std::string_view Performance::secondary_heat_exchanger_name = "secondary_heat_exchanger"; -void from_json(const nlohmann::json& j, RSCONDENSERWATERHEATSOURCE& x) { +void from_json(const nlohmann::json& j, RSCONDENSERWATERHEATSOURCE& x) +{ json_get(j, logger.get(), "metadata", x.metadata, x.metadata_is_set, true); - json_get(j, logger.get(), "description", x.description, x.description_is_set, false); - json_get(j, logger.get(), "performance", x.performance, x.performance_is_set, true); + json_get( + j, logger.get(), "description", x.description, x.description_is_set, false); + json_get( + j, logger.get(), "performance", x.performance, x.performance_is_set, true); } const std::string_view RSCONDENSERWATERHEATSOURCE::metadata_units = ""; @@ -171,9 +260,11 @@ const std::string_view RSCONDENSERWATERHEATSOURCE::performance_units = ""; const std::string_view RSCONDENSERWATERHEATSOURCE::metadata_description = "Metadata data group"; -const std::string_view RSCONDENSERWATERHEATSOURCE::description_description = "Data group describing product and rating information"; +const std::string_view RSCONDENSERWATERHEATSOURCE::description_description = + "Data group describing product and rating information"; -const std::string_view RSCONDENSERWATERHEATSOURCE::performance_description = "Data group containing performance information"; +const std::string_view RSCONDENSERWATERHEATSOURCE::performance_description = + "Data group containing performance information"; const std::string_view RSCONDENSERWATERHEATSOURCE::metadata_name = "metadata"; @@ -181,10 +272,22 @@ const std::string_view RSCONDENSERWATERHEATSOURCE::description_name = "descripti const std::string_view RSCONDENSERWATERHEATSOURCE::performance_name = "performance"; -void from_json(const nlohmann::json& j, SecondaryHeatExchanger& x) { - json_get(j, logger.get(), "cold_side_temperature_offset", x.cold_side_temperature_offset, x.cold_side_temperature_offset_is_set, true); - json_get(j, logger.get(), "hot_side_temperature_offset", x.hot_side_temperature_offset, x.hot_side_temperature_offset_is_set, true); - json_get(j, logger.get(), "extra_pump_power", x.extra_pump_power, x.extra_pump_power_is_set, true); +void from_json(const nlohmann::json& j, SecondaryHeatExchanger& x) +{ + json_get(j, + logger.get(), + "cold_side_temperature_offset", + x.cold_side_temperature_offset, + x.cold_side_temperature_offset_is_set, + true); + json_get(j, + logger.get(), + "hot_side_temperature_offset", + x.hot_side_temperature_offset, + x.hot_side_temperature_offset_is_set, + true); + json_get( + j, logger.get(), "extra_pump_power", x.extra_pump_power, x.extra_pump_power_is_set, true); } const std::string_view SecondaryHeatExchanger::cold_side_temperature_offset_units = ""; @@ -192,18 +295,21 @@ const std::string_view SecondaryHeatExchanger::hot_side_temperature_offset_units const std::string_view SecondaryHeatExchanger::extra_pump_power_units = ""; -const std::string_view SecondaryHeatExchanger::cold_side_temperature_offset_description = "Cold-side offset temperature"; +const std::string_view SecondaryHeatExchanger::cold_side_temperature_offset_description = + "Cold-side offset temperature"; -const std::string_view SecondaryHeatExchanger::hot_side_temperature_offset_description = "Hot-side offset temperature"; +const std::string_view SecondaryHeatExchanger::hot_side_temperature_offset_description = + "Hot-side offset temperature"; const std::string_view SecondaryHeatExchanger::extra_pump_power_description = "Extra pump power"; -const std::string_view SecondaryHeatExchanger::cold_side_temperature_offset_name = "cold_side_temperature_offset"; +const std::string_view SecondaryHeatExchanger::cold_side_temperature_offset_name = + "cold_side_temperature_offset"; -const std::string_view SecondaryHeatExchanger::hot_side_temperature_offset_name = "hot_side_temperature_offset"; +const std::string_view SecondaryHeatExchanger::hot_side_temperature_offset_name = + "hot_side_temperature_offset"; const std::string_view SecondaryHeatExchanger::extra_pump_power_name = "extra_pump_power"; -} -} - +} // namespace rscondenserwaterheatsource_ns +} // namespace hpwh_data_model diff --git a/hpwh_data_model/cpp/src/rsintegratedwaterheater.cpp b/hpwh_data_model/cpp/src/rsintegratedwaterheater.cpp index 3e0ee386..0fd6b21b 100644 --- a/hpwh_data_model/cpp/src/rsintegratedwaterheater.cpp +++ b/hpwh_data_model/cpp/src/rsintegratedwaterheater.cpp @@ -1,96 +1,130 @@ #include #include -namespace hpwh_data_model { +namespace hpwh_data_model +{ - namespace rsintegratedwaterheater_ns { - - void set_logger (std::shared_ptr value) { logger = value; } +namespace rsintegratedwaterheater_ns +{ - const std::string_view Schema::schema_title = "Integrated Heat-Pump Water Heater"; +void set_logger(std::shared_ptr value) { logger = value; } - const std::string_view Schema::schema_version = "0.1.0"; +const std::string_view Schema::schema_title = "Integrated Heat-Pump Water Heater"; - const std::string_view Schema::schema_description = "Schema for ASHRAE 205 annex RSINTEGRATEDWATERHEATER: Integrated Heat-Pump Water Heater"; +const std::string_view Schema::schema_version = "0.1.0"; - void from_json(const nlohmann::json& j, ProductInformation& x) { - json_get(j, logger.get(), "manufacturer", x.manufacturer, x.manufacturer_is_set, true); - json_get(j, logger.get(), "model_number", x.model_number, x.model_number_is_set, true); - } - const std::string_view ProductInformation::manufacturer_units = ""; +const std::string_view Schema::schema_description = + "Schema for ASHRAE 205 annex RSINTEGRATEDWATERHEATER: Integrated Heat-Pump Water Heater"; - const std::string_view ProductInformation::model_number_units = ""; - - const std::string_view ProductInformation::manufacturer_description = "Manufacturer name"; - - const std::string_view ProductInformation::model_number_description = "Model number"; - - const std::string_view ProductInformation::manufacturer_name = "manufacturer"; +void from_json(const nlohmann::json& j, ProductInformation& x) +{ + json_get( + j, logger.get(), "manufacturer", x.manufacturer, x.manufacturer_is_set, true); + json_get( + j, logger.get(), "model_number", x.model_number, x.model_number_is_set, true); +} +const std::string_view ProductInformation::manufacturer_units = ""; - const std::string_view ProductInformation::model_number_name = "model_number"; +const std::string_view ProductInformation::model_number_units = ""; - void from_json(const nlohmann::json& j, Description& x) { - json_get(j, logger.get(), "product_information", x.product_information, x.product_information_is_set, false); - } - const std::string_view Description::product_information_units = ""; +const std::string_view ProductInformation::manufacturer_description = "Manufacturer name"; - const std::string_view Description::product_information_description = "Data group describing product information"; +const std::string_view ProductInformation::model_number_description = "Model number"; - const std::string_view Description::product_information_name = "product_information"; +const std::string_view ProductInformation::manufacturer_name = "manufacturer"; - void from_json(const nlohmann::json& j, Performance& x) { - json_get(j, logger.get(), "tank", x.tank, x.tank_is_set, true); - json_get>(j, logger.get(), "heat_source_configurations", x.heat_source_configurations, x.heat_source_configurations_is_set, false); - json_get(j, logger.get(), "primary_heat_source_id", x.primary_heat_source_id, x.primary_heat_source_id_is_set, false); - json_get(j, logger.get(), "standby_power", x.standby_power, x.standby_power_is_set, false); - } - const std::string_view Performance::tank_units = ""; +const std::string_view ProductInformation::model_number_name = "model_number"; - const std::string_view Performance::heat_source_configurations_units = ""; +void from_json(const nlohmann::json& j, Description& x) +{ + json_get(j, + logger.get(), + "product_information", + x.product_information, + x.product_information_is_set, + false); +} +const std::string_view Description::product_information_units = ""; + +const std::string_view Description::product_information_description = + "Data group describing product information"; + +const std::string_view Description::product_information_name = "product_information"; + +void from_json(const nlohmann::json& j, Performance& x) +{ + json_get(j, logger.get(), "tank", x.tank, x.tank_is_set, true); + json_get>( + j, + logger.get(), + "heat_source_configurations", + x.heat_source_configurations, + x.heat_source_configurations_is_set, + false); + json_get(j, + logger.get(), + "primary_heat_source_id", + x.primary_heat_source_id, + x.primary_heat_source_id_is_set, + false); + json_get( + j, logger.get(), "standby_power", x.standby_power, x.standby_power_is_set, false); +} +const std::string_view Performance::tank_units = ""; - const std::string_view Performance::primary_heat_source_id_units = ""; +const std::string_view Performance::heat_source_configurations_units = ""; - const std::string_view Performance::standby_power_units = ""; +const std::string_view Performance::primary_heat_source_id_units = ""; - const std::string_view Performance::tank_description = "The corresponding Standard 205 tank representation"; +const std::string_view Performance::standby_power_units = ""; - const std::string_view Performance::heat_source_configurations_description = "Describes how the heat sources are configured within the tank"; +const std::string_view Performance::tank_description = + "The corresponding Standard 205 tank representation"; - const std::string_view Performance::primary_heat_source_id_description = "Turns on independently of other heat sources"; +const std::string_view Performance::heat_source_configurations_description = + "Describes how the heat sources are configured within the tank"; - const std::string_view Performance::standby_power_description = "Power drawn when system is in standby mode"; +const std::string_view Performance::primary_heat_source_id_description = + "Turns on independently of other heat sources"; - const std::string_view Performance::tank_name = "tank"; +const std::string_view Performance::standby_power_description = + "Power drawn when system is in standby mode"; - const std::string_view Performance::heat_source_configurations_name = "heat_source_configurations"; +const std::string_view Performance::tank_name = "tank"; - const std::string_view Performance::primary_heat_source_id_name = "primary_heat_source_id"; +const std::string_view Performance::heat_source_configurations_name = "heat_source_configurations"; - const std::string_view Performance::standby_power_name = "standby_power"; +const std::string_view Performance::primary_heat_source_id_name = "primary_heat_source_id"; - void from_json(const nlohmann::json& j, RSINTEGRATEDWATERHEATER& x) { - json_get(j, logger.get(), "metadata", x.metadata, x.metadata_is_set, true); - json_get(j, logger.get(), "description", x.description, x.description_is_set, false); - json_get(j, logger.get(), "performance", x.performance, x.performance_is_set, true); - } - const std::string_view RSINTEGRATEDWATERHEATER::metadata_units = ""; +const std::string_view Performance::standby_power_name = "standby_power"; - const std::string_view RSINTEGRATEDWATERHEATER::description_units = ""; +void from_json(const nlohmann::json& j, RSINTEGRATEDWATERHEATER& x) +{ + json_get(j, logger.get(), "metadata", x.metadata, x.metadata_is_set, true); + json_get( + j, logger.get(), "description", x.description, x.description_is_set, false); + json_get( + j, logger.get(), "performance", x.performance, x.performance_is_set, true); +} +const std::string_view RSINTEGRATEDWATERHEATER::metadata_units = ""; - const std::string_view RSINTEGRATEDWATERHEATER::performance_units = ""; +const std::string_view RSINTEGRATEDWATERHEATER::description_units = ""; - const std::string_view RSINTEGRATEDWATERHEATER::metadata_description = "Metadata data group"; +const std::string_view RSINTEGRATEDWATERHEATER::performance_units = ""; - const std::string_view RSINTEGRATEDWATERHEATER::description_description = "Data group describing product and rating information"; +const std::string_view RSINTEGRATEDWATERHEATER::metadata_description = "Metadata data group"; - const std::string_view RSINTEGRATEDWATERHEATER::performance_description = "Data group containing performance information"; +const std::string_view RSINTEGRATEDWATERHEATER::description_description = + "Data group describing product and rating information"; - const std::string_view RSINTEGRATEDWATERHEATER::metadata_name = "metadata"; +const std::string_view RSINTEGRATEDWATERHEATER::performance_description = + "Data group containing performance information"; - const std::string_view RSINTEGRATEDWATERHEATER::description_name = "description"; +const std::string_view RSINTEGRATEDWATERHEATER::metadata_name = "metadata"; - const std::string_view RSINTEGRATEDWATERHEATER::performance_name = "performance"; +const std::string_view RSINTEGRATEDWATERHEATER::description_name = "description"; - } -} +const std::string_view RSINTEGRATEDWATERHEATER::performance_name = "performance"; +} // namespace rsintegratedwaterheater_ns +} // namespace hpwh_data_model diff --git a/hpwh_data_model/cpp/src/rsresistancewaterheatsource.cpp b/hpwh_data_model/cpp/src/rsresistancewaterheatsource.cpp index 97bcd1f8..c64050a6 100644 --- a/hpwh_data_model/cpp/src/rsresistancewaterheatsource.cpp +++ b/hpwh_data_model/cpp/src/rsresistancewaterheatsource.cpp @@ -1,75 +1,93 @@ #include #include -namespace hpwh_data_model { +namespace hpwh_data_model +{ - namespace rsresistancewaterheatsource_ns { - - void set_logger (std::shared_ptr value) { logger = value; } +namespace rsresistancewaterheatsource_ns +{ - const std::string_view Schema::schema_title = "Resistance Water Heat Source"; +void set_logger(std::shared_ptr value) { logger = value; } - const std::string_view Schema::schema_version = "0.1.0"; +const std::string_view Schema::schema_title = "Resistance Water Heat Source"; - const std::string_view Schema::schema_description = "Schema for ASHRAE 205 annex RSRESISTANCEWATERHEATSOURCE: Resistance heat source"; +const std::string_view Schema::schema_version = "0.1.0"; - void from_json(const nlohmann::json& j, ProductInformation& x) { - json_get(j, logger.get(), "manufacturer", x.manufacturer, x.manufacturer_is_set, true); - json_get(j, logger.get(), "model_number", x.model_number, x.model_number_is_set, true); - } - const std::string_view ProductInformation::manufacturer_units = ""; +const std::string_view Schema::schema_description = + "Schema for ASHRAE 205 annex RSRESISTANCEWATERHEATSOURCE: Resistance heat source"; - const std::string_view ProductInformation::model_number_units = ""; +void from_json(const nlohmann::json& j, ProductInformation& x) +{ + json_get( + j, logger.get(), "manufacturer", x.manufacturer, x.manufacturer_is_set, true); + json_get( + j, logger.get(), "model_number", x.model_number, x.model_number_is_set, true); +} +const std::string_view ProductInformation::manufacturer_units = ""; - const std::string_view ProductInformation::manufacturer_description = "Manufacturer name"; +const std::string_view ProductInformation::model_number_units = ""; - const std::string_view ProductInformation::model_number_description = "Model number"; +const std::string_view ProductInformation::manufacturer_description = "Manufacturer name"; - const std::string_view ProductInformation::manufacturer_name = "manufacturer"; +const std::string_view ProductInformation::model_number_description = "Model number"; - const std::string_view ProductInformation::model_number_name = "model_number"; +const std::string_view ProductInformation::manufacturer_name = "manufacturer"; - void from_json(const nlohmann::json& j, Description& x) { - json_get(j, logger.get(), "product_information", x.product_information, x.product_information_is_set, false); - } - const std::string_view Description::product_information_units = ""; +const std::string_view ProductInformation::model_number_name = "model_number"; - const std::string_view Description::product_information_description = "Data group describing product information"; +void from_json(const nlohmann::json& j, Description& x) +{ + json_get(j, + logger.get(), + "product_information", + x.product_information, + x.product_information_is_set, + false); +} +const std::string_view Description::product_information_units = ""; - const std::string_view Description::product_information_name = "product_information"; +const std::string_view Description::product_information_description = + "Data group describing product information"; - void from_json(const nlohmann::json& j, Performance& x) { - json_get(j, logger.get(), "input_power", x.input_power, x.input_power_is_set, true); - } - const std::string_view Performance::input_power_units = "W"; +const std::string_view Description::product_information_name = "product_information"; - const std::string_view Performance::input_power_description = "Input power"; +void from_json(const nlohmann::json& j, Performance& x) +{ + json_get(j, logger.get(), "input_power", x.input_power, x.input_power_is_set, true); +} +const std::string_view Performance::input_power_units = "W"; - const std::string_view Performance::input_power_name = "input_power"; +const std::string_view Performance::input_power_description = "Input power"; - void from_json(const nlohmann::json& j, RSRESISTANCEWATERHEATSOURCE& x) { - json_get(j, logger.get(), "metadata", x.metadata, x.metadata_is_set, true); - json_get(j, logger.get(), "description", x.description, x.description_is_set, false); - json_get(j, logger.get(), "performance", x.performance, x.performance_is_set, true); - } - const std::string_view RSRESISTANCEWATERHEATSOURCE::metadata_units = ""; +const std::string_view Performance::input_power_name = "input_power"; - const std::string_view RSRESISTANCEWATERHEATSOURCE::description_units = ""; +void from_json(const nlohmann::json& j, RSRESISTANCEWATERHEATSOURCE& x) +{ + json_get(j, logger.get(), "metadata", x.metadata, x.metadata_is_set, true); + json_get( + j, logger.get(), "description", x.description, x.description_is_set, false); + json_get( + j, logger.get(), "performance", x.performance, x.performance_is_set, true); +} +const std::string_view RSRESISTANCEWATERHEATSOURCE::metadata_units = ""; - const std::string_view RSRESISTANCEWATERHEATSOURCE::performance_units = ""; +const std::string_view RSRESISTANCEWATERHEATSOURCE::description_units = ""; - const std::string_view RSRESISTANCEWATERHEATSOURCE::metadata_description = "Metadata data group"; +const std::string_view RSRESISTANCEWATERHEATSOURCE::performance_units = ""; - const std::string_view RSRESISTANCEWATERHEATSOURCE::description_description = "Data group describing product and rating information"; +const std::string_view RSRESISTANCEWATERHEATSOURCE::metadata_description = "Metadata data group"; - const std::string_view RSRESISTANCEWATERHEATSOURCE::performance_description = "Data group containing performance information"; +const std::string_view RSRESISTANCEWATERHEATSOURCE::description_description = + "Data group describing product and rating information"; - const std::string_view RSRESISTANCEWATERHEATSOURCE::metadata_name = "metadata"; +const std::string_view RSRESISTANCEWATERHEATSOURCE::performance_description = + "Data group containing performance information"; - const std::string_view RSRESISTANCEWATERHEATSOURCE::description_name = "description"; +const std::string_view RSRESISTANCEWATERHEATSOURCE::metadata_name = "metadata"; - const std::string_view RSRESISTANCEWATERHEATSOURCE::performance_name = "performance"; +const std::string_view RSRESISTANCEWATERHEATSOURCE::description_name = "description"; - } -} +const std::string_view RSRESISTANCEWATERHEATSOURCE::performance_name = "performance"; +} // namespace rsresistancewaterheatsource_ns +} // namespace hpwh_data_model diff --git a/hpwh_data_model/cpp/src/rstank.cpp b/hpwh_data_model/cpp/src/rstank.cpp index 26893cd5..d2449ff9 100644 --- a/hpwh_data_model/cpp/src/rstank.cpp +++ b/hpwh_data_model/cpp/src/rstank.cpp @@ -1,110 +1,142 @@ #include #include -namespace hpwh_data_model { +namespace hpwh_data_model +{ - namespace rstank_ns { - - void set_logger (std::shared_ptr value) { logger = value; } +namespace rstank_ns +{ - const std::string_view Schema::schema_title = "Water Tank"; +void set_logger(std::shared_ptr value) { logger = value; } - const std::string_view Schema::schema_version = "0.1.0"; +const std::string_view Schema::schema_title = "Water Tank"; - const std::string_view Schema::schema_description = "Schema for ASHRAE 205 annex RSTANK: Water tank"; +const std::string_view Schema::schema_version = "0.1.0"; - void from_json(const nlohmann::json& j, ProductInformation& x) { - json_get(j, logger.get(), "manufacturer", x.manufacturer, x.manufacturer_is_set, true); - json_get(j, logger.get(), "model_number", x.model_number, x.model_number_is_set, true); - } - const std::string_view ProductInformation::manufacturer_units = ""; +const std::string_view Schema::schema_description = + "Schema for ASHRAE 205 annex RSTANK: Water tank"; - const std::string_view ProductInformation::model_number_units = ""; - - const std::string_view ProductInformation::manufacturer_description = "Manufacturer name"; - - const std::string_view ProductInformation::model_number_description = "Model number"; - - const std::string_view ProductInformation::manufacturer_name = "manufacturer"; +void from_json(const nlohmann::json& j, ProductInformation& x) +{ + json_get( + j, logger.get(), "manufacturer", x.manufacturer, x.manufacturer_is_set, true); + json_get( + j, logger.get(), "model_number", x.model_number, x.model_number_is_set, true); +} +const std::string_view ProductInformation::manufacturer_units = ""; - const std::string_view ProductInformation::model_number_name = "model_number"; +const std::string_view ProductInformation::model_number_units = ""; - void from_json(const nlohmann::json& j, Description& x) { - json_get(j, logger.get(), "product_information", x.product_information, x.product_information_is_set, false); - } - const std::string_view Description::product_information_units = ""; +const std::string_view ProductInformation::manufacturer_description = "Manufacturer name"; - const std::string_view Description::product_information_description = "Data group describing product information"; +const std::string_view ProductInformation::model_number_description = "Model number"; - const std::string_view Description::product_information_name = "product_information"; +const std::string_view ProductInformation::manufacturer_name = "manufacturer"; - void from_json(const nlohmann::json& j, Performance& x) { - json_get(j, logger.get(), "volume", x.volume, x.volume_is_set, true); - json_get(j, logger.get(), "diameter", x.diameter, x.diameter_is_set, false); - json_get(j, logger.get(), "ua", x.ua, x.ua_is_set, true); - json_get(j, logger.get(), "fittings_ua", x.fittings_ua, x.fittings_ua_is_set, false); - json_get(j, logger.get(), "bottom_fraction_of_tank_mixing_on_draw", x.bottom_fraction_of_tank_mixing_on_draw, x.bottom_fraction_of_tank_mixing_on_draw_is_set, false); - json_get(j, logger.get(), "heat_exchanger_effectiveness", x.heat_exchanger_effectiveness, x.heat_exchanger_effectiveness_is_set, false); - } - const std::string_view Performance::volume_units = "m3"; +const std::string_view ProductInformation::model_number_name = "model_number"; - const std::string_view Performance::diameter_units = "m"; +void from_json(const nlohmann::json& j, Description& x) +{ + json_get(j, + logger.get(), + "product_information", + x.product_information, + x.product_information_is_set, + false); +} +const std::string_view Description::product_information_units = ""; + +const std::string_view Description::product_information_description = + "Data group describing product information"; + +const std::string_view Description::product_information_name = "product_information"; + +void from_json(const nlohmann::json& j, Performance& x) +{ + json_get(j, logger.get(), "volume", x.volume, x.volume_is_set, true); + json_get(j, logger.get(), "diameter", x.diameter, x.diameter_is_set, false); + json_get(j, logger.get(), "ua", x.ua, x.ua_is_set, true); + json_get(j, logger.get(), "fittings_ua", x.fittings_ua, x.fittings_ua_is_set, false); + json_get(j, + logger.get(), + "bottom_fraction_of_tank_mixing_on_draw", + x.bottom_fraction_of_tank_mixing_on_draw, + x.bottom_fraction_of_tank_mixing_on_draw_is_set, + false); + json_get(j, + logger.get(), + "heat_exchanger_effectiveness", + x.heat_exchanger_effectiveness, + x.heat_exchanger_effectiveness_is_set, + false); +} +const std::string_view Performance::volume_units = "m3"; - const std::string_view Performance::ua_units = "W/K"; +const std::string_view Performance::diameter_units = "m"; - const std::string_view Performance::fittings_ua_units = "W/K"; +const std::string_view Performance::ua_units = "W/K"; - const std::string_view Performance::bottom_fraction_of_tank_mixing_on_draw_units = "-"; +const std::string_view Performance::fittings_ua_units = "W/K"; - const std::string_view Performance::heat_exchanger_effectiveness_units = ""; +const std::string_view Performance::bottom_fraction_of_tank_mixing_on_draw_units = "-"; - const std::string_view Performance::volume_description = ""; +const std::string_view Performance::heat_exchanger_effectiveness_units = ""; - const std::string_view Performance::diameter_description = ""; +const std::string_view Performance::volume_description = ""; - const std::string_view Performance::ua_description = ""; +const std::string_view Performance::diameter_description = ""; - const std::string_view Performance::fittings_ua_description = ""; +const std::string_view Performance::ua_description = ""; - const std::string_view Performance::bottom_fraction_of_tank_mixing_on_draw_description = "Bottom fraction of the tank that should mix during draws"; +const std::string_view Performance::fittings_ua_description = ""; - const std::string_view Performance::heat_exchanger_effectiveness_description = "Effectiveness for heat exchange"; +const std::string_view Performance::bottom_fraction_of_tank_mixing_on_draw_description = + "Bottom fraction of the tank that should mix during draws"; - const std::string_view Performance::volume_name = "volume"; +const std::string_view Performance::heat_exchanger_effectiveness_description = + "Effectiveness for heat exchange"; - const std::string_view Performance::diameter_name = "diameter"; +const std::string_view Performance::volume_name = "volume"; - const std::string_view Performance::ua_name = "ua"; +const std::string_view Performance::diameter_name = "diameter"; - const std::string_view Performance::fittings_ua_name = "fittings_ua"; +const std::string_view Performance::ua_name = "ua"; - const std::string_view Performance::bottom_fraction_of_tank_mixing_on_draw_name = "bottom_fraction_of_tank_mixing_on_draw"; +const std::string_view Performance::fittings_ua_name = "fittings_ua"; - const std::string_view Performance::heat_exchanger_effectiveness_name = "heat_exchanger_effectiveness"; +const std::string_view Performance::bottom_fraction_of_tank_mixing_on_draw_name = + "bottom_fraction_of_tank_mixing_on_draw"; - void from_json(const nlohmann::json& j, RSTANK& x) { - json_get(j, logger.get(), "metadata", x.metadata, x.metadata_is_set, true); - json_get(j, logger.get(), "description", x.description, x.description_is_set, false); - json_get(j, logger.get(), "performance", x.performance, x.performance_is_set, true); - } - const std::string_view RSTANK::metadata_units = ""; +const std::string_view Performance::heat_exchanger_effectiveness_name = + "heat_exchanger_effectiveness"; - const std::string_view RSTANK::description_units = ""; +void from_json(const nlohmann::json& j, RSTANK& x) +{ + json_get(j, logger.get(), "metadata", x.metadata, x.metadata_is_set, true); + json_get( + j, logger.get(), "description", x.description, x.description_is_set, false); + json_get( + j, logger.get(), "performance", x.performance, x.performance_is_set, true); +} +const std::string_view RSTANK::metadata_units = ""; - const std::string_view RSTANK::performance_units = ""; +const std::string_view RSTANK::description_units = ""; - const std::string_view RSTANK::metadata_description = "Metadata data group"; +const std::string_view RSTANK::performance_units = ""; - const std::string_view RSTANK::description_description = "Data group describing product and rating information"; +const std::string_view RSTANK::metadata_description = "Metadata data group"; - const std::string_view RSTANK::performance_description = "Data group containing performance information"; +const std::string_view RSTANK::description_description = + "Data group describing product and rating information"; - const std::string_view RSTANK::metadata_name = "metadata"; +const std::string_view RSTANK::performance_description = + "Data group containing performance information"; - const std::string_view RSTANK::description_name = "description"; +const std::string_view RSTANK::metadata_name = "metadata"; - const std::string_view RSTANK::performance_name = "performance"; +const std::string_view RSTANK::description_name = "description"; - } -} +const std::string_view RSTANK::performance_name = "performance"; +} // namespace rstank_ns +} // namespace hpwh_data_model diff --git a/scripts/python/plotting/main.py b/scripts/python/plotting/dash_plot.py similarity index 91% rename from scripts/python/plotting/main.py rename to scripts/python/plotting/dash_plot.py index e87325de..a493d9df 100644 --- a/scripts/python/plotting/main.py +++ b/scripts/python/plotting/dash_plot.py @@ -36,16 +36,14 @@ def dash_plot(test_dir, build_dir, show_types, measured_filename, simulated_file if show_types & 1: if test_dir != "none": - print("show measured") measured_path = os.path.join(abs_repo_test_dir, test_dir, measured_filename) if show_types & 2: - print("show simulated") simulated_path = os.path.join(output_dir, simulated_filename) print("creating plot...") - print(f"measured_path: {measured_path}") - print(f"simulated__path: {simulated_path}") + #print(f"measured_path: {measured_path}") + #print(f"simulated__path: {simulated_path}") plotter = plot(measured_path, simulated_path) time.sleep(1) diff --git a/scripts/python/plotting/index.html b/scripts/python/plotting/index.html index de525722..69655428 100644 --- a/scripts/python/plotting/index.html +++ b/scripts/python/plotting/index.html @@ -67,11 +67,11 @@ const build_form = document.getElementById('build_form'); const test_form = document.getElementById('test_form'); - model_form.model_name.value = ("model_name" in prefs) ? prefs["model_name"] : "LG_APHWC50" + model_form.model_name.value = ("model_id" in prefs) ? prefs["model_id"] : "LG_APHWC50" model_form.model_spec.value = ("model_spec" in prefs) ? prefs["model_spec"] : "Preset"; build_form.build_dir.value = ("build_dir" in prefs) ? prefs["build_dir"] : "../../build"; test_form.test_list.value = ("test_list" in prefs) ? prefs["test_list"] : "All tests"; - test_form.test_name.value = ("test_name" in prefs) ? prefs["test_name"] : "LG/APHWC50/DOE2014_LGC50_24hr67"; + test_form.test_name.value = ("test_id" in prefs) ? prefs["test_id"] : "LG/APHWC50/DOE2014_LGC50_24hr67"; test_form.show_simulated.value = ("show_simulated" in prefs) ? prefs["show_simulated"] : true; test_form.show_measured.value = ("show_measured" in prefs) ? prefs["show_measured"] : true; test_form.draw_profile.value = ("draw_profile" in prefs) ? prefs["draw_profile"] : "auto"; @@ -84,11 +84,11 @@ const test_form = document.getElementById('test_form'); prefs = {} - prefs["model_name"] = model_form.model_name.value; + prefs["model_id"] = model_form.model_name.value; prefs["model_spec"] = model_form.model_spec.value; prefs["build_dir"] = build_form.build_dir.value; prefs["test_list"] = test_form.test_list.value; - prefs["test_name"] = test_form.test_name.value; + prefs["test_id"] = test_form.test_name.value; prefs["show_simulated"] = test_form.show_simulated.checked; prefs["show_measured"] = test_form.show_measured.checked; prefs["draw_profile"] = test_form.draw_profile.value; @@ -104,11 +104,11 @@ // get model_specs list from model_index for (let model of model_index["models"]){ - if ("name" in model) + if ("id" in model) { - const model_name = model["name"]; - model_names.push(model_name); - if (!model_name.localeCompare(prefs["model_name"])) + const model_id = model["id"]; + model_names.push(model_id); + if (!model_id.localeCompare(prefs["model_id"])) { if ("specs" in model) for(let i = 0; i < model["specs"].length; i++) @@ -117,8 +117,8 @@ } } - if (!(model_names.includes(prefs["model_name"]))) - model_names = [model_names, prefs["model_name"]]; + if (!(model_names.includes(prefs["model_id"]))) + model_names = [model_names, prefs["model_id"]]; if (!(model_specs.includes(prefs["model_spec"]))) prefs["model_spec"] = model_specs[0]; @@ -159,87 +159,79 @@ { var show_test = false; var test_name = ""; - if ("test" in test) - test_name = ("name" in test)? test["name"] :test["test"]; - else if ("name" in test) - test_name = test["name"]; - else - continue; - - show_test = show_all_tests; - if ("group" in test) + if ("id" in test) { - const test_group = test["group"]; - show_test |= show_standard_tests && !test_group.localeCompare("Standard tests"); - if (show_all_tests || show_tests_with_data) - if ("measured" in test) - { // get test list from model_index - const measureds = test["measured"]; - for (let measured of measureds) - if ("model" in measured) - if (!measured["model"].localeCompare(prefs["model_name"])) - { - show_test = true; - break; - } - } - } + const test_id = test["id"]; + test_name = test_id; + show_test = show_all_tests; + if ("group" in test) + { + const test_group = test["group"]; + show_test |= show_standard_tests && !test_group.localeCompare("Standard tests"); + if (show_all_tests || show_tests_with_data) + if ("measured" in test) + { // get test list from model_index + const measureds = test["measured"]; + for (let measured of measureds) + if ("id" in measured) + if (!measured["id"].localeCompare(prefs["model_id"])) + { + show_test = true; + break; + } + } + } - if(show_test) - { - test_names.push(test_name); - have_test = true; + if(show_test) + { + test_names.push(test_name); + have_test = true; + } } } - if (have_test && !(test_names.includes(prefs["test_name"]))) - prefs["test_name"] = test_names[0]; + if (have_test && !(test_names.includes(prefs["test_id"]))) + prefs["test_id"] = test_names[0]; var have_measured = false; for (let test of test_index["tests"]) { - var test_name = ""; - if ("test" in test) - test_name = ("name" in test)? test["name"] :test["test"]; - else if ("name" in test) - test_name = test["name"]; - else - continue; - - if (test_name == prefs["test_name"]) - if ("measured" in test) - for (let measured of test["measured"]) - if ("model" in measured) - if (measured["model"] == prefs["model_name"]) - { - have_measured = true; - break; - } + var test_id = ""; + if ("id" in test) + test_id = test["id"]; + if (test_id == prefs["test_id"]) + if ("measured" in test) + for (let measured of test["measured"]) + if ("id" in measured) + if (measured["id"] == prefs["model_id"]) + { + have_measured = true; + break; + } } var is_standard_test = false; for (let test of test_index["tests"]) - if (("test" in test) && ("group" in test)) - { - const test_dir = test["test"]; - const test_name = ("name" in test) ? test["name"] : test_dir; - if (!test_name.localeCompare(prefs["test_name"]) && !test["group"].localeCompare("Standard tests")) + if (("id" in test) && !test["id"].localeCompare(prefs["test_id"])) + if(("group" in test) && !test["group"].localeCompare("Standard tests")) { is_standard_test = true; break; } - } // set select_test control let select_test = document.getElementById('test_name'); while (select_test.hasChildNodes()) select_test.removeChild(select_test.firstChild); - var show_simulated = (prefs["show_simulated"] && have_test); - var show_measured = (prefs["show_measured"] && have_measured); + var show_simulated = prefs["show_simulated"] && have_test; + var show_measured = prefs["show_measured"] && have_measured; + show_simulated = show_simulated || (have_test && !show_measured); + show_measured = show_measured ||(have_measured && !show_simulated); + if (!have_test) { - prefs["test_name"] = ""; + prefs["test_id"] = ""; select_test.disabled = true; document.getElementById('test_btn').disabled = true; } @@ -312,7 +304,6 @@ const model_name = model_form.model_name.value; const test_form = document.getElementById('test_form'); - const test_name = test_form.test_name.value; var measured_filename = "none"; @@ -321,44 +312,33 @@ // get test path const test_index = await read_json_file("./test_index.json") var test_dir = "" - var core_test_name = ""; + var test_name = prefs["test_id"]; // get test list from model_index var is_standard_test = false; for (let test of test_index["tests"]) { - var comp_test_name = ""; - if ("test" in test) - comp_test_name = ("name" in test)? test["name"] :test["test"]; - else if ("name" in test) - comp_test_name = test["name"]; - else - continue; - - if (!comp_test_name.localeCompare(test_name)) + if (("id" in test) && (!test["id"].localeCompare(test_name))) { - if (("group" in test) && !test["group"].localeCompare("Standard tests")) - { - is_standard_test = true; - test_dir = "none"; - } - else if ("test" in test) - { - core_test_name = test["test"]; - test_dir = core_test_name; + if (("group" in test) && !test["group"].localeCompare("Standard tests")) + { + is_standard_test = true; + test_dir = "none"; + } + else + test_dir = test_name; if("path" in test) - test_dir = test["path"] + "/" + core_test_name; + test_dir = test["path"] + "/" + test_name; if ("measured" in test) for (let measured of test["measured"]) - if (("model" in measured) && !measured["model"].localeCompare(prefs["model_name"])) + if (("id" in measured) && !measured["id"].localeCompare(prefs["model_name"])) if ("filename" in measured) { measured_filename = measured["filename"]; break; } - } - } + } } document.getElementById("test_btn").disabled = true; @@ -391,7 +371,7 @@ fst += '&test_dir=' + test_dir; fst += '&build_dir=' + build_dir; await callPyServer("simulate", fst) - simulated_filename = core_test_name + "_" + model_spec + "_" + model_name + ".csv"; + simulated_filename = test_name + "_" + model_spec + "_" + model_name + ".csv"; } document.getElementById("plots").src = ""; diff --git a/scripts/python/plotting/model_index.json b/scripts/python/plotting/model_index.json index 0a9b6cdf..f7baed77 100644 --- a/scripts/python/plotting/model_index.json +++ b/scripts/python/plotting/model_index.json @@ -1,34 +1,83 @@ { "models": [ - {"name": "BradfordWhiteAeroThermRE2H50", "manufacturer": "BradfordWhite", "series": "AeroThermRE2H", "model": "AeroThermRE2H50", "specs": ["Preset", "File", "JSON"]}, - {"name": "BradfordWhiteAeroThermRE2H65", "manufacturer": "BradfordWhite", "series": "AeroThermRE2H", "model": "AeroThermRE2H65", "specs": ["Preset", "File", "JSON"]}, - {"name": "BradfordWhiteAeroThermRE2H80", "manufacturer": "BradfordWhite", "series": "AeroThermRE2H", "model": "AeroThermRE2H80", "specs": ["Preset", "File", "JSON"]}, + {"id": "BradfordWhiteAeroThermRE2H50", "name": "AeroThermRE2H50", "manufacturer": "BradfordWhite", "series": "AeroThermRE2H", "specs": ["Preset", "File", "JSON"]}, + {"id": "BradfordWhiteAeroThermRE2H65", "name": "AeroThermRE2H65", "manufacturer": "BradfordWhite", "series": "AeroThermRE2H", "specs": ["Preset", "File", "JSON"]}, + {"id": "BradfordWhiteAeroThermRE2H80", "name": "AeroThermRE2H80", "manufacturer": "BradfordWhite", "series": "AeroThermRE2H", "specs": ["Preset", "File", "JSON"]}, - {"name": "AOSmithHPTS45", "manufacturer": "AOSmith", "series": "HPTS", "model": "HPTS45", "specs": ["Preset", "File", "JSON"]}, - {"name": "AOSmithHPTS50", "manufacturer": "AOSmith", "series": "HPTS", "model": "HPTS50", "specs": ["Preset", "File", "JSON"]}, - {"name": "AOSmithHPTS65", "manufacturer": "AOSmith", "series": "HPTS", "model": "HPTS65", "specs": ["Preset", "File", "JSON"]}, - {"name": "AOSmithHPTS80", "manufacturer": "AOSmith", "series": "HPTS", "model": "HPTS80", "specs": ["Preset", "File", "JSON"]}, + {"id": "AOSmithHPTS45", "manufacturer": "AOSmith", "series": "HPTS", "specs": ["Preset", "File", "JSON"]}, + {"id": "AOSmithHPTS50", "manufacturer": "AOSmith", "series": "HPTS", "specs": ["Preset", "File", "JSON"]}, + {"id": "AOSmithHPTS65", "manufacturer": "AOSmith", "series": "HPTS", "specs": ["Preset", "File", "JSON"]}, + {"id": "AOSmithHPTS80", "manufacturer": "AOSmith", "series": "HPTS", "specs": ["Preset", "File", "JSON"]}, - {"name": "Rheem2020Prem45", "series": "2020Prem", "manufacturer": "Rheem", "model": "2020Prem45", "specs": ["Preset", "File", "JSON"]}, - {"name": "Rheem2020Prem50", "series": "2020Prem", "manufacturer": "Rheem", "model": "2020Prem50", "specs": ["Preset", "File", "JSON"]}, - {"name": "Rheem2020Prem65", "manufacturer": "Rheem", "series": "2020Prem", "model": "2020Prem65", "specs": ["Preset", "File", "JSON"]}, - {"name": "Rheem2020Prem80", "manufacturer": "Rheem", "series": "2020Prem", "model": "2020Prem80", "specs": ["Preset", "File", "JSON"]}, + {"id": "Rheem2020Prem45", "series": "2020Prem", "manufacturer": "Rheem", "specs": ["Preset", "File", "JSON"]}, + {"id": "Rheem2020Prem50", "series": "2020Prem", "manufacturer": "Rheem", "specs": ["Preset", "File", "JSON"]}, + {"id": "Rheem2020Prem65", "manufacturer": "Rheem", "series": "2020Prem", "specs": ["Preset", "File", "JSON"]}, + {"id": "Rheem2020Prem80", "manufacturer": "Rheem", "series": "2020Prem", "specs": ["Preset", "File", "JSON"]}, - {"name": "Rheem2020Build45", "manufacturer": "Rheem", "series": "2020Build", "model": "2020Build45", "specs": ["Preset", "File", "JSON"]}, - {"name": "Rheem2020Build50", "manufacturer": "Rheem", "series": "2020Build", "model": "2020Build50", "specs": ["Preset", "File", "JSON"]}, - {"name": "Rheem2020Build65", "manufacturer": "Rheem", "series": "2020Build", "model": "2020Build65", "specs": ["Preset", "File", "JSON"]}, - {"name": "Rheem2020Build80", "manufacturer": "Rheem", "series": "2020Build", "model": "2020Build80", "specs": ["Preset", "File", "JSON"]}, + {"id": "Rheem2020Build45", "manufacturer": "Rheem", "series": "2020Build", "specs": ["Preset", "File", "JSON"]}, + {"id": "Rheem2020Build50", "manufacturer": "Rheem", "series": "2020Build", "specs": ["Preset", "File", "JSON"]}, + {"id": "Rheem2020Build65", "manufacturer": "Rheem", "series": "2020Build", "specs": ["Preset", "File", "JSON"]}, + {"id": "Rheem2020Build80", "manufacturer": "Rheem", "series": "2020Build", "specs": ["Preset", "File", "JSON"]}, - {"name": "AquaThermAire", "manufacturer": "Villara", "model": "AquaThermAire", "specs": ["Preset", "File", "JSON"]}, + {"id": "AquaThermAire", "manufacturer": "Villara", "specs": ["Preset", "File", "JSON"]}, - {"name": "LG_APHWC50", "manufacturer": "LG", "model": "APHWC50", "specs": ["Preset", "File", "JSON"]}, - {"name": "LG_APHWC80", "manufacturer": "LG", "model": "APHWC80", "specs": ["Preset", "File", "JSON"]}, + {"id": "LG_APHWC50", "manufacturer": "LG", "specs": ["Preset", "File", "JSON"]}, + {"id": "LG_APHWC80", "manufacturer": "LG", "specs": ["Preset", "File", "JSON"]}, - {"name": "Stiebel220e", "manufacturer": "Stiebel", "model": "Stiebel220e", "specs": ["Preset", "File", "JSON"]}, - {"name": "GE502014", "manufacturer": "GE", "model": "GE502014", "specs": ["Preset", "File", "JSON"]}, + {"id": "Stiebel220e", "manufacturer": "Stiebel", "specs": ["Preset", "File", "JSON"]}, + {"id": "GE502014", "manufacturer": "GE", "specs": ["Preset", "File", "JSON"]}, - {"name": "ColmacCxA_20_SP", "manufacturer": "Colmac", "model": "ColmacCxA_20_SP", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, - {"name": "ColmacCxA_20_MP", "manufacturer": "Colmac", "model": "ColmacCxA_20_MP", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"} + {"id": "ColmacCxV_5_SP", "manufacturer": "Colmac", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "ColmacCxV_5_MP", "manufacturer": "Colmac", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, + + {"id": "ColmacCxV_10_SP", "manufacturer": "Colmac", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "ColmacCxV_10_MP", "manufacturer": "Colmac", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, + + {"id": "ColmacCxV_15_SP", "manufacturer": "Colmac", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "ColmacCxV_15_MP", "manufacturer": "Colmac", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, + + {"id": "ColmacCxA_20_SP", "manufacturer": "Colmac", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "ColmacCxA_20_MP", "manufacturer": "Colmac", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, + + {"id": "ColmacCxA_25_SP", "manufacturer": "Colmac", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "ColmacCxA_25_MP", "manufacturer": "Colmac", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, + + {"id": "ColmacCxA_30_SP", "manufacturer": "Colmac", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "ColmacCxA_30_MP", "manufacturer": "Colmac", "series": "ColmacCx", "specs": ["Preset", "JSON"], "type": "Central"}, + + {"id": "NyleC25A_SP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC60A_SP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC90A_SP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC125A_SP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC185A_SP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC250A_SP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + + {"id": "NyleC60A_C_SP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC90A_C_SP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC125A_C_SP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC185A_C_SP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC250A_C_SP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + + {"id": "NyleC60A_MP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC90A_MP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC125A_MP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC185A_MP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC250A_MP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + + {"id": "NyleC60A_C_MP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC90A_C_MP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC125A_C_MP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC185A_C_MP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "NyleC250A_C_MP", "manufacturer": "Colmac", "specs": ["Preset", "JSON"], "type": "Central"}, + + {"id": "QAHV_N136TAU_HPB_SP", "manufacturer": "Mitsubishi", "specs": ["Preset", "JSON"], "type": "Central"}, + + {"id": "Sanden40", "manufacturer": "Sanden", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "Sanden80", "manufacturer": "Sanden", "specs": ["Preset", "File", "JSON"], "type": "Central"}, + {"id": "Sanden120", "manufacturer": "Sanden", "specs": ["Preset", "JSON"], "type": "Central"}, + + {"id": "RheemHPHD60", "manufacturer": "Rheem", "specs": ["Preset", "JSON"], "type": "Central"}, + {"id": "RheemHPHD135", "manufacturer": "Rheem", "specs": ["Preset", "JSON"], "type": "Central"} ] } \ No newline at end of file diff --git a/scripts/python/plotting/plot.py b/scripts/python/plotting/plot.py index 77d65114..4aaa22d0 100644 --- a/scripts/python/plotting/plot.py +++ b/scripts/python/plotting/plot.py @@ -85,7 +85,7 @@ def __init__(self): }, "Labels": [ f"Storage Tank Temperature {number}" - for number in range(1, NUMBER_OF_THERMOCOUPLES + 1) + for number in reversed(range(1, NUMBER_OF_THERMOCOUPLES + 1)) ], "Units": f"{DEGREE_SIGN}F", "Colors": list(reversed(RED_BLUE_DIVERGING_PALLETTE)), @@ -108,7 +108,7 @@ def __init__(self): ], "Simulated": [ f"tcouple{number} (C)" - for number in reversed(range(1, NUMBER_OF_THERMOCOUPLES + 1)) + for number in range(1, NUMBER_OF_THERMOCOUPLES + 1) ], } @@ -169,9 +169,7 @@ def organize_tank_temperatures(self, variable_type): self.temperature_profile_vars[variable_type] ].mean(axis=1) - for temperature_column in self.variables["Y-Variables"]["Temperature"]["Column Names"][ - variable_type - ]: + for temperature_column in self.variables["Y-Variables"]["Temperature"]["Column Names"][variable_type]: for index in range(len(df)): df.loc[index, temperature_column] = 1.8 * df.loc[index, temperature_column] + 32 #convert(df.loc[index, temperature_column], "degC", "degF") diff --git a/scripts/python/plotting/prefs.json b/scripts/python/plotting/prefs.json index e41fe4ce..3ba8353b 100644 --- a/scripts/python/plotting/prefs.json +++ b/scripts/python/plotting/prefs.json @@ -1 +1 @@ -{"model_name": "ColmacCxA_20_SP", "model_spec": "Preset", "build_dir": "../../../build", "test_list": "All tests", "test_name": "testLargeComp45", "show_simulated": true, "show_measured": false, "draw_profile": "auto"} \ No newline at end of file +{"model_id": "BradfordWhiteAeroThermRE2H80", "model_spec": "Preset", "build_dir": "../../../build", "test_list": "Tests with data", "test_id": "RE2H80_UEF50", "show_simulated": true, "show_measured": false, "draw_profile": "High"} \ No newline at end of file diff --git a/scripts/python/plotting/server.py b/scripts/python/plotting/server.py index 8bf7b5c0..4e84c296 100644 --- a/scripts/python/plotting/server.py +++ b/scripts/python/plotting/server.py @@ -10,9 +10,9 @@ from simulate import simulate from plot import plot from measure import measure +from dash_plot import dash_plot import json from json import dumps -from main import dash_plot PORT = 8000 @@ -89,7 +89,6 @@ def do_GET(self): self.send_header("Access-Control-Allow-Origin", "*") self.end_headers() return - elif self.path.startswith('/plot'): query_components = urlparse.parse_qs(urlparse.urlparse(self.path).query) diff --git a/scripts/python/plotting/test_index.json b/scripts/python/plotting/test_index.json index 23300e50..4711b29f 100644 --- a/scripts/python/plotting/test_index.json +++ b/scripts/python/plotting/test_index.json @@ -1,33 +1,35 @@ { "tests": [ - {"group": "General tests", "test": "test30", "desc": "24h; 30F", "path": "general_tests"}, - {"group": "General tests", "test": "test50", "desc": "24h; 50F", "path": "general_tests"}, - {"group": "General tests", "test": "test70", "desc": "24h; 70F", "path": "general_tests"}, - {"group": "General tests", "test": "test95", "desc": "24h; 95F", "path": "general_tests"}, - {"group": "General tests", "test": "testSandenCombi", "desc": "SandenCombi", "path": "general_tests"}, + {"group": "General tests", "id": "test30", "desc": "24h; 30F", "path": "general_tests"}, + {"group": "General tests", "id": "test50", "desc": "24h; 50F", "path": "general_tests"}, + {"group": "General tests", "id": "test70", "desc": "24h; 70F", "path": "general_tests"}, + {"group": "General tests", "id": "test95", "desc": "24h; 95F", "path": "general_tests"}, + {"group": "General tests", "id": "testSandenCombi", "desc": "SandenCombi", "path": "general_tests"}, - {"group": "BradfordWhite AeroThermRE2H50", "test": "RE2H50_UEF50", "desc": "24h; 50F", "path": "BradfordWhite/AeroThermRE2H50", "measured": [{"model": "BradfordWhiteAeroThermRE2H50", "filename": "measured.csv"}]}, - {"group": "BradfordWhite AeroThermRE2H50", "test": "RE2H50_UEF67", "desc": "24h; 67F", "path": "BradfordWhite/AeroThermRE2H50", "measured": [{"model": "BradfordWhiteAeroThermRE2H50", "filename": "measured.csv"}]}, - {"group": "BradfordWhite_AeroThermRE2H65", "test": "RE2H65_UEF50", "desc": "24h; 50F", "path": "BradfordWhite/AeroThermRE2H65", "measured": [{"model": "BradfordWhiteAeroThermRE2H65", "filename": "measured.csv"}]}, - {"group": "BradfordWhite_AeroThermRE2H65", "test": "RE2H65_UEF67", "desc": "24h; 67F", "path": "BradfordWhite/AeroThermRE2H65", "measured": [{"model": "BradfordWhiteAeroThermRE2H65", "filename": "measured.csv"}]}, - {"group": "BradfordWhite AeroThermRE2H80", "test": "RE2H80_UEF50", "desc": "24h; 50F", "path": "BradfordWhite/AeroThermRE2H80", "measured": [{"model": "BradfordWhiteAeroThermRE2H80", "filename": "measured.csv"}]}, - {"group": "BradfordWhite AeroThermRE2H80", "test": "RE2H80_UEF67", "desc": "24h; 67F", "path": "BradfordWhite/AeroThermRE2H80", "measured": [{"model": "BradfordWhiteAeroThermRE2H80", "filename": "measured.csv"}]}, + {"group": "BradfordWhite AeroThermRE2H50", "id": "RE2H50_UEF50", "desc": "24h; 50F", "path": "BradfordWhite/AeroThermRE2H50", "measured": [{"id": "BradfordWhiteAeroThermRE2H50", "filename": "measured.csv"}]}, + {"group": "BradfordWhite AeroThermRE2H50", "id": "RE2H50_UEF67", "desc": "24h; 67F", "path": "BradfordWhite/AeroThermRE2H50", "measured": [{"id": "BradfordWhiteAeroThermRE2H50", "filename": "measured.csv"}]}, + {"group": "BradfordWhite_AeroThermRE2H65", "id": "RE2H65_UEF50", "desc": "24h; 50F", "path": "BradfordWhite/AeroThermRE2H65", "measured": [{"id": "BradfordWhiteAeroThermRE2H65", "filename": "measured.csv"}]}, + {"group": "BradfordWhite_AeroThermRE2H65", "id": "RE2H65_UEF67", "desc": "24h; 67F", "path": "BradfordWhite/AeroThermRE2H65", "measured": [{"id": "BradfordWhiteAeroThermRE2H65", "filename": "measured.csv"}]}, + {"group": "BradfordWhite AeroThermRE2H80", "id": "RE2H80_UEF50", "desc": "24h; 50F", "path": "BradfordWhite/AeroThermRE2H80", "measured": [{"id": "BradfordWhiteAeroThermRE2H80", "filename": "measured.csv"}]}, + {"group": "BradfordWhite AeroThermRE2H80", "id": "RE2H80_UEF67", "desc": "24h; 67F", "path": "BradfordWhite/AeroThermRE2H80", "measured": [{"id": "BradfordWhiteAeroThermRE2H80", "filename": "measured.csv"}]}, - {"group": "Villara_AquaThermAire", "test": "villara_24hr67", "desc": "24h; 67F", "path": "Villara/AquaThermAire", "measured": [{"model": "AquaThermAire", "filename": "measured.csv"}]}, + {"group": "Villara_AquaThermAire", "id": "villara_24hr67", "desc": "24h; 67F", "path": "Villara/AquaThermAire", "measured": [{"id": "AquaThermAire", "filename": "measured.csv"}]}, - {"group": "LG", "test": "DOE2014_LGC50_24hr50", "desc": "24h; 50F", "path": "LG/APHWC50", "measured": [{"model": "LG_APHWC50", "filename": "measured.csv"}]}, - {"group": "LG", "test": "DOE2014_LGC50_24hr67", "desc": "24h; 67F", "path": "LG/APHWC50", "measured": [{"model": "LG_APHWC50", "filename": "measured.csv"}]}, - {"group": "LG", "test": "DOE2014_LGC50_24hr95", "desc": "24h; 95F", "path": "LG/APHWC50", "measured": [{"model": "LG_APHWC50", "filename": "measured.csv"}]}, + {"group": "LG", "id": "DOE2014_LGC50_24hr50", "desc": "24h; 50F", "path": "LG/APHWC50", "measured": [{"id": "LG_APHWC50", "filename": "measured.csv"}]}, + {"group": "LG", "id": "DOE2014_LGC50_24hr67", "desc": "24h; 67F", "path": "LG/APHWC50", "measured": [{"id": "LG_APHWC50", "filename": "measured.csv"}]}, + {"group": "LG", "id": "DOE2014_LGC50_24hr95", "desc": "24h; 95F", "path": "LG/APHWC50", "measured": [{"id": "LG_APHWC50", "filename": "measured.csv"}]}, - {"group": "Demand-response tests", "test": "testDr_LO", "path": "DR_tests"}, - {"group": "Demand-response tests", "test": "testDr_TOO", "path": "DR_tests"}, - {"group": "Demand-response tests", "test": "testDr_TOO2", "path": "DR_tests"}, - {"group": "Demand-response tests", "test": "testDR_TOTLOR", "path": "DR_tests"}, + {"group": "Demand-response tests", "id": "testDr_LO", "path": "DR_tests"}, + {"group": "Demand-response tests", "id": "testDr_TOO", "path": "DR_tests"}, + {"group": "Demand-response tests", "id": "testDr_TOO2", "path": "DR_tests"}, + {"group": "Demand-response tests", "id": "testDR_TOTLOR", "path": "DR_tests"}, - {"group": "Standard tests", "name": "Standard 24-hr test"}, + {"group": "Standard tests", "id": "standard24hr", "name": "Standard 24-hr test"}, - {"test": "testLockout", "name": "Lockout test"}, + {"id": "testLockout", "name": "Lockout test"}, - {"group": "Central-system tests", "test": "testLargeComp45", "path": "large_compressor_tests"} + {"group": "Central-system tests", "id": "testLargeComp45", "path": "large_compressor_tests"}, + {"group": "Central-system tests", "id": "testLargeComp60", "path": "large_compressor_tests"}, + {"group": "Central-system tests", "id": "testLargeCompHot", "path": "large_compressor_tests"} ] } \ No newline at end of file diff --git a/src/HPWH.cc b/src/HPWH.cc index 2b6861df..bedf77ae 100644 --- a/src/HPWH.cc +++ b/src/HPWH.cc @@ -1485,154 +1485,139 @@ std::shared_ptr HPWH::shutOffSoC(string desc, std::greater()); } -//----------------------------------------------------------------------------- -/// @brief Builds a vector of logic node weights referred to a fixed number of -/// nodes given by LOGIC_SIZE. -/// @param[in] bottomFraction Lower bounding fraction (0 to 1) -/// @param[in] topFraction Upper bounding fraction (0 to 1) -/// @return vector of node weights -//----------------------------------------------------------------------------- -std::vector HPWH::getNodeWeightRange(double bottomFraction, double topFraction) +HPWH::Distribution HPWH::getRangeDistribution(double bottomFraction, double topFraction) { - std::vector nodeWeights; - if (topFraction < bottomFraction) - std::swap(bottomFraction, topFraction); - auto bottomIndex = static_cast(bottomFraction * LOGIC_SIZE); - auto topIndex = static_cast(topFraction * LOGIC_SIZE); - for (auto index = bottomIndex; index < topIndex; ++index) + std::vector heights = {}, weights = {}; + if (bottomFraction > 0.) + { + heights.push_back(bottomFraction); + weights.push_back(0.); + } + heights.push_back(topFraction); + weights.push_back(1.); + if (topFraction < 1.) { - nodeWeights.emplace_back(static_cast(index) + 1); + heights.push_back(1.); + weights.push_back(0.); } - return nodeWeights; + return {DistributionType::Weighted, {heights, weights}}; } std::shared_ptr HPWH::wholeTank(double decisionPoint, const UNITS units /* = UNITS_C */, const bool absolute /* = false */) { - auto nodeWeights = getNodeWeightRange(0., 1.); + auto dist = getRangeDistribution(0., 1.); double decisionPoint_C = convertTempToC(decisionPoint, units, absolute); return std::make_shared( - "whole tank", nodeWeights, decisionPoint_C, this, absolute); + "whole tank", dist, decisionPoint_C, this, absolute); } std::shared_ptr HPWH::topThird(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(2. / 3., 1.); - return std::make_shared( - "top third", nodeWeights, decisionPoint, this); + auto dist = getRangeDistribution(2. / 3., 1.); + return std::make_shared("top third", dist, decisionPoint, this); } std::shared_ptr HPWH::topThird_absolute(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(2. / 3., 1.); + auto dist = getRangeDistribution(2. / 3., 1.); return std::make_shared( - "top third absolute", nodeWeights, decisionPoint, this, true); + "top third absolute", dist, decisionPoint, this, true); } std::shared_ptr HPWH::secondThird(double decisionPoint, const UNITS units /* = UNITS_C */, const bool absolute /* = false */) { - auto nodeWeights = getNodeWeightRange(1. / 3., 2. / 3.); + auto dist = getRangeDistribution(1. / 3., 2. / 3.); double decisionPoint_C = convertTempToC(decisionPoint, units, absolute); return std::make_shared( - "second third", nodeWeights, decisionPoint_C, this, absolute); + "second third", dist, decisionPoint_C, this, absolute); } std::shared_ptr HPWH::bottomThird(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(0., 1. / 3.); - return std::make_shared( - "bottom third", nodeWeights, decisionPoint, this); + auto dist = getRangeDistribution(0., 1. / 3.); + return std::make_shared("bottom third", dist, decisionPoint, this); } std::shared_ptr HPWH::bottomSixth(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(0., 1. / 6.); - return std::make_shared( - "bottom sixth", nodeWeights, decisionPoint, this); + auto dist = getRangeDistribution(0., 1. / 6.); + return std::make_shared("bottom sixth", dist, decisionPoint, this); } std::shared_ptr HPWH::bottomSixth_absolute(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(0., 1. / 6.); + auto dist = getRangeDistribution(0., 1. / 6.); return std::make_shared( - "bottom sixth absolute", nodeWeights, decisionPoint, this, true); + "bottom sixth absolute", dist, decisionPoint, this, true); } std::shared_ptr HPWH::secondSixth(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(1. / 6., 2. / 6.); - return std::make_shared( - "second sixth", nodeWeights, decisionPoint, this); + auto dist = getRangeDistribution(1. / 6., 2. / 6.); + return std::make_shared("second sixth", dist, decisionPoint, this); } std::shared_ptr HPWH::thirdSixth(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(2. / 6., 3. / 6.); - return std::make_shared( - "third sixth", nodeWeights, decisionPoint, this); + auto dist = getRangeDistribution(2. / 6., 3. / 6.); + return std::make_shared("third sixth", dist, decisionPoint, this); } std::shared_ptr HPWH::fourthSixth(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(3. / 6., 4. / 6.); - return std::make_shared( - "fourth sixth", nodeWeights, decisionPoint, this); + auto dist = getRangeDistribution(3. / 6., 4. / 6.); + return std::make_shared("fourth sixth", dist, decisionPoint, this); } std::shared_ptr HPWH::fifthSixth(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(4. / 6., 5. / 6.); - return std::make_shared( - "fifth sixth", nodeWeights, decisionPoint, this); + auto dist = getRangeDistribution(4. / 6., 5. / 6.); + return std::make_shared("fifth sixth", dist, decisionPoint, this); } std::shared_ptr HPWH::topSixth(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(5. / 6., 1.); - return std::make_shared( - "top sixth", nodeWeights, decisionPoint, this); + auto dist = getRangeDistribution(5. / 6., 1.); + return std::make_shared("top sixth", dist, decisionPoint, this); } std::shared_ptr HPWH::bottomHalf(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(0., 1. / 2.); - return std::make_shared( - "bottom half", nodeWeights, decisionPoint, this); + auto dist = getRangeDistribution(0., 1. / 2.); + return std::make_shared("bottom half", dist, decisionPoint, this); } std::shared_ptr HPWH::bottomTwelfth(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(0., 1. / 12.); + auto dist = getRangeDistribution(0., 1. / 12.); return std::make_shared( - "bottom twelfth", nodeWeights, decisionPoint, this); + "bottom twelfth", dist, decisionPoint, this); } std::shared_ptr HPWH::standby(double decisionPoint) { - std::vector nodeWeights; - nodeWeights.emplace_back(LOGIC_SIZE + 1); // uses very top computation node + HPWH::Distribution dist = {DistributionType::TopOfTank, {{}, {}}}; return std::make_shared( - "standby", nodeWeights, decisionPoint, this); + "standby", dist, decisionPoint, this, false, std::less(), false, true); } std::shared_ptr HPWH::topNodeMaxTemp(double decisionPoint) { - std::vector nodeWeights; - nodeWeights.emplace_back(LOGIC_SIZE + 1); // uses very top computation node + HPWH::Distribution dist = {DistributionType::TopOfTank, {{}, {}}}; return std::make_shared( - "top node", nodeWeights, decisionPoint, this, true, std::greater()); + "top of tank", dist, decisionPoint, this, true, std::greater()); } std::shared_ptr HPWH::bottomNodeMaxTemp(double decisionPoint, bool isEnteringWaterHighTempShutoff /*=false*/) { - std::vector nodeWeights; - nodeWeights.emplace_back(0); // uses very bottom computation node - return std::make_shared("bottom node", - nodeWeights, + HPWH::Distribution dist = {DistributionType::BottomOfTank, {{}, {}}}; + return std::make_shared("bottom of tank", + dist, decisionPoint, this, true, @@ -1642,58 +1627,58 @@ HPWH::bottomNodeMaxTemp(double decisionPoint, bool isEnteringWaterHighTempShutof std::shared_ptr HPWH::bottomTwelfthMaxTemp(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(0., 1. / 12.); + auto dist = getRangeDistribution(0., 1. / 12.); return std::make_shared( - "bottom twelfth", nodeWeights, decisionPoint, this, true, std::greater()); + "bottom twelfth", dist, decisionPoint, this, true, std::greater()); } std::shared_ptr HPWH::topThirdMaxTemp(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(2. / 3., 1.); + auto dist = getRangeDistribution(2. / 3., 1.); return std::make_shared( - "top third", nodeWeights, decisionPoint, this, true, std::greater()); + "top third", dist, decisionPoint, this, true, std::greater()); } std::shared_ptr HPWH::bottomSixthMaxTemp(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(0., 1. / 6.); + auto dist = getRangeDistribution(0., 1. / 6.); return std::make_shared( - "bottom sixth", nodeWeights, decisionPoint, this, true, std::greater()); + "bottom sixth", dist, decisionPoint, this, true, std::greater()); } std::shared_ptr HPWH::secondSixthMaxTemp(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(1. / 6., 2. / 6.); + auto dist = getRangeDistribution(1. / 6., 2. / 6.); return std::make_shared( - "second sixth", nodeWeights, decisionPoint, this, true, std::greater()); + "second sixth", dist, decisionPoint, this, true, std::greater()); } std::shared_ptr HPWH::fifthSixthMaxTemp(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(4. / 6., 5. / 6.); + auto dist = getRangeDistribution(4. / 6., 5. / 6.); return std::make_shared( - "top sixth", nodeWeights, decisionPoint, this, true, std::greater()); + "top sixth", dist, decisionPoint, this, true, std::greater()); } std::shared_ptr HPWH::topSixthMaxTemp(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(5. / 6., 1.); + auto dist = getRangeDistribution(5. / 6., 1.); return std::make_shared( - "top sixth", nodeWeights, decisionPoint, this, true, std::greater()); + "top sixth", dist, decisionPoint, this, true, std::greater()); } std::shared_ptr HPWH::largeDraw(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(0., 1. / 4.); + auto dist = getRangeDistribution(0., 1. / 4.); return std::make_shared( - "large draw", nodeWeights, decisionPoint, this, true); + "large draw", dist, decisionPoint, this, true); } std::shared_ptr HPWH::largerDraw(double decisionPoint) { - auto nodeWeights = getNodeWeightRange(0., 1. / 2.); + auto dist = getRangeDistribution(0., 1. / 2.); return std::make_shared( - "larger draw", nodeWeights, decisionPoint, this, true); + "larger draw", dist, decisionPoint, this, true); } void HPWH::setNumNodes(const std::size_t num_nodes) { tank->setNumNodes(num_nodes); } @@ -2062,19 +2047,14 @@ double HPWH::getAverageTankTemp_C(const std::vector& dist) const return tank->getAverageNodeT_C(dist); } -//----------------------------------------------------------------------------- -/// @brief Evaluates the average tank temperature based on weighted logic nodes. -/// @note Logic nodes must be normalizable and are referred to the fixed size LOGIC_NODE_SIZE. -/// Node indices as associated with tank nodes as follows: -/// node # 0: bottom tank node only; -/// node # LOGIC_NODE_SIZE + 1: top node only; -/// nodes # 1..LOGIC_NODE_SIZE: resampled tank nodes. -/// @param[in] nodeWeights Discrete set of weighted nodes -/// @return Tank temperature (C) -//----------------------------------------------------------------------------- -double HPWH::getAverageTankTemp_C(const std::vector& nodeWeights) const +double HPWH::getAverageTankTemp_C(const WeightedDistribution& wdist) const { - return tank->getAverageNodeT_C(nodeWeights); + return tank->getAverageNodeT_C(wdist); +} + +double HPWH::getAverageTankTemp_C(const Distribution& dist) const +{ + return tank->getAverageNodeT_C(dist); } void HPWH::setTankToTemperature(double temp_C) { tank->setNodeT_C(temp_C); } @@ -2416,22 +2396,8 @@ int HPWH::getResistancePosition(int elementIndex) const { send_error("This index is not a resistance element."); } - bool foundPosition = false; - int position = -1; - for (int i = 0; i < heatSources[elementIndex]->getCondensitySize(); i++) - { - if (heatSources[elementIndex]->condensity[i] > 0.) - { // res elements have a condensity - position = i; - foundPosition = true; - break; - } - } - if (!foundPosition) - { - send_error("Invalid resistance heat source."); - } - return position; + return static_cast(HeatSource::CONDENSITY_SIZE * + heatSources[elementIndex]->heatDist.lowestNormHeight()); } void HPWH::updateSoCIfNecessary() @@ -2548,14 +2514,14 @@ void HPWH::calcDerivedHeatingValues() // find condentropy/shrinkage for (int i = 0; i < getNumHeatSources(); ++i) { - heatSources[i]->Tshrinkage_C = findShrinkageT_C(heatSources[i]->condensity); + heatSources[i]->Tshrinkage_C = + findShrinkageT_C(heatSources[i]->heatDist, tank->getNumNodes()); } // find lowest node for (int i = 0; i < getNumHeatSources(); i++) { - heatSources[i]->lowestNode = - findLowestNode(heatSources[i]->condensity, tank->getNumNodes()); + heatSources[i]->lowestNode = findLowestNode(heatSources[i]->heatDist, tank->getNumNodes()); } // define condenser index and lowest resistance element index @@ -2586,20 +2552,17 @@ void HPWH::calcDerivedHeatingValues() send_warning("More than one resistance element is assigned to VIP."); } } - int condensitySize = heatSources[i]->getCondensitySize(); - for (int j = 0; j < condensitySize; ++j) + double pos = heatSources[i]->heatDist.lowestNormHeight(); + if (pos < lowestPos) { - double pos = static_cast(j) / condensitySize; - if ((heatSources[i]->condensity[j] > 0.) && (pos < lowestPos)) - { - lowestElementIndex = i; - lowestPos = pos; - } - if ((heatSources[i]->condensity[j] > 0.) && (pos >= highestPos)) - { - highestElementIndex = i; - highestPos = pos; - } + lowestElementIndex = i; + lowestPos = pos; + } + pos = heatSources[i]->heatDist.lowestNormHeight(); + if (pos >= highestPos) + { + highestElementIndex = i; + highestPos = pos; } } } @@ -2716,7 +2679,6 @@ void HPWH::checkInputs() error_msgs.push("You must have at least one HeatSource."); } - double condensitySum; // loop through all heat sources to check each for malconfigurations for (int i = 0; i < getNumHeatSources(); i++) { @@ -2752,18 +2714,11 @@ void HPWH::checkInputs() error_msgs.push(fmt::format("Off logic at index {:d} is invalid.", i)); } } - - // check is condensity sums to 1 - condensitySum = 0; - - for (int j = 0; j < heatSources[i]->getCondensitySize(); j++) - condensitySum += heatSources[i]->condensity[j]; - if (fabs(condensitySum - 1.0) > 1e-6) + // check is distribution is valid + if (!heatSources[i]->heatDist.isValid()) { - error_msgs.push(fmt::format("The condensity for heatsource {:d} does not sum to 1. " - "It sums to {:g}.", - i, - condensitySum)); + error_msgs.push( + fmt::format("The heat distribution for heatsource {:d} is invalid.", i)); } // check that air flows are all set properly if (heatSources[i]->airflowFreedom > 1.0 || heatSources[i]->airflowFreedom <= 0.0) @@ -3696,6 +3651,30 @@ void HPWH::readFileAsJSON(string modelName, nlohmann::json& j) std::shared_ptr logic = std::make_shared( "custom", nodeWeights, tempDouble, this, absolute, compare); + + if (logic->dist.distribType == DistributionType::TopOfTank) + { + j_logic["distribution_type"] = "top of tank"; + } + else if (logic->dist.distribType == DistributionType::BottomOfTank) + { + j_logic["distribution_type"] = "bottom of tank"; + } + else if (logic->dist.distribType == DistributionType::Weighted) + { + std::vector distHeights = {}, distWeights = {}; + for (std::size_t i = 0; i < logic->dist.weightedDist.size(); ++i) + { + distHeights.push_back(logic->dist.weightedDist[i].height); + distWeights.push_back(logic->dist.weightedDist[i].weight); + } + nlohmann::json j_weighted_dist; + j_weighted_dist["normalized_height"] = distHeights; + j_weighted_dist["weight"] = distWeights; + j_logic["weighted_distribution"] = j_weighted_dist; + j_logic["distribution_type"] = "weighted"; + } + if (token == "onlogic") { j_heatsourceconfigs[heatsource]["turn_on_logic"].push_back(j_logic); @@ -3814,10 +3793,29 @@ void HPWH::readFileAsJSON(string modelName, nlohmann::json& j) "Improper {} for heat source {:d}", token.c_str(), heatsource)); } - for (auto& node : logic->nodeWeights) + if (logic->dist.distribType == DistributionType::TopOfTank) { - j_logic["node_weights"].push_back({node.nodeNum, node.weight}); + j_logic["distribution_type"] = "top of tank"; + } + else if (logic->dist.distribType == DistributionType::BottomOfTank) + { + j_logic["distribution_type"] = "bottom of tank"; + } + else if (logic->dist.distribType == DistributionType::Weighted) + { + std::vector distHeights = {}, distWeights = {}; + for (std::size_t i = 0; i < logic->dist.weightedDist.size(); ++i) + { + distHeights.push_back(logic->dist.weightedDist[i].height); + distWeights.push_back(logic->dist.weightedDist[i].weight); + } + nlohmann::json j_weighted_dist; + j_weighted_dist["normalized_height"] = distHeights; + j_weighted_dist["weight"] = distWeights; + j_logic["weighted_distribution"] = j_weighted_dist; + j_logic["distribution_type"] = "weighted"; } + if (logic->isAbsolute) j_logic["absolute_temperature_C"] = tempDouble; else @@ -3872,10 +3870,30 @@ void HPWH::readFileAsJSON(string modelName, nlohmann::json& j) send_error(fmt::format( "Improper {} for heat source {:d}", token.c_str(), heatsource)); } - for (auto& node : logic->nodeWeights) + + if (logic->dist.distribType == DistributionType::TopOfTank) + { + j_logic["distribution_type"] = "top of tank"; + } + else if (logic->dist.distribType == DistributionType::BottomOfTank) + { + j_logic["distribution_type"] = "bottom of tank"; + } + else if (logic->dist.distribType == DistributionType::Weighted) { - j_logic["node_weights"].push_back({node.nodeNum, node.weight}); + std::vector distHeights = {}, distWeights = {}; + for (std::size_t i = 0; i < logic->dist.weightedDist.size(); ++i) + { + distHeights.push_back(logic->dist.weightedDist[i].height); + distWeights.push_back(logic->dist.weightedDist[i].weight); + } + nlohmann::json j_weighted_dist; + j_weighted_dist["normalized_height"] = distHeights; + j_weighted_dist["weight"] = distWeights; + j_logic["weighted_distribution"] = j_weighted_dist; + j_logic["distribution_type"] = "weighted"; } + if (logic->isAbsolute) j_logic["absolute_temperature_C"] = tempDouble; else @@ -4212,10 +4230,29 @@ void HPWH::initFromFileJSON(nlohmann::json& j) for (auto& j_logic : j_heatsourceconfig["turn_on_logic"]) { - std::vector nodeWeights = {}; - for (auto& node_weight : j_logic["node_weights"]) + std::string desc; + checkFrom(desc, j_logic, "description", std::string("none")); + + std::string distType; + checkFrom(distType, j_logic, "distribution_type", std::string("weighted")); + + bool checkStandby = false; + Distribution dist; + if (distType == "top of tank") + { + dist = {DistributionType::TopOfTank, {{}, {}}}; + checkStandby = true; + } + + else if (distType == "bottom of tank") + dist = {DistributionType::BottomOfTank, {{}, {}}}; + + else if (distType == "weighted") { - nodeWeights.emplace_back(node_weight[0], node_weight[1]); + auto& j_dist = j_logic["weighted_distribution"]; + auto& distHeights = j_dist["normalized_height"]; + auto& distWeights = j_dist["weight"]; + dist = {DistributionType::Weighted, {distHeights, distWeights}}; } bool is_absolute = false; @@ -4228,25 +4265,38 @@ void HPWH::initFromFileJSON(nlohmann::json& j) else checkFrom(temp, j_logic, "differential_temperature_dC", 0.); - std::string desc; - checkFrom(desc, j_logic, "description", std::string("none")); std::function compare = std::less<>(); if (j_logic["comparison_type"] == "GREATER_THAN") compare = std::greater<>(); std::shared_ptr heatingLogic; heatingLogic = std::make_shared( - desc, nodeWeights, temp, this, is_absolute, compare); + desc, dist, temp, this, is_absolute, compare, false, checkStandby); element->addTurnOnLogic(heatingLogic); } for (auto& j_logic : j_heatsourceconfig["shut_off_logic"]) { - std::vector nodeWeights = {}; - for (auto& node_weight : j_logic["node_weights"]) + std::string desc; + checkFrom(desc, j_logic, "description", std::string("none")); + + std::string distType; + checkFrom(distType, j_logic, "distribution_type", std::string("weighted")); + + Distribution dist; + if (distType == "top of tank") + dist = {DistributionType::TopOfTank, {{}, {}}}; + + else if (distType == "bottom of tank") + dist = {DistributionType::BottomOfTank, {{}, {}}}; + + else if (distType == "weighted") { - nodeWeights.emplace_back(node_weight[0], node_weight[1]); + auto& j_dist = j_logic["weighted_distribution"]; + auto& distHeights = j_dist["normalized_height"]; + auto& distWeights = j_dist["weight"]; + dist = {DistributionType::Weighted, {distHeights, distWeights}}; } bool is_absolute = false; @@ -4259,15 +4309,13 @@ void HPWH::initFromFileJSON(nlohmann::json& j) else checkFrom(temp, j_logic, "differential_temperature_dC", 0.); - std::string desc; - checkFrom(desc, j_logic, "description", std::string("none")); std::function compare = std::less<>(); if (j_logic["comparison_type"] == "GREATER_THAN") compare = std::greater<>(); std::shared_ptr heatingLogic; heatingLogic = std::make_shared( - desc, nodeWeights, temp, this, is_absolute, compare); + desc, dist, temp, this, is_absolute, compare); element->addShutOffLogic(heatingLogic); } @@ -4275,10 +4323,23 @@ void HPWH::initFromFileJSON(nlohmann::json& j) if (j_heatsourceconfig.contains("standby_logic")) { auto& j_logic = j_heatsourceconfig["standby_logic"]; - std::vector nodeWeights = {}; - for (auto& node_weight : j_logic["node_weights"]) + // std::vector nodeWeights = {}; + std::string distType; + checkFrom(distType, j_logic, "distribution_type", std::string("weighted")); + + Distribution dist; + if (distType == "top of tank") + dist = {DistributionType::TopOfTank, {{}, {}}}; + + else if (distType == "bottom of tank") + dist = {DistributionType::BottomOfTank, {{}, {}}}; + + else if (distType == "weighted") { - nodeWeights.emplace_back(node_weight[0], node_weight[1]); + auto& j_dist = j_logic["weighted_distribution"]; + auto& distHeights = j_dist["normalized_height"]; + auto& distWeights = j_dist["weight"]; + dist = {DistributionType::Weighted, {distHeights, distWeights}}; } bool is_absolute = false; @@ -4297,7 +4358,7 @@ void HPWH::initFromFileJSON(nlohmann::json& j) std::shared_ptr heatingLogic; heatingLogic = std::make_shared( - "name", nodeWeights, temp, this, is_absolute, compare); + "name", dist, temp, this, is_absolute, compare); element->standbyLogic = heatingLogic; } diff --git a/src/HPWH.hh b/src/HPWH.hh index 63e40ae7..d7dfe888 100644 --- a/src/HPWH.hh +++ b/src/HPWH.hh @@ -378,6 +378,142 @@ class HPWH : public Courier::Sender CSVOPT_IS_DRAWING = 1 << 1 }; + struct DistributionPoint + { + double height, weight; + }; + struct WeightedDistribution : public std::vector + { + public: + WeightedDistribution(std::vector heights = {}, std::vector weights = {}) + { + clear(); + reserve(heights.size()); + auto weight = weights.begin(); + for (auto& height : heights) + if (weight != weights.end()) + { + push_back({height, *weight}); + ++weight; + } + } + double heightRange() const { return back().height; } + double totalWeight() const + { + double total = 0.; + double prevHeight = 0.; + for (auto distPoint : (*this)) + { + double& height = distPoint.height; + double& weight = distPoint.weight; + total += weight * (height - prevHeight); + prevHeight = height; + } + return total / prevHeight; + } + double maxWeight() const + { + double res = 0.; + for (auto distPoint : (*this)) + res = std::max(distPoint.weight, res); + return res; + } + double normHeight(std::size_t i) const { return (*this)[i].height / heightRange(); } + double normWeight(std::size_t i) const { return (*this)[i].weight / totalWeight(); } + double unitaryWeight(std::size_t i) const { return (*this)[i].weight / maxWeight(); } + bool isValid() const + { + bool isNotEmpty = (size() > 0); + bool hasWeight = false; + bool isSorted = true; + double prevHeight = 0.; + for (auto distPoint = begin(); distPoint != end(); ++distPoint) + { + if (distPoint->height <= prevHeight) + isSorted = false; + if (distPoint->weight > 0.) + hasWeight = true; + } + return isNotEmpty && hasWeight && isSorted; + } + double normWeight(double beginFrac, double endFrac) const + { + double res = 0.; + double prevFrac = beginFrac; + for (auto distPoint : (*this)) + { + double frac = distPoint.height / heightRange(); + if (frac < beginFrac) + continue; + if (frac > prevFrac) + { + if (frac > endFrac) + { + res += distPoint.weight * (endFrac - prevFrac); + break; + } + else + res += distPoint.weight * (frac - prevFrac); + } + prevFrac = frac; + } + return res / totalWeight(); + } + double lowestNormHeight() const + { + double prev_height = 0.; + for (auto distPoint = begin(); distPoint != end(); ++distPoint) + { + if (distPoint->weight > 0.) + return prev_height / heightRange(); + prev_height = distPoint->height; + } + + return 0.; + } + double highestNormHeight() const + { + double height = 0.; + for (auto distPoint = begin(); distPoint != end(); ++distPoint) + { + if (distPoint->weight > 0.) + height = distPoint->height; + } + return height / heightRange(); + } + }; + enum class DistributionType + { + Weighted, + TopOfTank, + BottomOfTank + }; + + struct Distribution + { + public: + DistributionType distribType; + WeightedDistribution weightedDist; + Distribution(DistributionType distribType_in = DistributionType::Weighted, + WeightedDistribution weightedDist_in = {{}, {}}) + : distribType(distribType_in), weightedDist(weightedDist_in) + { + } + bool isValid() const + { + switch (distribType) + { + case DistributionType::TopOfTank: + case DistributionType::BottomOfTank: + return true; + + case DistributionType::Weighted: + return weightedDist.isValid(); + } + return false; + } + }; + struct NodeWeight { int nodeNum; @@ -876,12 +1012,14 @@ class HPWH : public Courier::Sender /// returns the tank temperature averaged uniformly double getAverageTankTemp_C() const; - /// returns the tank temperature averaged over a distribution double getAverageTankTemp_C(const std::vector& dist) const; /// returns the tank temperature averaged using weighted logic nodes - double getAverageTankTemp_C(const std::vector& nodeWeights) const; + double getAverageTankTemp_C(const Distribution& dist) const; + + /// returns the tank temperature averaged using weighted logic nodes + double getAverageTankTemp_C(const WeightedDistribution& wdist) const; void setMaxTempDepression(double maxDepression, UNITS units = UNITS_C); @@ -1206,8 +1344,8 @@ class HPWH : public Courier::Sender /**< A map from index of an resistance element in heatSources to position in the tank, its is sorted by height from lowest to highest*/ - /// Generates a vector of logical nodes - std::vector getNodeWeightRange(double bottomFraction, double topFraction); + /// Generates a top-hat distribution + Distribution getRangeDistribution(double bottomFraction, double topFraction); public: static double getResampledValue(const std::vector& sampleValues, @@ -1223,8 +1361,8 @@ class HPWH : public Courier::Sender } static double expitFunc(double x, double offset); static void normalize(std::vector& distribution); - static int findLowestNode(const std::vector& nodeDist, const int numTankNodes); - static double findShrinkageT_C(const std::vector& nodeDist); + static int findLowestNode(const WeightedDistribution& wdist, const int numTankNodes); + static double findShrinkageT_C(const WeightedDistribution& wDist, const int numTankNodes); static void calcThermalDist(std::vector& thermalDist, const double shrinkageT_C, const int lowestNode, diff --git a/src/HPWHHeatSource.cc b/src/HPWHHeatSource.cc index a41e1193..d5790c52 100644 --- a/src/HPWHHeatSource.cc +++ b/src/HPWHHeatSource.cc @@ -66,7 +66,7 @@ HPWH::HeatSource& HPWH::HeatSource::operator=(const HeatSource& hSource) followedByHeatSource = NULL; } - condensity = hSource.condensity; + heatDist = hSource.heatDist; Tshrinkage_C = hSource.Tshrinkage_C; @@ -93,7 +93,11 @@ void HPWH::HeatSource::from( { auto& config = hsc; checkFrom(name, config.id_is_set, config.id, std::string("heatsource")); - setCondensity(config.heat_distribution); + + if (config.heat_distribution_is_set) + { + heatDist = {config.heat_distribution.normalized_height, config.heat_distribution.weight}; + } if (config.turn_on_logic_is_set) { @@ -132,7 +136,18 @@ void HPWH::HeatSource::from( void HPWH::HeatSource::to( hpwh_data_model::heat_source_configuration_ns::HeatSourceConfiguration& hsc) const { - hsc.heat_distribution = condensity; + std::vector heights = {}, weights = {}; + for (std::size_t i = 0; i < heatDist.size(); ++i) + { + heights.push_back(heatDist.normHeight(i)); + weights.push_back(heatDist.unitaryWeight(i)); + } + + hpwh_data_model::heat_source_configuration_ns::WeightedDistribution wd; + checkTo(heights, wd.normalized_height_is_set, wd.normalized_height); + checkTo(weights, wd.weight_is_set, wd.weight); + checkTo(wd, hsc.heat_distribution_is_set, hsc.heat_distribution); + hsc.id = name; hsc.shut_off_logic.resize(shutOffLogicSet.size()); @@ -203,10 +218,26 @@ void HPWH::HeatSource::to( void HPWH::HeatSource::setCondensity(const std::vector& condensity_in) { - condensity = condensity_in; -} -int HPWH::HeatSource::getCondensitySize() const { return static_cast(condensity.size()); } + heatDist = {{}, {}}; + // double prev_height = 0.; + // double prev_weight = 0.; + auto nCond = condensity_in.size(); + for (std::size_t i = 0; i < nCond; ++i) + { + double height = static_cast(i + 1) / nCond; + double weight = condensity_in[i]; + if (i == nCond - 1) + { + heatDist.push_back({height, weight}); + break; + } + if (weight != condensity_in[i + 1]) + { + heatDist.push_back({height, weight}); + } + } +} int HPWH::HeatSource::findParent() const { @@ -249,7 +280,7 @@ bool HPWH::HeatSource::shouldHeat() const if (turnOnLogicSet[i]->compare(average, comparison)) { - if (turnOnLogicSet[i]->description == "standby" && standbyLogic != NULL) + if (turnOnLogicSet[i]->checksStandby() && standbyLogic != NULL) { double avgStandby = standbyLogic->getTankValue(); double comparisonStandby = standbyLogic->getComparisonValue(); @@ -328,8 +359,11 @@ double HPWH::HeatSource::heat(double cap_kJ, const double maxSetpointT_C) calcHeatDist(heatDistribution); // set the leftover capacity to 0 + // auto distPoint = heatDist.rbegin(); + // double totalWeight = heatDist.totalWeight(); + int numNodes = hpwh->getNumNodes(); double leftoverCap_kJ = 0.; - for (int i = hpwh->getNumNodes() - 1; i >= 0; i--) + for (int i = numNodes - 1; i >= 0; i--) { double nodeCap_kJ = cap_kJ * heatDistribution[i]; if (nodeCap_kJ != 0.) @@ -342,30 +376,26 @@ double HPWH::HeatSource::heat(double cap_kJ, const double maxSetpointT_C) return leftoverCap_kJ; } -double HPWH::HeatSource::getTankTemp() const -{ - - std::vector resampledTankTemps(getCondensitySize()); - resample(resampledTankTemps, hpwh->tank->nodeTs_C); - - double tankTemp_C = 0.; - - std::size_t j = 0; - for (auto& resampledNodeTemp : resampledTankTemps) - { - tankTemp_C += condensity[j] * resampledNodeTemp; - // Note that condensity is normalized. - ++j; - } - - return tankTemp_C; -} +double HPWH::HeatSource::getTankTemp() const { return hpwh->getAverageTankTemp_C(heatDist); } void HPWH::HeatSource::calcHeatDist(std::vector& heatDistribution) { // Populate the vector of heat distribution - heatDistribution.resize(hpwh->getNumNodes()); - resampleExtensive(heatDistribution, condensity); + int numNodes = hpwh->getNumNodes(); + heatDistribution.resize(numNodes); + double beginFrac = 0.; + int i = 0; + double totalWeight = 0.; + for (auto& dist : heatDistribution) + { + double endFrac = static_cast(i + 1) / numNodes; + dist = heatDist.normWeight(beginFrac, endFrac); + beginFrac = endFrac; + ++i; + totalWeight += dist; + } + for (auto& dist : heatDistribution) + dist /= totalWeight; } void HPWH::HeatSource::addTurnOnLogic(std::shared_ptr logic) diff --git a/src/HPWHHeatSource.hh b/src/HPWHHeatSource.hh index 9476134b..0b426c29 100644 --- a/src/HPWHHeatSource.hh +++ b/src/HPWHHeatSource.hh @@ -73,8 +73,6 @@ class HPWH::HeatSource : public Sender /// resampled to preserve a condensity vector of size CONDENSITY_SIZE. void setCondensity(const std::vector& condensity_in); - int getCondensitySize() const; - private: /** the creator of the heat source, necessary to access HPWH variables */ HPWH* hpwh; @@ -110,7 +108,8 @@ class HPWH::HeatSource : public Sender // It is conceptually linked to the way condenser coils are wrapped around // (or within) the tank, however a resistance heat source can also be simulated // by specifying the entire condensity in one node. */ - std::vector condensity; + // std::vector condensity; + WeightedDistribution heatDist; double Tshrinkage_C; /**< Tshrinkage_C is a derived from the condentropy (conditional entropy), diff --git a/src/HPWHHeatingLogic.cc b/src/HPWHHeatingLogic.cc index cfed94bf..e058da3f 100644 --- a/src/HPWHHeatingLogic.cc +++ b/src/HPWHHeatingLogic.cc @@ -119,26 +119,56 @@ double HPWH::SoCBasedHeatingLogic::getFractToMeetComparisonExternal() } /* Temperature Based Heating Logic*/ -bool HPWH::TempBasedHeatingLogic::isValid() +HPWH::TempBasedHeatingLogic::TempBasedHeatingLogic(std::string desc, + std::vector n, + double decisionPoint, + HPWH* hpwh, + bool a, + std::function c, + bool isHTS, + bool checksStandby_in) + : HeatingLogic(desc, decisionPoint, hpwh, c, isHTS, checksStandby_in), isAbsolute(a) { - bool isValid = true; - if (!areNodeWeightsValid()) + dist = {DistributionType::Weighted, {{}, {}}}; + auto prev_height = 0.; + for (auto node = n.begin(); node != n.end(); ++node) { - isValid = false; + if (node->nodeNum == 0) + { + dist = {DistributionType::BottomOfTank, {{}, {}}}; + return; + } + if (node->nodeNum == LOGIC_SIZE + 1) + { + dist = {DistributionType::TopOfTank, {{}, {}}}; + return; + } + double height_front = node->nodeNum - 1; + if (height_front > prev_height) + dist.weightedDist.push_back({height_front, 0.}); + while (node + 1 != n.end()) + { + if ((node + 1)->weight == node->weight) + ++node; + else + break; + } + height_front = node->nodeNum - 1; + dist.weightedDist.push_back({height_front + 1., node->weight}); + prev_height = height_front + 1.; } - return isValid; + if (prev_height < LOGIC_SIZE) + dist.weightedDist.push_back({LOGIC_SIZE, 0.}); } -bool HPWH::TempBasedHeatingLogic::areNodeWeightsValid() +bool HPWH::TempBasedHeatingLogic::isValid() { - for (auto nodeWeight : nodeWeights) + bool isValid = true; + if (!dist.isValid()) { - if (nodeWeight.nodeNum > 13 || nodeWeight.nodeNum < 0) - { - return false; - } + isValid = false; } - return true; + return isValid; } double HPWH::TempBasedHeatingLogic::getComparisonValue() @@ -154,10 +184,7 @@ double HPWH::TempBasedHeatingLogic::getComparisonValue() } } -double HPWH::TempBasedHeatingLogic::getTankValue() -{ - return hpwh->getAverageTankTemp_C(nodeWeights); -} +double HPWH::TempBasedHeatingLogic::getTankValue() { return hpwh->getAverageTankTemp_C(dist); } void HPWH::TempBasedHeatingLogic::setDecisionPoint(double value) { decisionPoint = value; } void HPWH::TempBasedHeatingLogic::setDecisionPoint(double value, bool absolute) @@ -168,31 +195,31 @@ void HPWH::TempBasedHeatingLogic::setDecisionPoint(double value, bool absolute) double HPWH::TempBasedHeatingLogic::nodeWeightAvgFract() { - double logicNode; - double calcNodes = 0, totWeight = 0; + switch (dist.distribType) + { + case DistributionType::BottomOfTank: + return 1. / (double)hpwh->getNumNodes(); + + case DistributionType::TopOfTank: + return 1.; - for (auto nodeWeight : nodeWeights) + case DistributionType::Weighted: { - // bottom calc node only - if (nodeWeight.nodeNum == 0) - { // simple equation - return 1. / (double)hpwh->getNumNodes(); - } - // top calc node only - else if (nodeWeight.nodeNum == LOGIC_SIZE + 1) + double tot_weight = 0., tot_weight_avg = 0.; + double prev_height = 0.; + for (auto distPoint : dist.weightedDist) { - return 1.; - } - else - { // have to tally up the nodes - calcNodes += nodeWeight.nodeNum * nodeWeight.weight; - totWeight += nodeWeight.weight; + double weight = distPoint.weight * (distPoint.height - prev_height); + double node_avg = 0.5 * (distPoint.height + prev_height); + tot_weight_avg += weight * node_avg; + tot_weight += weight; + prev_height = distPoint.height; } + double frac = tot_weight_avg / tot_weight / prev_height; + return frac + 0.5 / LOGIC_SIZE; } - - logicNode = calcNodes / totWeight; - - return logicNode / static_cast(LOGIC_SIZE); + } + return 0.; } double HPWH::TempBasedHeatingLogic::getFractToMeetComparisonExternal() @@ -207,35 +234,51 @@ double HPWH::TempBasedHeatingLogic::getFractToMeetComparisonExternal() double comparisonT_C = getComparisonValue() + HPWH::TOL_MINVALUE; // slightly over heat double nodeDensity = static_cast(hpwh->getNumNodes()) / LOGIC_SIZE; - for (auto nodeWeight : nodeWeights) + switch (dist.distribType) { - if (nodeWeight.nodeNum == 0) - { // bottom-most tank node only - firstNode = calcNode = 0; - double nodeT_C = hpwh->tank->nodeTs_C.front(); - sum = nodeT_C * nodeWeight.weight; - totWeight = nodeWeight.weight; - } - // top calc node only - else if (nodeWeight.nodeNum == LOGIC_SIZE + 1) - { // top-most tank node only - firstNode = calcNode = hpwh->getNumNodes() - 1; - double nodeT_C = hpwh->tank->nodeTs_C.back(); - sum = nodeT_C * nodeWeight.weight; - totWeight = nodeWeight.weight; + case DistributionType::BottomOfTank: + { + firstNode = calcNode = 0; + sum = hpwh->tank->nodeTs_C.front(); + totWeight = 1.; + break; + } + + case DistributionType::TopOfTank: + { + firstNode = calcNode = hpwh->getNumNodes() - 1; + sum = hpwh->tank->nodeTs_C.back(); + totWeight = 1.; + break; + } + + case DistributionType::Weighted: + { + for (auto& distPoint : dist.weightedDist) + { + if (distPoint.weight > 0.) + { + firstNode = 0; + calcNode = static_cast(nodeDensity) - 1; // last tank node in logic node + break; + } + else + { + double norm_dist_height = distPoint.height / dist.weightedDist.heightRange(); + firstNode = static_cast( + norm_dist_height * hpwh->getNumNodes()); // first tank node with non-zero weight + calcNode = + firstNode + static_cast(nodeDensity); // last tank node in logic node + break; + } } - else - { // logical nodes - firstNode = static_cast(nodeDensity * - (nodeWeight.nodeNum - 1)); // first tank node in logic node - calcNode = static_cast(nodeDensity * (nodeWeight.nodeNum)) - - 1; // last tank node in logical node - auto logicNode = static_cast(nodeWeight.nodeNum - 1); - double logicNodeT_C = resampledTankTemps[logicNode]; - sum += logicNodeT_C * nodeWeight.weight; - totWeight += nodeWeight.weight; + for (int i = firstNode; i <= calcNode; ++i) + { + sum += hpwh->tank->nodeTs_C[i]; + totWeight += 1.; } } + } double averageT_C = sum / totWeight; double targetT_C = (calcNode < hpwh->getNumNodes() - 1) ? hpwh->tank->nodeTs_C[calcNode + 1] @@ -325,8 +368,8 @@ HPWH::HeatingLogic::make(const hpwh_data_model::heat_source_configuration_ns::He else break; - std::vector nodeWeights = {}; - + bool checksStandby_in = false; + Distribution dist; if (temp_based_logic->standby_temperature_location_is_set) { switch (temp_based_logic->standby_temperature_location) @@ -334,15 +377,16 @@ HPWH::HeatingLogic::make(const hpwh_data_model::heat_source_configuration_ns::He case hpwh_data_model::heat_source_configuration_ns::StandbyTemperatureLocation:: TOP_OF_TANK: { - label = "top node"; - nodeWeights.emplace_back(LOGIC_SIZE + 1); + dist = {DistributionType::TopOfTank, {{}, {}}}; + label = "top of tank"; + checksStandby_in = true; break; } case hpwh_data_model::heat_source_configuration_ns::StandbyTemperatureLocation:: BOTTOM_OF_TANK: { - label = "bottom node"; - nodeWeights.emplace_back(0); + dist = {DistributionType::BottomOfTank, {{}, {}}}; + label = "bottom of tank"; break; } default: @@ -353,24 +397,22 @@ HPWH::HeatingLogic::make(const hpwh_data_model::heat_source_configuration_ns::He if (temp_based_logic->temperature_weight_distribution_is_set) { - std::vector logic_dist(HPWH::LOGIC_SIZE); - HPWH::resample(logic_dist, temp_based_logic->temperature_weight_distribution); - for (auto inode = 0; inode < HPWH::LOGIC_SIZE; ++inode) + auto& weight_dist = temp_based_logic->temperature_weight_distribution; + if (weight_dist.normalized_height_is_set && weight_dist.weight_is_set) { - if (logic_dist[inode] > 0.) - { - nodeWeights.emplace_back(inode + 1, logic_dist[inode]); - } + dist = {DistributionType::Weighted, + {weight_dist.normalized_height, weight_dist.weight}}; } } heatingLogic = std::make_shared( label, - nodeWeights, + dist, temp, hpwh, temp_based_logic->absolute_temperature_is_set, - comparison_type); + comparison_type, + checksStandby_in); break; } } @@ -446,16 +488,9 @@ void HPWH::TempBasedHeatingLogic::to( heating_logic.comparison_type); } - if (description == "standby") + switch (dist.distribType) { - checkTo( - hpwh_data_model::heat_source_configuration_ns::StandbyTemperatureLocation::TOP_OF_TANK, - logic.standby_temperature_location_is_set, - logic.standby_temperature_location); - - logic.temperature_weight_distribution_is_set = false; - } - else if (description == "top node") + case DistributionType::TopOfTank: { checkTo( hpwh_data_model::heat_source_configuration_ns::StandbyTemperatureLocation::TOP_OF_TANK, @@ -463,8 +498,9 @@ void HPWH::TempBasedHeatingLogic::to( logic.standby_temperature_location); logic.temperature_weight_distribution_is_set = false; + break; } - else if (description == "bottom node") + case DistributionType::BottomOfTank: { checkTo(hpwh_data_model::heat_source_configuration_ns::StandbyTemperatureLocation:: BOTTOM_OF_TANK, @@ -472,38 +508,26 @@ void HPWH::TempBasedHeatingLogic::to( logic.standby_temperature_location); logic.temperature_weight_distribution_is_set = false; + break; } - else + case DistributionType::Weighted: { - std::vector logicDist(LOGIC_SIZE, 0.); - for (auto& nodeWeight : nodeWeights) + std::vector heights = {}, weights = {}; + for (std::size_t i = 0; i < dist.weightedDist.size(); ++i) { - auto iNode = nodeWeight.nodeNum - 1; - if (iNode < 0) - iNode = 0; - if (iNode > LOGIC_SIZE - 1) - iNode = LOGIC_SIZE - 1; - logicDist[iNode] = nodeWeight.weight; + heights.push_back(dist.weightedDist.normHeight(i)); + weights.push_back(dist.weightedDist.unitaryWeight(i)); } - // downsample, if possible - std::vector reconstructedTempDist(LOGIC_SIZE); - for (std::size_t iSize = 1; 2 * iSize <= LOGIC_SIZE; ++iSize) - { - std::vector resampledTempDist(iSize); - resample(resampledTempDist, logicDist); - resample(reconstructedTempDist, resampledTempDist); - if (reconstructedTempDist == logicDist) - { - logicDist = resampledTempDist; - break; - } - } - checkTo(logicDist, + hpwh_data_model::heat_source_configuration_ns::WeightedDistribution wd; + checkTo(heights, wd.normalized_height_is_set, wd.normalized_height); + checkTo(weights, wd.weight_is_set, wd.weight); + checkTo(wd, logic.temperature_weight_distribution_is_set, logic.temperature_weight_distribution); + break; + } } - heating_logic.heating_logic = std::make_unique< hpwh_data_model::heat_source_configuration_ns::TemperatureBasedHeatingLogic>(logic); diff --git a/src/HPWHHeatingLogic.hh b/src/HPWHHeatingLogic.hh index 3827fe5a..81f5bed3 100644 --- a/src/HPWHHeatingLogic.hh +++ b/src/HPWHHeatingLogic.hh @@ -16,12 +16,16 @@ struct HPWH::HeatingLogic double decisionPoint_in, HPWH* hpwh_in, std::function c, - bool isHTS) + bool isHTS, + bool checkStandby_in) : description(desc) , compare(c) , decisionPoint(decisionPoint_in) , hpwh(hpwh_in) - , isEnteringWaterHighTempShutoff(isHTS) {}; + , isEnteringWaterHighTempShutoff(isHTS) + , checkStandby(checkStandby_in) + { + } virtual ~HeatingLogic() = default; @@ -46,10 +50,13 @@ struct HPWH::HeatingLogic virtual void to(hpwh_data_model::heat_source_configuration_ns::HeatingLogic& heatingLogic) const = 0; + bool checksStandby() { return checkStandby; } + protected: double decisionPoint; HPWH* hpwh; bool isEnteringWaterHighTempShutoff; + bool checkStandby = false; }; struct HPWH::SoCBasedHeatingLogic : HPWH::HeatingLogic @@ -62,8 +69,9 @@ struct HPWH::SoCBasedHeatingLogic : HPWH::HeatingLogic double tM_C = 43.333, bool constMains = false, double mains_C = 18.333, - std::function c = std::less()) - : HeatingLogic(desc, decisionPoint, hpwh, c, false) + std::function c = std::less(), + bool checkStandby = false) + : HeatingLogic(desc, decisionPoint, hpwh, c, false, checkStandby) , tempMinUseful_C(tM_C) , hysteresisFraction(hF) , useCostantMains(constMains) @@ -99,8 +107,24 @@ struct HPWH::TempBasedHeatingLogic : HPWH::HeatingLogic HPWH* hpwh, bool a = false, std::function c = std::less(), - bool isHTS = false) - : HeatingLogic(desc, decisionPoint, hpwh, c, isHTS), isAbsolute(a), nodeWeights(n) {}; + bool isHTS = false, + bool checkStandby = false); + + //: HeatingLogic(desc, decisionPoint, hpwh, c, isHTS), isAbsolute(a), nodeWeights(n) {} + + TempBasedHeatingLogic(std::string desc, + Distribution dist_in, + double decisionPoint, + HPWH* hpwh, + bool a = false, + std::function c = std::less(), + bool isHTS = false, + bool checkStandby = false) + : HeatingLogic(desc, decisionPoint, hpwh, c, isHTS, checkStandby) + , isAbsolute(a) + , dist(dist_in) + { + } bool isValid() override; @@ -116,10 +140,10 @@ struct HPWH::TempBasedHeatingLogic : HPWH::HeatingLogic to(hpwh_data_model::heat_source_configuration_ns::HeatingLogic& heatingLogic) const override; bool isAbsolute; - std::vector nodeWeights; + Distribution dist; private: - bool areNodeWeightsValid(); + bool isDistributionValid(); }; #endif diff --git a/src/HPWHTank.cc b/src/HPWHTank.cc index ff55c6a4..2d3339da 100644 --- a/src/HPWHTank.cc +++ b/src/HPWHTank.cc @@ -226,36 +226,69 @@ double HPWH::Tank::getAverageNodeT_C(const std::vector& dist) const return tankT_C; } -double HPWH::Tank::getAverageNodeT_C(const std::vector& nodeWeights) const +double HPWH::Tank::getAverageNodeT_C(const WeightedDistribution& wdist) const { + const int numNodes = hpwh->getNumNodes(); double sum = 0; double totWeight = 0; + auto distPoint = wdist.begin(); + for (int i = 0; i < numNodes; ++i) + { + double norm_node_height = static_cast(i) / numNodes; + double norm_dist_height = distPoint->height / wdist.heightRange(); - std::vector resampledTankTemps(LOGIC_SIZE); - HPWH::resample(resampledTankTemps, nodeTs_C); + double next_norm_node_height = static_cast(i + 1) / numNodes; + double nodeT_C = hpwh->tank->nodeTs_C[i]; + double norm_height = norm_node_height; + while (norm_dist_height < next_norm_node_height) + { + double weight = distPoint->weight * (norm_dist_height - norm_height); + if (weight > 0.) + { + sum += weight * nodeT_C; + totWeight += weight; + } - for (auto& nodeWeight : nodeWeights) - { - if (nodeWeight.nodeNum == 0) - { // bottom node only - sum += nodeTs_C.front() * nodeWeight.weight; - totWeight += nodeWeight.weight; - } - else if (nodeWeight.nodeNum > LOGIC_SIZE) - { // top node only - sum += nodeTs_C.back() * nodeWeight.weight; - totWeight += nodeWeight.weight; + ++distPoint; + if (distPoint == wdist.end()) + break; + + norm_height = norm_dist_height; + norm_dist_height = distPoint->height / wdist.heightRange(); } - else - { // general case; sum over all weighted nodes - sum += resampledTankTemps[static_cast(nodeWeight.nodeNum - 1)] * - nodeWeight.weight; - totWeight += nodeWeight.weight; + double weight = distPoint->weight * (next_norm_node_height - norm_height); + if (weight > 0.) + { + sum += weight * nodeT_C; + totWeight += weight; } } return sum / totWeight; } +double HPWH::Tank::getAverageNodeT_C(const Distribution& dist) const +{ + + switch (dist.distribType) + { + case DistributionType::BottomOfTank: + { + return hpwh->tank->nodeTs_C.front(); + } + + case DistributionType::TopOfTank: + { + return hpwh->tank->nodeTs_C.back(); + } + + case DistributionType::Weighted: + { + return hpwh->tank->getAverageNodeT_C(dist.weightedDist); + } + } + return 0; +} + // returns tank heat content relative to 0 C using kJ double HPWH::Tank::getHeatContent_kJ() const { @@ -742,7 +775,7 @@ void HPWH::Tank::modifyHeatDistribution(std::vector& heatDistribution_W, for (auto& heatDist_W : heatDistribution_W) heatDist_W /= totalHeat_W; - double shrinkageT_C = findShrinkageT_C(heatDistribution_W); + double shrinkageT_C = findShrinkageT_C(heatDistribution_W, getNumNodes()); int lowestNode = findLowestNode(heatDistribution_W, getNumNodes()); std::vector modHeatDistribution_W; diff --git a/src/HPWHTank.hh b/src/HPWHTank.hh index 0f25510f..dd56ec81 100644 --- a/src/HPWHTank.hh +++ b/src/HPWHTank.hh @@ -144,7 +144,9 @@ class HPWH::Tank : public Sender double getAverageNodeT_C(const std::vector& dist) const; - double getAverageNodeT_C(const std::vector& nodeWeights) const; + double getAverageNodeT_C(const WeightedDistribution& wdist) const; + + double getAverageNodeT_C(const Distribution& dist) const; double getHeatContent_kJ() const; diff --git a/src/HPWHUtils.cc b/src/HPWHUtils.cc index 11e6dfb6..cc92bab4 100644 --- a/src/HPWHUtils.cc +++ b/src/HPWHUtils.cc @@ -148,39 +148,35 @@ void HPWH::normalize(std::vector& distribution) } /*static*/ -int HPWH::findLowestNode(const std::vector& nodeDist, const int numTankNodes) +int HPWH::findLowestNode(const WeightedDistribution& wdist, const int numTankNodes) { - int lowest = 0; - const int distSize = static_cast(nodeDist.size()); - double nodeRatio = static_cast(numTankNodes) / distSize; - - for (auto j = 0; j < distSize; ++j) + for (auto j = 0; j < numTankNodes; ++j) { - if (nodeDist[j] > 0.) - { - lowest = static_cast(nodeRatio * j); - break; - } + if (wdist.normWeight(j / numTankNodes, (j + 1.) / numTankNodes) > 0.) + return j; } - return lowest; + return 0; } /*static*/ -double HPWH::findShrinkageT_C(const std::vector& nodeDist) +double HPWH::findShrinkageT_C(const WeightedDistribution& wdist, const int numNodes) { double alphaT_C = 1., betaT_C = 2.; double condentropy = 0.; - for (std::size_t iNode = 0; iNode < nodeDist.size(); ++iNode) + double fracBegin = 0.; + for (int iNode = 0; iNode < numNodes; ++iNode) { - double dist = nodeDist[iNode]; + double fracEnd = static_cast(iNode + 1) / numNodes; + double dist = wdist.normWeight(fracBegin, fracEnd); if (dist > 0.) { condentropy -= dist * log(dist); } + fracBegin = fracEnd; } // condentropy shifts as ln(# of condensity nodes) - double size_factor = static_cast(nodeDist.size()) / HPWH::HeatSource::CONDENSITY_SIZE; + double size_factor = static_cast(numNodes) / HPWH::HeatSource::CONDENSITY_SIZE; double standard_condentropy = condentropy - log(size_factor); return alphaT_C + standard_condentropy * betaT_C; @@ -583,7 +579,14 @@ void HPWH::to_json(const hpwh_data_model::rsintegratedwaterheater_ns::RSINTEGRAT { nlohmann::json j_heat_source_config; j_heat_source_config["id"] = heat_source_config.id; - j_heat_source_config["heat_distribution"] = heat_source_config.heat_distribution; + + nlohmann::json heights = heat_source_config.heat_distribution.normalized_height; + nlohmann::json weights = heat_source_config.heat_distribution.weight; + nlohmann::json j_weight_dist; + j_weight_dist["normalized_height"] = heights; + j_weight_dist["weight"] = weights; + + j_heat_source_config["heat_distribution"] = j_weight_dist; auto& heat_source = heat_source_config.heat_source; nlohmann::json j_heat_source; @@ -685,7 +688,14 @@ void HPWH::to_json( { nlohmann::json j_heat_source_config; j_heat_source_config["id"] = heat_source_config.id; - j_heat_source_config["heat_distribution"] = heat_source_config.heat_distribution; + + nlohmann::json heights = heat_source_config.heat_distribution.normalized_height; + nlohmann::json weights = heat_source_config.heat_distribution.weight; + nlohmann::json j_weight_dist; + j_weight_dist["normalized_height"] = heights; + j_weight_dist["weight"] = weights; + + j_heat_source_config["heat_distribution"] = j_weight_dist; auto& heat_source = heat_source_config.heat_source; nlohmann::json j_heat_source; @@ -966,7 +976,13 @@ void HPWH::to_json( } if (tempLogic.temperature_weight_distribution_is_set) { - j["temperature_weight_distribution"] = tempLogic.temperature_weight_distribution; + nlohmann::json heights = tempLogic.temperature_weight_distribution.normalized_height; + nlohmann::json weights = tempLogic.temperature_weight_distribution.weight; + nlohmann::json j_weight_dist; + j_weight_dist["normalized_height"] = heights; + j_weight_dist["weight"] = weights; + + j["temperature_weight_distribution"] = j_weight_dist; } if (tempLogic.standby_temperature_location_is_set) diff --git a/src/HPWHpresets.cc b/src/HPWHpresets.cc index d1aa5e84..aeba7723 100644 --- a/src/HPWHpresets.cc +++ b/src/HPWHpresets.cc @@ -4455,41 +4455,41 @@ void HPWH::initPreset(MODELS presetNum) compressor->perfMap.reserve(3); - double dPin_dT = 2.1; - double dcop_dT = -0.01; + double dPin_dTs = 2.1; + double dcop_dTs = -0.01; double Ts_op = 124.; double Pin50_op = 355.8; double cop50_op = 3.13; - double Pin50_0 = Pin50_op - dPin_dT * (Ts_op); - double cop50_0 = cop50_op - dcop_dT * (Ts_op); + double Pin50_0 = Pin50_op - dPin_dTs * (Ts_op - 0.); + double cop50_0 = cop50_op - dcop_dTs * (Ts_op - 0.); double Pin67_op = 272; double cop67_op = 4.25; - double Pin67_0 = Pin67_op - dPin_dT * (Ts_op); - double cop67_0 = cop67_op - dcop_dT * (Ts_op); + double Pin67_0 = Pin67_op - dPin_dTs * (Ts_op - 0.); + double cop67_0 = cop67_op - dcop_dTs * (Ts_op - 0.); double Pin95_op = 260.5; double cop95_op = 6.56; - double Pin95_0 = Pin95_op - dPin_dT * (Ts_op); - double cop95_0 = cop95_op - dcop_dT * (Ts_op); + double Pin95_0 = Pin95_op - dPin_dTs * (Ts_op - 0.); + double cop95_0 = cop95_op - dcop_dTs * (Ts_op - 0.); compressor->perfMap.push_back({ - 50, // Temperature (F) - {Pin50_0, dPin_dT, 0.}, // Input Power Coefficients (W) - {cop50_0, dcop_dT, 0.} // COP Coefficients + 50, // Temperature (F) + {Pin50_0, dPin_dTs, 0.}, // Input Power Coefficients (W) + {cop50_0, dcop_dTs, 0.} // COP Coefficients }); compressor->perfMap.push_back({ - 67.5, // Temperature (F) - {Pin67_0, dPin_dT, 0.}, // Input Power Coefficients (W) - {cop67_0, dcop_dT, 0.} // COP Coefficients + 67.5, // Temperature (F) + {Pin67_0, dPin_dTs, 0.}, // Input Power Coefficients (W) + {cop67_0, dcop_dTs, 0.} // COP Coefficients }); compressor->perfMap.push_back({ - 95, // Temperature (F) - {Pin95_0, dPin_dT, 0.}, // Input Power Coefficients (W) - {cop95_0, dcop_dT, 0.} // COP Coefficients + 95, // Temperature (F) + {Pin95_0, dPin_dTs, 0.}, // Input Power Coefficients (W) + {cop95_0, dcop_dTs, 0.} // COP Coefficients }); compressor->minT = F_TO_C(23); diff --git a/src/Resistance.cc b/src/Resistance.cc index 00dc3cc8..0c2b6888 100644 --- a/src/Resistance.cc +++ b/src/Resistance.cc @@ -56,8 +56,16 @@ void HPWH::Resistance::setup(int node, double Watts, int condensitySize /* = CON { isOn = false; isVIP = false; - condensity = std::vector(condensitySize, 0.); - condensity[node] = 1; + + double dnode = 1. / condensitySize; + double beginFrac = dnode * node; + double endFrac = dnode * (node + 1.); + heatDist = {}; + if (beginFrac > 0.) + heatDist.push_back({beginFrac, 0.}); + heatDist.push_back({endFrac, 1.}); + if (endFrac < 1.) + heatDist.push_back({1., 0.}); power_kW = Watts / 1000.; } diff --git a/test/models_json/AOSmithCAHP120.json b/test/models_json/AOSmithCAHP120.json index eba87ebf..609b8577 100644 --- a/test/models_json/AOSmithCAHP120.json +++ b/test/models_json/AOSmithCAHP120.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "resistiveElementBottom", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5833333333333333, + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 320.3722222222222, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -56,11 +58,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 12.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -70,20 +77,18 @@ "backup_heat_source_id": "compressor", "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 1.0 + ], + "weight": [ + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -99,14 +104,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 315.92777777777775, - "temperature_weight_distribution": [ - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.16666666666666666, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -116,11 +125,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 12.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -128,20 +142,20 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.3, - 0.3, - 0.2, - 0.1, - 0.1, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.16666666666666666, + 0.25, + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.6666666666666667, + 0.33333333333333337, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -675,14 +689,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.9166666666666665, - "temperature_weight_distribution": [ - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.16666666666666666, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AOSmithHPTS40.json b/test/models_json/AOSmithHPTS40.json index 86c9b2e8..d5ee74f5 100644 --- a/test/models_json/AOSmithHPTS40.json +++ b/test/models_json/AOSmithHPTS40.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,11 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 6.594444444444444, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -52,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -79,20 +78,18 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -153,11 +150,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.77777777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AOSmithHPTS50.json b/test/models_json/AOSmithHPTS50.json index 1cfbd60d..9d99c0ca 100644 --- a/test/models_json/AOSmithHPTS50.json +++ b/test/models_json/AOSmithHPTS50.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,11 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 6.594444444444444, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -52,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -79,20 +78,18 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -153,11 +150,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.77777777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AOSmithHPTS66.json b/test/models_json/AOSmithHPTS66.json index d9d869d3..22133f71 100644 --- a/test/models_json/AOSmithHPTS66.json +++ b/test/models_json/AOSmithHPTS66.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,11 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 6.594444444444444, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -52,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -79,20 +78,18 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -153,11 +150,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.77777777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AOSmithHPTS80.json b/test/models_json/AOSmithHPTS80.json index 5dd6527b..d6070f41 100644 --- a/test/models_json/AOSmithHPTS80.json +++ b/test/models_json/AOSmithHPTS80.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,11 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 6.594444444444444, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -52,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -79,20 +78,18 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -153,11 +150,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.77777777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AOSmithHPTU50.json b/test/models_json/AOSmithHPTU50.json index dc0b3957..d31b2f04 100644 --- a/test/models_json/AOSmithHPTU50.json +++ b/test/models_json/AOSmithHPTU50.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 313.7055555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,20 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -179,11 +167,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 19.444444444444443, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AOSmithHPTU66.json b/test/models_json/AOSmithHPTU66.json index 2b7a3629..88628925 100644 --- a/test/models_json/AOSmithHPTU66.json +++ b/test/models_json/AOSmithHPTU66.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 313.7055555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,11 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -170,11 +167,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 19.444444444444443, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AOSmithHPTU80.json b/test/models_json/AOSmithHPTU80.json index c2af6275..7d6cc324 100644 --- a/test/models_json/AOSmithHPTU80.json +++ b/test/models_json/AOSmithHPTU80.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 313.7055555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,12 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -171,11 +167,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 19.444444444444443, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AOSmithHPTU80_DR.json b/test/models_json/AOSmithHPTU80_DR.json index 5c0afaa6..75129cdb 100644 --- a/test/models_json/AOSmithHPTU80_DR.json +++ b/test/models_json/AOSmithHPTU80_DR.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,11 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 303.7055555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -51,20 +54,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -80,20 +79,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 299.87666666666667, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -101,11 +96,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -161,11 +161,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 18.97977777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AOSmithPHPT60.json b/test/models_json/AOSmithPHPT60.json index cf8d6833..cf13f70c 100644 --- a/test/models_json/AOSmithPHPT60.json +++ b/test/models_json/AOSmithPHPT60.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,11 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 13.88888888888889, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -51,20 +54,16 @@ { "backup_heat_source_id": "resistiveElementBottom", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -174,11 +173,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 24.22222222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, @@ -194,20 +198,16 @@ }, { "backup_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -223,11 +223,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 24.22222222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/AOSmithPHPT80.json b/test/models_json/AOSmithPHPT80.json index 5731d9bb..432764c0 100644 --- a/test/models_json/AOSmithPHPT80.json +++ b/test/models_json/AOSmithPHPT80.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,11 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 13.88888888888889, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -51,20 +54,16 @@ { "backup_heat_source_id": "resistiveElementBottom", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -174,11 +173,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 24.22222222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, @@ -194,20 +198,16 @@ }, { "backup_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -223,11 +223,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 24.22222222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/AWHSTier3Generic40.json b/test/models_json/AWHSTier3Generic40.json index 94e1a00d..6a3a51d9 100644 --- a/test/models_json/AWHSTier3Generic40.json +++ b/test/models_json/AWHSTier3Generic40.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -48,11 +46,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.11111111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -61,20 +64,20 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.25, + 1.0 + ], + "weight": [ + 0.0, + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -90,20 +93,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 299.81666666666666, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -113,14 +112,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 33.333333333333336, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -128,11 +131,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -188,11 +196,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 18.715722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AWHSTier3Generic50.json b/test/models_json/AWHSTier3Generic50.json index 2e528a3b..b236c031 100644 --- a/test/models_json/AWHSTier3Generic50.json +++ b/test/models_json/AWHSTier3Generic50.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -48,11 +46,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.11111111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -61,20 +64,20 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.25, + 1.0 + ], + "weight": [ + 0.0, + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -90,20 +93,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 299.81666666666666, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -113,14 +112,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 33.333333333333336, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -128,11 +131,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -188,11 +196,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 18.715722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AWHSTier3Generic65.json b/test/models_json/AWHSTier3Generic65.json index ee7f97ae..6767fb5b 100644 --- a/test/models_json/AWHSTier3Generic65.json +++ b/test/models_json/AWHSTier3Generic65.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -48,11 +46,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.11111111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -61,20 +64,20 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.25, + 1.0 + ], + "weight": [ + 0.0, + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -90,20 +93,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 299.81666666666666, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -113,14 +112,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 33.333333333333336, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -128,11 +131,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -188,11 +196,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 18.715722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AWHSTier3Generic80.json b/test/models_json/AWHSTier3Generic80.json index b5dc3e65..71a9b272 100644 --- a/test/models_json/AWHSTier3Generic80.json +++ b/test/models_json/AWHSTier3Generic80.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -48,11 +46,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.11111111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -61,20 +64,20 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.25, + 1.0 + ], + "weight": [ + 0.0, + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -90,20 +93,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 299.81666666666666, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -113,14 +112,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 33.333333333333336, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -128,11 +131,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -188,11 +196,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 18.715722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AWHSTier4Generic40.json b/test/models_json/AWHSTier4Generic40.json index 24dce9e3..103fc2df 100644 --- a/test/models_json/AWHSTier4Generic40.json +++ b/test/models_json/AWHSTier4Generic40.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,11 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 6.666666666666666, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -52,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -81,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 299.81666666666666, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -104,14 +99,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 33.333333333333336, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -119,20 +118,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -188,11 +183,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.666666666666668, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AWHSTier4Generic50.json b/test/models_json/AWHSTier4Generic50.json index f2163a72..8fef8a3b 100644 --- a/test/models_json/AWHSTier4Generic50.json +++ b/test/models_json/AWHSTier4Generic50.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,11 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 6.666666666666666, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -52,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -81,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 299.81666666666666, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -104,14 +99,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 33.333333333333336, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -119,20 +118,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -188,11 +183,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.666666666666668, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AWHSTier4Generic65.json b/test/models_json/AWHSTier4Generic65.json index f627c4d3..99748d68 100644 --- a/test/models_json/AWHSTier4Generic65.json +++ b/test/models_json/AWHSTier4Generic65.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,11 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 6.666666666666666, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -52,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -81,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 299.81666666666666, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -104,14 +99,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 33.333333333333336, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -119,20 +118,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -188,11 +183,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.666666666666668, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AWHSTier4Generic80.json b/test/models_json/AWHSTier4Generic80.json index b342181e..104c89ac 100644 --- a/test/models_json/AWHSTier4Generic80.json +++ b/test/models_json/AWHSTier4Generic80.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,11 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 6.666666666666666, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -52,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -81,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 299.81666666666666, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -104,14 +99,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 33.333333333333336, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -119,20 +118,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -188,11 +183,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.666666666666668, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/AquaThermAire.json b/test/models_json/AquaThermAire.json index 9497d3e5..0873fcc2 100644 --- a/test/models_json/AquaThermAire.json +++ b/test/models_json/AquaThermAire.json @@ -8,9 +8,14 @@ "performance": { "heat_source_configurations": [ { - "heat_distribution": [ - 1.0 - ], + "heat_distribution": { + "normalized_height": [ + 1.0 + ], + "weight": [ + 1.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -76,9 +81,14 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 317.0388888888889, - "temperature_weight_distribution": [ - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 1.0 + ], + "weight": [ + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/BWC2020_65.json b/test/models_json/BWC2020_65.json index 3918a525..d6ffaa27 100644 --- a/test/models_json/BWC2020_65.json +++ b/test/models_json/BWC2020_65.json @@ -8,20 +8,18 @@ "performance": { "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -47,11 +45,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.11111111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -59,20 +62,20 @@ }, { "backup_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.25, + 1.0 + ], + "weight": [ + 0.0, + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -88,20 +91,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 299.81666666666666, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -111,14 +110,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 33.333333333333336, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -126,11 +129,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -186,11 +194,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 18.715722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/BradfordWhiteAeroThermRE2H50.json b/test/models_json/BradfordWhiteAeroThermRE2H50.json index d2785f98..873db0e7 100644 --- a/test/models_json/BradfordWhiteAeroThermRE2H50.json +++ b/test/models_json/BradfordWhiteAeroThermRE2H50.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,14 +36,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 17.77777777777778, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.5, + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -54,20 +56,20 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.25, + 1.0 + ], + "weight": [ + 0.0, + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -83,20 +85,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 303.2055555555555, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -104,11 +102,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -164,11 +167,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 13.88888888888889, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/BradfordWhiteAeroThermRE2H65.json b/test/models_json/BradfordWhiteAeroThermRE2H65.json index 41500b14..85d260c7 100644 --- a/test/models_json/BradfordWhiteAeroThermRE2H65.json +++ b/test/models_json/BradfordWhiteAeroThermRE2H65.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,14 +36,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 17.77777777777778, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.5, + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -54,20 +56,20 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.25, + 1.0 + ], + "weight": [ + 0.0, + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -83,20 +85,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 303.2055555555555, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -104,11 +102,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -164,11 +167,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 13.88888888888889, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/BradfordWhiteAeroThermRE2H80.json b/test/models_json/BradfordWhiteAeroThermRE2H80.json index e853760d..4f2c90b8 100644 --- a/test/models_json/BradfordWhiteAeroThermRE2H80.json +++ b/test/models_json/BradfordWhiteAeroThermRE2H80.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,14 +36,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 17.77777777777778, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.5, + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -54,20 +56,20 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.25, + 1.0 + ], + "weight": [ + 0.0, + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -83,20 +85,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 303.2055555555555, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -104,11 +102,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -164,11 +167,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 13.88888888888889, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/ColmacCxA_10_MP.json b/test/models_json/ColmacCxA_10_MP.json index 2cec476d..864dd8d6 100644 --- a/test/models_json/ColmacCxA_10_MP.json +++ b/test/models_json/ColmacCxA_10_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -2114,20 +2112,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -2137,20 +2133,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/ColmacCxA_10_SP.json b/test/models_json/ColmacCxA_10_SP.json index 441f8003..e304bd52 100644 --- a/test/models_json/ColmacCxA_10_SP.json +++ b/test/models_json/ColmacCxA_10_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4116,20 +4112,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4139,20 +4131,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/ColmacCxA_15_MP.json b/test/models_json/ColmacCxA_15_MP.json index 2b91190b..7b88e9ba 100644 --- a/test/models_json/ColmacCxA_15_MP.json +++ b/test/models_json/ColmacCxA_15_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -2114,20 +2112,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -2137,20 +2133,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/ColmacCxA_15_SP.json b/test/models_json/ColmacCxA_15_SP.json index 9ecd776b..ffb55b74 100644 --- a/test/models_json/ColmacCxA_15_SP.json +++ b/test/models_json/ColmacCxA_15_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4116,20 +4112,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4139,20 +4131,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/ColmacCxA_20_MP.json b/test/models_json/ColmacCxA_20_MP.json index 69c02087..5bb152b0 100644 --- a/test/models_json/ColmacCxA_20_MP.json +++ b/test/models_json/ColmacCxA_20_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -2114,20 +2112,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -2137,20 +2133,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/ColmacCxA_20_SP.json b/test/models_json/ColmacCxA_20_SP.json index 705c2637..a4ab9cbc 100644 --- a/test/models_json/ColmacCxA_20_SP.json +++ b/test/models_json/ColmacCxA_20_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4116,20 +4112,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4139,20 +4131,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/ColmacCxA_25_MP.json b/test/models_json/ColmacCxA_25_MP.json index 3e9708d5..c5732d84 100644 --- a/test/models_json/ColmacCxA_25_MP.json +++ b/test/models_json/ColmacCxA_25_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -2114,20 +2112,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -2137,20 +2133,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/ColmacCxA_25_SP.json b/test/models_json/ColmacCxA_25_SP.json index 21cc373c..f5c1f1b5 100644 --- a/test/models_json/ColmacCxA_25_SP.json +++ b/test/models_json/ColmacCxA_25_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4116,20 +4112,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4139,20 +4131,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/ColmacCxA_30_MP.json b/test/models_json/ColmacCxA_30_MP.json index d9f0a839..505269de 100644 --- a/test/models_json/ColmacCxA_30_MP.json +++ b/test/models_json/ColmacCxA_30_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -2114,20 +2112,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -2137,20 +2133,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/ColmacCxA_30_SP.json b/test/models_json/ColmacCxA_30_SP.json index d964f6c0..c29f7909 100644 --- a/test/models_json/ColmacCxA_30_SP.json +++ b/test/models_json/ColmacCxA_30_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4116,20 +4112,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4139,20 +4131,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/ColmacCxV_5_MP.json b/test/models_json/ColmacCxV_5_MP.json index 7d245e9a..5ee7e80f 100644 --- a/test/models_json/ColmacCxV_5_MP.json +++ b/test/models_json/ColmacCxV_5_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -2351,20 +2349,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -2374,20 +2370,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/ColmacCxV_5_SP.json b/test/models_json/ColmacCxV_5_SP.json index 8ed832bc..78a48e95 100644 --- a/test/models_json/ColmacCxV_5_SP.json +++ b/test/models_json/ColmacCxV_5_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -2354,20 +2350,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -2377,20 +2369,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/GE.json b/test/models_json/GE.json index e712e3c3..0b7b8acd 100644 --- a/test/models_json/GE.json +++ b/test/models_json/GE.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,11 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 15.555555555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -51,20 +54,16 @@ { "backup_heat_source_id": "resistiveElementBottom", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -120,12 +119,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 291.4833333333333, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -135,11 +138,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 22.22222222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, @@ -155,20 +163,16 @@ }, { "backup_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -184,11 +188,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 22.22222222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/GE2014STDMode.json b/test/models_json/GE2014STDMode.json index 8b2f97bc..06bed58a 100644 --- a/test/models_json/GE2014STDMode.json +++ b/test/models_json/GE2014STDMode.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,11 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 10.9225, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -51,20 +54,20 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.25, + 1.0 + ], + "weight": [ + 0.0, + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -80,20 +83,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 303.2117222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -101,11 +100,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -161,11 +165,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 18.715722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/GE2014STDMode_80.json b/test/models_json/GE2014STDMode_80.json index ae21f491..973c055c 100644 --- a/test/models_json/GE2014STDMode_80.json +++ b/test/models_json/GE2014STDMode_80.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,11 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 10.9225, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -51,20 +54,20 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.25, + 1.0 + ], + "weight": [ + 0.0, + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -80,20 +83,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 303.2117222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -101,11 +100,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -161,11 +165,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 18.715722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/GE502014.json b/test/models_json/GE502014.json index 676f6edb..87f19d7b 100644 --- a/test/models_json/GE502014.json +++ b/test/models_json/GE502014.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -48,11 +46,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.11111111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -61,20 +64,20 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.25, + 1.0 + ], + "weight": [ + 0.0, + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -90,20 +93,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 299.81666666666666, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -113,14 +112,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 33.333333333333336, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -128,11 +131,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -188,11 +196,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 18.715722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/GE802014.json b/test/models_json/GE802014.json index 7144e0e5..99821660 100644 --- a/test/models_json/GE802014.json +++ b/test/models_json/GE802014.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,11 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 303.7055555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -51,20 +54,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -80,14 +79,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 33.333333333333336, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -95,11 +98,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -155,11 +163,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 18.715722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Generic1.json b/test/models_json/Generic1.json index 2e15049b..24f9b6ea 100644 --- a/test/models_json/Generic1.json +++ b/test/models_json/Generic1.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,11 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 19.444444444444443, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -51,20 +54,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -80,20 +79,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 316.4833333333333, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -103,11 +98,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 44.44444444444444, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -115,11 +115,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -175,12 +180,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 291.4833333333333, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -190,11 +199,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 22.22222222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Generic2.json b/test/models_json/Generic2.json index 1bf40328..8a2cea64 100644 --- a/test/models_json/Generic2.json +++ b/test/models_json/Generic2.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,11 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 22.22222222222222, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -51,20 +54,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -80,20 +79,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -103,11 +98,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 44.44444444444444, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -115,11 +115,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -175,12 +180,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 288.7055555555555, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -190,11 +199,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 22.22222222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Generic3.json b/test/models_json/Generic3.json index d32de8ef..2f6973ae 100644 --- a/test/models_json/Generic3.json +++ b/test/models_json/Generic3.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,11 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 22.22222222222222, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -51,20 +54,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -80,11 +79,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 33.333333333333336, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -92,11 +96,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -152,12 +161,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 285.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -167,11 +180,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 22.22222222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/GenericUEF217.json b/test/models_json/GenericUEF217.json index 37cb0c1f..c9681769 100644 --- a/test/models_json/GenericUEF217.json +++ b/test/models_json/GenericUEF217.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,11 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 10.555555555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -51,20 +54,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -80,20 +79,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 302.59444444444443, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -103,14 +98,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 15.555555555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -118,11 +117,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -178,11 +182,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.666666666666668, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/LG_APHWC50.json b/test/models_json/LG_APHWC50.json index 243eec3e..792ff5db 100644 --- a/test/models_json/LG_APHWC50.json +++ b/test/models_json/LG_APHWC50.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,11 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 21.666666666666668, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -52,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -79,20 +78,18 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.17, - 0.166, - 0.166, - 0.166, - 0.166, - 0.166, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 1.0, + 0.9764705882352941, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -153,11 +150,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 29.388888888888886, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/LG_APHWC80.json b/test/models_json/LG_APHWC80.json index 59b483f9..37553ac6 100644 --- a/test/models_json/LG_APHWC80.json +++ b/test/models_json/LG_APHWC80.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,11 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 21.666666666666668, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -52,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -79,20 +78,18 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.17, - 0.166, - 0.166, - 0.166, - 0.166, - 0.166, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 1.0, + 0.9764705882352941, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -153,11 +150,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 29.388888888888886, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/NyleC125A_C_MP.json b/test/models_json/NyleC125A_C_MP.json index fea33d29..431931d6 100644 --- a/test/models_json/NyleC125A_C_MP.json +++ b/test/models_json/NyleC125A_C_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -110,20 +108,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -133,20 +129,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC125A_C_SP.json b/test/models_json/NyleC125A_C_SP.json index 8a63da78..33ddd5a5 100644 --- a/test/models_json/NyleC125A_C_SP.json +++ b/test/models_json/NyleC125A_C_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -7230,20 +7226,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -7253,20 +7245,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC125A_MP.json b/test/models_json/NyleC125A_MP.json index 405a55da..926f46bc 100644 --- a/test/models_json/NyleC125A_MP.json +++ b/test/models_json/NyleC125A_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -110,20 +108,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -133,20 +129,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC125A_SP.json b/test/models_json/NyleC125A_SP.json index 382d2c7e..6bbc5067 100644 --- a/test/models_json/NyleC125A_SP.json +++ b/test/models_json/NyleC125A_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4116,20 +4112,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4139,20 +4131,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC185A_C_MP.json b/test/models_json/NyleC185A_C_MP.json index 7d515ccd..17ab7da1 100644 --- a/test/models_json/NyleC185A_C_MP.json +++ b/test/models_json/NyleC185A_C_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -110,20 +108,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -133,20 +129,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC185A_C_SP.json b/test/models_json/NyleC185A_C_SP.json index 5007db38..68865a2d 100644 --- a/test/models_json/NyleC185A_C_SP.json +++ b/test/models_json/NyleC185A_C_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -7230,20 +7226,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -7253,20 +7245,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC185A_MP.json b/test/models_json/NyleC185A_MP.json index 5ee63f3c..59553926 100644 --- a/test/models_json/NyleC185A_MP.json +++ b/test/models_json/NyleC185A_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -110,20 +108,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -133,20 +129,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC185A_SP.json b/test/models_json/NyleC185A_SP.json index 10be662a..493043fa 100644 --- a/test/models_json/NyleC185A_SP.json +++ b/test/models_json/NyleC185A_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4116,20 +4112,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4139,20 +4131,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC250A_C_MP.json b/test/models_json/NyleC250A_C_MP.json index d457341f..02b9569a 100644 --- a/test/models_json/NyleC250A_C_MP.json +++ b/test/models_json/NyleC250A_C_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -110,20 +108,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -133,20 +129,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC250A_C_SP.json b/test/models_json/NyleC250A_C_SP.json index 4ee9547b..6210c7e2 100644 --- a/test/models_json/NyleC250A_C_SP.json +++ b/test/models_json/NyleC250A_C_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -7230,20 +7226,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -7253,20 +7245,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC250A_MP.json b/test/models_json/NyleC250A_MP.json index ebaeb3cb..4858c2e6 100644 --- a/test/models_json/NyleC250A_MP.json +++ b/test/models_json/NyleC250A_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -110,20 +108,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -133,20 +129,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC250A_SP.json b/test/models_json/NyleC250A_SP.json index 75f9346c..4a9d3376 100644 --- a/test/models_json/NyleC250A_SP.json +++ b/test/models_json/NyleC250A_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4116,20 +4112,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4139,20 +4131,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC25A_SP.json b/test/models_json/NyleC25A_SP.json index 12f0a474..e0e8ca5e 100644 --- a/test/models_json/NyleC25A_SP.json +++ b/test/models_json/NyleC25A_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4116,20 +4112,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4139,20 +4131,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC60A_C_MP.json b/test/models_json/NyleC60A_C_MP.json index 718bc0f8..fa76d7eb 100644 --- a/test/models_json/NyleC60A_C_MP.json +++ b/test/models_json/NyleC60A_C_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -110,20 +108,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -133,20 +129,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC60A_C_SP.json b/test/models_json/NyleC60A_C_SP.json index 29c5021d..fbc1f5d5 100644 --- a/test/models_json/NyleC60A_C_SP.json +++ b/test/models_json/NyleC60A_C_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -7230,20 +7226,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -7253,20 +7245,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC60A_MP.json b/test/models_json/NyleC60A_MP.json index 32d9c56c..e08ead49 100644 --- a/test/models_json/NyleC60A_MP.json +++ b/test/models_json/NyleC60A_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -110,20 +108,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -133,20 +129,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC60A_SP.json b/test/models_json/NyleC60A_SP.json index 8f7109bb..f4012210 100644 --- a/test/models_json/NyleC60A_SP.json +++ b/test/models_json/NyleC60A_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4116,20 +4112,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4139,20 +4131,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC90A_C_MP.json b/test/models_json/NyleC90A_C_MP.json index 052426b9..5faaff65 100644 --- a/test/models_json/NyleC90A_C_MP.json +++ b/test/models_json/NyleC90A_C_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -110,20 +108,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -133,20 +129,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC90A_C_SP.json b/test/models_json/NyleC90A_C_SP.json index 7a1bf086..a856b477 100644 --- a/test/models_json/NyleC90A_C_SP.json +++ b/test/models_json/NyleC90A_C_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -7230,20 +7226,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -7253,20 +7245,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC90A_MP.json b/test/models_json/NyleC90A_MP.json index 81e08511..536dbfbf 100644 --- a/test/models_json/NyleC90A_MP.json +++ b/test/models_json/NyleC90A_MP.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -110,20 +108,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -133,20 +129,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/NyleC90A_SP.json b/test/models_json/NyleC90A_SP.json index 8d5be24e..6abc9fe4 100644 --- a/test/models_json/NyleC90A_SP.json +++ b/test/models_json/NyleC90A_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4116,20 +4112,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4139,20 +4131,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/QAHV_N136TAU_HPB_SP.json b/test/models_json/QAHV_N136TAU_HPB_SP.json index fdbac48c..65ebd1da 100644 --- a/test/models_json/QAHV_N136TAU_HPB_SP.json +++ b/test/models_json/QAHV_N136TAU_HPB_SP.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -1121,20 +1117,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -1144,20 +1136,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 316.4833333333333, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/Rheem2020Build40.json b/test/models_json/Rheem2020Build40.json index 37f51d75..7a8ad772 100644 --- a/test/models_json/Rheem2020Build40.json +++ b/test/models_json/Rheem2020Build40.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.34261111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,20 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -219,11 +207,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.666666666666668, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Rheem2020Build50.json b/test/models_json/Rheem2020Build50.json index 0da265f2..e8cb0719 100644 --- a/test/models_json/Rheem2020Build50.json +++ b/test/models_json/Rheem2020Build50.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.34261111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,20 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -219,11 +207,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.666666666666668, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Rheem2020Build65.json b/test/models_json/Rheem2020Build65.json index a4670ac0..427700f4 100644 --- a/test/models_json/Rheem2020Build65.json +++ b/test/models_json/Rheem2020Build65.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.34261111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,20 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -219,11 +207,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.666666666666668, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Rheem2020Build80.json b/test/models_json/Rheem2020Build80.json index eeacbbc1..2740b5f9 100644 --- a/test/models_json/Rheem2020Build80.json +++ b/test/models_json/Rheem2020Build80.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.34261111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,20 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -219,11 +207,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.666666666666668, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Rheem2020Prem40.json b/test/models_json/Rheem2020Prem40.json index ef9cc2fe..c0f849d1 100644 --- a/test/models_json/Rheem2020Prem40.json +++ b/test/models_json/Rheem2020Prem40.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.34261111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,20 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -228,11 +216,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 17.77777777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Rheem2020Prem50.json b/test/models_json/Rheem2020Prem50.json index 9af4a573..2670f12e 100644 --- a/test/models_json/Rheem2020Prem50.json +++ b/test/models_json/Rheem2020Prem50.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.34261111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,20 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -228,11 +216,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 17.77777777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Rheem2020Prem65.json b/test/models_json/Rheem2020Prem65.json index d10282d7..923858ce 100644 --- a/test/models_json/Rheem2020Prem65.json +++ b/test/models_json/Rheem2020Prem65.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.34261111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,20 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -228,11 +216,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 17.77777777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Rheem2020Prem80.json b/test/models_json/Rheem2020Prem80.json index 7b401ea3..859239a3 100644 --- a/test/models_json/Rheem2020Prem80.json +++ b/test/models_json/Rheem2020Prem80.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.34261111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,20 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -228,11 +216,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 17.77777777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemHB50.json b/test/models_json/RheemHB50.json index 2e1169fb..bb1c6823 100644 --- a/test/models_json/RheemHB50.json +++ b/test/models_json/RheemHB50.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,14 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.34261111111111, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -54,20 +54,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -83,20 +79,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 298.02483333333333, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -104,11 +96,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -164,11 +161,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 21.11111111111111, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemHBDR2250.json b/test/models_json/RheemHBDR2250.json index 56893e36..46962a4f 100644 --- a/test/models_json/RheemHBDR2250.json +++ b/test/models_json/RheemHBDR2250.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 313.7055555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,20 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -179,11 +167,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 19.444444444444443, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemHBDR2265.json b/test/models_json/RheemHBDR2265.json index 0b1ec585..78f4d1ea 100644 --- a/test/models_json/RheemHBDR2265.json +++ b/test/models_json/RheemHBDR2265.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 313.7055555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,11 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -170,11 +167,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 19.444444444444443, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemHBDR2280.json b/test/models_json/RheemHBDR2280.json index 198dc9fc..ff07bea8 100644 --- a/test/models_json/RheemHBDR2280.json +++ b/test/models_json/RheemHBDR2280.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 313.7055555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,12 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -171,11 +167,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 19.444444444444443, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemHBDR4550.json b/test/models_json/RheemHBDR4550.json index dc0b3957..d31b2f04 100644 --- a/test/models_json/RheemHBDR4550.json +++ b/test/models_json/RheemHBDR4550.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 313.7055555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,20 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -179,11 +167,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 19.444444444444443, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemHBDR4565.json b/test/models_json/RheemHBDR4565.json index 858dcf32..10354445 100644 --- a/test/models_json/RheemHBDR4565.json +++ b/test/models_json/RheemHBDR4565.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 313.7055555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,11 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -170,11 +167,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 19.444444444444443, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemHBDR4580.json b/test/models_json/RheemHBDR4580.json index c2af6275..7d6cc324 100644 --- a/test/models_json/RheemHBDR4580.json +++ b/test/models_json/RheemHBDR4580.json @@ -10,20 +10,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 0.75, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -39,14 +37,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 313.7055555555555, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.8333333333333334, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -55,20 +55,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -84,20 +80,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -105,12 +97,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -171,11 +167,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 19.444444444444443, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemHPHD135.json b/test/models_json/RheemHPHD135.json index 77edade1..37610a3c 100644 --- a/test/models_json/RheemHPHD135.json +++ b/test/models_json/RheemHPHD135.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -1664,20 +1662,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -1687,20 +1683,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/RheemHPHD60.json b/test/models_json/RheemHPHD60.json index b84b5f80..f40dae86 100644 --- a/test/models_json/RheemHPHD60.json +++ b/test/models_json/RheemHPHD60.json @@ -4,20 +4,18 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -1664,20 +1662,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -1687,20 +1683,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/RheemPlugInDedicated40.json b/test/models_json/RheemPlugInDedicated40.json index e5f12274..bbbf8b8a 100644 --- a/test/models_json/RheemPlugInDedicated40.json +++ b/test/models_json/RheemPlugInDedicated40.json @@ -8,11 +8,16 @@ "performance": { "heat_source_configurations": [ { - "heat_distribution": [ - 0.5, - 0.5, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -68,11 +73,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.11111111111111, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemPlugInDedicated50.json b/test/models_json/RheemPlugInDedicated50.json index 8e133326..6e7986c0 100644 --- a/test/models_json/RheemPlugInDedicated50.json +++ b/test/models_json/RheemPlugInDedicated50.json @@ -8,11 +8,16 @@ "performance": { "heat_source_configurations": [ { - "heat_distribution": [ - 0.5, - 0.5, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -68,11 +73,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 11.11111111111111, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemPlugInShared40.json b/test/models_json/RheemPlugInShared40.json index fdf320b0..e9efb299 100644 --- a/test/models_json/RheemPlugInShared40.json +++ b/test/models_json/RheemPlugInShared40.json @@ -8,20 +8,16 @@ "performance": { "heat_source_configurations": [ { - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -131,11 +127,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 17.77777777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemPlugInShared50.json b/test/models_json/RheemPlugInShared50.json index 61f78c55..00635450 100644 --- a/test/models_json/RheemPlugInShared50.json +++ b/test/models_json/RheemPlugInShared50.json @@ -8,20 +8,16 @@ "performance": { "heat_source_configurations": [ { - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -131,11 +127,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 17.77777777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemPlugInShared65.json b/test/models_json/RheemPlugInShared65.json index 72e7cf98..e189665d 100644 --- a/test/models_json/RheemPlugInShared65.json +++ b/test/models_json/RheemPlugInShared65.json @@ -8,20 +8,16 @@ "performance": { "heat_source_configurations": [ { - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -131,11 +127,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 17.77777777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/RheemPlugInShared80.json b/test/models_json/RheemPlugInShared80.json index 374b6197..61afd656 100644 --- a/test/models_json/RheemPlugInShared80.json +++ b/test/models_json/RheemPlugInShared80.json @@ -8,20 +8,16 @@ "performance": { "heat_source_configurations": [ { - "heat_distribution": [ - 0.2, - 0.2, - 0.2, - 0.2, - 0.2, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.4166666666666667, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -131,11 +127,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 17.77777777777778, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Sanden120.json b/test/models_json/Sanden120.json index 519213bb..7c62bf81 100644 --- a/test/models_json/Sanden120.json +++ b/test/models_json/Sanden120.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -89,20 +85,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 330.3722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -111,21 +103,7 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 318.15, - "standby_temperature_location": "TOP_OF_TANK", - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "standby_temperature_location": "BOTTOM_OF_TANK" }, "heating_logic_type": "TEMPERATURE_BASED" }, @@ -134,20 +112,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 318.15, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.5833333333333334, + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Sanden40.json b/test/models_json/Sanden40.json index 021961d3..fb7c6685 100644 --- a/test/models_json/Sanden40.json +++ b/test/models_json/Sanden40.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -89,20 +85,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 330.3722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -111,21 +103,7 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 318.15, - "standby_temperature_location": "TOP_OF_TANK", - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "standby_temperature_location": "BOTTOM_OF_TANK" }, "heating_logic_type": "TEMPERATURE_BASED" }, @@ -134,20 +112,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 318.15, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Sanden80.json b/test/models_json/Sanden80.json index ccc1d9b8..b19f5af4 100644 --- a/test/models_json/Sanden80.json +++ b/test/models_json/Sanden80.json @@ -4,20 +4,16 @@ "external_outlet_height": 0.0, "heat_source_configurations": [ { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -89,20 +85,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 330.3722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -111,21 +103,7 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 318.15, - "standby_temperature_location": "TOP_OF_TANK", - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "standby_temperature_location": "BOTTOM_OF_TANK" }, "heating_logic_type": "TEMPERATURE_BASED" }, @@ -134,20 +112,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "absolute_temperature": 318.15, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.5833333333333334, + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/Scalable_MP.json b/test/models_json/Scalable_MP.json index fdb9fc33..2c2172f6 100644 --- a/test/models_json/Scalable_MP.json +++ b/test/models_json/Scalable_MP.json @@ -6,20 +6,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.75, + 0.8333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -35,11 +33,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 16.666666666666668, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -48,20 +51,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -75,20 +74,18 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -2185,20 +2182,18 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 0.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -2208,20 +2203,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 2.7777777777777777, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/Stiebel220e.json b/test/models_json/Stiebel220e.json index 82edf6d6..4e1e603e 100644 --- a/test/models_json/Stiebel220e.json +++ b/test/models_json/Stiebel220e.json @@ -9,20 +9,20 @@ "heat_source_configurations": [ { "backup_heat_source_id": "resistiveElement", - "heat_distribution": [ - 0.0, - 0.12, - 0.22, - 0.22, - 0.22, - 0.22, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 0.5454545454545454, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -78,20 +78,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 310.92777777777775, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -101,34 +97,34 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 3.639388888888889, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 0.5, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } ] }, { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" diff --git a/test/models_json/TamScalable_SP.json b/test/models_json/TamScalable_SP.json index 39121c1a..ed738857 100644 --- a/test/models_json/TamScalable_SP.json +++ b/test/models_json/TamScalable_SP.json @@ -6,20 +6,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.75, + 0.8333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -35,11 +33,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -48,20 +51,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -75,20 +74,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4187,20 +4182,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4210,20 +4201,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/TamScalable_SP_2X.json b/test/models_json/TamScalable_SP_2X.json index 2e742ae7..6323fcac 100644 --- a/test/models_json/TamScalable_SP_2X.json +++ b/test/models_json/TamScalable_SP_2X.json @@ -6,20 +6,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.75, + 0.8333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -35,11 +33,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -48,20 +51,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -75,20 +74,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4187,20 +4182,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4210,20 +4201,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/TamScalable_SP_Half.json b/test/models_json/TamScalable_SP_Half.json index 8dd882be..e9ae761e 100644 --- a/test/models_json/TamScalable_SP_Half.json +++ b/test/models_json/TamScalable_SP_Half.json @@ -6,20 +6,18 @@ { "companion_heat_source_id": "compressor", "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.75, + 0.8333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -35,11 +33,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -48,20 +51,16 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -75,20 +74,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -4187,20 +4182,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -4210,20 +4201,18 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 8.333333333333334, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.25, + 0.3333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } diff --git a/test/models_json/UEF2generic.json b/test/models_json/UEF2generic.json index a9d92317..8d163dde 100644 --- a/test/models_json/UEF2generic.json +++ b/test/models_json/UEF2generic.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.5, + 0.5833333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,11 +36,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 10.366944444444444, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -51,20 +54,20 @@ { "backup_heat_source_id": "compressor", "followed_by_heat_source_id": "compressor", - "heat_distribution": [ - 0.0, - 0.2, - 0.8, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 0.16666666666666666, + 0.25, + 1.0 + ], + "weight": [ + 0.0, + 0.25, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -80,20 +83,16 @@ "comparison_type": "GREATER_THAN", "heating_logic": { "absolute_temperature": 303.2117222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } @@ -101,11 +100,16 @@ }, { "backup_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSCONDENSERWATERHEATSOURCE" @@ -161,11 +165,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 18.715722222222222, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/models_json/restankRealistic.json b/test/models_json/restankRealistic.json index b7d428cb..91a8c7f5 100644 --- a/test/models_json/restankRealistic.json +++ b/test/models_json/restankRealistic.json @@ -9,20 +9,18 @@ "heat_source_configurations": [ { "followed_by_heat_source_id": "resistiveElementBottom", - "heat_distribution": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.75, + 0.8333333333333333, + 1.0 + ], + "weight": [ + 0.0, + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -38,31 +36,32 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 20.0, - "temperature_weight_distribution": [ - 0.0, - 0.0, - 1.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.6666666666666666, + 1.0 + ], + "weight": [ + 0.0, + 1.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" } ] }, { - "heat_distribution": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], + "heat_distribution": { + "normalized_height": [ + 0.08333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + }, "heat_source": { "metadata": { "schema": "RSRESISTANCEWATERHEATSOURCE" @@ -78,11 +77,16 @@ "comparison_type": "LESS_THAN", "heating_logic": { "differential_temperature": 20.0, - "temperature_weight_distribution": [ - 1.0, - 0.0, - 0.0 - ] + "temperature_weight_distribution": { + "normalized_height": [ + 0.3333333333333333, + 1.0 + ], + "weight": [ + 1.0, + 0.0 + ] + } }, "heating_logic_type": "TEMPERATURE_BASED" }, diff --git a/test/ref/testDr_TOT_Preset_AOSmithHPTS40.csv b/test/ref/testDr_TOT_Preset_AOSmithHPTS40.csv index e0ecafe1..c2ab638b 100644 --- a/test/ref/testDr_TOT_Preset_AOSmithHPTS40.csv +++ b/test/ref/testDr_TOT_Preset_AOSmithHPTS40.csv @@ -100,7 +100,7 @@ minutes,Ta,Tsetpoint,inletT,draw,DRstatus,h_src1In (Wh),h_src1Out (Wh),h_src2In 98, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.54,52.69,52.69,52.69,52.69,52.69, 99, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.52,52.68,52.68,52.68,52.68,52.68, 100, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.51,52.67,52.67,52.67,52.67,52.67, -101, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,-0.00,-0.00,53.00,53.00,53.00,53.00,53.00,53.00, +101, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,0.00,0.00,53.00,53.00,53.00,53.00,53.00,53.00, 102, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.99,52.99,52.99,52.99,52.99,52.99, 103, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.97,52.98,52.98,52.98,52.98,52.98, 104, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.96,52.97,52.97,52.97,52.97,52.97, @@ -140,7 +140,7 @@ minutes,Ta,Tsetpoint,inletT,draw,DRstatus,h_src1In (Wh),h_src1Out (Wh),h_src2In 138, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.54,52.69,52.69,52.69,52.69,52.69, 139, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.52,52.68,52.68,52.68,52.68,52.68, 140, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.51,52.67,52.67,52.67,52.67,52.67, -141, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,-0.00,-0.00,53.00,53.00,53.00,53.00,53.00,53.00, +141, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,0.00,0.00,53.00,53.00,53.00,53.00,53.00,53.00, 142, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.99,52.99,52.99,52.99,52.99,52.99, 143, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.97,52.98,52.98,52.98,52.98,52.98, 144, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.96,52.97,52.97,52.97,52.97,52.97, @@ -180,7 +180,7 @@ minutes,Ta,Tsetpoint,inletT,draw,DRstatus,h_src1In (Wh),h_src1Out (Wh),h_src2In 178, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.54,52.69,52.69,52.69,52.69,52.69, 179, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.52,52.68,52.68,52.68,52.68,52.68, 180, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.51,52.67,52.67,52.67,52.67,52.67, -181, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,-0.00,-0.00,53.00,53.00,53.00,53.00,53.00,53.00, +181, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,0.00,0.00,53.00,53.00,53.00,53.00,53.00,53.00, 182, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.99,52.99,52.99,52.99,52.99,52.99, 183, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.97,52.98,52.98,52.98,52.98,52.98, 184, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.96,52.97,52.97,52.97,52.97,52.97, @@ -220,7 +220,7 @@ minutes,Ta,Tsetpoint,inletT,draw,DRstatus,h_src1In (Wh),h_src1Out (Wh),h_src2In 218, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.54,52.69,52.69,52.69,52.69,52.69, 219, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.52,52.68,52.68,52.68,52.68,52.68, 220, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.51,52.67,52.67,52.67,52.67,52.67, -221, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,-0.00,-0.00,53.00,53.00,53.00,53.00,53.00,53.00, +221, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,0.00,0.00,53.00,53.00,53.00,53.00,53.00,53.00, 222, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.99,52.99,52.99,52.99,52.99,52.99, 223, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.97,52.98,52.98,52.98,52.98,52.98, 224, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.96,52.97,52.97,52.97,52.97,52.97, @@ -380,7 +380,7 @@ minutes,Ta,Tsetpoint,inletT,draw,DRstatus,h_src1In (Wh),h_src1Out (Wh),h_src2In 378, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.54,52.69,52.69,52.69,52.69,52.69, 379, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.52,52.68,52.68,52.68,52.68,52.68, 380, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.51,52.67,52.67,52.67,52.67,52.67, -381, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,-0.00,-0.00,53.00,53.00,53.00,53.00,53.00,53.00, +381, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,0.00,0.00,53.00,53.00,53.00,53.00,53.00,53.00, 382, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.99,52.99,52.99,52.99,52.99,52.99, 383, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.97,52.98,52.98,52.98,52.98,52.98, 384, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.96,52.97,52.97,52.97,52.97,52.97, @@ -420,7 +420,7 @@ minutes,Ta,Tsetpoint,inletT,draw,DRstatus,h_src1In (Wh),h_src1Out (Wh),h_src2In 418, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.54,52.69,52.69,52.69,52.69,52.69, 419, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.52,52.68,52.68,52.68,52.68,52.68, 420, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.51,52.67,52.67,52.67,52.67,52.67, -421, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,-0.00,-0.00,53.00,53.00,53.00,53.00,53.00,53.00, +421, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,0.00,0.00,53.00,53.00,53.00,53.00,53.00,53.00, 422, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.99,52.99,52.99,52.99,52.99,52.99, 423, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.97,52.98,52.98,52.98,52.98,52.98, 424, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.96,52.97,52.97,52.97,52.97,52.97, @@ -460,7 +460,7 @@ minutes,Ta,Tsetpoint,inletT,draw,DRstatus,h_src1In (Wh),h_src1Out (Wh),h_src2In 458, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.54,52.69,52.69,52.69,52.69,52.69, 459, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.52,52.68,52.68,52.68,52.68,52.68, 460, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.51,52.67,52.67,52.67,52.67,52.67, -461, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,-0.00,-0.00,53.00,53.00,53.00,53.00,53.00,53.00, +461, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,57.72,57.72,0.00,0.00,53.00,53.00,53.00,53.00,53.00,53.00, 462, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.99,52.99,52.99,52.99,52.99,52.99, 463, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.97,52.98,52.98,52.98,52.98,52.98, 464, 20.000000, 53.000000, 15.000000, 0.000000, 8,0.00,0.00,0.00,0.00,0.00,0.00,52.96,52.97,52.97,52.97,52.97,52.97, diff --git a/vendor/hpwh_data_model b/vendor/hpwh_data_model index 2f3deea0..29a0099a 160000 --- a/vendor/hpwh_data_model +++ b/vendor/hpwh_data_model @@ -1 +1 @@ -Subproject commit 2f3deea0ddf9f6d7ea68ee6c544a056c1f09b7ae +Subproject commit 29a0099af29eb88fe0b268b06e15bdb3782d3e68