Skip to content

Commit

Permalink
update to v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
EPRI-SQA committed Sep 14, 2021
1 parent e2b7a00 commit 44e17f8
Show file tree
Hide file tree
Showing 13 changed files with 17,865 additions and 8,786 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ Questions and feedback can be submitted to the Electric Power Research Institute

The format is based on [Keep a Changelog] (https://keepachangelog.com/en/1.0.0/).

## [1.1.2] - 2021-08-04 to 2021-09-09
### Changed
- Changed the expected type to float for yearly_degrade battery input

### Fixed
- Degradation Fix: more descriptive column header names on Results files
- Simplifies system_requirements infeasibility checks
- Fix to allow minimum battery sizing user constraints to work

## [1.1.1] - 2021-07-09 to 2021-08-03
### Fixed
- Removed comma from soc_target description in the Model Parameters CSV
Expand Down
4 changes: 2 additions & 2 deletions Model_Parameters_Template_DER.csv
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Battery,1,sdr,0,%/hr,float,"[0, 99]",N/A,None,Energy Storage Self-Discharge Rate
Battery,1,construction_year,2016,year,Period,,N/A,None,The year when capital costs are tendered and construction begins,.,no,.,.,
Battery,1,operation_year,2017,year,Period,,N/A,None,Operation Date of the System,.,no,.,.,
Battery,1,soc_target,100,%,float,"[0, 100] ",N/A,None,The SOC the storage system will return to after every optimization window. For Reliability based ES sizing this is the starting SOC for outage simulation.,.,no,.,.,
Battery,1,yearly_degrade,0,N/A,int,"[0, 100] ",N/A,None,% degradation per year. This calendar degradation combines with cycling degradation to get total degradation.,.,no,.,.,
Battery,1,yearly_degrade,0,%,float,"[0, 100] ",N/A,None,% degradation per year. This calendar degradation combines with cycling degradation to get total degradation.,.,no,.,.,
Battery,1,incl_cycle_degrade,0,N/A,bool,"{0,1}",N/A,None,T or F to include degradation per year,.,no,.,.,
Battery,1,cycle_life_table_eol_condition,80,%,int,"[0, 100] ",N/A,None,End of life condition used to make the cycle_life input table.,.,no,,,
Battery,1,cycle_life_table_eol_condition,80,%,int,"[0, 100] ",N/A,None,ES state based on which cycle budgets are reported in cycle_life table input,.,no,,,
Battery,1,cycle_life_filename,.\data\battery_cycle_life.csv,N/A,string,valid file path to a degradation data file,N/A,None,"For our rainflow model, defines the buckets and the number of cycles per bucket the battery can with stand before requiring replacement",.,no,.,.,
Battery,1,p_start_ch,0,$,float,"[0, p_start_ch)",N/A,None,Startup cost to start charging,.,no,.,.,
Battery,1,p_start_dis,0,$,float,"[0, p_start_dis)",N/A,None,Startup cost to start discharging,.,no,.,.,
Expand Down
4 changes: 2 additions & 2 deletions Model_Parameters_Template_DER.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
"coupled": "None",
"value": "nan"
},
"type": "int"
"type": "float"
}
}
}
Expand Down Expand Up @@ -3255,4 +3255,4 @@
}
},
"type": "Expert"
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ pip install -e ./dervet
We use [Gitlab](https://gitlab.epri.com/storagevet/dervet) for versioning. For the versions available,
see the [list of releases](https://github.com/epri-dev/DER-VET/releases) on this repository.
This is version 1.1.1
This is version 1.1.2
## Authors
Expand Down Expand Up @@ -216,7 +216,7 @@ Please make sure to update tests as appropriate.
This project is licensed under the BSD (3-clause) License - see [LICENSE.txt](./LICENSE.txt).
DER-VET v1.1.1
DER-VET v1.1.2
Copyright © 2021 Electric Power Research Institute, Inc. All Rights Reserved.
Expand Down
6 changes: 3 additions & 3 deletions dervet/MicrogridDER/Battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,17 @@ def set_end_of_life_based_on_degradation_cycle(self, analysis_years, start_year,
no_optimizations_per_year = len(self.degrade_data.iloc[1:].index) / no_years_solved
for indx, year in enumerate(analysis_years):
first_degrad_inx = indx * no_optimizations_per_year
initial_degradation = self.degrade_data.iloc[int(first_degrad_inx)]['degradation']
initial_degradation = self.degrade_data.iloc[int(first_degrad_inx)]['degradation progress %']
last_degrad_idx = first_degrad_inx + no_optimizations_per_year
final_degradation = self.degrade_data.iloc[int(last_degrad_idx)]['degradation']
final_degradation = self.degrade_data.iloc[int(last_degrad_idx)]['degradation progress %']
tot_yr_degradation = final_degradation - initial_degradation
self.yearly_degradation_report[pd.Period(year, freq='y')] = tot_yr_degradation
# fill in the remaining years (assume constant degradation)
self.yearly_degradation_report.fillna(method='ffill', inplace=True)
# estimate lifetime with average yearly degradation
avg_lifetime = (1-self.state_of_health)/self.yearly_degradation_report.mean()

# reset failure years
# reset failure years
self.failure_preparation_years = []

# set EXPECTED_LIFETIME to be the actual EOL -- it should never be 0 years
Expand Down
20 changes: 10 additions & 10 deletions dervet/MicrogridDER/ESSSizing.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,39 +100,39 @@ def __init__(self, params):
if self.user_ch_rated_max:
self.size_constraints += [cvx.NonPos(self.ch_max_rated - self.user_ch_rated_max)]
if self.user_ch_rated_min:
self.size_constraints += [cvx.NonPos(self.user_ch_rated_min - self.ch_min_rated)]
self.size_constraints += [cvx.NonPos(-self.ch_max_rated + self.user_ch_rated_min)]

self.dis_max_rated = self.ch_max_rated

if self.user_dis_rated_min:
self.size_constraints += [cvx.NonPos(self.user_dis_rated_min - self.dis_min_rated)]
if self.user_dis_rated_max:
self.size_constraints += [cvx.NonPos(self.dis_max_rated - self.user_dis_rated_max)]
if self.user_dis_rated_min:
self.size_constraints += [cvx.NonPos(-self.dis_max_rated + self.user_dis_rated_min)]
if self.incl_charge_limits and self.limit_charge_max is not None:
TellUser.error(f'Ignoring charge max time series because {self.tag}-{self.name} sizing for power capacity')
self.limit_charge_max = None
if self.incl_discharge_limits and self.limit_discharge_max is not None:
TellUser.error(f'Ignoring discharge max time series because {self.tag}-{self.name} sizing for power capacity')
self.limit_discharge_max = None

elif not self.ch_max_rated: # if the user inputted the discharge rating as 0, then size discharge rating
elif not self.ch_max_rated: # if the user inputted the charge rating as 0, then size for charge
self.ch_max_rated = cvx.Variable(name='charge_power_cap', integer=True)
self.size_constraints += [cvx.NonPos(-self.ch_max_rated)]
if self.user_ch_rated_max:
self.size_constraints += [cvx.NonPos(self.ch_max_rated - self.user_ch_rated_max)]
if self.user_ch_rated_min:
self.size_constraints += [cvx.NonPos(self.user_ch_rated_min - self.ch_min_rated)]
self.size_constraints += [cvx.NonPos(-self.ch_max_rated + self.user_ch_rated_min)]
if self.incl_charge_limits and self.limit_charge_max is not None:
TellUser.error(f'Ignoring charge max time series because {self.tag}-{self.name} sizing for power capacity')
self.limit_charge_max = None

elif not self.dis_max_rated: # if the user inputted the charge rating as 0, then size for charge
elif not self.dis_max_rated: # if the user inputted the discharge rating as 0, then size discharge rating
self.dis_max_rated = cvx.Variable(name='discharge_power_cap', integer=True)
self.size_constraints += [cvx.NonPos(-self.dis_max_rated)]
if self.user_dis_rated_min:
self.size_constraints += [cvx.NonPos(self.user_dis_rated_min - self.dis_min_rated)]
if self.user_dis_rated_max:
self.size_constraints += [cvx.NonPos(self.dis_max_rated - self.user_dis_rated_max)]
if self.user_dis_rated_min:
self.size_constraints += [cvx.NonPos(-self.dis_max_rated + self.user_dis_rated_min)]
if self.incl_discharge_limits and self.limit_discharge_max is not None:
TellUser.error(f'Ignoring discharge max time series because {self.tag}-{self.name} sizing for power capacity')
self.limit_discharge_max = None
Expand Down Expand Up @@ -427,7 +427,7 @@ def max_p_schedule_down(self):
max_charging_range = self.ch_max_rated - self.ch_min_rated
# ability to provide regulation down through discharging less
if self.is_discharge_sizing():
if not self.user_ch_rated_max:
if not self.user_dis_rated_max:
max_discharging_range = self.user_dis_rated_max - self.dis_min_rated
else:
max_discharging_range = np.inf
Expand All @@ -444,7 +444,7 @@ def replacement_cost(self):
return np.dot(self.replacement_cost_function, [1, self.discharge_capacity(True), self.energy_capacity(True)])

def is_charge_sizing(self):
return isinstance(self.dis_max_rated, cvx.Variable)
return isinstance(self.ch_max_rated, cvx.Variable)

def is_discharge_sizing(self):
return isinstance(self.dis_max_rated, cvx.Variable)
Expand Down
4 changes: 0 additions & 4 deletions dervet/MicrogridScenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,6 @@ def optimize_problem_loop(self, **kwargs):
**kwargs: allows child classes to pass in additional arguments to set_up_optimization
"""
# calculate and check that system requirement set by value streams can be met
self.system_requirements = self.service_agg.identify_system_requirements(self.poi.der_list,
self.opt_years,
self.frequency)
alpha = 1
if self.poi.is_sizing_optimization:
# calculate the annuity scalar that will convert any yearly costs into a present value
Expand Down
2 changes: 1 addition & 1 deletion dervet/Schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
"cba": "n",
"max": "100",
"min": "0",
"type": "int",
"type": "float",
"unit": "%"
}
}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
README = (HERE / "README.md").read_text()

setup(name='dervet',
version='1.1.1',
version='1.1.2',
description='',
url='der-vet.com',
long_description=README,
Expand Down
Loading

0 comments on commit 44e17f8

Please sign in to comment.