Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bridges] MultirowChange in set_map.jl drops zero coefficients

Đang mở
#3,106 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@odow đang làm issue này rồi.

Từ ngày 16/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.

Ngôn ngữ chính
Julia
Star
506
Fork
103
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jump-dev/MathOptInterface.jl

Tất cả issue của jump-dev/MathOptInterface.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.