[BUG] Java: variable objective coefficients are ignored after setObjective
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 63/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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(...)aftersetObjectivedoes not change the next solve.- A variable added after
setObjectivewith 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.aVariableCoefficientChangedAfterSettingTheObjectiveChangesTheSolveNativeEdgeCaseTest.aVariableAddedAfterSettingTheObjectiveKeepsItsCoefficient
🤖 Generated with Claude Code
- Dominant language
- Cuda
- Stars
- 1.1k
- Forks
- 249
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 127
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 NVIDIA/cuopt
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 Half a day Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
feature request
Difficulty 4/5 3-5 days Newbie friendliness 45/100
NVIDIA/cuopt#2239 · 1 reaction ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
-
[BUG] Java: Problem.addConstraint accepts the same Constraint twicePossibly taken @akhil9tiet claimed this 6 days ago. Openbug
NVIDIA/cuopt#2224 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nexu-io/open-design#9262 · 1 comment ·
Maintainers usually reply within 1 day
-
[BUG] LLM conflict check ignores MNEMOSYNE_LLM_MAX_TOKENS, so reasoning models return empty repliesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
mnemosyne-oss/mnemosyne#1325 ·
Maintainers usually reply within 1 day
-
enhancement meshtastic-2.8
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
pskillen/meshflow-api#459 ·
-
agent-assisted bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug lobby
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
alastair-smith/card-games#372 ·
Maintainers usually reply within 1 day