Skip to content

Commit

Permalink
Merge pull request opencobra#1050 from tpfau/test13CUpdate
Browse files Browse the repository at this point in the history
Making test13C fail if no standard solver is present
  • Loading branch information
rmtfleming authored Dec 7, 2017
2 parents 6702eda + 9ec6738 commit 3b838c7
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,21 @@
% Note: the glpk solver is sufficient, no need to run multiple solvers
fprintf(' Preparing the model using glpk ... ');

changeCobraSolver('glpk');
%The following can be done with any allowed solver, but e.g. pdco will fail, so we will run a few others.

solverPkgs = {'glpk', 'gurobi', 'ibm_cplex', 'tomlab_cplex'};

solverAccepted = false;
for k = 1:numel(solverPkgs)
solverAccepted = changeCobraSolver(solverPkgs{k});
if solverAccepted
break;
end
end

if ~solverAccepted
assert(false,'Could not run the test as none of the allowed solvers (%s) was present.\nThe function might still work with a different solver.');
end

generateIsotopomerSolver(model, 'xglcDe', expdata, 'true');
expdata.inputfrag = convertCarbonInput(expdata.input); % generate inputFragments (required for EMU solver)
Expand Down

0 comments on commit 3b838c7

Please sign in to comment.