ampl / mp

An open-source library for mathematical programming
https://mp.ampl.com
Other
229 stars 42 forks source link

Xpress defaultalg (alg:method) method chooses concurrent optimizer #216

Closed 4er4er4er closed 1 year ago

4er4er4er commented 1 year ago

A user reported the following difficulty:

I have written a new .run changing the code to the new xpress interface, using the same options, except the "barrier" option for the mip phase. This option in xpressasl is not present in xpress. I tried to replace it using "alg:method=4", but it is not exactly the same. Xpressasl solves the initial lp using exclusively de barrier algorithm, but xpress uses the concurrent solver with dual and barrier methods. I have found no way to use only the barrier algorithm to solve the initial lp.

For both xpress and xpressasl, it appears that the option defaultalg (and its MP equivalents) invokes the concurrent optimizer regardless of its setting. Here's an example with defaultalg=4, which should select the barrier method:

ampl: model multmip3.mod data multmip3.dat
ampl: option solver xpress;
ampl: option xpress_options 'outlev=1 defaultalg=4';
ampl: solve;

XPRESS 9.0.0 (41.01.01): tech:outlev=1
alg:method=4
FICO Xpress v9.0.0, Hyper, solve started 14:08:11, Jul 13, 2023
Heap usage: 159KB (peak 159KB, 69KB system)
Minimizing MILP  using up to 4 threads and up to 15GB memory, with these control settings:
DEFAULTALG = 4
.......
Starting concurrent solve with dual (1 thread)

 Concurrent-Solve,   0s
            Dual        
    objective   dual inf
 D  224765.00   .0000000
------- optimal --------
Concurrent statistics:
      Dual: 60 simplex iterations, 0.00s
Optimal solution found

   Its         Obj Value      S   Ninf  Nneg   Sum Dual Inf  Time
    60       224765.0000      D      0     0        .000000     0
Dual solved problem
  60 simplex iterations in 0.00 seconds at time 0

The user wants to choose barrier-only, not concurrent. With the ASL interface, this could be done by specifying the option barrier (with no value), so the problem showed up when the user switched to MP, which does not seem to have an equivalent to the barrier option.

glebbelov commented 1 year ago

According to XPRESS documentation, DEFAULTALG should imply the choice of LP algorithms for all nodes of a MIP tree. Obviously, it does not.

To circumvent the issue, added options barrier/primal/dual/network, analog to xpressasl, see yesterday's release.