8000 Fix transcription of vector constraints with constant components by dnguyen227 · Pull Request #442 · infiniteopt/InfiniteOpt.jl · GitHub
[go: up one dir, main page]

Skip to content

Fix transcription of vector constraints with constant components - #442

Merged
pulsipher merged 1 commit into
infiniteopt:masterfrom
dnguyen227:vector_constraint_promotion
Sep 11, 2026
Merged

pulsipher merged 1 commit into
infiniteopt:masterfrom
dnguyen227:vector_constraint_promotion

Conversation

@dnguyen227
Copy link
Copy Markdown
Member

Vector constraints with a constant (e.g. a cone with one fixed entry) builds fine but errors during transcription. The constant row is stored as a GenericAffExpr with no variable, then transcription makes it a Float64. This creates mixed elements which is rejected by moi_function inside _process_constraint (src/TranscriptionOpt/transcribe.jl).

Another option is to change map_expression but it looks like that would convert things that are actually Float64 into GenericAffExpr indiscriminately.

Fixes #440

@codecov
codecov Bot commented Sep 7, 2026 •
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.72%. Comparing base (e26e51c) to head (c5d8e40).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #442   +/-   ##
=======================================
  Coverage   99.72%   99.72%           
=======================================
  Files          39       39           
  Lines        6819     6821    +2     
=======================================
+ Hits         6800     6802    +2     
  Misses         19       19           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pulsipher pulsipher added the bug Something isn't working label Sep 11, 2026
@pulsipher
pulsipher merged commit 467c671 into infiniteopt:master Sep 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transcription fails for vector constraints with constant components (cones for example)

2 participants

0