%pset 7, Gross and Lodish model

function epo = Epo_trafficking(t,y,k_on,k_off,k_in,k_resec,k_lys,k_lag,k_deg);

EpoRsurface = 2000; % #/cell
%y1 = d[Epo_media_intact]/dt     all units = #/cell*min
%y2 = d[Epo.EpoR_surface]/dt    
%y3 = d[Epo.EpoR_sorting_endosome]/dt
%y4 = d[Epo.EpoR_deg_pathway1]/dt
%y5 = d[Epo.EpoR_deg_pathway2]/dt
%y6 = d[Epo.EpoR_deg_pathway3]/dt
%y7 = d[Epo.EpoR_deg_pathway4]/dt
%y8 = d[Epo.EpoR_deg_pathway5]/dt
%y9 = d[Epo.EpoR_deg_pathway6]/dt
%y10 = d[Epo.EpoR_lysosome]/dt
%y11 = d[Epo_media_degraded]/dt
%y12 = EpoR_surface

epo(1,:) = k_off*y(2) + k_resec*y(3) - k_on*y(1)*EpoRsurface;
epo(2,:) = k_on*y(1)*EpoRsurface - (k_off+k_in)*y(2);
epo(3,:) = k_in*y(2) - k_resec*y(3) - k_lys*y(3);
epo(4,:) = k_lys*y(3) - k_lag*y(4);
epo(5,:) = k_lag*y(4) - k_lag*y(5);
epo(6,:) = k_lag*y(5) - k_lag*y(6);
epo(7,:) = k_lag*y(6) - k_lag*y(7);
epo(8,:) = k_lag*y(7) - k_lag*y(8);
epo(9,:) = k_lag*y(8) - k_lag*y(9);
epo(10,:) = k_lag*y(9) - k_deg*y(10);
epo(11,:) = k_deg*y(10);
