% Fit dynamics of ExMT model assuming SatLV model to compare with DpMM % SatLV: saturating Lotka-Volterra dr_i = phi_ij * n_j/(n_j + K_j) % DpMM: mechanistic with consumable Michaelis-Menten interaction mediators % FitDynamicsMM: Same Michaelis-Menten coefficients used both for consumption and for influence clear global r0 rint A B KMM rndseed = 4000; rand('twister',rndseed) r0 = [0.12; 0.1]; % population reproduction rates, per hour at = 0.05; % avg. consumption values (fmole per cell); alpha_ij: population i, resource j bt = 0.5; % avg. production rates (fmole per cell per hour); beta_ij: population i, resource j rint = [0; 0.03]; % Nc*Nm matrix of interaction coefficients CSD = 1e5; % total initial cells K = 1e1; % Michaelis-Menten coefficient, fmole/ml ExtTh = 0.1; % population extinction threshold DilTh = 1e8; % coculture dilution threshold tau0 = 0; tauf = 250; % in hours dtau = 0.01; % in hours, cell growth update and uptake timescale Nr = 10; % number of rounds of propagation [Nc Nm] = size(rint); KMM = K*[1 1]; % Michaelis-Menten coefficients for consumption and influence, fmole/ml rp0 = [0.5 0.5]; %1/Nc*ones(1,Nc); %% Connectivity, Nm*Nc R = [0 1]; % release P = [1 0]; % consumption % interaction matrix alpha = at*[0 1]; % consumption rates beta = bt*[1 0]; % mediator release rates A = (R.*alpha)'; B = (P.*beta)'; %% Initial state rp = rp0; % cell distrbution [tout,yout] = ode23(@Dynamics_WM_NetworkDpMM_ODE23,[0 58],[rp(1)*CSD rp(2)*CSD 0]); nref = yout(:,1:2)'; cref = yout(:,3)'; nrefs = zeros(Nr,600000); crefs = zeros(Nr,600000); cct = 0; cf = 1; Nd = zeros(1,Nr); for nr = 1:Nr-1, disp(nr) tDil = interp1(sum(nref)',tout,DilTh); Nd(nr) = sum(tout