0

I have an integer programming optimization problem, that I solve in matlab using yalmip and xpress as the solver. For the solver I want to set two stopping criteria - a time limit and an optimal gap limit.

I have tried to use the xpress functions MAXTIME and MIPRELSTOP, the matlab code compiles and runs the optimization but the stopping criteria are not transferred to the solver.

The relevant code part looks as follows:

Cons = [sum(sum((dVar_mat.*(x_mat.*y_vec))')) >= a]; %constraint
obj = sum(sum(dVar_mat.*z_mat)); %objective

ops = sdpsettings('solver', 'xpress', 'verbose', 2); %solver options
ops.xpress.MAXTIME = 10000; %set timelimit
ops.xpress.MIPRELSTOP = 0.05; %set relative gap as stop limit

solIP = optimize(Cons, obj, ops); % Solve

When I run the optimzation, a solution is found but significantly later than I would like it to stop. The report says:

STOPPING - MIPRELSTOP target reached (MIPRELSTOP=0.0001)

meaning the MIPRELSTOP target is still set at the default, which is 0.0001. Similarily, the optimization runs over the time limit, disregarding that stopping criterion as well.

How can I correctly set stopping criteria in matlab/yalmip/xpress?

chris
  • 1,638
  • 2
  • 15
  • 17
Mike Lang
  • 65
  • 5

2 Answers2

0

Are you sure you are using the correct name and that it is exposed in the MATLAB interface, i.e. is that options visible in ops.xpress. I don't have xpress installed so I cannot test it.

(btw, YALMIP question are much better asked on the YALMIP Google groups forum)

Johan Löfberg
  • 378
  • 1
  • 13
  • Thanks a lot for the answer. A valid point, I checked not and 'ops.xpress' actually is empty, does not give me an answer. I can run express but it seems I have not linked the xpress options. Any hints on how I can do that? – Mike Lang Jun 16 '19 at 17:54
0

The 'MAXTIME' control of Xpress Optimizer can be used with positive and negative values: with positive values for 'MAXTIME' when solving MIP problems the limit is only applied once a solution has been found, otherwise the solving continues until the first solution is found; a negative value means a hard stop, so for your case I would recommend that you try a value like -10000 as the time limit.

(See the documentation in the Xpress Optimizer Reference Manual, eg: https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/HTML/MAXTIME.html)

  • 1
    Are you affiliated to FICO? – Vega Jul 28 '20 at 18:04
  • @Vega why do you feel that that’s an issue here? The question is about using the XPress solver and this answer links to documentation for that solver. There is no promotion going on here that I can see. – Martijn Pieters Jul 28 '20 at 19:42
  • @MartijnPieters, I considered that that they specifically promoted a documentation available on the site from the company where they work and did not disclose their affiliation. I didn't consider FICO as official documentation site – Vega Jul 28 '20 at 19:47
  • @Vega I see two different Xplorer packages, the documentation here is one of those, it’s not a third-party hosting setup here. – Martijn Pieters Jul 28 '20 at 19:57