Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bridges] MultirowChange in set_map.jl drops zero coefficients

Open
#3,106 2 comments 0 reactions 1 assignee View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jump-dev/MathOptInterface.jl

All issues in jump-dev/MathOptInterface.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.