bonmin solver infeasibility on simple MIQP problem

85 views
Skip to first unread message

Odd Quatar

unread,
Apr 23, 2021, 9:57:54 AM4/23/21
to YALMIP
Hi Prof John,

I am trying to run the unit commitment problem as provided by you in the examples
https://yalmip.github.io/example/unitcommitment/#:~:text=A%20classical%20problem%20in%20scheduling,demand%2C%20while%20minimizing%20our%20costs. I am using the same code as provided in the example, however, I have attached the file for reference.

The problem can be easily solved using gurobi as well as bnb solver. 
GUROBI
  yalmipversion: '20200930'
  matlabversion: '9.9.0.1467703 (R2020b)'
  yalmiptime: 0.3075
  solvertime: 0.1225
  info: 'Successfully solved (GUROBI-GUROBI)'
  problem: 0

BNB
yalmipversion: '20200930'
matlabversion: '9.9.0.1467703 (R2020b)'
yalmiptime: 0.3360
 solvertime: 53.8780
  info: 'Successfully solved (BNB)'
  problem: 0

However, when I am trying to solve the same problem with bonmin solver, it concludes the problem is infeasible. 

    yalmipversion: '20200930'
    matlabversion: '9.9.0.1467703 (R2020b)'
    yalmiptime: 0.3742
    solvertime: 0.0438
    info: 'Infeasible problem (BONMIN)'
    problem: 1

Can you please point out any way to resolve this issue?


solver_test.m

Johan Löfberg

unread,
Apr 23, 2021, 10:08:07 AM4/23/21
to YALMIP
Works here. (Would never use it unless I really had to though, super slow here compared to gurobi)


******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************

NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I             1         OPT 70119.151       20 0.234
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I             1         OPT 70119.151       11 0.036
NLP0014I             2         OPT 70119.151       11 0.034
NLP0014I             3         OPT 70119.151       11 0.033
NLP0014I             4         OPT 70119.151       11 0.032
NLP0014I             5         OPT 70119.151       11 0.032
NLP0014I             6         OPT 70119.151       13 0.038
NLP0014I             7         OPT 70119.151       11 0.032
NLP0014I             8         OPT 70119.151       11 0.032
NLP0014I             9         OPT 70119.151       13 0.038
NLP0014I            10         OPT 70119.151       13 0.044
NLP0014I            11         OPT 70119.151       13 0.046
NLP0014I            12         OPT 70119.151       13 0.054
NLP0014I            13         OPT 70119.151       13 0.043
NLP0014I            14         OPT 70119.151       13 0.041
NLP0014I            15         OPT 70119.151       13 0.036
NLP0014I            16         OPT 70119.151       13 0.037
NLP0014I            17         OPT 70119.151       13 0.036
NLP0014I            18         OPT 70119.151       13 0.04
NLP0014I            19         OPT 70119.151       13 0.038
NLP0014I            20         OPT 70119.151       13 0.038
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I            21         OPT 70119.151       13 0.04
NLP0014I            22         OPT 70119.151       13 0.041
NLP0014I            23         OPT 70121.384       18 0.052
NLP0014I            24         OPT 70121.384       18 0.054
NLP0014I            25         OPT 70121.384       18 0.053
NLP0014I            26         OPT 70121.384       18 0.053
NLP0014I            27         OPT 70121.384       18 0.053
NLP0014I            28         OPT 70123.617       14 0.04
NLP0014I            29         OPT 70125.849       15 0.042
NLP0014I            30         OPT 70125.849       13 0.036
NLP0014I            31         OPT 70125.849       13 0.036
NLP0014I            32         OPT 70125.849       18 0.051
NLP0014I            33         OPT 70128.082       13 0.037
NLP0014I            34         OPT 70128.082       18 0.059
NLP0014I            35         OPT 70128.082       18 0.054
NLP0014I            36         OPT 70128.082       18 0.052
NLP0014I            37         OPT 70128.082       18 0.052
NLP0014I            38         OPT 70128.082       18 0.051
NLP0014I            39         OPT 70128.082       18 0.051
NLP0014I            40         OPT 70128.082       18 0.05
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I            41         OPT 70128.082       18 0.053
NLP0014I            42         OPT 70128.082       18 0.058
NLP0014I            43         OPT 70128.082       18 0.05
NLP0014I            44         OPT 70128.082       18 0.05
NLP0014I            45         OPT 70129.416       13 0.035
NLP0014I            46         OPT 70130.749       13 0.035
NLP0014I            47         OPT 70130.749       13 0.035
NLP0014I            48         OPT 70130.749       13 0.035
NLP0014I            49         OPT 70130.749       13 0.036
NLP0014I            50         OPT 70130.749       13 0.049
NLP0014I            51         OPT 70132.575       13 0.064
NLP0014I            52         OPT 70134.402       13 0.059
NLP0014I            53         OPT 70136.228       14 0.06
NLP0014I            54         OPT 70138.054       14 0.059
NLP0014I            55         OPT 70141.772       14 0.048
NLP0014I            56         OPT 70145.49       14 0.054
NLP0014I            57         OPT 70149.208       14 0.056
NLP0014I            58         OPT 70152.926       14 0.062
NLP0014I            59         OPT 70161.26       14 0.055
NLP0014I            60         OPT 70169.593       14 0.042
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I            61         OPT 70177.926       14 0.068
NLP0014I            62         OPT 70186.26       14 0.056
NLP0014I            63         OPT 70206.51       16 0.064
NLP0014I            64         OPT 70206.51       15 0.07
NLP0014I            65         OPT 70226.761       15 0.043
NLP0014I            66         OPT 70226.761       15 0.042
NLP0014I            67         OPT 70247.011       15 0.048
NLP0014I            68         OPT 70247.011       15 0.043
NLP0014I            69         OPT 70267.262       15 0.04
NLP0014I            70         OPT 70267.262       15 0.04
NLP0014I            71         OPT 70267.262       13 0.031
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I             1         OPT 70267.262        6 0.014
Cbc0012I Integer solution of 70267.262 found by DiveMIPFractional after 0 iterations and 0 nodes (4.37 seconds)
NLP0014I             2      INFEAS 9.9423319       61 0.279
NLP0014I             3         OPT 70136.97       17 0.049
NLP0014I             4      INFEAS 9.9048071       64 0.371
NLP0014I             5         OPT 70136.97       17 0.049
NLP0014I             6      INFEAS 9.9313329       65 0.353
NLP0014I             7         OPT 70136.97       17 0.055
NLP0014I             8      INFEAS 9.9156261       72 0.317
NLP0014I             9         OPT 70136.97       17 0.049
NLP0014I            10         OPT 70127.484       17 0.05
NLP0014I            11         OPT 70169.984       19 0.052
NLP0014I            12         OPT 70127.484       17 0.049
NLP0014I            13         OPT 70169.984       19 0.052
NLP0014I            14         OPT 70127.484       17 0.063
NLP0014I            15         OPT 70169.984       19 0.065
NLP0014I            16         OPT 70127.484       17 0.062
NLP0014I            17         OPT 70169.984       19 0.055
NLP0014I            18      INFEAS 17.686481       58 0.268
NLP0014I            19         OPT 70122.869       14 0.041
NLP0014I            20      INFEAS 17.682819       57 0.262
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I            21         OPT 70122.869       14 0.043
NLP0014I            22      INFEAS 17.667096       57 0.221
NLP0014I            23         OPT 70122.869       14 0.043
NLP0014I            24      INFEAS 17.676053       60 0.282
NLP0014I            25         OPT 70122.869       14 0.04
NLP0014I            26         OPT 70119.709       18 0.052
NLP0014I            27         OPT 70119.151       13 0.046
NLP0014I            28         OPT 70119.709       18 0.052
NLP0014I            29         OPT 70119.151       13 0.037
NLP0014I            30         OPT 70119.709       18 0.05
NLP0014I            31         OPT 70119.151       13 0.038
NLP0014I            32         OPT 70119.709       18 0.052
NLP0014I            33         OPT 70119.151       13 0.05
NLP0014I            34      INFEAS 22.575705       81 0.458
NLP0014I            35         OPT 70120.977       13 0.061
NLP0014I            36      INFEAS 22.579337       69 0.369
NLP0014I            37         OPT 70120.977       13 0.038
NLP0014I            38      INFEAS 22.540138       70 0.319
NLP0014I            39         OPT 70120.977       13 0.037
NLP0014I            40      INFEAS 22.565712       85 0.397
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I            41         OPT 70120.977       13 0.038
NLP0014I            42         OPT 70121.234       14 0.039
NLP0014I            43         OPT 70119.151       11 0.031
NLP0014I            44         OPT 70121.234       14 0.045
NLP0014I            45         OPT 70119.151       11 0.046
NLP0014I            46         OPT 70121.234       14 0.062
NLP0014I            47         OPT 70119.151       11 0.033
NLP0014I            48         OPT 70121.234       14 0.039
NLP0014I            49         OPT 70119.151       11 0.031
NLP0014I            50      INFEAS 24.31015       32 0.115
NLP0014I            51         OPT 70120.484       13 0.038
NLP0014I            52      INFEAS 24.309455       32 0.115
NLP0014I            53         OPT 70120.484       13 0.038
NLP0014I            54         OPT 70123.317       17 0.048
NLP0014I            55         OPT 70119.151       11 0.033
NLP0014I            56         OPT 70123.317       17 0.048
NLP0014I            57         OPT 70119.151       11 0.032
NLP0014I            58         OPT 70123.317       17 0.047
NLP0014I            59         OPT 70119.151       11 0.032
NLP0014I            60         OPT 70123.317       17 0.047
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I            61         OPT 70119.151       11 0.032
NLP0014I            62         OPT 70535.817       15 0.044
NLP0014I            63         OPT 70119.151       11 0.032
NLP0014I            64         OPT 70535.817       15 0.043
NLP0014I            65         OPT 70119.151       11 0.031
NLP0014I            66         OPT 70547.079       15 0.043
NLP0014I            67         OPT 70119.151       11 0.031
NLP0014I            68         OPT 70547.079       15 0.045
NLP0014I            69         OPT 70119.151       11 0.031
NLP0014I            70         OPT 70547.079       15 0.043
NLP0014I            71         OPT 70119.151       11 0.032
NLP0014I            72         OPT 70547.079       15 0.043
NLP0014I            73         OPT 70119.151       11 0.033
NLP0014I            74         OPT 70125.401       14 0.04
NLP0014I            75         OPT 70119.151       11 0.032
NLP0014I            76         OPT 70125.401       14 0.04
NLP0014I            77         OPT 70119.151       11 0.049
NLP0014I            78         OPT 70125.401       14 0.044
NLP0014I            79         OPT 70119.151       11 0.032
NLP0014I            80         OPT 70125.401       14 0.04
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I            81         OPT 70119.151       11 0.033
NLP0014I            82         OPT 70121.384       14 0.04
NLP0014I            83         OPT 70217.44       19 0.052
NLP0014I            84         OPT 70121.384       14 0.04
NLP0014I            85         OPT 70217.44       19 0.068
NLP0014I            86         OPT 70121.384       14 0.049
NLP0014I            87         OPT 70217.44       19 0.052
NLP0014I            88         OPT 70121.384       14 0.043
NLP0014I            89         OPT 70217.44       19 0.085
NLP0014I            90         OPT 70578.98       15 0.044
NLP0014I            91         OPT 70119.151       11 0.032
NLP0014I            92         OPT 70578.98       15 0.057
NLP0014I            93         OPT 70119.151       11 0.063
NLP0014I            94         OPT 70578.98       15 0.044
NLP0014I            95         OPT 70119.151       11 0.032
NLP0014I            96         OPT 70578.98       15 0.043
NLP0014I            97         OPT 70119.151       11 0.031
NLP0014I            98         OPT 70126.926       12 0.036
NLP0014I            99         OPT 70119.151       13 0.037
NLP0014I           100         OPT 70126.926       12 0.034
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I           101         OPT 70119.151       13 0.038
NLP0014I           102         OPT 70126.926       12 0.036
NLP0014I           103         OPT 70119.151       13 0.037
NLP0014I           104         OPT 70126.926       12 0.033
NLP0014I           105         OPT 70119.151       13 0.037
NLP0014I           106         OPT 70626.3       16 0.046
NLP0014I           107         OPT 70119.151       11 0.031
NLP0014I           108         OPT 70626.3       16 0.047
NLP0014I           109         OPT 70119.151       11 0.032
NLP0014I           110         OPT 70626.3       16 0.045
NLP0014I           111         OPT 70119.151       11 0.036
NLP0014I           112         OPT 70626.3       16 0.055
NLP0014I           113         OPT 70119.151       11 0.036
NLP0014I           114         OPT 70127.484       17 0.054
NLP0014I           115         OPT 70119.151       13 0.037
NLP0014I           116         OPT 70127.484       17 0.047
NLP0014I           117         OPT 70119.151       13 0.037
NLP0014I           118         OPT 70681.651       17 0.048
NLP0014I           119         OPT 70119.151       11 0.032
NLP0014I           120         OPT 70681.651       17 0.05
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I           121         OPT 70119.151       11 0.034
NLP0014I           122         OPT 70681.651       17 0.052
NLP0014I           123         OPT 70119.151       11 0.031
NLP0014I           124         OPT 70681.651       17 0.048
NLP0014I           125         OPT 70119.151       11 0.032
NLP0014I           126      INFEAS 12.014371       54 0.269
NLP0014I           127         OPT 70119.151       11 0.031
NLP0014I           128      INFEAS 12.008073       44 0.212
NLP0014I           129         OPT 70119.151       11 0.031
NLP0014I           130      INFEAS 11.998146       50 0.262
NLP0014I           131         OPT 70119.151       11 0.033
NLP0014I           132      INFEAS 12.0063       46 0.21
NLP0014I           133         OPT 70119.151       11 0.032
NLP0014I           134         OPT 70215.27       14 0.038
NLP0014I           135      INFEAS 60.226995      197 1.032
NLP0014I           136         OPT 70215.27       13 0.036
NLP0014I           137      INFEAS 60.238604       62 0.31
NLP0014I           138         OPT 70215.27       13 0.036
NLP0014I           139      INFEAS 60.126891       48 0.201
NLP0014I           140         OPT 70215.27       13 0.036
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I           141      INFEAS 60.144758       48 0.203
NLP0014I           142         OPT 70215.27       13 0.036
NLP0014I           143         OPT 70215.27       13 0.037
Cbc0010I After 0 nodes, 1 on tree, 70267.262 best solution, best possible 70215.27 (17.11 seconds)
NLP0014I           144         OPT 70217.503       14 0.04
NLP0014I           145         OPT 70313.56       14 0.04
NLP0014I           146         OPT 70219.736       19 0.056
NLP0014I           147         OPT 70315.793       18 0.05
NLP0014I           148         OPT 70221.969       19 0.051
NLP0014I           149         OPT 70318.025       16 0.045
NLP0014I           150         OPT 70224.202       14 0.038
NLP0014I           151         OPT 70320.258       14 0.039
NLP0014I           152         OPT 70232.535       17 0.048
NLP0014I           153         OPT 70275.035       16 0.046
NLP0014I           154         OPT 70240.869       16 0.045
NLP0014I           155         OPT 70283.369       16 0.045
NLP0014I           156         OPT 70249.202       16 0.044
NLP0014I           157         OPT 70291.702       17 0.047
NLP0014I           158         OPT 70257.535       14 0.039
NLP0014I           159         OPT 70300.035       14 0.038
NLP0014I           160         OPT 70257.535       14 0.04
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I           161         OPT 70264.535       15 0.041
NLP0014I           162         OPT 70257.535       14 0.039
NLP0014I           163         OPT 70264.535       15 0.044
NLP0014I           164         OPT 70257.535       14 0.039
NLP0014I           165         OPT 70263.484       15 0.043
NLP0014I           166         OPT 70257.535       16 0.046
NLP0014I           167         OPT 70263.484       15 0.041
NLP0014I           168         OPT 70257.535       14 0.039
NLP0014I           169         OPT 70263.484       15 0.043
NLP0014I           170         OPT 70257.535       14 0.039
NLP0014I           171         OPT 70263.484       15 0.043
NLP0014I           172         OPT 70257.535       15 0.042
NLP0014I           173         OPT 70260.067       15 0.043
NLP0014I           174         OPT 70257.535       16 0.048
NLP0014I           175         OPT 70260.067       17 0.048
NLP0014I           176         OPT 70257.535       16 0.047
NLP0014I           177         OPT 70260.067       17 0.048
NLP0014I           178         OPT 70257.535       15 0.043
NLP0014I           179         OPT 70260.067       17 0.047
NLP0014I           180         OPT 70257.535       16 0.045
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I           181      INFEAS 7.3382035       47 0.161
NLP0014I           182         OPT 70257.535       15 0.042
NLP0014I           183      INFEAS 7.3529827       89 0.449
NLP0014I           184         OPT 70257.535       15 0.043
NLP0014I           185      INFEAS 7.4009541       86 0.511
NLP0014I           186         OPT 70257.535       14 0.046
NLP0014I             2         OPT 70257.535        6 0.016
Cbc0004I Integer solution of 70257.535 found after 867 iterations and 43 nodes (21.46 seconds)
Cbc0001I Search completed - best objective 70257.53536934426, took 867 iterations and 43 nodes (21.47 seconds)
Cbc0032I Strong branching done 70 times (3062 iterations), fathomed 0 nodes and fixed 40 variables
Cbc0035I Maximum depth 21, 0 variables fixed on reduced cost

ans = 
  struct with fields:

    yalmipversion: '20210331'
    matlabversion: '9.9.0.1524771 (R2020b) Update 2'
       yalmiptime: 0.5002
       solvertime: 21.8088
             info: 'Successfully solved (BONMIN)'
          problem: 0



Odd Quatar

unread,
Apr 23, 2021, 10:14:02 AM4/23/21
to YALMIP
Thanks, I will get back to you after updating my YALMIP version and reinstalling OPTI Toolbox.
Do you recommend any other free available solver which provides comparable performance with GUROBI. The bnb solver of YALMIP seems also to be very slow.

Thanks

Johan Löfberg

unread,
Apr 23, 2021, 10:27:53 AM4/23/21
to YALMIP
Depends on what you mean with free. gurobi/moxek/cplex/press are all free for academia. open-source scip (also inopti) is free for non-commercial use

using bnb for MIQPs would be silly, as here are so many dedicated alternatives there

Johan Löfberg

unread,
Apr 23, 2021, 10:32:23 AM4/23/21
to YALMIP
and note that I am using opti 2.22. My impression was that there where some bugs introduced in later versions, and I think bonmin was affected
Reply all
Reply to author
Forward
0 new messages