%This script can be used to reduce the example models presented in
%"Sunnaker, Schmidt, Jirstrand, Cedersund (2010), Zooming of states and parameters
%using a lumping approach including back-translation"

clear all;
clc;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Reduce one of the example models by evaluation of one of the cells below
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%This is the 6-states photosynthesis model
model = SBmodel('sixStatesModel.txt');
%epsilon defines if a reaction should be considered fast or slow and is
%used in the epsilon-decomposition
epsilon = 1E2; %note that 1E2 is the default value
coslow = 1E-6; %note that 1E-6 is the default cut-off value
%reduced the model
reducedModel = reduceModel(model,epsilon,coslow);
%Open SBedit to study the reduced model
SBedit(reducedModel);

%%
%This is the 26-states photosynthesis model
model = SBmodel('twentySixStatesModel.txt');
%epsilon defines if a reaction should be considered fast or slow and is
%used in the epsilon-decomposition
epsilon = 1E2; %note that 1E2 is the default value
coslow = 1E-6; %note that 1E-6 is the default value
%reduced the model
reducedModel = reduceModel(model,epsilon,coslow);
%Open SBedit to study the reduced model
SBedit(reducedModel);


