-
Notifications
You must be signed in to change notification settings - Fork 28
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
Set slacks to zero #117
Set slacks to zero #117
Conversation
pareto/strategic_water_management/strategic_produced_water_optimization.py
Show resolved
Hide resolved
pareto/strategic_water_management/strategic_produced_water_optimization.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. I like this new restructuring of code, it is definitely cleaner. I ran the code with our four modes (capacity vs distance, input vs calculated) and all outputs looked good! Only change suggested is to remove df_parameters as an input to _preprocess_data (line 5212), similar to the other methods.
pareto/strategic_water_management/strategic_produced_water_optimization.py
Show resolved
Hide resolved
pareto/strategic_water_management/strategic_produced_water_optimization.py
Show resolved
Hide resolved
…t-pareto into set_slacks_zero
I removed two other unused imports. Other than that it looks good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for implementing those suggestions!
c28cc4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, runs as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Fixes/Addresses/Summary/Motivation:
This PR adds a method to set slacks to zero for the strategic model. The method checks if the termination condition of the solver is unfeasible, in that case the slacks are activated and the model is run again.
Changes proposed in this PR:
run_strategic_model.py
has been simplified. It now contains call to the methodsolve_model(model, options)
which receives a model object and a dictionary with the following options:create_model()
slightly to "attach"df_sets
anddf_parameters
to the model object so we don't have to pass those in as part of thepostprocess_water_quality_calculation(model, opt)
.Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my
contribution:
at the top level of this directory.
rights to intellectual property that includes these contributions, I represent that I have
received permission to make contributions and grant the required license on behalf of that
employer.