Ac/port psi 1585 dual mip rounding#128
Closed
acostarelli wants to merge 5 commits into
Closed
Conversation
Gap analysis + actionable plan for porting PSI (PowerSimulations.jl) generic optimization-core changes into IOM. Confirmed port: PR #1585 (dual-cache MIP-tolerance rounding); plus DLR IOM portion and minor serialization residuals, with an already-ported "do not redo" list. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Round cached integer/binary primal values to the nearest integer before re-fixing relaxed variables in process_duals. MIP solver tolerances leave values like 0.9999997 instead of 1.0, making the fixed relaxation infeasible. Landed into IOM's existing dual_processing structure (not PSI's VarRestoreInfo refactor); the restore path already reuses var_cache, so rounding once also covers the integer-restore path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Record findings for the three plan items: #1585 ported (functional rounding fix only, not PSI's struct refactor); DLR has no IOM work (param types live in POM); #1539 residuals are stale write_result! refs with no action needed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ports the PSI #1585 fix into InfrastructureOptimizationModels.jl by rounding cached primal values for dense integer/binary variable containers before re-fixing them during process_duals, preventing LP infeasibility caused by MIP integrality tolerances (e.g., 0.9999997 vs 1.0).
Changes:
- Added
_round_cache_values!forDenseAxisArraycaches and applied it immediately beforeJuMP.fix.(...)inprocess_duals. - Added a regression test ensuring MIP-tolerance values in the cache are snapped to exact integers.
- Added an internal port-plan markdown document capturing PSI→IOM port status and rationale.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/core/dual_processing.jl |
Rounds cached integer/binary primal values before refixing during dual processing to avoid tolerance-induced infeasibility. |
test/test_optimization_container.jl |
Adds a regression test validating cache rounding behavior for MIP-tolerance artifacts. |
.claude/iom_port_plan.md |
Documents PSI port tracking and the rationale for the #1585 rounding-only port. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Performance Results This branch |
acostarelli
commented
Jun 26, 2026
…re method
Comment 1: inline the integer-cache rounding in process_duals instead of a
dedicated _round_cache_values! helper, and drop the trivial unit test that only
exercised round.(). Rounding cached integer primals before re-fixing is the
canonical JuMP pattern for computing MILP duals.
Comment 2: add the missing write_output! method for 1-D UnitRange-indexed
(time-only) results in DecisionModelStore, which previously MethodError'd since
initialize_storage! allocates that shape for component-less results. Mirrors
PSI's write_result! (the #1506 system-slack fix) and the existing 1-D
Vector{String} method. Add a store write/read round-trip test and correct the
port-plan note.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`const PSI = InfrastructureOptimizationModels` was a misleading alias — this is IOM, not PowerSimulations. Replace all 272 `PSI.` references with the correct `IOM.` alias (already defined in the test harness) and drop the redundant `PSI` definitions/guards in mock_components.jl and the three test files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for opening a PR to InfrastructureOptimizationModels.jl, please take note of the following when making a PR:
Check the contributor guidelines