Repository navigation
Description
I get various complaints that some CPLEX option does not work, when a user of the ASL version has switched to MP. Here's a summary; the first 3 are the most serious.
network simplex
ASL: netopt requires an argument (0, 1, 2, or 3) which determines whether and how the network simplex method is applied; there are also related options
netdisplay, netfeasibility, netfind, netiterations, netoptimality, and netpricing.
MP: netopt does not accept an argument. netiterations is recognized, but the other 5 related options are not.
logs
ASL: mipdisplay and mipinterval control the contents of the MIP log; display or lpdisplay controls the simplex log, and bardisplay controls the barrier log.
MP: All of the above are accepted but do not produce any log output. outlev does produce logs, but with less control over the settings, and with a - in front of almost every line. outlev=1 would be better if it used mipdisplay=2 rather than mipdisplay=3 (which is usually more verbose than needed).
primal versus dual
ASL: primal and dual force CPLEX to solve the primal or the dual, respectively, of the problem received from AMPL. predual is similar, but chooses between the primal and the dual form of the problem that results after presolve. primalopt and dualopt select the primal or dual simplex method.
MP: primal is not recognized, and dual is treated as a synonym for dualopt (alg:dual). (predual, primalopt, and dualopt are still available.)
sensitivity
ASL: sensitivity does not have an argument. It creates suffixes .up, .down, and .current which only apply properly to objective coefficients and single right-hand sides. (There is an example of their use in the subsection Solver-defined suffixes: sensitivity analysis in the AMPL book.)
MP: sensitivity (alg:sens) requires an argument. It doesn't recognize ASL's suffixes, but defines others that are more general.
error handling
ASL: Scans the entire cplex_options string and reports every option that is in error.
MP: Stops scanning the cplex_options string after the first error is found.
Activity
glebbelov commentedon Apr 22, 2025
MP also has
alg:method:This option was introduced for compatibility with other drivers.
The last paragraph makes little sense.
Xpress alg:method=4: comment on bar:alg=4 #261
Compatibility option alg:netopt #261
CPLEX: process major options in FinishOptionParsing() #261
CPLEX: PlayObjNParams() back to InputExtras() #261
CPLEX: netdisplay, netfeasibility, netfind, netoptimality, and netpri…
CPLEX: fix logs #261
CPLEX: dummy 'primal', 'dual' #261
glebbelov commentedon Apr 22, 2025
Done the following changes:
The reason is, we don't parse any arc/node info in FlatConverter. Instead, we only use value 3 of
netopt, which is the default (i.e., any LP is analyzed for network by default; this is affected by CPLEX presolve).Fixed logs.
Option
dualwas manually implemented incplexasl. Changed it to be dummy:We might still think about priorities between
alg:method/alg:priamlopt... /alg:netopt.CPLEX: netopt=0 default #261
CPLEX: align alg:method values #261
XPRESS: set_verbose_mode() in FinishOptionParsing() #261
XPRESS: set_verbose_mode() in FinishOptionParsing() #261
CPLEX: finalizing solver warnings only with debug=1 #261
Gurobi, CPLEX, Mosek: alg:sens: .down/.up[/.current] #261
glebbelov commentedon Apr 23, 2025
More changes:
netopt=0defaultalg:methodandmip:nodemethodoverride the keyword flagsalg:primaloptetc., which overridenetoptalg:methodvalues with those ofmip:nodemethod,mip:submipstartalg,mip:submipalg..down/.up/.currentfor objective coefficients and.down/.upfor RHS constraints (Gurobi, CPLEX, Mosek).In detail on 1.:
In detail on 2., 3.:
In detail on 4.:
MP changelog #261
glebbelov commentedon Apr 29, 2025
The changes have been released in 20250424.
CPLEX: coordinate dual and predual #261
glebbelov commentedon May 1, 2025
dualandpredualare now connected to imitate CPLEX ASL:For comparison, here CPLEX ASL versions:
To be released.
CPLEX: alg:start:advance #261
CPLEX changelog #261