Skip to content

Commit aa1ea8b

Browse files
authored
Merge pull request #691 from NREL/zero-thermal
Minor Fixes December 2025
2 parents 46dfe52 + 28bbb42 commit aa1ea8b

File tree

6 files changed

+68
-7
lines changed

6 files changed

+68
-7
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ Classify the change according to the following categories:
2626
##### Removed
2727
### Patches
2828

29+
## v3.17.4
30+
### Minor Updates
31+
##### Fixed
32+
- `/schedule_stats` endpoint by updating syntax for Pandas date_range based on Python 3.12 upgrade
33+
- Enabled campus/blended building types for a POST request to `/simulated_load` endpoint by adding `percent_share`
34+
##### Changed
35+
- Reduced the minimum energy input for heating and cooling loads to zero, from 1.0
36+
- Increased the max value for `annual_tonhour` cooling input by an order of magnitude
37+
2938
## v3.17.3
3039
### Minor Updates
3140
##### Added

reo/utilities.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def generate_year_profile_hourly(year, consecutive_periods):
273273
end_date = "12/31/"+str(year)
274274
else:
275275
end_date = "1/1/"+str(year+1)
276-
dt_profile = pd.date_range(start='1/1/'+str(year), end=end_date, freq="1H", closed="left")
276+
dt_profile = pd.date_range(start='1/1/'+str(year), end=end_date, freq="1h", inclusive="left")
277277
year_profile_hourly_series = pd.Series(np.zeros(8760), index=dt_profile)
278278

279279
# Check if the consecutive_periods is a list_of_dict or other (must be Pandas DataFrame), and if other, convert to list_of_dict
@@ -333,7 +333,7 @@ def get_weekday_weekend_total_hours_by_month(year, year_profile_hourly_list):
333333
end_date = "12/31/"+str(year)
334334
else:
335335
end_date = "1/1/"+str(year+1)
336-
dt_profile = pd.date_range(start='1/1/'+str(year), end=end_date, freq="1H", closed="left")
336+
dt_profile = pd.date_range(start='1/1/'+str(year), end=end_date, freq="1h", inclusive="left")
337337
year_profile_hourly_series = pd.Series(year_profile_hourly_list, index=dt_profile)
338338
unavail_hours = year_profile_hourly_series[year_profile_hourly_series == 1]
339339
weekday_weekend_total_hours_by_month = {m:{} for m in range(1,13)}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Generated by Django 4.0.7 on 2025-09-26 14:42
2+
3+
import django.core.validators
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('reoptjl', '0104_cstinputs_can_waste_heat'),
11+
]
12+
13+
operations = [
14+
migrations.AlterField(
15+
model_name='coolingloadinputs',
16+
name='annual_tonhour',
17+
field=models.FloatField(blank=True, help_text="Annual electric chiller thermal energy production, in [Ton-Hour],used to scale simulated default electric chiller load profile for the site's climate zone", null=True, validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(1000000000.0)]),
18+
),
19+
migrations.AlterField(
20+
model_name='domestichotwaterloadinputs',
21+
name='annual_mmbtu',
22+
field=models.FloatField(blank=True, help_text="Annual site DHW consumption, used to scale simulated default building load profile for the site's climate zone [MMBtu]", null=True, validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(100000000.0)]),
23+
),
24+
migrations.AlterField(
25+
model_name='processheatloadinputs',
26+
name='annual_mmbtu',
27+
field=models.FloatField(blank=True, help_text='Annual site process heat fuel consumption, used to scale simulated default industry load profile [MMBtu]', null=True, validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(100000000.0)]),
28+
),
29+
migrations.AlterField(
30+
model_name='spaceheatingloadinputs',
31+
name='annual_mmbtu',
32+
field=models.FloatField(blank=True, help_text="Annual site space heating consumption, used to scale simulated default building load profile for the site's climate zone [MMBtu]", null=True, validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(100000000.0)]),
33+
),
34+
]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Generated by Django 4.2.26 on 2025-12-09 23:38
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('reoptjl', '0105_alter_coolingloadinputs_annual_tonhour_and_more'),
10+
('reoptjl', '0112_windinputs_acres_per_kw'),
11+
]
12+
13+
operations = [
14+
]

reoptjl/models.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5116,8 +5116,8 @@ class CoolingLoadInputs(BaseModel, models.Model):
51165116

51175117
annual_tonhour = models.FloatField(
51185118
validators=[
5119-
MinValueValidator(1),
5120-
MaxValueValidator(MAX_BIG_NUMBER)
5119+
MinValueValidator(0.0),
5120+
MaxValueValidator(1.0e9)
51215121
],
51225122
null=True,
51235123
blank=True,
@@ -7654,7 +7654,7 @@ class SpaceHeatingLoadInputs(BaseModel, models.Model):
76547654

76557655
annual_mmbtu = models.FloatField(
76567656
validators=[
7657-
MinValueValidator(1),
7657+
MinValueValidator(0.0),
76587658
MaxValueValidator(MAX_BIG_NUMBER)
76597659
],
76607660
null=True,
@@ -7829,7 +7829,7 @@ class DomesticHotWaterLoadInputs(BaseModel, models.Model):
78297829

78307830
annual_mmbtu = models.FloatField(
78317831
validators=[
7832-
MinValueValidator(1),
7832+
MinValueValidator(0.0),
78337833
MaxValueValidator(MAX_BIG_NUMBER)
78347834
],
78357835
null=True,
@@ -7985,7 +7985,7 @@ class ProcessHeatLoadInputs(BaseModel, models.Model):
79857985

79867986
annual_mmbtu = models.FloatField(
79877987
validators=[
7988-
MinValueValidator(1),
7988+
MinValueValidator(0.0),
79897989
MaxValueValidator(MAX_BIG_NUMBER)
79907990
],
79917991
null=True,

reoptjl/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,7 @@ def simulated_load(request):
656656
data = json.loads(request.body)
657657
required_post_fields = ["load_type", "year"]
658658
either_required = ["normalize_and_scale_load_profile_input", "doe_reference_name"]
659+
optional = ["percent_share"]
659660
either_check = 0
660661
for either in either_required:
661662
if data.get(either) is not None:
@@ -668,6 +669,9 @@ def simulated_load(request):
668669
for field in required_post_fields:
669670
# TODO make year optional for doe_reference_name input
670671
inputs[field] = data[field]
672+
for opt in optional:
673+
if data.get(opt) is not None:
674+
inputs[opt] = data[opt]
671675
if data.get("normalize_and_scale_load_profile_input") is not None:
672676
if "load_profile" not in data:
673677
return JsonResponse({"Error": "load_profile is required when normalize_and_scale_load_profile_input is provided."}, status=400)

0 commit comments

Comments
 (0)