% lacsim.m - simulation of the lac operon model
% RMM, 20 Jan 07

eq1 = [11.73; 0.70; 1.39];

%
% Simulation of the reduced order model from Yildirim et al
%

% Time delays needed by dde23 (replicated in lac_yshm04)
tau_M = 0.1; tau_B = 2;

sol = dde23(@lac_yshm04, [tau_M tau_B], [0.1; 0; 1], [0 100]);
figure(1); 
  plot (sol.x, sol.y(1,:), sol.x, sol.y(2,:));
  title('Lac operon simulation (YSHM04)');
  xlabel('time (min)'); legend('M', 'B')

%
% Simulation of the non-time delay version
%
sol = ode45(@lac, [0 100], [0.1; 0; 1]);
figure(2);
  plot (sol.x, sol.y(1,:), sol.x, sol.y(2,:));
  title('Lac operon simulation (no time delays)');
  xlabel('time (min)'); legend('M', 'B');  
