[BUG] Java: Problem.write of an unnamed model produces an MPS file that read rejects

Open
#2,225 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
backend, databases

Research direction

Start with the disabled NativeEdgeCaseTest.anUnnamedModelRoundTripsThroughAnMPSFile test mentioned in the issue and trace the Java Problem.write and Problem.read paths for unnamed variables and constraints. Check how the MPS names are produced and where reading rejects blank names. Done means an unnamed model writes an MPS file that Problem.read accepts and the round trip test passes.

Written by the indexing model from the issue text.

Description

bug

In the Java bindings, Problem.write on a model with unnamed variables or constraints writes blank names to the MPS file, and Problem.read rejects that file. An unnamed model therefore cannot be written and read back.

Expected: write generates default names (for example C0, R0), or the Java layer names them before writing.

Disabled test that reproduces it (in #2219): NativeEdgeCaseTest.anUnnamedModelRoundTripsThroughAnMPSFile

🤖 Generated with Claude Code

Dominant language
Cuda
Stars
1.1k
Forks
249
Avg merge
1d 15h
Merged PRs (30d)
124

Getting set up

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 NVIDIA/cuopt

All issues in NVIDIA/cuopt

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.