[BUG] Java: variable objective coefficients are ignored after setObjective

オープン
#2,223 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@pcbeingused333 がすでに取り組んでいます。

2026年11月4日 から。

  • #2269 @pcbeingused333 による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
63/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java
領域
api, backend

調査の方向性

Read the Java bindings' Problem objective construction and the disabled reproductions named in #2219: NativeEdgeCaseTest.aVariableCoefficientChangedAfterSettingTheObjectiveChangesTheSolve and NativeEdgeCaseTest.aVariableAddedAfterSettingTheObjectiveKeepsItsCoefficient. Trace how setObjective and variable coefficients reach the solve, then enable or run those tests. Done means the solve uses current coefficients, or coefficient changes after setObjective are rejected.

索引モデルが issue の本文から書いたものです。

説明

bug

In the Java bindings, Problem builds the objective from the setObjective expression once an objective is set, so later changes to variable objective coefficients are ignored by the solve.

  • x.setObjectiveCoefficient(...) after setObjective does not change the next solve.
  • A variable added after setObjective with a nonzero coefficient has that coefficient ignored.

Expected: the solve uses the current variable coefficients, or setting a coefficient after setObjective is rejected.

Disabled tests that reproduce both (in #2219):

  • NativeEdgeCaseTest.aVariableCoefficientChangedAfterSettingTheObjectiveChangesTheSolve
  • NativeEdgeCaseTest.aVariableAddedAfterSettingTheObjectiveKeepsItsCoefficient

🤖 Generated with Claude Code

主要言語
Cuda
スター
1.1k
フォーク
249
平均マージ
1日 11時間
マージ済み PR(30日)
123

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/cuopt のほかの issue

NVIDIA/cuopt の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。