Skip to content

PuLP integration, cbcModel.status, variable names, readMPS, etc. #206

@pchtsp

Description

@pchtsp

I'm trying to integrate this package as an optional dependency of PuLP, as an alternative to distribute the cbc binary.

You can see the progress here: https://github.com/coin-or/pulp/blob/60579dc516c55c63b603f139e2b823de6a1b2d31/pulp/apis/coin_api.py#L872

I've been encountering a number of issues.

I've tried to follow the documentation on CyClpSimplex and CyCbcModel.

It seems that cbcModel.status returns "relaxation infeasible" on optimal problems, where the log says is Optimal.

What's the correct way to get the correct status after solving a problem? I attach a few mps with

filename: test_continuous-pulp.txt
cbc logs say: Optimal
cbc.status returns: relaxation infeasible
cbc.solve() returns: 0


The return code from cbcModel.solve() returns 0 (which I interpret as Optimal) when the log status shows "Linear relaxation infeasible".

filename: test_infeasible-pulp.txt
cbc logs says: Linear relaxation infeasible
cbc.status returns: relaxation infeasible
cbc.solve() returns: 0

Result - Linear relaxation infeasible


Also, how do I solve maximization problems? Do I need to invert the objective functional myself? Or is there a way to communicate this when loading the MPS file?

filename: test_continuous_max-pulp.txt


Finally, how do I access the variables by name when I load the MPS file as input with CyClpSimplex.readMps?

CyClpSimplex.variables returns an error
CyClpSimplex.variableNames is empty

test_infeasible-pulp.txt
test_continuous-pulp.txt
test_continuous_max-pulp.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions