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

Change GAMS solver type for time limit adjustment #2706

Merged
merged 2 commits into from
Jan 27, 2023

Conversation

shermanjasonaf
Copy link
Contributor

Summary/Motivation:

The PyROS subsolver time limit adjustment routine introduced in #2660 does not properly detect the GAMS shell solver type (solvers.plugins.solvers.GAMS.GAMSShell or type(SolverFactory("gams", solver_io="shell")), for which the routine was originally written. This detection issue occurs as the GAMS shell solver type does not inherit from the generic GAMS solver interface type solvers.plugins.solvers.GAMS.GAMSSolver (accessed via SolverFactory.get_class("gams")).

In this PR, we ensure that the GAMS shell type, rather than the more generic interface, is detected
and acted upon in the subsolver time limit adjustment routine of #2660.

Changes proposed in this PR:

See summary.

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has 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.

@codecov
Copy link

codecov bot commented Jan 26, 2023

Codecov Report

Base: 87.04% // Head: 86.73% // Decreases project coverage by -0.32% ⚠️

Coverage data is based on head (745aa17) compared to base (200e777).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2706      +/-   ##
==========================================
- Coverage   87.04%   86.73%   -0.32%     
==========================================
  Files         757      756       -1     
  Lines       84623    84586      -37     
==========================================
- Hits        73663    73367     -296     
- Misses      10960    11219     +259     
Flag Coverage Δ
linux 84.45% <0.00%> (+<0.01%) ⬆️
osx 74.50% <0.00%> (ø)
other 84.63% <0.00%> (ø)
win 81.79% <0.00%> (ø)

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

Impacted Files Coverage Δ
pyomo/contrib/pyros/util.py 78.10% <0.00%> (-6.73%) ⬇️
pyomo/contrib/pyros/master_problem_methods.py 53.25% <0.00%> (-34.68%) ⬇️
pyomo/contrib/pyros/pyros_algorithm_methods.py 75.30% <0.00%> (-18.08%) ⬇️
pyomo/contrib/pyros/separation_problem_methods.py 71.76% <0.00%> (-16.18%) ⬇️
pyomo/contrib/gdpopt/branch_and_bound.py 67.65% <0.00%> (-8.94%) ⬇️
pyomo/contrib/gdpopt/oa_algorithm_utils.py 96.00% <0.00%> (-4.00%) ⬇️
pyomo/opt/plugins/sol.py 83.61% <0.00%> (-2.83%) ⬇️
pyomo/contrib/pyros/pyros.py 93.19% <0.00%> (-1.05%) ⬇️
pyomo/contrib/pyros/uncertainty_sets.py 92.33% <0.00%> (-0.59%) ⬇️
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@blnicho blnicho merged commit 141baf0 into Pyomo:main Jan 27, 2023
@shermanjasonaf shermanjasonaf deleted the fix-adjust-pyros-time-lim branch June 19, 2023 00:02
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.

4 participants