function [dcdt] = Model_BI130_1(t,c,Parameters,Constants)
%%
% %Parameters()
% Parameters(1) = 0.055;     % my_max   [h^-1]          Maximum Specific Growth Rate  
% Parameters(2) = 0.03;      % my_d_max [h^-1]          Maximum Specific Death Rate  
% Parameters(3) = 0.002;     % my_d_min [h^-1]          Minimum Specific Death Rate                  
% Parameters(4) = 1.8*10^-8; % qGlc_max [mmol/cells *h] Maximum Cell-specific Glucose Uptake Rate
% Parameters(5) = 0.8*10^-8; % qGln_max [mmol/cells *h] Maximum Cell-specific Glutamine Uptake Rate
% Parameters(6) = 1.2*10^-8;% qLac_max [mmol/cells *h] Maximum Cell-specific Lactate Uptake Rate
% Parameters(7) = 0.19;      % kGlc     [mmol/L]        Monod Kinetic Constant for Glucose Uptake
% Parameters(8) = 0.3;       % kGln     [mmol/L]        Monod Kinetic Constant for Glutamine Uptake
% Parameters(9) = 0.03;      % KsGlc    [mmol/L]        Monod Kinetic Constant for Glucose          
% Parameters(10) = 0.03;     % KsGln    [mmol/L]        Monod Kinetic Constant for Glutamine  
%  %%
% %constants
% %Constants(1) = 0.0000;       % KLys        [h^-1]          Constant for Cell Lysing    
% Constants(2) = 4*10^-12;   % qAmm_uptake [mmol/cells *h] Maximum Cell-specific Ammonia Uptake Rate  
% Constants(3) = 0.4;        % YAmm/Gln    [mmol/mmol]     Kinetic production Constant for Ammonia by consuming Glutamine  
% Constants(4) = 1.0;        %YLac/Glc     [mmol/mmol]     Kinetic production Constant for Lactate by consuming Glucose  
% Constants(5) = 0;          %             [L]             Sample Volume
% Constants(6) = 0.5;        %                             Correction Factor for Ammonia uptake
%%
%Parameters()
my_max   = Parameters(1);
my_d_max = Parameters(2);
my_d_min = Parameters(3);
qGlc_max = Parameters(4);
qGln_max = Parameters(5);
qLac_uptake_max = Parameters(6);
kGlc     = Parameters(7);
kGln     = Parameters(8);
KsGlc    = Parameters(9);
KsGln    = Parameters(10);

%constants()
%Klys            = Constants(1);
qAmm_uptake_max = Constants(2);
YAmm_Gln        = Constants(3);
YLac_Glc        = Constants(4);
Fsample         = Constants(5);
kAmm            = Constants(6);
%%
%Bennenung der Variablen
Xv   = c(1); %viable cell density
Xd   = c(2); %total cell density
cGlc = c(3); % Glucose concentration
cLac = c(4); % Lactate concentration
cGln = c(5); % Glutamin concentration
cAmm = c(6); % Ammonia concentration
v    = c(7); % Volume
%%
%Parameter Berechnung
my = my_max * (cGlc/(cGlc + KsGlc)) * (cGln/(cGln + KsGln))*0.5;                                     %Cell specific growth rate
my_d = my_d_min + my_d_max * (KsGlc/(KsGlc + cGlc)) * (KsGln/(KsGln + cGln));                 %Cell specific death rate
qGlc = qGlc_max * (cGlc/(cGlc + kGlc)) * (my/(my + my_max)+0.5);                                 %Glucose Updake Rate
qGln = qGln_max * (cGln/(cGln + kGln));                                                         %Glutamine Uptake Rate
qLac = YLac_Glc * qGlc * (cGlc/cLac) - qLac_uptake_max * ((my_max - my)/my_max);                  %Lactate production Rate
qAmm = YAmm_Gln * qGln * cGln/cAmm - kAmm * qAmm_uptake_max * ((my_max - my)/my_max);           %Ammonia production Rate                                                            %Limiting substrate  
%%
%Differential Equations
dXvdt   = Xv * (my - my_d);              % Equation 1 - dXv/dt
dXddt   = Xv * my_d;                     % Equation 2 - dXt/dt  
dcGlcdt = -1.0 * Xv * qGlc;              % Equation 4 - dcGlc/dt
dcLacdt  = Xv * qLac;                    % Equation 5 - dcLac/dt
dcGlndt = -1.0 * Xv * qGln;              % Equation 6 - dcGln/dt
dcAmmdt = Xv * qAmm;                     % Equation 7 - dcAmm/dt
dvdt    = Fsample;                       % Equation 8 - dV/dt


[dcdt]=[dXvdt; dXddt; dcGlcdt; dcLacdt; dcGlndt; dcAmmdt; dvdt]; % concentration changes as ouput
end