-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misreporting of primal infeasbile as of release 1.17.8 #264
Comments
Reproduction script: #!/bin/bash
set -euo pipefail
cat > example.cpp <<EOF
#include "ClpSimplex.hpp"
#include <iostream>
int main(int argc, const char* argv[]) {
ClpSimplex model;
model.readMps("infeasible.mps", true);
model.primal();
std::cout << "status = " << model.status() << "\n";
if (model.status() == 1) {
return 0; // success
}
return 1; // failure
}
EOF
cat > infeasible.mps <<EOF
NAME ClpDefau
ROWS
N OBJROW
L R0000000
E R0000001
COLUMNS
C0000000 OBJROW -1. R0000000 1.
C0000000 R0000001 2.
C0000001 OBJROW -1. R0000000 2.
C0000001 R0000001 1.
RHS
RHS R0000000 3. R0000001 4.
BOUNDS
LO BOUND C0000001 2.
ENDATA
EOF
mkdir good bad
(cd good && wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew)
chmod u+x good/coinbrew
cp good/coinbrew bad/
(cd good && ./coinbrew fetch [email protected])
(cd good && ./coinbrew build --tests=none Clp)
(cd good && g++ -omain ../example.cpp $(env PKG_CONFIG_PATH=dist/lib/pkgconfig pkg-config --cflags --libs clp))
LD_LIBRARY_PATH=good/dist/lib good/main
(cd bad && ./coinbrew fetch [email protected])
(cd bad && ./coinbrew build --tests=none Clp)
(cd bad && g++ -omain ../example.cpp $(env PKG_CONFIG_PATH=dist/lib/pkgconfig pkg-config --cflags --libs clp))
LD_LIBRARY_PATH=bad/dist/lib bad/main Output from 1.17.7:
Output from 1.17.8:
|
BTW, the linear program we solve is very simple
which is obviously infeasible given x0 >= 0, x1 >= 2 and x0 + 2 * x1 <= 3. |
Seems to be a series of tiny things going wrong. The code starts off with primal, but then switches to dual and then thinks infeasible after one iteration. The code tested number of iterations since last re-factorization. If >1 would be OK and ==0 also. It decided to switch back to primal, but code gets confused and thinks user wants to stop. I don't think the fix I will put in can do any harm. |
In Clp 1.17.7, the following program correctly reports a
model.status()
of1 - primal infeasible
.In Clp 1.17.8, the status is mis-reported as
4 - stopped due to errors
.I tested this using the reproduction script (attached in my next post) on Ubuntu 22.04 with GCC 11.3.0 and all of coinbrew's default options.
Bisecting, the failure started happening as of commit 85648fa (and notably the subsequent commit 4152b2e did not fix it), and is still failing on the 1.17.8 release tag. FYI @jjhforrest.
\CC @hongkai-dai
The text was updated successfully, but these errors were encountered: