[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 15h
- Merged PRs (30d)
- 124
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 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
NVIDIA/cuopt#2255 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 50/100
Maintainers usually reply within 1 day
Similar issues
-
priority: low ☕️ type: bug 🐛
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
agent-self
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
yologdev/yoyo-evolve#1117 · 1 comment ·
-
area: kitchen bug difficulty: easy good first issue kitchen: flisk-agent kitchen: scores priority: low tech: bun tech: typescript
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
flisk-sh/run-my-agents#191 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nexu-io/open-design#9262 · 1 comment ·
Maintainers usually reply within 1 day