Skip to content

handle missing dual values when barrier solution has no crossover#601

Open
danielelerede-oet wants to merge 2 commits intoPyPSA:masterfrom
open-energy-transition:duals_cplex
Open

handle missing dual values when barrier solution has no crossover#601
danielelerede-oet wants to merge 2 commits intoPyPSA:masterfrom
open-energy-transition:duals_cplex

Conversation

@danielelerede-oet
Copy link

@danielelerede-oet danielelerede-oet commented Mar 4, 2026

Changes proposed in this Pull Request

This PR improves the extraction of solver quality metrics for CPLEX. Previously, linopy attempted to access some quality attributes that are not always available for LP problems solved with CPLEX. In particular, the max_dual_infeasibility metric was not consistently retrieved, which could lead to missing or incomplete solver diagnostics when using CPLEX through Linopy.

This PR introduces safer handling of CPLEX quality attributes and ensures that available metrics are extracted correctly without raising errors when certain attributes are absent.

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • Unit tests for new features were added (if applicable).
  • A note for the release notes doc/release_notes.rst of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

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