Skip to content

Link selected values in induced linearity reformulation - #4117

Open
Kiril1Shevtsov wants to merge 1 commit into
Pyomo:mainfrom
Kiril1Shevtsov:fix/4103-induced-linearity-link
Open

Kiril1Shevtsov wants to merge 1 commit into
Pyomo:mainfrom
Kiril1Shevtsov:fix/4103-induced-linearity-link

Conversation

@Kiril1Shevtsov

@Kiril1Shevtsov Kiril1Shevtsov commented Nov 23, 2026 •

Copy link
Copy Markdown

Summary

Fix a correctness issue in the GDP transformation where a discrete value could be selected without properly constraining the corresponding original variable.

The previous transformation enforced the discrete selection but did not link that selection to the original variable. As a result, the transformed model could admit solutions that did not satisfy the intended relationship.

The patch adds the missing linking constraint and allows inactive variable copies to take the value zero.

Motivation and context

A GDP reformulation should preserve the constraints represented by the original model. Selecting a discrete value is not sufficient if the original variable remains free to take a different value.

The missing link could therefore produce solutions that were feasible for the transformed formulation but inconsistent with the original model.

The correction enforces the relationship between the selected value and the original variable while allowing inactive copies to remain at zero.

Testing

Validation included:

  • 6 tests passed.
  • 4 GLPK-dependent tests skipped.
  • 144/144 independent algebraic checks passed.
  • 24/24 independent GDP checks passed.

The GLPK-dependent cases were not executed, so these results do not establish solver-level correctness for those cases.

AI Disclosure

ChatGPT was used to translate this PR description into English, review the code for potential issues, suggest fixes that I subsequently verified myself, assist with writing tests, and help assess their correctness.

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