coin-or / MibS

A solver for mixed integer bilevel programs
Eclipse Public License 1.0
50 stars 20 forks source link

LP/LP gets into infinite loop #88

Closed odow closed 2 years ago

odow commented 3 years ago

Solving any pure LP bilevel program causes MibS to go into an infinite loop with "all linking variables should be discrete."

tkralphs commented 2 years ago

It would make my life a tiny bit easier if you can provide a .mps and .aux that triggers this :). Otherwise, I'm sure I can probably eyeball it and see what's going on.

odow commented 2 years ago
shell> cat model.mps
NAME          
ROWS
 N  OBJ
 L  u1
 L  u2
 L  c3_1
 L  c4
 L  c5
 G  u3
 G  u4
 G  c3
COLUMNS
    y         u2        1
    y         c3_1      1
    y         c4        1
    y         c5        -7
    y         u3        1
    y         c3        1
    y         OBJ       1
    z         u4        1
    z         OBJ       1
    x         u1        1
    x         c3_1      1
    x         c4        2
    x         c5        2
    x         c3        4
    x         OBJ       3
RHS
    rhs       u1        5
    rhs       u2        8
    rhs       c3_1      8
    rhs       c4        13
    rhs       c5        0
    rhs       u3        0
    rhs       u4        0
    rhs       c3        8
RANGES
BOUNDS
 FR bounds    y
 FR bounds    z
 FR bounds    x
ENDATA

shell> cat model.aux
N 1
M 4
LC 2
LR 7
LR 2
LR 3
LR 4
LO -1.0
OS 1

julia> MibS_jll.mibs() do exe
           run(`$(exe) -Alps_instance model.mps -MibS_auxiliaryInfoFile model.aux`)
       end

========================================================
========================================================
Welcome to MibS (Mixed Integer Bilevel Solver)
Copyright (C) 2007-2019 Lehigh University, Scott DeNegre, Ted Ralphs
and Sahar Tahernejad.
All Rights Reserved.
This software is licensed under the Eclipse Public License. Please see
accompanying file for terms.
Version: 1.1.3
Build Date: Jun 18 2021
========================================================
========================================================
==  Welcome to the Abstract Library for Parallel Search (ALPS) 
==  Copyright 2000-2019 Lehigh University and others 
==  All Rights Reserved. 
==  Distributed under the Eclipse Public License 1.0 
==  Version: 1.5
==  Build Date: Jun 14 2021
Alps0030I Data file: model.mps
Coin0001I At line 1 NAME
Coin0001I At line 2 ROWS
Coin0001I At line 12 COLUMNS
Coin0001I At line 28 RHS
Coin0001I At line 37 RANGES
Coin0001I At line 38 BOUNDS
Coin0001I At line 42 ENDATA
Coin0002I Problem no_name has 8 rows, 3 columns and 12 elements
LL Data File: model.aux
Number of LL Variables:   1

=======================================
Analyzing problem structure            
=======================================

Number of UL Variables: 2
Number of LL Variables: 1
Number of UL Rows: 4
Number of LL Rows: 4
Number of integer UL Variables: 0
Number of integer LL Variables: 0
This instance is a mixed integer problem.
All linking variables should be discrete
All linking variables should be discrete
All linking variables should be discrete
All linking variables should be discrete
All linking variables should be discrete
All linking variables should be discrete
All linking variables should be discrete
All linking variables should be discrete
All linking variables should be discrete
All linking variables should be discrete
All linking variables should be discrete
tkralphs commented 2 years ago

OK, that was a stupid bug that I should have been able to just eyeball. The fix is committed to the stable/1.2 branch, which I've been working on quite a bit in the last month or two. I'll make a release 1.2.0 in the relatively near future and then you can update the Julia wrapper to incorporate this change.