Originally posted by: Hubert_ETH
I'm using Cplex 12.51 within Matlab to solve a LP and have problems with the solution Cplex is proposing.
The optimal value fval is zero with f*x giving a pretty much higher value. If I solve the problem with Matlab's build in solver linprog, the solution is of much higher quality.
When I put the solution from linprog as starting base for cplexlp, cplexlp still produces a non-optimal solution with the same issues, that optimal value is not equal objective function * optimal solution vector.
%% Initialization
clear all;
% load data
load('f.mat')
load('Aeq.mat')
load('beq.mat')
load('lb.mat')
load('ub.mat')
% options for cplexlp
opt = cplexoptimset('cplex');
opt.emphasis.numerical = 1;
opt.diagnostics = 'on';
opt.simplex.tolerances.markowitz = 0.99999;
opt.lpmethod = 1;
opt.exportmodel = 'model.sav';
% options for linprog
opt_linprog = optimoptions('linprog');
opt_linprog.Display = 'off';
%%
% run linprog for finding solution
[x_linprog,~,~,~] = linprog(f,[],[],Aeq,beq,lb,ub,[],opt_linprog);
% run cplexlp with linprog solution as starting base
[x,fval,exitflag,output] = cplexlp(f,[],[],Aeq,beq,lb,ub,x_linprog,opt);
As I understand this could happen with barrier type solvers especially if the problem formulation is ill-conditioned. However this also happens if I force using the simplex type solver within Cplex.
Exitflag is 1. Diagnostics are:
LP Presolve eliminated 268 rows and 1011 columns.
Reduced LP has 148 rows, 286 columns, and 626 nonzeros.
Presolve time = 0.00 sec. (1.81 ticks)
Initializing dual steep norms . . .
Iteration log . . .
Iteration: 1 Dual objective = 0.000000
Perturbation started.
Iteration: 51 Dual objective = 0.000000
Iteration: 113 Dual objective = 0.001084
Iteration: 175 Dual objective = 0.002105
Removing perturbation.
Dual simplex - Optimal: Objective = 0.0000000000e+00
Solution time = 0.01 sec. Iterations = 202 (0)
Deterministic time = 3.16 ticks (472.01 ticks/sec)
And solution quality if this helps:
There are no reduced-cost infeasibilities.
Maximum bound infeasibility = 7.99361e-15
Maximum Ax-b residual = 4.34097e-14
Maximum c-B'pi residual = 0
Maximum |x| = 100
Maximum |pi| = 0
Maximum |red-cost| = 10
Condition number of unscaled basis = 3.3e+02
The model is attached as .sav as well as Matlab files.
Thanks for any advice!
#CPLEXOptimizers#DecisionOptimization