-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObjective_diff_toy_models.m
More file actions
68 lines (58 loc) · 1.94 KB
/
Copy pathObjective_diff_toy_models.m
File metadata and controls
68 lines (58 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
clear
model = three_pathway_toy_model();
model.ub(:) =10;
model.ub([1,6,9]) = 1; % constraining the media reactions
model.c(5)=1; % settin the objective function
core = 5;
tol=1e-5;
% the LP based objective
consType = 'stoichiometry';
weights = ones(numel(model.rxns),1);
probType = 'minNetLP';
altSolMethod = {};
nSol=1;
[Model_minNetLP] = spectraME(model,core,tol,consType,weights,nSol,altSolMethod,probType);
% the minMILP based objective
consType = 'stoichiometry';
weights = ones(numel(model.rxns),1);
probType = 'minNetMILP';
altSolMethod = {};
nSol=1;
[Model_minNetMILP] = spectraME(model,core,tol,consType,weights,nSol,altSolMethod,probType);
% the DC based objective
consType = 'stoichiometry';
weights = ones(numel(model.rxns),1);
probType = 'minNetDC';
altSolMethod = {};
nSol=1;
[Model_minNetDC] = spectraME(model,core,tol,consType,weights,nSol,altSolMethod,probType);
% the tradeOff based objective
consType = 'stoichiometry';
weights = [1,1,-2,-1,1,1,2,-1,-2,0,1]';
probType = 'tradeOff';
altSolMethod = {};
nSol = 1;
[Model_tradeOff] = spectraME(model,core,tol,consType,weights,nSol,altSolMethod,probType);
% the optimBiomass based objective
consType = 'stoichiometry';
weights = ones(numel(model.rxns),1);
weights(find(model.c)) =10;
probType = 'growthOptim';
altSolMethod = {};
nSol = 1;
[Model_growthOptim] = spectraME(model,core,tol,consType,weights,nSol,altSolMethod,probType);
% to get the alternate solutions in MILP objectives
% the minMILP based objective
consType = 'stoichiometry';
weights = ones(numel(model.rxns),1);
probType = 'minNetMILP';
altSolMethod = 'pathwayExclusion';
nSol=5;
[Model_minNetMILP_altSols] = spectraME(model,core,tol,consType,weights,nSol,altSolMethod,probType);
% the tradeoff based objective
consType = 'stoichiometry';
weights = [1,1,-2,-1,1,1,2,-1,-2,0,1]';
probType = 'tradeOff';
altSolMethod = 'pathwayExclusion';
nSol=5;
[Model_tradeoff_altSols] = spectraME(model,core,tol,consType,weights,nSol,altSolMethod,probType);