Skip to content

Commit

Permalink
solfull vs solv
Browse files Browse the repository at this point in the history
  • Loading branch information
rmtfleming committed Mar 19, 2020
1 parent 786e80a commit 74e1f84
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/analysis/rMTA/MTA_MIQP.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/thermo/thermoFBA/fastSNP.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down

0 comments on commit 74e1f84

Please sign in to comment.