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

ADD: new energy storage opfitd problem specification #19

Merged
merged 16 commits into from
Nov 27, 2023

Conversation

juanjospina
Copy link
Collaborator

Pull Request (PR) Template

This PR is a major PR that adds a new problem specification that allows running a OPFITD considering storage costs. The names of the new problem specifications are:

  • solve_opfitd_storage(...) - single network (single timestep)
  • solve_mn_opfitd_storage(...) - multinetwork (multi-timestep)

Major Changes:

  • Added eng2math_passthrough parameter to all instantiate_model(..) and solve_X(...) functions.
  • Added unit tests to opftid_storage.jl that test the correct operation of the eng2math_passthrough both in single network and multinetwork applications.
  • Added test cases files for the opftid_storage.jl unit tests.
  • Added new problem specifications build_opfitd_storage and build_mn_opfitd_storage to prob/opfitd_storage.jl that perform opf optimization taking into account storage costs.
  • Added new objective functions to objective_storage.jl that consider energy storage costs in the objective function for the opf optimization.
  • Added unit tests to opftid_storage.jl that test the new costs functions with energy storage costs added.
  • Added functions _compute_default_strg_cost_transmission and _compute_default_strg_cost_distribution to data.jl that compute default costs for storage devices based on dafault parameters. Users are encouraged to use their own costs.
  • Added code to common.jl functions parse_power_distribution_file and parse_power_transmission_file that adds default costs to distribution and transmission system(s) storage devices when parsing their individual files.
  • Modified solve_opfitd_storage and solve_mn_opfitd_storage functions in opfitd_storage.jl, so that the eng2math_passthrough = Dict("storage"=>["cost"]) is done automatically. PMITD assumes that if an user is running the solve_opfitd_storage(...) function, then storage costs should be passed from ENG to MATH models.
  • Added the required variables and constraints for Transmission system-related storage devices to all problem specifications in opfitd_storage.jl.
  • Fixed storage variables and constraints being used in opfitd and opfitd_oltc.jl where the versions used were the _mi mixed integer versions.
  • Modified all objectives in objective_storage.jl to take into account the cost of discharging the storage devices in the transmission system. Also, added in-situ conversion for the PMD cost that converts the $/kWh -> $/pu cost, so that the user can provide the $/kWh in the ENG model, avoiding confusions.
  • Added the option to parse files and use the parsed structure solve directly the optimization problem using solve_opfitd_storage(..) and solve_mn_opfitd_storage(..). This allows users to parse the data, modify costs (or other parameters) and then run the solve functions without using the solve_model(..) function which requires users to explicitly use the eng2math_passthrough = Dict("storage"=>["cost"]).
  • Added option to parse files and use the parsed structure directly into any solve_x(..) functions.
  • Added documentation of the new problem formulation that considers storage costs.
  • Updated BeginnersGuide.jl Pluto Notebook to latest versions.
  • Updated DOCs dependencies and fixed minor issues.

Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 142 lines in your changes are missing coverage. Please review.

Comparison is base (4db5def) 79.80% compared to head (2cfe22b) 80.57%.

Files Patch % Lines
src/prob/opfitd_storage.jl 87.93% 76 Missing ⚠️
src/prob/opfitd.jl 45.45% 24 Missing ⚠️
src/prob/opfitd_oltc.jl 37.14% 22 Missing ⚠️
src/core/objective_storage.jl 83.33% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
+ Coverage   79.80%   80.57%   +0.77%     
==========================================
  Files          28       30       +2     
  Lines        4040     4885     +845     
==========================================
+ Hits         3224     3936     +712     
- Misses        816      949     +133     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juanjospina juanjospina merged commit 76ad53e into lanl-ansi:main Nov 27, 2023
@juanjospina juanjospina deleted the add-energystorage-costs branch November 27, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant