[Bridges] MultirowChange in set_map.jl drops zero coefficients
Maintainers usually reply within 1 day
@odow is already working on this.
Since Oct 16, 2026.
Assessment
This issue has not been assessed yet.
Description
The MOI.modify method for MultirowChange in src/Bridges/Constraint/set_map.jl drops zeros after mapping the new coefficients (the !iszero filter added in #2662). In both examples the variable is in one row, so the change is the whole column.
With JuMP and SCS the constraint goes through SetDotScalingBridge:
using JuMP, LinearAlgebra, SCS
model = Model(SCS.Optimizer)
set_silent(model)
@variable(model, x)
@constraint(model, x <= 2)
@constraint(model, c, Symmetric([1 x; x 1]) in PSDCone())
@objective(model, Max, x)
optimize!(model)
value(x) # 1.0
set_normalized_coefficient(c, x, [(2, 0.0)])
optimize!(model)
value(x) # still 1.0, should be 2.0
In MOI, this is test_modify_MultirowChange from test/Bridges/Constraint/test_NormOneConeToNormConeBridge.jl with 0.0 instead of 2.0:
import MathOptInterface as MOI
inner = MOI.Utilities.Model{Float64}()
model = MOI.Bridges.Constraint.NormOneConeToNormCone{Float64}(inner)
x = MOI.add_variables(model, 2)
c = MOI.add_constraint(model, MOI.Utilities.vectorize(1.0 .* x), MOI.NormOneCone(2))
MOI.modify(model, c, MOI.MultirowChange(x[2], [(2, 0.0)]))
MOI.get(model, MOI.ConstraintFunction(), c) # row 2 is still 1.0 x[2]
This is on MOI 1.54.0 and master, with JuMP 1.32.1 and SCS 2.7.0.
- Dominant language
- Julia
- Stars
- 506
- Forks
- 103
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 9
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jump-dev/MathOptInterface.jl
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jump-dev/MathOptInterface.jl#3113 ·
Maintainers usually reply within 1 day
-
Precision loss in Hessian computationPossibly taken @blegat claimed this 8 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
jump-dev/MathOptInterface.jl#3104 · 11 comments ·
Maintainers usually reply within 1 day
-
Layer instantiatorOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
jump-dev/MathOptInterface.jl#2986 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
jump-dev/MathOptInterface.jl#2969 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Add Batched{S} setOpenType: Set Request
Difficulty 5/5 Over a week Newbie friendliness 35/100
jump-dev/MathOptInterface.jl#2904 · 15 comments · 7 reactions ·
Maintainers usually reply within 1 day
All issues in jump-dev/MathOptInterface.jl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
legend-exp/LegendDataManagement.jl#232 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
EnzymeAD/Reactant.jl#3569 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
astroautomata/SymbolicRegression.jl#783 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day