diff --git a/src/analysis/wholeBody/PSCMToolbox/optimizeWBModel.m b/src/analysis/wholeBody/PSCMToolbox/optimizeWBModel.m index b8e8383ab1..fc3af0f129 100644 --- a/src/analysis/wholeBody/PSCMToolbox/optimizeWBModel.m +++ b/src/analysis/wholeBody/PSCMToolbox/optimizeWBModel.m @@ -181,7 +181,7 @@ case 'ibm_cplex' % https://www.ibm.com/docs/en/icos/12.10.0?topic=infeasibility-coping-ill-conditioned-problem-handling-unscaled-infeasibilities - param.minNorm = 0; + % param.minNorm = 0; % Decides how to scale the problem matrix. % Value Meaning @@ -258,26 +258,26 @@ noLinearObjective = all(model.c==0); if noLinearObjective - [tmp, solverOK] = getCobraSolver('QP'); - solverName{1,1} = tmp; - solverName{1,2} = 'QP'; + [tmp, solverOK] = getCobraSolver('QP', 1); + solverNameQP{1,1} = tmp; + solverNameQP{1,2} = 'QP'; else - [solverName{1,1}, solverOK] = getCobraSolver('LP'); - solverName{1,2} = 'QP'; - [solverName{2,1}, solverOK] = getCobraSolver('QP'); - solverName{2,2} = 'QP'; + [solverNameQP{1,1}, solverOK] = getCobraSolver('LP', 1); + solverNameQP{1,2} = 'QP'; + [solverNameQP{2,1}, solverOK] = getCobraSolver('QP', 1); + solverNameQP{2,2} = 'QP'; end - for i = 1:size(solverName,1) - if ~any(strcmp(solverName{i,1},validatedSolvers)) + for i = 1:size(solverNameQP,1) + if ~any(strcmp(solverNameQP{i,1},validatedSolvers)) fprintf('%s\n','Note that the solvers validated for use with the PSCM toolbox are:') disp(validatedSolvers) %switch over to a validated solver - [solverOK, solverInstalled] = changeCobraSolver('tomlab_cplex', solverName{i,2},1,1); + [solverOK, solverInstalled] = changeCobraSolver('tomlab_cplex', solverNameQP{i,2},1,1); if solverOK - fprintf('%s\n',[solverName{i,1} ' has not been validated for use with the PSCM toolbox. Tried to change to tomlab_cplex, but it failed.']) + fprintf('%s\n',[solverNameQP{i,1} ' has not been validated for use with the PSCM toolbox. Tried to change to tomlab_cplex, but it failed.']) else - error([solverName{i,1} ' has not been validated for use with the PSCM toolbox. Tried to change to tomlab_cplex, but it failed.']) + error([solverNameQP{i,1} ' has not been validated for use with the PSCM toolbox. Tried to change to tomlab_cplex, but it failed.']) end end end diff --git a/src/base/solvers/buildOptProblemFromModel.m b/src/base/solvers/buildOptProblemFromModel.m index 4ec8f19b31..4889998389 100644 --- a/src/base/solvers/buildOptProblemFromModel.m +++ b/src/base/solvers/buildOptProblemFromModel.m @@ -207,6 +207,8 @@ %nothing to do - done above already case 'QP' %nothing to do - done above already + case 'QPold' + %nothing to do - done above already case 'QRLP' [m,n]=size(optProblem.A); optProblem.A = [...