diff --git a/.helm/templates/redis-stateful-set.yaml b/.helm/templates/redis-stateful-set.yaml index a66a152f0..339705613 100644 --- a/.helm/templates/redis-stateful-set.yaml +++ b/.helm/templates/redis-stateful-set.yaml @@ -20,7 +20,7 @@ spec: containers: - name: {{ .Chart.Name }}-redis image: redis:6.0.8-alpine - args: ["sh", "-c", "redis-server --requirepass $$REDIS_PASSWORD --save 900 1 --save 300 10 --save 60 10000 --appendonly yes --maxmemory 2048mb --maxmemory-policy volatile-lru"] + args: ["sh", "-c", "redis-server --requirepass $$REDIS_PASSWORD --save 900 1 --save 300 10 --save 60 10000 --appendonly yes --maxmemory 2048mb --maxmemory-policy allkeys-lru"] # volumeMounts: # - name: {{ .Chart.Name }}-redis-data-volume # mountPath: /data diff --git a/CHANGELOG.md b/CHANGELOG.md index c0b951636..3cea3c26f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,14 @@ Classify the change according to the following categories: ##### Removed ### Patches -## Develop - 2022-01-11 +## Develop +### Minor Updates +### Added + - In job/ app (v3): Added **addressable_load_fraction** to SpaceHeatingLoad and DomesticHotWaterLoad inputs. +### Changed + - Changed redis service memory settings to mitigate "out of memory" OOM issue we've been getting on production + +## v2.7.0 ### Minor Updates ### Changed - In job/ app (v3): Name changes for many outputs/results. Generally, changes are for energy outputs (not costs) that include "year_one", and are changed to annual_ for scalars and to production_to_, thermal_to_ etc. for time series. diff --git a/job/migrations/0017_domestichotwaterloadinputs_addressable_load_fraction_and_more.py b/job/migrations/0017_domestichotwaterloadinputs_addressable_load_fraction_and_more.py new file mode 100644 index 000000000..d4fa1ba9c --- /dev/null +++ b/job/migrations/0017_domestichotwaterloadinputs_addressable_load_fraction_and_more.py @@ -0,0 +1,35 @@ +# Generated by Django 4.0.7 on 2022-12-29 05:39 + +import django.contrib.postgres.fields +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('job', '0016_coldthermalstorageinputs_coldthermalstorageoutputs_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='domestichotwaterloadinputs', + name='addressable_load_fraction', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1.0)]), blank=True, default=list, help_text='Fraction of input fuel load which is addressable by heating technologies (default is 1.0).Can be a scalar or vector with length aligned with use of monthly_mmbtu (12) or fuel_loads_mmbtu_per_hour.', size=None), + ), + migrations.AddField( + model_name='spaceheatingloadinputs', + name='addressable_load_fraction', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1.0)]), blank=True, default=list, help_text='Fraction of input fuel load which is addressable by heating technologies (default is 1.0).Can be a scalar or vector with length aligned with use of monthly_mmbtu (12) or fuel_loads_mmbtu_per_hour.', size=None), + ), + migrations.AlterField( + model_name='chpinputs', + name='fuel_cost_per_mmbtu', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0)]), blank=True, default=list, help_text='The `fuel_cost_per_mmbtu` is a required input and can be a scalar, a list of 12 monthly values, or a time series of values for every time step.', size=None), + ), + migrations.AlterField( + model_name='spaceheatingloadinputs', + name='fuel_loads_mmbtu_per_hour', + field=django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(blank=True), blank=True, default=list, help_text='Vector of space heating fuel loads [mmbtu/hr] over one year. Must be hourly (8,760 samples), 30 minute (17,520 samples), or 15 minute (35,040 samples). All non-net load values must be greater than or equal to zero. ', size=None), + ), + ] diff --git a/job/migrations/0021_merge_20230112_1748.py b/job/migrations/0021_merge_20230112_1748.py new file mode 100644 index 000000000..c75461d8e --- /dev/null +++ b/job/migrations/0021_merge_20230112_1748.py @@ -0,0 +1,14 @@ +# Generated by Django 4.0.7 on 2023-01-12 17:48 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('job', '0017_domestichotwaterloadinputs_addressable_load_fraction_and_more'), + ('job', '0020_chpoutputs_thermal_production_series_mmbtu_per_hour'), + ] + + operations = [ + ] diff --git a/job/models.py b/job/models.py index 2861775aa..7f20353bb 100644 --- a/job/models.py +++ b/job/models.py @@ -3318,10 +3318,7 @@ class CHPInputs(BaseModel, models.Model): null=False, blank=True, help_text=( - "The CHP system fuel cost is a required input when the CHP system is included as an option." - "The `fuel_cost_per_mmbtu` can be a scalar, a list of 12 monthly values, or a time series of values for every time step." - "If a scalar or a vector of 12 values are provided, then the value is scaled up to 8760 values." - "If a vector of 8760, 17520, or 35040 values is provided, it is adjusted to match timesteps per hour in the optimization." + "The `fuel_cost_per_mmbtu` is a required input and can be a scalar, a list of 12 monthly values, or a time series of values for every time step." ) ) @@ -5015,7 +5012,7 @@ class SpaceHeatingLoadInputs(BaseModel, models.Model): ), default=list, blank=True, - help_text=("Typical load over all hours in one year. Must be hourly (8,760 samples), 30 minute (17," + help_text=("Vector of space heating fuel loads [mmbtu/hr] over one year. Must be hourly (8,760 samples), 30 minute (17," "520 samples), or 15 minute (35,040 samples). All non-net load values must be greater than or " "equal to zero. " ) @@ -5047,6 +5044,20 @@ class SpaceHeatingLoadInputs(BaseModel, models.Model): "DoE Commercial Reference Buildings. Must sum to 1.0.") ) + addressable_load_fraction = ArrayField( + models.FloatField( + validators=[ + MinValueValidator(0), + MaxValueValidator(1.0) + ], + blank=True + ), + default=list, + blank=True, + help_text=( "Fraction of input fuel load which is addressable by heating technologies (default is 1.0)." + "Can be a scalar or vector with length aligned with use of monthly_mmbtu (12) or fuel_loads_mmbtu_per_hour.") + ) + ''' Latitude and longitude are passed on to SpaceHeating struct using the Site struct. City is not used as an input here because it is found using find_ashrae_zone_city() when needed. @@ -5070,6 +5081,9 @@ def clean(self): if self.doe_reference_name != "" or \ len(self.blended_doe_reference_names) > 0: self.year = 2017 # the validator provides an "info" message regarding this) + + if self.addressable_load_fraction == None: + self.addressable_load_fraction = list([1.0]) # should not convert to timeseries, in case it is to be used with monthly_mmbtu or annual_mmbtu if error_messages: raise ValidationError(error_messages) @@ -5191,6 +5205,20 @@ class DomesticHotWaterLoadInputs(BaseModel, models.Model): "DoE Commercial Reference Buildings to simulate buildings/campuses. Must sum to 1.0.") ) + addressable_load_fraction = ArrayField( + models.FloatField( + validators=[ + MinValueValidator(0), + MaxValueValidator(1.0) + ], + blank=True + ), + default=list, + blank=True, + help_text=( "Fraction of input fuel load which is addressable by heating technologies (default is 1.0)." + "Can be a scalar or vector with length aligned with use of monthly_mmbtu (12) or fuel_loads_mmbtu_per_hour.") + ) + ''' Latitude and longitude are passed on to DomesticHotWater struct using the Site struct. City is not used as an input here because it is found using find_ashrae_zone_city() when needed. @@ -5215,6 +5243,9 @@ def clean(self): if self.doe_reference_name != "" or \ len(self.blended_doe_reference_names) > 0: self.year = 2017 # the validator provides an "info" message regarding this) + + if self.addressable_load_fraction == None: + self.addressable_load_fraction = list([1.0]) # should not convert to timeseries, in case it is to be used with monthly_mmbtu or annual_mmbtu class HeatingLoadOutputs(BaseModel, models.Model):