From 74e1f840531c7acaf0f7fadda2b645456d073fa2 Mon Sep 17 00:00:00 2001 From: Ronan Fleming Date: Thu, 19 Mar 2020 03:48:35 +0000 Subject: [PATCH] solfull vs solv --- src/analysis/rMTA/MTA_MIQP.m | 2 +- src/analysis/thermo/thermoFBA/fastSNP.m | 2 +- .../dataIntegration/testSWIFTCORE/testSWIFTCORE.m | 4 +++- .../reconstruction/testModelManipulation/testGenerateRules.m | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/analysis/rMTA/MTA_MIQP.m b/src/analysis/rMTA/MTA_MIQP.m index e1db3e654f..50fe5336fa 100644 --- a/src/analysis/rMTA/MTA_MIQP.m +++ b/src/analysis/rMTA/MTA_MIQP.m @@ -129,7 +129,7 @@ 'threads',numWorkers); if solution.stat ~= 0 - v_res = solutioned(v); + v_res = solution.full(v); else v_res = zeros(length(v),1); end diff --git a/src/analysis/thermo/thermoFBA/fastSNP.m b/src/analysis/thermo/thermoFBA/fastSNP.m index bb2ca7132b..1a40064b26 100644 --- a/src/analysis/thermo/thermoFBA/fastSNP.m +++ b/src/analysis/thermo/thermoFBA/fastSNP.m @@ -88,7 +88,7 @@ if checkSolFeas(LP, sol) <= feasTol % feasible solution found. Save it - x = sol.fulledit(1:n); + x = sol.full(1:n); x(abs(x) < tol0) = 0; Ntemp(:, 2) = x / min(abs(x(x ~= 0))); end diff --git a/test/verifiedTests/dataIntegration/testSWIFTCORE/testSWIFTCORE.m b/test/verifiedTests/dataIntegration/testSWIFTCORE/testSWIFTCORE.m index 8b13113676..771e64b470 100644 --- a/test/verifiedTests/dataIntegration/testSWIFTCORE/testSWIFTCORE.m +++ b/test/verifiedTests/dataIntegration/testSWIFTCORE/testSWIFTCORE.m @@ -44,7 +44,9 @@ [~, coreInd, ~] = swiftcore(model, core, ones(n, 1), 1e-10, true, solvers.LP{1}); assert(all(coreInd(core))); A = swiftcc(model.S(:, coreInd), model.rev(coreInd)); -assert(all(A.' == 1:length(A))); +tmp=nnz(A.' == 1:length(A))/length(A) +bool=all(A.' == 1:length(A)); +assert(bool); % output a success message fprintf('\nDone.\n'); diff --git a/test/verifiedTests/reconstruction/testModelManipulation/testGenerateRules.m b/test/verifiedTests/reconstruction/testModelManipulation/testGenerateRules.m index cd49625821..4a8b8bedb5 100644 --- a/test/verifiedTests/reconstruction/testModelManipulation/testGenerateRules.m +++ b/test/verifiedTests/reconstruction/testModelManipulation/testGenerateRules.m @@ -32,7 +32,7 @@ fp = FormulaParser(); % fix for Recon2 - if strcmp(modelsToTry{i}, 'Recon2.v04.mat') + if strcmp(modelsToTry{i}, 'Recon2.v05.mat') model.rules(2240) = {'(x(2)) | (x(4)) | (x(3))'}; % '(26.1) or (314.1) or (314.2)' model.rules(2543) = {'(x(2)) | (x(4)) | (x(1)) | (x(3))'}; % '(26.1) or (314.1) or (8639.1) or (314.2)' model.rules(2750) = {'(x(2)) | (x(4)) | (x(1)) | (x(3))'}; % '(26.1) or (314.1) or (8639.1) or (314.2)'