Skip to content

Commit

Permalink
Merge pull request #1574 from rmtfleming/tests-check
Browse files Browse the repository at this point in the history
Tests check
  • Loading branch information
rmtfleming authored Mar 3, 2020
2 parents 8c5d962 + cd1ebeb commit defa4d5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 33 deletions.
30 changes: 0 additions & 30 deletions src/base/solvers/solveCobraLP.m
Original file line number Diff line number Diff line change
Expand Up @@ -504,36 +504,6 @@

case {'lindo_new', 'lindo_old'}
error('The lindo interfaces are legacy interfaces and will be no longer maintained.');
%% LINDO
% if (strcmp(solver, 'lindo_new'))
% % use new API (>= 2.0)
% [f, x, y, w, s, origStat] = solveCobraLPLindo(A, b, c, csense, lb, ub, osense, cobraParams.primalOnlyFlag, false);
% % note that status handling may change (see Lindo.h)
% if (origStat == 1 || origStat == 2)
% stat = 1; % optimal solution found
% elseif(origStat == 4)
% stat = 2; % unbounded
% elseif(origStat == 3 || origStat == 6)
% stat = 0; % infeasible
% else
% stat = -1; % Solution not optimal or solver problem
% end
% else
% % use old API
% [f, x, y, w, s, origStat] = solveCobraLPLindo(A, b, c, csense, lb, ub, osense, cobraParams.primalOnlyFlag, true);
% % Note that status handling may change (see Lindo.h)
% if (origStat == 2 || origStat == 3)
% stat = 1; % optimal solution found
% elseif(origStat == 5)
% stat = 2; % unbounded
% elseif(origStat == 4 || origStat == 6)
% stat = 0; % infeasible
% else
% stat = -1; % solution not optimal or solver problem
% end
% end
%[f,x,y,s,w,stat] = LMSolveLPNew(A,b,c,csense,lb,ub,osense,0);

case 'lp_solve'
% lp_solve
if (isempty(csense))
Expand Down
9 changes: 7 additions & 2 deletions test/verifiedTests/base/testSolvers/testSolveCobraLP.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
global CBTDIR

%Test the requirements
useSolversIfAvailable = {'cplex_direct', 'glpk', 'gurobi', 'ibm_cplex', 'matlab', 'mosek', ...
'pdco', 'quadMinos', 'tomlab_cplex', 'mosek_linprog', 'dqqMinos'}; % 'lp_solve': legacy
if 1
useSolversIfAvailable = {'cplex_direct', 'glpk', 'gurobi', 'ibm_cplex', 'mosek', ...
'quadMinos', 'tomlab_cplex', 'mosek_linprog', 'dqqMinos','cplexlp'}; % 'lp_solve': legacy
excludeSolvers={'pdco','matlab'};
else
useSolversIfAvailable = {'pdco'};
end
solvers = prepareTest('needsLP',true,'useSolversIfAvailable',useSolversIfAvailable);

% save the current path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
global CBTDIR

% require the specified toolboxes and solvers
solvers = prepareTest('needsLP', true, 'useSolversIfAvailable', {'gurobi'});
solvers = prepareTest('needsLP', true, 'requireOneSolverOf', {'gurobi'},'excludeSolvers', {'matlab', 'lp_solve','pdco'});


% save the current path
currentDir = pwd;
Expand Down

0 comments on commit defa4d5

Please sign in to comment.