diff --git a/src/libecalc/core/consumers/legacy_consumer/component.py b/src/libecalc/core/consumers/legacy_consumer/component.py index 1819558af..b84e4669b 100644 --- a/src/libecalc/core/consumers/legacy_consumer/component.py +++ b/src/libecalc/core/consumers/legacy_consumer/component.py @@ -1,3 +1,4 @@ +import itertools import math from collections import defaultdict from datetime import datetime @@ -37,6 +38,7 @@ from libecalc.core.result import ConsumerSystemResult, EcalcModelResult from libecalc.core.result.results import ( CompressorResult, + ConsumerModelResult, GenericComponentResult, PumpResult, ) @@ -55,6 +57,10 @@ def get_operational_settings_used_from_consumer_result( ) +ConsumerOrSystemFunctionResult = Union[ConsumerSystemConsumerFunctionResult, ConsumerFunctionResult] +ConsumerResult = Union[ConsumerSystemResult, PumpResult, CompressorResult] + + class Consumer(BaseConsumer): def __init__( self, @@ -73,97 +79,40 @@ def __init__( def id(self): return self._consumer_dto.id - def evaluate( - self, - variables_map: VariablesMap, - ) -> EcalcModelResult: - """Warning! We are converting energy usage to NaN when the energy usage models has invalid timesteps. this will - probably be changed soon. - """ - logger.debug(f"Evaluating consumer: {self._consumer_dto.name}") - regularity = TemporalExpression.evaluate( - temporal_expression=TemporalModel(self._consumer_dto.regularity), - variables_map=variables_map, - ) - - # NOTE! This function may not handle regularity 0 - consumer_function_result = self.evaluate_consumer_temporal_model( - variables_map=variables_map, - regularity=regularity, - ) - - energy_usage = self.reindex_time_vector( - values=consumer_function_result.energy_usage, - time_vector=consumer_function_result.time_vector, - new_time_vector=variables_map.time_vector, - ) - - valid_timesteps = self.reindex_time_vector( - values=consumer_function_result.is_valid, - time_vector=consumer_function_result.time_vector, - new_time_vector=variables_map.time_vector, - fillna=True, # Time-step is valid if not calculated. - ).astype(bool) - - extrapolations = ~valid_timesteps - energy_usage[extrapolations] = np.nan - energy_usage = Rates.forward_fill_nan_values(rates=energy_usage) - - # By convention, we change remaining NaN-values to 0 regardless of extrapolation - energy_usage = np.nan_to_num(energy_usage) - - if self._consumer_dto.consumes == ConsumptionType.FUEL: - power_time_series = None - if consumer_function_result.power is not None: - power = self.reindex_time_vector( - values=consumer_function_result.power, - time_vector=consumer_function_result.time_vector, - new_time_vector=variables_map.time_vector, - ) - power_time_series = TimeSeriesStreamDayRate( - timesteps=variables_map.time_vector, - values=list(power), - unit=Unit.MEGA_WATT, - ) - energy_usage_time_series = TimeSeriesStreamDayRate( - timesteps=variables_map.time_vector, - values=list(energy_usage), - unit=Unit.STANDARD_CUBIC_METER_PER_DAY, - ) - - elif self._consumer_dto.consumes == ConsumptionType.ELECTRICITY: - energy_usage_time_series = TimeSeriesStreamDayRate( - timesteps=variables_map.time_vector, - values=list(energy_usage), - unit=Unit.MEGA_WATT, + def map_model_result(self, model_result: Union[ConsumerOrSystemFunctionResult]) -> List[ConsumerModelResult]: + if self._consumer_dto.component_type in [ComponentType.PUMP_SYSTEM, ComponentType.COMPRESSOR_SYSTEM]: + return get_consumer_system_models( + model_result, + name=self._consumer_dto.name, ) - - power_time_series = energy_usage_time_series.copy() else: - raise ValueError(f"Consuming '{self._consumer_dto.consumes}' is not implemented.") - - is_valid = TimeSeriesBoolean( - timesteps=variables_map.time_vector, - values=list(valid_timesteps), - unit=Unit.NONE, - ) + return get_single_consumer_models( + result=model_result, + name=self._consumer_dto.name, + ) + def get_consumer_result( + self, + timesteps: List[datetime], + energy_usage: TimeSeriesStreamDayRate, + is_valid: TimeSeriesBoolean, + power_usage: TimeSeriesStreamDayRate, + aggregated_result: Union[ConsumerOrSystemFunctionResult], + ) -> ConsumerResult: if self._consumer_dto.component_type in [ComponentType.PUMP_SYSTEM, ComponentType.COMPRESSOR_SYSTEM]: - operational_settings_used = get_operational_settings_used_from_consumer_result( - result=consumer_function_result - ) + operational_settings_used = get_operational_settings_used_from_consumer_result(result=aggregated_result) operational_settings_used.values = list( self.reindex_time_vector( values=operational_settings_used.values, - time_vector=consumer_function_result.time_vector, - new_time_vector=variables_map.time_vector, + time_vector=aggregated_result.time_vector, + new_time_vector=timesteps, fillna=-1, ) ) - operational_settings_used.timesteps = variables_map.time_vector + operational_settings_used.timesteps = timesteps operational_settings_result = get_operational_settings_results_from_consumer_result( - consumer_function_result, parent_id=self._consumer_dto.id + aggregated_result, parent_id=self._consumer_dto.id ) # convert to 1-based index @@ -172,137 +121,215 @@ def evaluate( consumer_result = ConsumerSystemResult( id=self._consumer_dto.id, - timesteps=variables_map.time_vector, + timesteps=timesteps, is_valid=is_valid, - power=power_time_series, - energy_usage=energy_usage_time_series, + power=power_usage, + energy_usage=energy_usage, operational_settings_used=operational_settings_used, operational_settings_results=operational_settings_result, ) - models = get_consumer_system_models( - consumer_function_result, - name=self._consumer_dto.name, - ) elif self._consumer_dto.component_type == ComponentType.PUMP: # Using generic consumer result as pump has no specific results currently inlet_rate_time_series = TimeSeriesStreamDayRate( - timesteps=consumer_function_result.time_vector.tolist(), - values=list(consumer_function_result.energy_function_result.rate), + timesteps=aggregated_result.time_vector.tolist(), + values=list(aggregated_result.energy_function_result.rate), unit=Unit.STANDARD_CUBIC_METER_PER_DAY, - ).reindex(new_time_vector=variables_map.time_vector) + ).reindex(new_time_vector=timesteps) inlet_pressure_time_series = TimeSeriesFloat( - timesteps=consumer_function_result.time_vector.tolist(), - values=list(consumer_function_result.energy_function_result.suction_pressure), + timesteps=aggregated_result.time_vector.tolist(), + values=list(aggregated_result.energy_function_result.suction_pressure), unit=Unit.BARA, - ).reindex(new_time_vector=variables_map.time_vector) + ).reindex(new_time_vector=timesteps) outlet_pressure_time_series = TimeSeriesFloat( - timesteps=consumer_function_result.time_vector.tolist(), - values=list(consumer_function_result.energy_function_result.discharge_pressure), + timesteps=aggregated_result.time_vector.tolist(), + values=list(aggregated_result.energy_function_result.discharge_pressure), unit=Unit.BARA, - ).reindex(new_time_vector=variables_map.time_vector) + ).reindex(new_time_vector=timesteps) operational_head_time_series = TimeSeriesFloat( - timesteps=consumer_function_result.time_vector.tolist(), - values=list(consumer_function_result.energy_function_result.operational_head), + timesteps=aggregated_result.time_vector.tolist(), + values=list(aggregated_result.energy_function_result.operational_head), unit=Unit.POLYTROPIC_HEAD_JOULE_PER_KG, - ).reindex(new_time_vector=variables_map.time_vector) + ).reindex(new_time_vector=timesteps) consumer_result = PumpResult( id=self._consumer_dto.id, - timesteps=variables_map.time_vector, + timesteps=timesteps, is_valid=is_valid, - energy_usage=energy_usage_time_series, - power=power_time_series, + energy_usage=energy_usage, + power=power_usage, inlet_liquid_rate_m3_per_day=inlet_rate_time_series, inlet_pressure_bar=inlet_pressure_time_series, outlet_pressure_bar=outlet_pressure_time_series, operational_head=operational_head_time_series, ) - models = get_single_consumer_models( - result=consumer_function_result, - name=self._consumer_dto.name, - ) elif self._consumer_dto.component_type == ComponentType.COMPRESSOR: # All energy_function_results should be CompressorTrainResult, # if not the consumer should not have COMPRESSOR type. - if isinstance(consumer_function_result.energy_function_result, CompressorTrainResult): - recirculation_loss = consumer_function_result.energy_function_result.recirculation_loss + if isinstance(aggregated_result.energy_function_result, CompressorTrainResult): + recirculation_loss = aggregated_result.energy_function_result.recirculation_loss recirculation_loss = list( self.reindex_time_vector( values=recirculation_loss, - time_vector=consumer_function_result.time_vector, - new_time_vector=variables_map.time_vector, + time_vector=aggregated_result.time_vector, + new_time_vector=timesteps, ) ) - rate_exceeds_maximum = consumer_function_result.energy_function_result.rate_exceeds_maximum + rate_exceeds_maximum = aggregated_result.energy_function_result.rate_exceeds_maximum rate_exceeds_maximum = list( self.reindex_time_vector( values=rate_exceeds_maximum, - time_vector=consumer_function_result.time_vector, - new_time_vector=variables_map.time_vector, + time_vector=aggregated_result.time_vector, + new_time_vector=timesteps, ) ) outlet_pressure_before_choking = ( - consumer_function_result.energy_function_result.outlet_pressure_before_choking - if consumer_function_result.energy_function_result.outlet_pressure_before_choking is not None - else [math.nan] * variables_map.length + aggregated_result.energy_function_result.outlet_pressure_before_choking + if aggregated_result.energy_function_result.outlet_pressure_before_choking is not None + else [math.nan] * len(timesteps) ) outlet_pressure_before_choking = list( self.reindex_time_vector( values=outlet_pressure_before_choking, - time_vector=consumer_function_result.time_vector, - new_time_vector=variables_map.time_vector, + time_vector=aggregated_result.time_vector, + new_time_vector=timesteps, ) ) else: - recirculation_loss = [math.nan] * variables_map.length - rate_exceeds_maximum = [False] * variables_map.length - outlet_pressure_before_choking = [math.nan] * variables_map.length + recirculation_loss = [math.nan] * len(timesteps) + rate_exceeds_maximum = [False] * len(timesteps) + outlet_pressure_before_choking = [math.nan] * len(timesteps) consumer_result = CompressorResult( id=self._consumer_dto.id, - timesteps=variables_map.time_vector, + timesteps=timesteps, is_valid=is_valid, - energy_usage=energy_usage_time_series, - power=power_time_series, + energy_usage=energy_usage, + power=power_usage, recirculation_loss=TimeSeriesStreamDayRate( - timesteps=variables_map.time_vector, + timesteps=timesteps, values=recirculation_loss, unit=Unit.MEGA_WATT, ), rate_exceeds_maximum=TimeSeriesBoolean( - timesteps=variables_map.time_vector, values=rate_exceeds_maximum, unit=Unit.NONE + timesteps=timesteps, values=rate_exceeds_maximum, unit=Unit.NONE ), outlet_pressure_before_choking=TimeSeriesFloat( - timesteps=variables_map.time_vector, values=outlet_pressure_before_choking, unit=Unit.BARA + timesteps=timesteps, values=outlet_pressure_before_choking, unit=Unit.BARA ), ) - models = get_single_consumer_models( - result=consumer_function_result, - name=self._consumer_dto.name, - ) else: consumer_result = GenericComponentResult( id=self._consumer_dto.id, - timesteps=variables_map.time_vector, + timesteps=timesteps, is_valid=is_valid, - energy_usage=energy_usage_time_series, - power=power_time_series, + energy_usage=energy_usage, + power=power_usage, ) - models = get_single_consumer_models( - result=consumer_function_result, - name=self._consumer_dto.name, + return consumer_result + + def evaluate( + self, + variables_map: VariablesMap, + ) -> EcalcModelResult: + """Warning! We are converting energy usage to NaN when the energy usage models has invalid timesteps. this will + probably be changed soon. + """ + logger.debug(f"Evaluating consumer: {self._consumer_dto.name}") + regularity = TemporalExpression.evaluate( + temporal_expression=TemporalModel(self._consumer_dto.regularity), + variables_map=variables_map, + ) + + # NOTE! This function may not handle regularity 0 + consumer_function_results = self.evaluate_consumer_temporal_model( + variables_map=variables_map, + regularity=regularity, + ) + + aggregated_consumer_function_result = self.aggregate_consumer_function_results( + consumer_function_results=consumer_function_results, + ) + + energy_usage = self.reindex_time_vector( + values=aggregated_consumer_function_result.energy_usage, + time_vector=aggregated_consumer_function_result.time_vector, + new_time_vector=variables_map.time_vector, + ) + + valid_timesteps = self.reindex_time_vector( + values=aggregated_consumer_function_result.is_valid, + time_vector=aggregated_consumer_function_result.time_vector, + new_time_vector=variables_map.time_vector, + fillna=True, # Time-step is valid if not calculated. + ).astype(bool) + + extrapolations = ~valid_timesteps + energy_usage[extrapolations] = np.nan + energy_usage = Rates.forward_fill_nan_values(rates=energy_usage) + + # By convention, we change remaining NaN-values to 0 regardless of extrapolation + energy_usage = np.nan_to_num(energy_usage) + + if self._consumer_dto.consumes == ConsumptionType.FUEL: + power_time_series = None + if aggregated_consumer_function_result.power is not None: + power = self.reindex_time_vector( + values=aggregated_consumer_function_result.power, + time_vector=aggregated_consumer_function_result.time_vector, + new_time_vector=variables_map.time_vector, + ) + power_time_series = TimeSeriesStreamDayRate( + timesteps=variables_map.time_vector, + values=list(power), + unit=Unit.MEGA_WATT, + ) + energy_usage_time_series = TimeSeriesStreamDayRate( + timesteps=variables_map.time_vector, + values=list(energy_usage), + unit=Unit.STANDARD_CUBIC_METER_PER_DAY, + ) + + elif self._consumer_dto.consumes == ConsumptionType.ELECTRICITY: + energy_usage_time_series = TimeSeriesStreamDayRate( + timesteps=variables_map.time_vector, + values=list(energy_usage), + unit=Unit.MEGA_WATT, ) + power_time_series = energy_usage_time_series.copy() + else: + raise ValueError(f"Consuming '{self._consumer_dto.consumes}' is not implemented.") + + is_valid = TimeSeriesBoolean( + timesteps=variables_map.time_vector, + values=list(valid_timesteps), + unit=Unit.NONE, + ) + + consumer_result = self.get_consumer_result( + timesteps=variables_map.time_vector, + energy_usage=energy_usage_time_series, + power_usage=power_time_series, + is_valid=is_valid, + aggregated_result=aggregated_consumer_function_result, + ) + + if self._consumer_dto.component_type in [ComponentType.PUMP_SYSTEM, ComponentType.COMPRESSOR_SYSTEM]: + model_results = self.map_model_result(aggregated_consumer_function_result) + else: + model_results = [self.map_model_result(model_result) for model_result in consumer_function_results] + model_results = list(itertools.chain(*model_results)) # Flatten model results + return EcalcModelResult( component_result=consumer_result, - models=models, + models=model_results, sub_components=[], ) @@ -310,9 +337,9 @@ def evaluate_consumer_temporal_model( self, variables_map: VariablesMap, regularity: List[float], - ) -> Union[ConsumerSystemConsumerFunctionResult, ConsumerFunctionResult]: + ) -> List[ConsumerOrSystemFunctionResult]: """Evaluate each of the models in the temporal model for this consumer.""" - result = None + results = [] for period, consumer_model in self._consumer_time_function.items(): if Period.intersects(period, variables_map.period): start_index, end_index = period.get_timestep_indices(variables_map.time_vector) @@ -330,15 +357,26 @@ def evaluate_consumer_temporal_model( variables_map=variables_map_this_period, regularity=regularity_this_period, ) - if result is None: - result = consumer_function_result - else: - result.extend(consumer_function_result) + results.append(consumer_function_result) + + return results + + @staticmethod + def aggregate_consumer_function_results( + consumer_function_results: List[ConsumerOrSystemFunctionResult], + ) -> ConsumerOrSystemFunctionResult: + merged_result = None + for consumer_function_result in consumer_function_results: + if merged_result is None: + merged_result = consumer_function_result + else: + merged_result.extend(consumer_function_result) - if result is None: + if merged_result is None: # This will happen if all the energy usage functions are defined outside the parent consumer timeslot(s). - return ConsumerFunctionResult.create_empty() - return result + empty_result = ConsumerFunctionResult.create_empty() + return empty_result + return merged_result @staticmethod def reindex_time_vector( diff --git a/src/tests/libecalc/core/consumers/test_legacy_consumer.py b/src/tests/libecalc/core/consumers/test_legacy_consumer.py index 40c339956..ef3a724d6 100644 --- a/src/tests/libecalc/core/consumers/test_legacy_consumer.py +++ b/src/tests/libecalc/core/consumers/test_legacy_consumer.py @@ -38,6 +38,7 @@ def test_evaluate_consumer_time_function(direct_el_consumer): results = consumer.evaluate_consumer_temporal_model( variables_map=dto.VariablesMap(time_vector=time_vector), regularity=np.ones_like(time_vector) ) + results = consumer.aggregate_consumer_function_results(results) assert results.energy_usage.tolist() == [1, 2, 10, 0, 0, 0] assert results.is_valid.tolist() == [1, 1, 1, 1, 1, 1] assert results.time_vector.tolist() == time_vector @@ -136,7 +137,7 @@ def test_electricity_consumer_nan_values(direct_el_consumer): is_valid=np.asarray([False, False, True, False, False, False]), ) - electricity_consumer.evaluate_consumer_temporal_model = Mock(return_value=consumer_function_result) + electricity_consumer.evaluate_consumer_temporal_model = Mock(return_value=[consumer_function_result]) result = electricity_consumer.evaluate( variables_map=dto.VariablesMap(time_vector=time_vector), diff --git a/src/tests/libecalc/dto/results/model/test_requested_pressures_compressors.py b/src/tests/libecalc/dto/results/model/test_requested_pressures_compressors.py index 88b4e0b5f..a135c6a38 100644 --- a/src/tests/libecalc/dto/results/model/test_requested_pressures_compressors.py +++ b/src/tests/libecalc/dto/results/model/test_requested_pressures_compressors.py @@ -77,17 +77,17 @@ def test_requested_pressures_compressor_system_temporal_model(result: EcalcModel models = result.models # Compressor system with temporal model and inlet/outlet pressures per compressor - requested_inlet_pressure_train1 = get_inlet_pressure(1, date_temporal_1, models) - requested_inlet_pressure_train1_upgr = get_inlet_pressure(2, date_temporal_2, models) - requested_inlet_pressure_train2 = get_inlet_pressure(3, date_temporal_1, models) - requested_inlet_pressure_train2_upgr = get_inlet_pressure(4, date_temporal_2, models) - requested_inlet_pressure_train3 = get_inlet_pressure(5, date_temporal_1, models) - - requested_outlet_pressure_train1 = get_outlet_pressure(1, date_temporal_1, models) - requested_outlet_pressure_train1_upgr = get_outlet_pressure(2, date_temporal_2, models) - requested_outlet_pressure_train2 = get_outlet_pressure(3, date_temporal_1, models) - requested_outlet_pressure_train2_upgr = get_outlet_pressure(4, date_temporal_2, models) - requested_outlet_pressure_train3 = get_outlet_pressure(5, date_temporal_1, models) + requested_inlet_pressure_train1 = get_inlet_pressure(2, date_temporal_1, models) + requested_inlet_pressure_train1_upgr = get_inlet_pressure(3, date_temporal_2, models) + requested_inlet_pressure_train2 = get_inlet_pressure(4, date_temporal_1, models) + requested_inlet_pressure_train2_upgr = get_inlet_pressure(5, date_temporal_2, models) + requested_inlet_pressure_train3 = get_inlet_pressure(6, date_temporal_1, models) + + requested_outlet_pressure_train1 = get_outlet_pressure(2, date_temporal_1, models) + requested_outlet_pressure_train1_upgr = get_outlet_pressure(3, date_temporal_2, models) + requested_outlet_pressure_train2 = get_outlet_pressure(4, date_temporal_1, models) + requested_outlet_pressure_train2_upgr = get_outlet_pressure(5, date_temporal_2, models) + requested_outlet_pressure_train3 = get_outlet_pressure(6, date_temporal_1, models) # Temporal model 1 assert requested_inlet_pressure_train1 in [20.0, 50.0] diff --git a/src/tests/libecalc/integration/snapshots/test_all_consumer_with_time_slots_models/test_all_consumer_with_time_slots_models_results/all_consumer_with_time_slots_models_v3.json b/src/tests/libecalc/integration/snapshots/test_all_consumer_with_time_slots_models/test_all_consumer_with_time_slots_models_results/all_consumer_with_time_slots_models_v3.json index e474a29ba..6f08dee21 100644 --- a/src/tests/libecalc/integration/snapshots/test_all_consumer_with_time_slots_models/test_all_consumer_with_time_slots_models_results/all_consumer_with_time_slots_models_v3.json +++ b/src/tests/libecalc/integration/snapshots/test_all_consumer_with_time_slots_models/test_all_consumer_with_time_slots_models_results/all_consumer_with_time_slots_models_v3.json @@ -284,6 +284,135 @@ "2028-01-01 00:00:00", "2029-01-01 00:00:00" ] + }, + { + "energy_usage": { + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 10.0, + 10.0, + 10.0, + 10.0, + 10.0 + ] + }, + "is_valid": { + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "unit": "N/A", + "values": [ + true, + true, + true, + true, + true + ] + }, + "name": "el-consumer2", + "power": { + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 10.0, + 10.0, + 10.0, + 10.0, + 10.0 + ] + }, + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ] + }, + { + "energy_usage": { + "timesteps": [ + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "is_valid": { + "timesteps": [ + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "N/A", + "values": [ + true, + true, + true, + true, + true, + true + ] + }, + "name": "el-consumer2", + "power": { + "timesteps": [ + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "timesteps": [ + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ] } ], "sub_components": [] @@ -12959,6 +13088,81 @@ "2028-01-01 00:00:00", "2029-01-01 00:00:00" ] + }, + { + "energy_usage": { + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00", + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "Sm3/d", + "values": [ + 4.49989998, + 4.49989998, + 4.49989998, + 4.49989998, + 4.49989998, + 4.49989998, + 4.49989998, + 4.49989998, + 4.49989998, + 4.49989998, + 4.49989998 + ] + }, + "is_valid": { + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00", + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "N/A", + "values": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "name": "fuel_consumer_with_time_slots", + "power": null, + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00", + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ] } ], "sub_components": [] @@ -13247,61 +13451,190 @@ "2028-01-01 00:00:00", "2029-01-01 00:00:00" ] - } - ], - "sub_components": [] - }, - "a8d3e56e32a9aaf28130d776d0a4f0e6": { - "component_result": { - "energy_usage": { - "timesteps": [ - "2010-01-01 00:00:00", - "2011-01-01 00:00:00", - "2012-01-01 00:00:00", - "2013-01-01 00:00:00", - "2014-01-01 00:00:00", - "2015-01-01 00:00:00", - "2016-01-01 00:00:00", - "2017-01-01 00:00:00", - "2018-01-01 00:00:00", - "2019-01-01 00:00:00", - "2020-01-01 00:00:00", - "2021-01-01 00:00:00", - "2022-01-01 00:00:00", - "2023-01-01 00:00:00", - "2024-01-01 00:00:00", - "2025-01-01 00:00:00", - "2026-01-01 00:00:00", - "2027-01-01 00:00:00", - "2028-01-01 00:00:00", - "2029-01-01 00:00:00" - ], - "unit": "Sm3/d", - "values": [ - 4.34498971, - 4.34498971, - 4.34498971, - 4.34498971, - 4.34498971, - 4.34498971, - 4.34498971, - 14.3449897, - 14.3449897, - 19.3449897, - 19.3449897, - 19.3449897, - 19.3449897, - 19.3449897, - 4.34498971, - 4.34498971, - 4.34498971, - 4.34498971, - 4.34498971, - 4.34498971 - ] }, - "id": "a8d3e56e32a9aaf28130d776d0a4f0e6", - "is_valid": { + { + "energy_usage": { + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 10.0, + 10.0, + 10.0, + 10.0, + 10.0 + ] + }, + "is_valid": { + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "unit": "N/A", + "values": [ + true, + true, + true, + true, + true + ] + }, + "name": "el-consumer4", + "power": { + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 10.0, + 10.0, + 10.0, + 10.0, + 10.0 + ] + }, + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ] + }, + { + "energy_usage": { + "timesteps": [ + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "is_valid": { + "timesteps": [ + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "N/A", + "values": [ + true, + true, + true, + true, + true, + true + ] + }, + "name": "el-consumer4", + "power": { + "timesteps": [ + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "timesteps": [ + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ] + } + ], + "sub_components": [] + }, + "a8d3e56e32a9aaf28130d776d0a4f0e6": { + "component_result": { + "energy_usage": { + "timesteps": [ + "2010-01-01 00:00:00", + "2011-01-01 00:00:00", + "2012-01-01 00:00:00", + "2013-01-01 00:00:00", + "2014-01-01 00:00:00", + "2015-01-01 00:00:00", + "2016-01-01 00:00:00", + "2017-01-01 00:00:00", + "2018-01-01 00:00:00", + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00", + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "Sm3/d", + "values": [ + 4.34498971, + 4.34498971, + 4.34498971, + 4.34498971, + 4.34498971, + 4.34498971, + 4.34498971, + 14.3449897, + 14.3449897, + 19.3449897, + 19.3449897, + 19.3449897, + 19.3449897, + 19.3449897, + 4.34498971, + 4.34498971, + 4.34498971, + 4.34498971, + 4.34498971, + 4.34498971 + ] + }, + "id": "a8d3e56e32a9aaf28130d776d0a4f0e6", + "is_valid": { "timesteps": [ "2010-01-01 00:00:00", "2011-01-01 00:00:00", @@ -15002,268 +15335,1608 @@ "2029-01-01 00:00:00" ], "turbine_result": null - } - ], - "sub_components": [] - }, - "dce9ee3d6802b4096b59c91642b5d6e0": { - "component_result": { - "energy_usage": { - "timesteps": [ - "2010-01-01 00:00:00", - "2011-01-01 00:00:00", - "2012-01-01 00:00:00", - "2013-01-01 00:00:00", - "2014-01-01 00:00:00", - "2015-01-01 00:00:00", - "2016-01-01 00:00:00", - "2017-01-01 00:00:00", - "2018-01-01 00:00:00", - "2019-01-01 00:00:00", - "2020-01-01 00:00:00", - "2021-01-01 00:00:00", - "2022-01-01 00:00:00", - "2023-01-01 00:00:00", - "2024-01-01 00:00:00", - "2025-01-01 00:00:00", - "2026-01-01 00:00:00", - "2027-01-01 00:00:00", - "2028-01-01 00:00:00", - "2029-01-01 00:00:00" - ], - "unit": "Sm3/d", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 10.0, - 10.0, - 10.0, - 10.0, - 10.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] }, - "id": "dce9ee3d6802b4096b59c91642b5d6e0", - "is_valid": { - "timesteps": [ - "2010-01-01 00:00:00", - "2011-01-01 00:00:00", - "2012-01-01 00:00:00", - "2013-01-01 00:00:00", - "2014-01-01 00:00:00", - "2015-01-01 00:00:00", - "2016-01-01 00:00:00", - "2017-01-01 00:00:00", - "2018-01-01 00:00:00", - "2019-01-01 00:00:00", - "2020-01-01 00:00:00", - "2021-01-01 00:00:00", - "2022-01-01 00:00:00", - "2023-01-01 00:00:00", - "2024-01-01 00:00:00", - "2025-01-01 00:00:00", - "2026-01-01 00:00:00", - "2027-01-01 00:00:00", - "2028-01-01 00:00:00", - "2029-01-01 00:00:00" - ], - "unit": "N/A", - "values": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true - ] - }, - "power": { - "timesteps": [ - "2010-01-01 00:00:00", - "2011-01-01 00:00:00", - "2012-01-01 00:00:00", - "2013-01-01 00:00:00", - "2014-01-01 00:00:00", - "2015-01-01 00:00:00", - "2016-01-01 00:00:00", - "2017-01-01 00:00:00", - "2018-01-01 00:00:00", - "2019-01-01 00:00:00", - "2020-01-01 00:00:00", - "2021-01-01 00:00:00", - "2022-01-01 00:00:00", - "2023-01-01 00:00:00", - "2024-01-01 00:00:00", - "2025-01-01 00:00:00", - "2026-01-01 00:00:00", - "2027-01-01 00:00:00", - "2028-01-01 00:00:00", - "2029-01-01 00:00:00" + { + "energy_usage": { + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658 + ] + }, + "energy_usage_unit": "MW", + "failure_status": [ + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH" ], - "unit": "MW", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 5.0, - 5.0, - 10.0, - 10.0, - 10.0, - 10.0, - 10.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "power_capacity_margin": { - "timesteps": [ - "2010-01-01 00:00:00", - "2011-01-01 00:00:00", - "2012-01-01 00:00:00", - "2013-01-01 00:00:00", - "2014-01-01 00:00:00", - "2015-01-01 00:00:00", - "2016-01-01 00:00:00", - "2017-01-01 00:00:00", - "2018-01-01 00:00:00", - "2019-01-01 00:00:00", - "2020-01-01 00:00:00", - "2021-01-01 00:00:00", - "2022-01-01 00:00:00", - "2023-01-01 00:00:00", - "2024-01-01 00:00:00", - "2025-01-01 00:00:00", - "2026-01-01 00:00:00", - "2027-01-01 00:00:00", - "2028-01-01 00:00:00", - "2029-01-01 00:00:00" + "is_valid": { + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "unit": "N/A", + "values": [ + false, + false, + false, + false, + false + ] + }, + "max_standard_rate": [ + NaN, + NaN, + NaN, + NaN, + NaN ], - "unit": "MW", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 290.0, - 290.0, - 290.0, - 290.0, - 290.0, - 300.0, - 300.0, - 300.0, - 300.0, - 300.0, - 300.0 - ] - }, - "timesteps": [ - "2010-01-01 00:00:00", - "2011-01-01 00:00:00", - "2012-01-01 00:00:00", - "2013-01-01 00:00:00", - "2014-01-01 00:00:00", - "2015-01-01 00:00:00", - "2016-01-01 00:00:00", - "2017-01-01 00:00:00", - "2018-01-01 00:00:00", - "2019-01-01 00:00:00", - "2020-01-01 00:00:00", - "2021-01-01 00:00:00", - "2022-01-01 00:00:00", - "2023-01-01 00:00:00", - "2024-01-01 00:00:00", - "2025-01-01 00:00:00", - "2026-01-01 00:00:00", - "2027-01-01 00:00:00", - "2028-01-01 00:00:00", - "2029-01-01 00:00:00" - ] - }, - "models": [], - "sub_components": [] - }, - "f935bb4a2425f11689d8b4e685bd1274": { - "component_result": { - "energy_usage": { - "timesteps": [ - "2010-01-01 00:00:00", - "2011-01-01 00:00:00", - "2012-01-01 00:00:00", - "2013-01-01 00:00:00", - "2014-01-01 00:00:00", - "2015-01-01 00:00:00", - "2016-01-01 00:00:00", - "2017-01-01 00:00:00", - "2018-01-01 00:00:00", - "2019-01-01 00:00:00", - "2020-01-01 00:00:00", - "2021-01-01 00:00:00", - "2022-01-01 00:00:00", - "2023-01-01 00:00:00", - "2024-01-01 00:00:00", - "2025-01-01 00:00:00", - "2026-01-01 00:00:00", - "2027-01-01 00:00:00", - "2028-01-01 00:00:00", - "2029-01-01 00:00:00" + "name": "el-consumer-simple-compressor-model-with-timeslots", + "power": { + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658 + ] + }, + "power_unit": "MW", + "rate_sm3_day": [ + 5000.0, + 5000.0, + 5000.0, + 5000.0, + 5000.0 ], - "unit": "MW", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 5.0, - 5.0, - 5.0, - 5.0, - 5.0, - 5.0, - 5.0, + "stage_results": [ + { + "asv_recirculation_loss_mw": [ + 0.44505127, + 0.44505127, + 0.44505127, + 0.44505127, + 0.44505127 + ], + "chart": { + "efficiency_fraction": [ + 1.0, + 0.9, + 0.8, + 0.7, + 0.6, + 0.5, + 0.4, + 0.3, + 0.2, + 0.1 + ], + "polytropic_head_joule_per_kg": [ + 100000.0, + 90000.0, + 80000.0, + 70000.0, + 60000.0, + 50000.0, + 40000.0, + 30000.0, + 20000.0, + 10000.0 + ], + "rate_actual_m3_hour": [ + 1000.0, + 2000.0, + 3000.0, + 4000.0, + 5000.0, + 6000.0, + 7000.0, + 8000.0, + 9000.0, + 10000.0 + ], + "speed_rpm": 1.0, + "typ": "SINGLE_SPEED_CHART" + }, + "chart_area_flags": [ + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE" + ], + "energy_usage": [ + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533 + ], + "energy_usage_unit": "MW", + "fluid_composition": {}, + "head_exceeds_maximum": [ + false, + false, + false, + false, + false + ], + "inlet_stream_condition": { + "actual_rate_before_asv_m3_per_hr": [ + 10.6131436, + 10.6131436, + 10.6131436, + 10.6131436, + 10.6131436 + ], + "actual_rate_m3_per_hr": [ + 1000.0, + 1000.0, + 1000.0, + 1000.0, + 1000.0 + ], + "density_kg_per_m3": [ + 16.1937117, + 16.1937117, + 16.1937117, + 16.1937117, + 16.1937117 + ], + "kappa": [ + 1.24456753, + 1.24456753, + 1.24456753, + 1.24456753, + 1.24456753 + ], + "pressure": [ + 20.0, + 20.0, + 20.0, + 20.0, + 20.0 + ], + "pressure_before_choking": [ + 20.0, + 20.0, + 20.0, + 20.0, + 20.0 + ], + "temperature_kelvin": [ + 303.15, + 303.15, + 303.15, + 303.15, + 303.15 + ], + "z": [ + 0.95397088, + 0.95397088, + 0.95397088, + 0.95397088, + 0.95397088 + ] + }, + "is_valid": [ + true, + true, + true, + true, + true + ], + "mass_rate_before_asv_kg_per_hr": [ + 171.866189, + 171.866189, + 171.866189, + 171.866189, + 171.866189 + ], + "mass_rate_kg_per_hr": [ + 16193.7117, + 16193.7117, + 16193.7117, + 16193.7117, + 16193.7117 + ], + "outlet_stream_condition": { + "actual_rate_before_asv_m3_per_hr": [ + NaN, + NaN, + NaN, + NaN, + NaN + ], + "actual_rate_m3_per_hr": [ + 5.86391331, + 5.86391331, + 5.86391331, + 5.86391331, + 5.86391331 + ], + "density_kg_per_m3": [ + 29.3091285, + 29.3091285, + 29.3091285, + 29.3091285, + 29.3091285 + ], + "kappa": [ + 1.21674582, + 1.21674582, + 1.21674582, + 1.21674582, + 1.21674582 + ], + "pressure": [ + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075 + ], + "pressure_before_choking": [ + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075 + ], + "temperature_kelvin": [ + 356.364971, + 356.364971, + 356.364971, + 356.364971, + 356.364971 + ], + "z": [ + 0.95321758, + 0.95321758, + 0.95321758, + 0.95321758, + 0.95321758 + ] + }, + "polytropic_efficiency": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "polytropic_enthalpy_change_before_choke_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "polytropic_enthalpy_change_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "polytropic_head_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "power": [ + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533 + ], + "power_unit": "MW", + "pressure_is_choked": [ + false, + false, + false, + false, + false + ], + "rate_exceeds_maximum": [ + false, + false, + false, + false, + false + ], + "rate_has_recirculation": [ + false, + false, + false, + false, + false + ], + "speed": [ + NaN, + NaN, + NaN, + NaN, + NaN + ] + }, + { + "asv_recirculation_loss_mw": [ + 1.00429719, + 1.00429719, + 1.00429719, + 1.00429719, + 1.00429719 + ], + "chart": { + "efficiency_fraction": [ + 1.0, + 0.9, + 0.8, + 0.7, + 0.6, + 0.5, + 0.4, + 0.3, + 0.2, + 0.1 + ], + "polytropic_head_joule_per_kg": [ + 100000.0, + 90000.0, + 80000.0, + 70000.0, + 60000.0, + 50000.0, + 40000.0, + 30000.0, + 20000.0, + 10000.0 + ], + "rate_actual_m3_hour": [ + 1000.0, + 2000.0, + 3000.0, + 4000.0, + 5000.0, + 6000.0, + 7000.0, + 8000.0, + 9000.0, + 10000.0 + ], + "speed_rpm": 1.0, + "typ": "SINGLE_SPEED_CHART" + }, + "chart_area_flags": [ + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE" + ], + "energy_usage": [ + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125 + ], + "energy_usage_unit": "MW", + "fluid_composition": {}, + "head_exceeds_maximum": [ + false, + false, + false, + false, + false + ], + "inlet_stream_condition": { + "actual_rate_before_asv_m3_per_hr": [ + 4.73114341, + 4.73114341, + 4.73114341, + 4.73114341, + 4.73114341 + ], + "actual_rate_m3_per_hr": [ + 1000.0, + 1000.0, + 1000.0, + 1000.0, + 1000.0 + ], + "density_kg_per_m3": [ + 36.326565, + 36.326565, + 36.326565, + 36.326565, + 36.326565 + ], + "kappa": [ + 1.21977787, + 1.21977787, + 1.21977787, + 1.21977787, + 1.21977787 + ], + "pressure": [ + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075 + ], + "pressure_before_choking": [ + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075 + ], + "temperature_kelvin": [ + 303.15, + 303.15, + 303.15, + 303.15, + 303.15 + ], + "z": [ + 0.90446791, + 0.90446791, + 0.90446791, + 0.90446791, + 0.90446791 + ] + }, + "is_valid": [ + true, + true, + true, + true, + true + ], + "mass_rate_before_asv_kg_per_hr": [ + 171.866189, + 171.866189, + 171.866189, + 171.866189, + 171.866189 + ], + "mass_rate_kg_per_hr": [ + 36326.565, + 36326.565, + 36326.565, + 36326.565, + 36326.565 + ], + "outlet_stream_condition": { + "actual_rate_before_asv_m3_per_hr": [ + NaN, + NaN, + NaN, + NaN, + NaN + ], + "actual_rate_m3_per_hr": [ + 2.60244818, + 2.60244818, + 2.60244818, + 2.60244818, + 2.60244818 + ], + "density_kg_per_m3": [ + 66.0401964, + 66.0401964, + 66.0401964, + 66.0401964, + 66.0401964 + ], + "kappa": [ + 1.19077002, + 1.19077002, + 1.19077002, + 1.19077002, + 1.19077002 + ], + "pressure": [ + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815 + ], + "pressure_before_choking": [ + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815 + ], + "temperature_kelvin": [ + 361.553538, + 361.553538, + 361.553538, + 361.553538, + 361.553538 + ], + "z": [ + 0.92075602, + 0.92075602, + 0.92075602, + 0.92075602, + 0.92075602 + ] + }, + "polytropic_efficiency": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "polytropic_enthalpy_change_before_choke_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "polytropic_enthalpy_change_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "polytropic_head_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "power": [ + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125 + ], + "power_unit": "MW", + "pressure_is_choked": [ + false, + false, + false, + false, + false + ], + "rate_exceeds_maximum": [ + false, + false, + false, + false, + false + ], + "rate_has_recirculation": [ + false, + false, + false, + false, + false + ], + "speed": [ + NaN, + NaN, + NaN, + NaN, + NaN + ] + } + ], + "timesteps": [ + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "turbine_result": null + }, + { + "energy_usage": { + "timesteps": [ + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658 + ] + }, + "energy_usage_unit": "MW", + "failure_status": [ + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH" + ], + "is_valid": { + "timesteps": [ + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "N/A", + "values": [ + false, + false, + false, + false, + false, + false + ] + }, + "max_standard_rate": [ + NaN, + NaN, + NaN, + NaN, + NaN, + NaN + ], + "name": "el-consumer-simple-compressor-model-with-timeslots", + "power": { + "timesteps": [ + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658 + ] + }, + "power_unit": "MW", + "rate_sm3_day": [ + 5000.0, + 5000.0, + 5000.0, + 5000.0, + 5000.0, + 5000.0 + ], + "stage_results": [ + { + "asv_recirculation_loss_mw": [ + 0.44505127, + 0.44505127, + 0.44505127, + 0.44505127, + 0.44505127, + 0.44505127 + ], + "chart": { + "efficiency_fraction": [ + 1.0, + 0.9, + 0.8, + 0.7, + 0.6, + 0.5, + 0.4, + 0.3, + 0.2, + 0.1 + ], + "polytropic_head_joule_per_kg": [ + 100000.0, + 90000.0, + 80000.0, + 70000.0, + 60000.0, + 50000.0, + 40000.0, + 30000.0, + 20000.0, + 10000.0 + ], + "rate_actual_m3_hour": [ + 1000.0, + 2000.0, + 3000.0, + 4000.0, + 5000.0, + 6000.0, + 7000.0, + 8000.0, + 9000.0, + 10000.0 + ], + "speed_rpm": 1.0, + "typ": "SINGLE_SPEED_CHART" + }, + "chart_area_flags": [ + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE" + ], + "energy_usage": [ + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533 + ], + "energy_usage_unit": "MW", + "fluid_composition": {}, + "head_exceeds_maximum": [ + false, + false, + false, + false, + false, + false + ], + "inlet_stream_condition": { + "actual_rate_before_asv_m3_per_hr": [ + 10.6131436, + 10.6131436, + 10.6131436, + 10.6131436, + 10.6131436, + 10.6131436 + ], + "actual_rate_m3_per_hr": [ + 1000.0, + 1000.0, + 1000.0, + 1000.0, + 1000.0, + 1000.0 + ], + "density_kg_per_m3": [ + 16.1937117, + 16.1937117, + 16.1937117, + 16.1937117, + 16.1937117, + 16.1937117 + ], + "kappa": [ + 1.24456753, + 1.24456753, + 1.24456753, + 1.24456753, + 1.24456753, + 1.24456753 + ], + "pressure": [ + 20.0, + 20.0, + 20.0, + 20.0, + 20.0, + 20.0 + ], + "pressure_before_choking": [ + 20.0, + 20.0, + 20.0, + 20.0, + 20.0, + 20.0 + ], + "temperature_kelvin": [ + 303.15, + 303.15, + 303.15, + 303.15, + 303.15, + 303.15 + ], + "z": [ + 0.95397088, + 0.95397088, + 0.95397088, + 0.95397088, + 0.95397088, + 0.95397088 + ] + }, + "is_valid": [ + true, + true, + true, + true, + true, + true + ], + "mass_rate_before_asv_kg_per_hr": [ + 171.866189, + 171.866189, + 171.866189, + 171.866189, + 171.866189, + 171.866189 + ], + "mass_rate_kg_per_hr": [ + 16193.7117, + 16193.7117, + 16193.7117, + 16193.7117, + 16193.7117, + 16193.7117 + ], + "outlet_stream_condition": { + "actual_rate_before_asv_m3_per_hr": [ + NaN, + NaN, + NaN, + NaN, + NaN, + NaN + ], + "actual_rate_m3_per_hr": [ + 5.86391331, + 5.86391331, + 5.86391331, + 5.86391331, + 5.86391331, + 5.86391331 + ], + "density_kg_per_m3": [ + 29.3091285, + 29.3091285, + 29.3091285, + 29.3091285, + 29.3091285, + 29.3091285 + ], + "kappa": [ + 1.21674582, + 1.21674582, + 1.21674582, + 1.21674582, + 1.21674582, + 1.21674582 + ], + "pressure": [ + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075 + ], + "pressure_before_choking": [ + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075 + ], + "temperature_kelvin": [ + 356.364971, + 356.364971, + 356.364971, + 356.364971, + 356.364971, + 356.364971 + ], + "z": [ + 0.95321758, + 0.95321758, + 0.95321758, + 0.95321758, + 0.95321758, + 0.95321758 + ] + }, + "polytropic_efficiency": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "polytropic_enthalpy_change_before_choke_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "polytropic_enthalpy_change_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "polytropic_head_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "power": [ + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533 + ], + "power_unit": "MW", + "pressure_is_choked": [ + false, + false, + false, + false, + false, + false + ], + "rate_exceeds_maximum": [ + false, + false, + false, + false, + false, + false + ], + "rate_has_recirculation": [ + false, + false, + false, + false, + false, + false + ], + "speed": [ + NaN, + NaN, + NaN, + NaN, + NaN, + NaN + ] + }, + { + "asv_recirculation_loss_mw": [ + 1.00429719, + 1.00429719, + 1.00429719, + 1.00429719, + 1.00429719, + 1.00429719 + ], + "chart": { + "efficiency_fraction": [ + 1.0, + 0.9, + 0.8, + 0.7, + 0.6, + 0.5, + 0.4, + 0.3, + 0.2, + 0.1 + ], + "polytropic_head_joule_per_kg": [ + 100000.0, + 90000.0, + 80000.0, + 70000.0, + 60000.0, + 50000.0, + 40000.0, + 30000.0, + 20000.0, + 10000.0 + ], + "rate_actual_m3_hour": [ + 1000.0, + 2000.0, + 3000.0, + 4000.0, + 5000.0, + 6000.0, + 7000.0, + 8000.0, + 9000.0, + 10000.0 + ], + "speed_rpm": 1.0, + "typ": "SINGLE_SPEED_CHART" + }, + "chart_area_flags": [ + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE" + ], + "energy_usage": [ + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125 + ], + "energy_usage_unit": "MW", + "fluid_composition": {}, + "head_exceeds_maximum": [ + false, + false, + false, + false, + false, + false + ], + "inlet_stream_condition": { + "actual_rate_before_asv_m3_per_hr": [ + 4.73114341, + 4.73114341, + 4.73114341, + 4.73114341, + 4.73114341, + 4.73114341 + ], + "actual_rate_m3_per_hr": [ + 1000.0, + 1000.0, + 1000.0, + 1000.0, + 1000.0, + 1000.0 + ], + "density_kg_per_m3": [ + 36.326565, + 36.326565, + 36.326565, + 36.326565, + 36.326565, + 36.326565 + ], + "kappa": [ + 1.21977787, + 1.21977787, + 1.21977787, + 1.21977787, + 1.21977787, + 1.21977787 + ], + "pressure": [ + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075 + ], + "pressure_before_choking": [ + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075 + ], + "temperature_kelvin": [ + 303.15, + 303.15, + 303.15, + 303.15, + 303.15, + 303.15 + ], + "z": [ + 0.90446791, + 0.90446791, + 0.90446791, + 0.90446791, + 0.90446791, + 0.90446791 + ] + }, + "is_valid": [ + true, + true, + true, + true, + true, + true + ], + "mass_rate_before_asv_kg_per_hr": [ + 171.866189, + 171.866189, + 171.866189, + 171.866189, + 171.866189, + 171.866189 + ], + "mass_rate_kg_per_hr": [ + 36326.565, + 36326.565, + 36326.565, + 36326.565, + 36326.565, + 36326.565 + ], + "outlet_stream_condition": { + "actual_rate_before_asv_m3_per_hr": [ + NaN, + NaN, + NaN, + NaN, + NaN, + NaN + ], + "actual_rate_m3_per_hr": [ + 2.60244818, + 2.60244818, + 2.60244818, + 2.60244818, + 2.60244818, + 2.60244818 + ], + "density_kg_per_m3": [ + 66.0401964, + 66.0401964, + 66.0401964, + 66.0401964, + 66.0401964, + 66.0401964 + ], + "kappa": [ + 1.19077002, + 1.19077002, + 1.19077002, + 1.19077002, + 1.19077002, + 1.19077002 + ], + "pressure": [ + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815 + ], + "pressure_before_choking": [ + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815 + ], + "temperature_kelvin": [ + 361.553538, + 361.553538, + 361.553538, + 361.553538, + 361.553538, + 361.553538 + ], + "z": [ + 0.92075602, + 0.92075602, + 0.92075602, + 0.92075602, + 0.92075602, + 0.92075602 + ] + }, + "polytropic_efficiency": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "polytropic_enthalpy_change_before_choke_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "polytropic_enthalpy_change_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "polytropic_head_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "power": [ + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125 + ], + "power_unit": "MW", + "pressure_is_choked": [ + false, + false, + false, + false, + false, + false + ], + "rate_exceeds_maximum": [ + false, + false, + false, + false, + false, + false + ], + "rate_has_recirculation": [ + false, + false, + false, + false, + false, + false + ], + "speed": [ + NaN, + NaN, + NaN, + NaN, + NaN, + NaN + ] + } + ], + "timesteps": [ + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "turbine_result": null + } + ], + "sub_components": [] + }, + "dce9ee3d6802b4096b59c91642b5d6e0": { + "component_result": { + "energy_usage": { + "timesteps": [ + "2010-01-01 00:00:00", + "2011-01-01 00:00:00", + "2012-01-01 00:00:00", + "2013-01-01 00:00:00", + "2014-01-01 00:00:00", + "2015-01-01 00:00:00", + "2016-01-01 00:00:00", + "2017-01-01 00:00:00", + "2018-01-01 00:00:00", + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00", + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "Sm3/d", + "values": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "id": "dce9ee3d6802b4096b59c91642b5d6e0", + "is_valid": { + "timesteps": [ + "2010-01-01 00:00:00", + "2011-01-01 00:00:00", + "2012-01-01 00:00:00", + "2013-01-01 00:00:00", + "2014-01-01 00:00:00", + "2015-01-01 00:00:00", + "2016-01-01 00:00:00", + "2017-01-01 00:00:00", + "2018-01-01 00:00:00", + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00", + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "N/A", + "values": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ] + }, + "power": { + "timesteps": [ + "2010-01-01 00:00:00", + "2011-01-01 00:00:00", + "2012-01-01 00:00:00", + "2013-01-01 00:00:00", + "2014-01-01 00:00:00", + "2015-01-01 00:00:00", + "2016-01-01 00:00:00", + "2017-01-01 00:00:00", + "2018-01-01 00:00:00", + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00", + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 5.0, + 5.0, + 10.0, + 10.0, + 10.0, + 10.0, + 10.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "power_capacity_margin": { + "timesteps": [ + "2010-01-01 00:00:00", + "2011-01-01 00:00:00", + "2012-01-01 00:00:00", + "2013-01-01 00:00:00", + "2014-01-01 00:00:00", + "2015-01-01 00:00:00", + "2016-01-01 00:00:00", + "2017-01-01 00:00:00", + "2018-01-01 00:00:00", + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00", + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 290.0, + 290.0, + 290.0, + 290.0, + 290.0, + 300.0, + 300.0, + 300.0, + 300.0, + 300.0, + 300.0 + ] + }, + "timesteps": [ + "2010-01-01 00:00:00", + "2011-01-01 00:00:00", + "2012-01-01 00:00:00", + "2013-01-01 00:00:00", + "2014-01-01 00:00:00", + "2015-01-01 00:00:00", + "2016-01-01 00:00:00", + "2017-01-01 00:00:00", + "2018-01-01 00:00:00", + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00", + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ] + }, + "models": [], + "sub_components": [] + }, + "f935bb4a2425f11689d8b4e685bd1274": { + "component_result": { + "energy_usage": { + "timesteps": [ + "2010-01-01 00:00:00", + "2011-01-01 00:00:00", + "2012-01-01 00:00:00", + "2013-01-01 00:00:00", + "2014-01-01 00:00:00", + "2015-01-01 00:00:00", + "2016-01-01 00:00:00", + "2017-01-01 00:00:00", + "2018-01-01 00:00:00", + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00", + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 5.0, + 5.0, + 5.0, + 5.0, + 5.0, + 5.0, + 5.0, 0.0, 0.0, 0.0, @@ -15296,132 +16969,907 @@ "2028-01-01 00:00:00", "2029-01-01 00:00:00" ], - "unit": "N/A", - "values": [ - true, - true, - true, - true, - true, - true, - true, - true, - false, - false, - false, - false, - false, - false, - true, - true, - true, - true, - true, - true - ] - }, - "power": { + "unit": "N/A", + "values": [ + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true + ] + }, + "power": { + "timesteps": [ + "2010-01-01 00:00:00", + "2011-01-01 00:00:00", + "2012-01-01 00:00:00", + "2013-01-01 00:00:00", + "2014-01-01 00:00:00", + "2015-01-01 00:00:00", + "2016-01-01 00:00:00", + "2017-01-01 00:00:00", + "2018-01-01 00:00:00", + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00", + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 5.0, + 5.0, + 5.0, + 5.0, + 5.0, + 5.0, + 5.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "timesteps": [ + "2010-01-01 00:00:00", + "2011-01-01 00:00:00", + "2012-01-01 00:00:00", + "2013-01-01 00:00:00", + "2014-01-01 00:00:00", + "2015-01-01 00:00:00", + "2016-01-01 00:00:00", + "2017-01-01 00:00:00", + "2018-01-01 00:00:00", + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00", + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" + ] + }, + "models": [ + { + "energy_usage": { + "timesteps": [ + "2017-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 5.0 + ] + }, + "is_valid": { + "timesteps": [ + "2017-01-01 00:00:00" + ], + "unit": "N/A", + "values": [ + true + ] + }, + "name": "el-consumer1", + "power": { + "timesteps": [ + "2017-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 5.0 + ] + }, + "timesteps": [ + "2017-01-01 00:00:00" + ] + }, + { + "energy_usage": { + "timesteps": [ + "2018-01-01 00:00:00", + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658 + ] + }, + "energy_usage_unit": "MW", + "failure_status": [ + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH", + "TARGET_DISCHARGE_PRESSURE_TOO_HIGH" + ], + "is_valid": { + "timesteps": [ + "2018-01-01 00:00:00", + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "unit": "N/A", + "values": [ + false, + false, + false, + false, + false, + false + ] + }, + "max_standard_rate": [ + NaN, + NaN, + NaN, + NaN, + NaN, + NaN + ], + "name": "el-consumer1", + "power": { + "timesteps": [ + "2018-01-01 00:00:00", + "2019-01-01 00:00:00", + "2020-01-01 00:00:00", + "2021-01-01 00:00:00", + "2022-01-01 00:00:00", + "2023-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658, + 2.45889658 + ] + }, + "power_unit": "MW", + "rate_sm3_day": [ + 5000.0, + 5000.0, + 5000.0, + 5000.0, + 5000.0, + 5000.0 + ], + "stage_results": [ + { + "asv_recirculation_loss_mw": [ + 0.44505127, + 0.44505127, + 0.44505127, + 0.44505127, + 0.44505127, + 0.44505127 + ], + "chart": { + "efficiency_fraction": [ + 1.0, + 0.9, + 0.8, + 0.7, + 0.6, + 0.5, + 0.4, + 0.3, + 0.2, + 0.1 + ], + "polytropic_head_joule_per_kg": [ + 100000.0, + 90000.0, + 80000.0, + 70000.0, + 60000.0, + 50000.0, + 40000.0, + 30000.0, + 20000.0, + 10000.0 + ], + "rate_actual_m3_hour": [ + 1000.0, + 2000.0, + 3000.0, + 4000.0, + 5000.0, + 6000.0, + 7000.0, + 8000.0, + 9000.0, + 10000.0 + ], + "speed_rpm": 1.0, + "typ": "SINGLE_SPEED_CHART" + }, + "chart_area_flags": [ + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE" + ], + "energy_usage": [ + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533 + ], + "energy_usage_unit": "MW", + "fluid_composition": {}, + "head_exceeds_maximum": [ + false, + false, + false, + false, + false, + false + ], + "inlet_stream_condition": { + "actual_rate_before_asv_m3_per_hr": [ + 10.6131436, + 10.6131436, + 10.6131436, + 10.6131436, + 10.6131436, + 10.6131436 + ], + "actual_rate_m3_per_hr": [ + 1000.0, + 1000.0, + 1000.0, + 1000.0, + 1000.0, + 1000.0 + ], + "density_kg_per_m3": [ + 16.1937117, + 16.1937117, + 16.1937117, + 16.1937117, + 16.1937117, + 16.1937117 + ], + "kappa": [ + 1.24456753, + 1.24456753, + 1.24456753, + 1.24456753, + 1.24456753, + 1.24456753 + ], + "pressure": [ + 20.0, + 20.0, + 20.0, + 20.0, + 20.0, + 20.0 + ], + "pressure_before_choking": [ + 20.0, + 20.0, + 20.0, + 20.0, + 20.0, + 20.0 + ], + "temperature_kelvin": [ + 303.15, + 303.15, + 303.15, + 303.15, + 303.15, + 303.15 + ], + "z": [ + 0.95397088, + 0.95397088, + 0.95397088, + 0.95397088, + 0.95397088, + 0.95397088 + ] + }, + "is_valid": [ + true, + true, + true, + true, + true, + true + ], + "mass_rate_before_asv_kg_per_hr": [ + 171.866189, + 171.866189, + 171.866189, + 171.866189, + 171.866189, + 171.866189 + ], + "mass_rate_kg_per_hr": [ + 16193.7117, + 16193.7117, + 16193.7117, + 16193.7117, + 16193.7117, + 16193.7117 + ], + "outlet_stream_condition": { + "actual_rate_before_asv_m3_per_hr": [ + NaN, + NaN, + NaN, + NaN, + NaN, + NaN + ], + "actual_rate_m3_per_hr": [ + 5.86391331, + 5.86391331, + 5.86391331, + 5.86391331, + 5.86391331, + 5.86391331 + ], + "density_kg_per_m3": [ + 29.3091285, + 29.3091285, + 29.3091285, + 29.3091285, + 29.3091285, + 29.3091285 + ], + "kappa": [ + 1.21674582, + 1.21674582, + 1.21674582, + 1.21674582, + 1.21674582, + 1.21674582 + ], + "pressure": [ + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075 + ], + "pressure_before_choking": [ + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075 + ], + "temperature_kelvin": [ + 356.364971, + 356.364971, + 356.364971, + 356.364971, + 356.364971, + 356.364971 + ], + "z": [ + 0.95321758, + 0.95321758, + 0.95321758, + 0.95321758, + 0.95321758, + 0.95321758 + ] + }, + "polytropic_efficiency": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "polytropic_enthalpy_change_before_choke_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "polytropic_enthalpy_change_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "polytropic_head_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "power": [ + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533, + 0.44982533 + ], + "power_unit": "MW", + "pressure_is_choked": [ + false, + false, + false, + false, + false, + false + ], + "rate_exceeds_maximum": [ + false, + false, + false, + false, + false, + false + ], + "rate_has_recirculation": [ + false, + false, + false, + false, + false, + false + ], + "speed": [ + NaN, + NaN, + NaN, + NaN, + NaN, + NaN + ] + }, + { + "asv_recirculation_loss_mw": [ + 1.00429719, + 1.00429719, + 1.00429719, + 1.00429719, + 1.00429719, + 1.00429719 + ], + "chart": { + "efficiency_fraction": [ + 1.0, + 0.9, + 0.8, + 0.7, + 0.6, + 0.5, + 0.4, + 0.3, + 0.2, + 0.1 + ], + "polytropic_head_joule_per_kg": [ + 100000.0, + 90000.0, + 80000.0, + 70000.0, + 60000.0, + 50000.0, + 40000.0, + 30000.0, + 20000.0, + 10000.0 + ], + "rate_actual_m3_hour": [ + 1000.0, + 2000.0, + 3000.0, + 4000.0, + 5000.0, + 6000.0, + 7000.0, + 8000.0, + 9000.0, + 10000.0 + ], + "speed_rpm": 1.0, + "typ": "SINGLE_SPEED_CHART" + }, + "chart_area_flags": [ + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE", + "BELOW_MINIMUM_FLOW_RATE" + ], + "energy_usage": [ + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125 + ], + "energy_usage_unit": "MW", + "fluid_composition": {}, + "head_exceeds_maximum": [ + false, + false, + false, + false, + false, + false + ], + "inlet_stream_condition": { + "actual_rate_before_asv_m3_per_hr": [ + 4.73114341, + 4.73114341, + 4.73114341, + 4.73114341, + 4.73114341, + 4.73114341 + ], + "actual_rate_m3_per_hr": [ + 1000.0, + 1000.0, + 1000.0, + 1000.0, + 1000.0, + 1000.0 + ], + "density_kg_per_m3": [ + 36.326565, + 36.326565, + 36.326565, + 36.326565, + 36.326565, + 36.326565 + ], + "kappa": [ + 1.21977787, + 1.21977787, + 1.21977787, + 1.21977787, + 1.21977787, + 1.21977787 + ], + "pressure": [ + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075 + ], + "pressure_before_choking": [ + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075, + 42.4849075 + ], + "temperature_kelvin": [ + 303.15, + 303.15, + 303.15, + 303.15, + 303.15, + 303.15 + ], + "z": [ + 0.90446791, + 0.90446791, + 0.90446791, + 0.90446791, + 0.90446791, + 0.90446791 + ] + }, + "is_valid": [ + true, + true, + true, + true, + true, + true + ], + "mass_rate_before_asv_kg_per_hr": [ + 171.866189, + 171.866189, + 171.866189, + 171.866189, + 171.866189, + 171.866189 + ], + "mass_rate_kg_per_hr": [ + 36326.565, + 36326.565, + 36326.565, + 36326.565, + 36326.565, + 36326.565 + ], + "outlet_stream_condition": { + "actual_rate_before_asv_m3_per_hr": [ + NaN, + NaN, + NaN, + NaN, + NaN, + NaN + ], + "actual_rate_m3_per_hr": [ + 2.60244818, + 2.60244818, + 2.60244818, + 2.60244818, + 2.60244818, + 2.60244818 + ], + "density_kg_per_m3": [ + 66.0401964, + 66.0401964, + 66.0401964, + 66.0401964, + 66.0401964, + 66.0401964 + ], + "kappa": [ + 1.19077002, + 1.19077002, + 1.19077002, + 1.19077002, + 1.19077002, + 1.19077002 + ], + "pressure": [ + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815 + ], + "pressure_before_choking": [ + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815, + 93.6056815 + ], + "temperature_kelvin": [ + 361.553538, + 361.553538, + 361.553538, + 361.553538, + 361.553538, + 361.553538 + ], + "z": [ + 0.92075602, + 0.92075602, + 0.92075602, + 0.92075602, + 0.92075602, + 0.92075602 + ] + }, + "polytropic_efficiency": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "polytropic_enthalpy_change_before_choke_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "polytropic_enthalpy_change_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "polytropic_head_kJ_per_kg": [ + 100.0, + 100.0, + 100.0, + 100.0, + 100.0, + 100.0 + ], + "power": [ + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125, + 1.00907125 + ], + "power_unit": "MW", + "pressure_is_choked": [ + false, + false, + false, + false, + false, + false + ], + "rate_exceeds_maximum": [ + false, + false, + false, + false, + false, + false + ], + "rate_has_recirculation": [ + false, + false, + false, + false, + false, + false + ], + "speed": [ + NaN, + NaN, + NaN, + NaN, + NaN, + NaN + ] + } + ], "timesteps": [ - "2010-01-01 00:00:00", - "2011-01-01 00:00:00", - "2012-01-01 00:00:00", - "2013-01-01 00:00:00", - "2014-01-01 00:00:00", - "2015-01-01 00:00:00", - "2016-01-01 00:00:00", - "2017-01-01 00:00:00", "2018-01-01 00:00:00", "2019-01-01 00:00:00", "2020-01-01 00:00:00", "2021-01-01 00:00:00", "2022-01-01 00:00:00", - "2023-01-01 00:00:00", - "2024-01-01 00:00:00", - "2025-01-01 00:00:00", - "2026-01-01 00:00:00", - "2027-01-01 00:00:00", - "2028-01-01 00:00:00", - "2029-01-01 00:00:00" + "2023-01-01 00:00:00" ], - "unit": "MW", - "values": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 5.0, - 5.0, - 5.0, - 5.0, - 5.0, - 5.0, - 5.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] + "turbine_result": null }, - "timesteps": [ - "2010-01-01 00:00:00", - "2011-01-01 00:00:00", - "2012-01-01 00:00:00", - "2013-01-01 00:00:00", - "2014-01-01 00:00:00", - "2015-01-01 00:00:00", - "2016-01-01 00:00:00", - "2017-01-01 00:00:00", - "2018-01-01 00:00:00", - "2019-01-01 00:00:00", - "2020-01-01 00:00:00", - "2021-01-01 00:00:00", - "2022-01-01 00:00:00", - "2023-01-01 00:00:00", - "2024-01-01 00:00:00", - "2025-01-01 00:00:00", - "2026-01-01 00:00:00", - "2027-01-01 00:00:00", - "2028-01-01 00:00:00", - "2029-01-01 00:00:00" - ] - }, - "models": [ { "energy_usage": { "timesteps": [ - "2017-01-01 00:00:00" + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" ], "unit": "MW", "values": [ - 5.0 + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 ] }, "is_valid": { "timesteps": [ - "2017-01-01 00:00:00" + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" ], "unit": "N/A", "values": [ + true, + true, + true, + true, + true, true ] }, "name": "el-consumer1", "power": { "timesteps": [ - "2017-01-01 00:00:00" + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" ], "unit": "MW", "values": [ - 5.0 + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 ] }, "timesteps": [ - "2017-01-01 00:00:00" + "2024-01-01 00:00:00", + "2025-01-01 00:00:00", + "2026-01-01 00:00:00", + "2027-01-01 00:00:00", + "2028-01-01 00:00:00", + "2029-01-01 00:00:00" ] }, { diff --git a/src/tests/libecalc/integration/snapshots/test_all_energy_usage_models/test_all_results/all_energy_usage_models_v3.json b/src/tests/libecalc/integration/snapshots/test_all_energy_usage_models/test_all_results/all_energy_usage_models_v3.json index ded328834..f7e44118a 100644 --- a/src/tests/libecalc/integration/snapshots/test_all_energy_usage_models/test_all_results/all_energy_usage_models_v3.json +++ b/src/tests/libecalc/integration/snapshots/test_all_energy_usage_models/test_all_results/all_energy_usage_models_v3.json @@ -22188,6 +22188,72 @@ "2019-01-01 00:00:00", "2020-01-01 00:00:00" ] + }, + { + "energy_usage": { + "timesteps": [ + "2019-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 2.0 + ] + }, + "is_valid": { + "timesteps": [ + "2019-01-01 00:00:00" + ], + "unit": "N/A", + "values": [ + true + ] + }, + "name": "late_start_consumer", + "power": { + "timesteps": [ + "2019-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 2.0 + ] + }, + "timesteps": [ + "2019-01-01 00:00:00" + ] + }, + { + "energy_usage": { + "timesteps": [ + "2020-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 0.0 + ] + }, + "is_valid": { + "timesteps": [ + "2020-01-01 00:00:00" + ], + "unit": "N/A", + "values": [ + true + ] + }, + "name": "late_start_consumer", + "power": { + "timesteps": [ + "2020-01-01 00:00:00" + ], + "unit": "MW", + "values": [ + 0.0 + ] + }, + "timesteps": [ + "2020-01-01 00:00:00" + ] } ], "sub_components": [] diff --git a/src/tests/libecalc/integration/test_all_consumer_with_time_slots_models.py b/src/tests/libecalc/integration/test_all_consumer_with_time_slots_models.py index ecec0ceb1..eeb7e558b 100644 --- a/src/tests/libecalc/integration/test_all_consumer_with_time_slots_models.py +++ b/src/tests/libecalc/integration/test_all_consumer_with_time_slots_models.py @@ -46,7 +46,7 @@ def test_time_slots_with_changing_model(time_slot_electricity_consumer_with_chan # train-stages are also included as CONSUMER_MODELs model_results = result.models assert isinstance(model_results, list) - assert len(model_results) == 3 + assert len(model_results) == 5 def test_time_slots_with_non_changing_model(time_slot_electricity_consumer_with_same_model_type):