Too much time wasted in bmibnb solver, what shall I do?

140 views
Skip to first unread message

Weiwei Yao

unread,
Feb 24, 2020, 4:52:27 AM2/24/20
to YALMIP
Dear Prof. Löfberg,
I'm your fun. Thank you for all the help you've gaved me.
When I use bmibnb solver, the solver spend different time with different original data. In most cases, it works very well. Unfortunately, with some particular data, it will take a long time. even for one hour.
What shall I do? May I change some attributes of bmibnb?
Thanks!
----------------------------------------------------------------------------------------------------------------------------------------------------------------
* Starting YALMIP global branch & bound.
* Branch-variables : 120
* Upper solver     : fmincon
* Lower solver     : GUROBI
* LP solver        : GUROBI
* Warning: 24 branch variables are unbounded from above
----------------------------------------------------------------------------------------------------------------------------------------------------------------
>> ops.bmibnb
ans = 
  struct with fields:

      branchmethod: 'best'
        branchrule: 'omega'
               cut: [1×1 struct]
           sdpcuts: 0
          lpreduce: 1
           lowrank: 0
       diagonalize: 1
       lowersolver: ''
       uppersolver: ''
          lpsolver: ''
            target: -Inf
       lowertarget: Inf
            vartol: 1.0000e-03
         relgaptol: 0.0100
         absgaptol: 0.0100
             pdtol: -1.0000e-06
             eqtol: 1.0000e-06
           maxiter: 100
           maxtime: 3600
         roottight: 1
         numglobal: Inf
        localstart: 'relaxed'
    presolvescheme: []
    strengthscheme: [1 2 1 3 1 4 1 6 1 5 1 4 1 6 1 4 1]
----------------------------------------------------------------------------------------------------------------------------------------------------------------


Johan Löfberg

unread,
Feb 24, 2020, 5:03:58 AM2/24/20
to YALMIP
Impossible to answer without reproducible example

In general though, with 120 variables to branch on, you have to be very lucky to solve the problem in less than hours, days or weeks.

Weiwei Yao

unread,
Feb 25, 2020, 12:24:13 AM2/25/20
to YALMIP
Dear Prof. Löfberg,
May I change the relative gap or time limit to terminate the callutation? Which attribute should I set?
Thank you very much.

Weiwei Yao

unread,
Feb 25, 2020, 12:25:03 AM2/25/20
to YALMIP

Johan Löfberg

unread,
Feb 25, 2020, 1:42:54 AM2/25/20
to YALMIP
maxtime, absgaptol, relgaptol  (not too surprisingly)

However, don't try to tweak your self out of a bad model. Show the model

Weiwei Yao

unread,
Feb 25, 2020, 11:11:02 AM2/25/20
to YALMIP
Dear Prof. Lofberg,

I've uploaded my code. I have to use bmibnb to solver this model. I'm not sure whether this result is available and credible for my model. It always shows 'fmincon stopped because it exceeded the function evaluation limit, options.MaxFunctionEvaluations = 3.000000e+03.'.

I know this model is not so good, but I don’t really know how to fix it. The average computation time is about 30 sec. I have 365 sets of data and jut one set of them appears in the attachment code, it takes lots of time. What shall I do to accelerate the process?

Best

-----------------------------------------------------------------------------------------------------------------------------
Solver stopped prematurely.

fmincon stopped because it exceeded the function evaluation limit,
options.MaxFunctionEvaluations = 3.000000e+03.

    1 :   -5.563E+05     0.00     -5.563E+05   2  Improved solution  
* Finished.  Cost: -556320.4075 Gap: 2.0926e-14
* Termination with relative gap satisfied 
* Timing: 20% spent in upper solver (1 problems solved)
*         1% spent in lower solver (241 problems solved)
*         40% spent in LP-based domain reduction (434 problems solved)
-----------------------------------------------------------------------------------------------------------------------------

BadModel.m

Johan Löfberg

unread,
Feb 25, 2020, 1:26:42 PM2/25/20
to YALMIP
As far as I can tell, you have a simple MILP representable model that you are killing by introducing binary*continuous bilinear terms. Don't.

Reply all
Reply to author
Forward
0 new messages