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

Export opt model setting #1141

Merged
merged 9 commits into from
Sep 11, 2024
Merged

Conversation

jd-lara
Copy link
Member

@jd-lara jd-lara commented Sep 11, 2024

No description provided.

@jd-lara jd-lara requested a review from daniel-thom September 11, 2024 16:50
@jd-lara jd-lara linked an issue Sep 11, 2024 that may be closed by this pull request
@jd-lara jd-lara requested a review from rodrigomha September 11, 2024 16:50
@jd-lara jd-lara self-assigned this Sep 11, 2024
Copy link
Contributor

@rodrigomha rodrigomha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks okay.

Are we fine keeping the name of the functions to be serialize_problem rather than export_problem?

@jd-lara
Copy link
Member Author

jd-lara commented Sep 11, 2024

This looks okay.

Are we fine keeping the name of the functions to be serialize_problem rather than export_problem?

IMO is fine, serialize is not exported.

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.93%. Comparing base (f7e83f4) to head (2b45701).
Report is 10 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1141      +/-   ##
==========================================
+ Coverage   77.89%   77.93%   +0.03%     
==========================================
  Files         118      118              
  Lines       12700    12707       +7     
==========================================
+ Hits         9893     9903      +10     
+ Misses       2807     2804       -3     
Flag Coverage Δ
unittests 77.93% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/core/settings.jl 93.15% <100.00%> (+0.09%) ⬆️
src/operation/decision_model.jl 91.27% <100.00%> (ø)
src/operation/emulation_model.jl 86.00% <100.00%> (ø)
src/operation/operation_model_interface.jl 79.35% <100.00%> (+1.54%) ⬆️

@jd-lara jd-lara requested a review from rodrigomha September 11, 2024 20:40

if get_export_optimization_model(get_settings(model))
model_output_dir = joinpath(output_dir, "optimization_model_exports")
if !ispath(model_output_dir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case you care, this is slightly more convenient.

Suggested change
if !ispath(model_output_dir)
mkpath(model_output_dir)

Copy link
Contributor

@daniel-thom daniel-thom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Made one minor suggestion if you're interested.

@jd-lara jd-lara merged commit dd26d5a into NREL-Sienna:main Sep 11, 2024
9 of 10 checks passed
@jd-lara jd-lara deleted the export_opt_model_setting branch September 11, 2024 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export Optimization Problem at each solve call
3 participants