Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #629

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Classify the change according to the following categories:
- Truncate the last day of the year instead of the leap day for leap years
##### Added
- Option for ASHP to `force_dispatch` (default = true) which maximizes ASHP thermal output
- Added `min_duration_hours` and `max_duration_hours` for limitting electric storage's energy capacity

## v3.10.2
### Minor Updates
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.0.7 on 2025-01-27 05:41

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('reoptjl', '0076_ashpspaceheaterinputs_force_dispatch_and_more'),
]

operations = [
migrations.AddField(
model_name='electricstorageinputs',
name='max_duration_hours',
field=models.FloatField(blank=True, default=100000.0, help_text='Maximum amount of time storage can discharge at its rated power capacity', validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1000000000.0)]),
),
migrations.AddField(
model_name='electricstorageinputs',
name='min_duration_hours',
field=models.FloatField(blank=True, default=0.0, help_text='Minimum amount of time storage can discharge at its rated power capacity', validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1000000000.0)]),
),
]
18 changes: 18 additions & 0 deletions reoptjl/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3449,6 +3449,24 @@ class ElectricStorageInputs(BaseModel, models.Model):
blank=True,
help_text="Rebate based on installed energy capacity"
)
min_duration_hours = models.FloatField(
default=0.0,
validators=[
MinValueValidator(0),
MaxValueValidator(1.0e9)
],
blank=True,
help_text="Minimum amount of time storage can discharge at its rated power capacity"
)
max_duration_hours = models.FloatField(
default=100000.0,
validators=[
MinValueValidator(0),
MaxValueValidator(1.0e9)
],
blank=True,
help_text="Maximum amount of time storage can discharge at its rated power capacity"
)


class ElectricStorageOutputs(BaseModel, models.Model):
Expand Down
2 changes: 2 additions & 0 deletions reoptjl/test/posts/all_inputs_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@
"max_kw": 100.0,
"min_kwh": 200.0,
"max_kwh": 200.0,
"min_duration_hours": 2.0,
"max_duration_hours": 2.0,
"internal_efficiency_fraction": 0.975,
"inverter_efficiency_fraction": 0.96,
"rectifier_efficiency_fraction": 0.96,
Expand Down
Loading