Skip to content

GLPK solver option is broken — produces no results in UI #468

@SeaCelo

Description

@SeaCelo

The "Solve with GLPK" option in the UI runs the GLPK binary but produces no visible results in the case. CBC works correctly; only GLPK is affected. This isn't new — same behavior on main, and the same gap exists in MUIO upstream.

What's happening under the hood:

  1. No preprocessing. The CBC path runs preprocessData() to fill in defaults like MODEperTECHNOLOGY before invoking the solver. The GLPK path skips this and feeds raw data.txt to GLPK, which often fails immediately. On the CLEWs Demo for example, GLPK errors out with no value for MODEperTECHNOLOGY[MINCOA].

  2. Status check looks at the wrong solver. After solve, run() reads cbc_out.stdout to detect "Optimal". For GLPK runs, cbc_out is a dummy CompletedProcess with empty stdout, so the success path never fires.

  3. No CSV generator for GLPK output. Only generateCSVfromCBC exists. GLPK's -o output format is different from CBC's -solu format, so even if items 1 and 2 are fixed, the existing CSV generator can't parse GLPK results.

So even when a user clicks "Solve with GLPK" and the solver succeeds internally, the UI shows nothing.

For now CBC works fine, so the workaround is: use CBC. We'll come back to this after the v5.6 sync lands.

Open question: since the gap exists in MUIO too, the right place to fix it might be upstream. Worth raising with MUIO maintainers to see if they have plans or a different approach in mind. If they don't, we can fix it in MUIOGO and offer the change back.

Related: API/Classes/Case/DataFileClass.pyrun() method, generateCSVfromCBC().

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    Status
    On Hold

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions