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

Update cplex solution parser for cplex 12.10 #1792

Merged
merged 1 commit into from
Jan 25, 2021

Conversation

jsiirola
Copy link
Member

Fixes #1766

Summary/Motivation:

Starting in CPLEX 12.10, cplex returns an <objectiveValues> tag as part of the solution output. This was running afoul of the sol file parser. This is an extension of PR #1779 to actually parse and return the named objective values in the results object.

Changes proposed in this PR:

  • parse the <objectiveValues> / <objective> tags in the cplex output
  • update kernel.block.load_solution() to not throw errors when redundant objective values are encountered.

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 19, 2021

Codecov Report

Merging #1792 (49b20dc) into master (dcd3fd8) will decrease coverage by 0.20%.
The diff coverage is 37.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1792      +/-   ##
==========================================
- Coverage   74.95%   74.75%   -0.21%     
==========================================
  Files         638      638              
  Lines       91797    92837    +1040     
==========================================
+ Hits        68810    69400     +590     
- Misses      22987    23437     +450     
Impacted Files Coverage Δ
pyomo/solvers/plugins/solvers/CPLEX.py 88.01% <28.57%> (-0.78%) ⬇️
pyomo/core/kernel/block.py 100.00% <100.00%> (ø)
pyomo/solvers/plugins/solvers/GUROBI.py 68.50% <0.00%> (-21.24%) ⬇️
pyomo/solvers/plugins/solvers/GAMS.py 71.41% <0.00%> (-6.37%) ⬇️
pyomo/contrib/gdpbb/GDPbb.py 19.84% <0.00%> (-1.87%) ⬇️
pyomo/contrib/mindtpy/MindtPy.py 97.10% <0.00%> (-1.28%) ⬇️
pyomo/repn/plugins/gams_writer.py 92.98% <0.00%> (-0.26%) ⬇️
pyomo/solvers/plugins/solvers/mosek_direct.py 13.27% <0.00%> (-0.02%) ⬇️
pyomo/contrib/gdpopt/GDPopt.py 100.00% <0.00%> (ø)
pyomo/contrib/multistart/multi.py 100.00% <0.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dcd3fd8...49b20dc. Read the comment docs.

@blnicho blnicho merged commit 249523f into Pyomo:master Jan 25, 2021
@jsiirola jsiirola deleted the cplex-12.10-soln-parser branch January 29, 2021 16:43
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.

Error with Cplex 20.1.0.0
2 participants