tic;    
[VOI, STATES, ALGEBRAIC, CONSTANTS] = mainFunction();
toc;

function [VOI, STATES, ALGEBRAIC, CONSTANTS] = mainFunction()
    % This is the "main function".  In Matlab, things work best if you rename this function to match the filename.
   [VOI, STATES, ALGEBRAIC, CONSTANTS] = solveModel();
end

function [algebraicVariableCount] = getAlgebraicVariableCount()
    % Used later when setting a global variable with the number of algebraic variables.
    % Note: This is not the "main method".
    algebraicVariableCount =696;
end
% There are a total of 98 entries in each of the rate and state variable arrays.
% There are a total of 334 entries in the constant variable array.
%

function [VOI, STATES, ALGEBRAIC, CONSTANTS] = solveModel()
    [LEGEND_STATES, LEGEND_ALGEBRAIC, LEGEND_VOI, LEGEND_CONSTANTS] = createLegends();
    % Create ALGEBRAIC of correct size
    global algebraicVariableCount;  algebraicVariableCount = getAlgebraicVariableCount();
    % Initialise constants and state variables
    [INIT_STATES, CONSTANTS] = initConsts;

    % Set timespan to solve over
    tspan = [0, 4.6];

    % Set numerical accuracy options for ODE solver
    options = odeset('RelTol', 1e-06, 'AbsTol', 1e-06, 'MaxStep', 1e-4);

    % Solve model with ODE solver
    [VOI, STATES] = ode15s(@(VOI, STATES)computeRates(VOI, STATES, CONSTANTS), tspan, INIT_STATES, options);

    % Compute algebraic variables
    [RATES, ALGEBRAIC] = computeRates(VOI, STATES, CONSTANTS);
    ALGEBRAIC = computeAlgebraic(ALGEBRAIC, CONSTANTS, STATES, VOI);
    vlabels = {'V_mem in component environment (J_per_C)',...
        'I_stim in component environment (fA)',...
        'q_Ca_i in component environment (fmol)',...
        'q_Na_i in component environment (fmol)',...
        'q_K_i in component environment (fmol)'};
    [~, i_st, i_alg] = find_indices(vlabels, cellstr(LEGEND_CONSTANTS), cellstr(LEGEND_STATES), cellstr(LEGEND_ALGEBRAIC));
    if i_st
        vol_myo = 3.7; % pL
        plot_selected(i_st,VOI,STATES/vol_myo,'s',LEGEND_STATES,'concentrations mM',ceil(sqrt(length(i_st))))
    end
    plot_selected(i_alg,VOI,ALGEBRAIC,'s',LEGEND_ALGEBRAIC,'ALGEBRAIC',ceil(sqrt(length(i_alg))))

    % fluxes
    vlabels = {'v_K1 in component K1 (fmol_per_sec)', ...
        'v_Kr in component Kr (fmol_per_sec)',...
        'v_Ks in component Ks (fmol_per_sec)',...
        'v_CaB in component CaB (fmol_per_sec)',...
        'v_funny_Na in component funny (fmol_per_sec)',...
        'v_pCa_R2 in component pCa (fmol_per_sec)',...
        'v_TCC in component TCC (fmol_per_sec)'};
    [~, ~, i_alg] = find_indices(vlabels, cellstr(LEGEND_CONSTANTS), cellstr(LEGEND_STATES), cellstr(LEGEND_ALGEBRAIC));
    if false
        if i_st
            plot_selected(i_st,VOI,STATES,'s',LEGEND_STATES,'FLUXES',ceil(sqrt(length(i_st))))
        end
        plot_selected(i_alg,VOI,ALGEBRAIC,'s',LEGEND_ALGEBRAIC,'FLUXES',ceil(sqrt(length(i_alg))))
    end
    
    % plot Kr in terms of current [=] uA/uF
    % fluxes
    if true
        % convert v (fmol/s) to i (uA/uF) 
        F = 96485;
        Cm = 6e-5; % Unit microF %0.001;
        conv = 1e-9*F/Cm;
        figure();
        for j=1:length(vlabels)
            subplot(3,4,j)
            plot(VOI, ALGEBRAIC(:,i_alg(j))*conv);
            xlabel(LEGEND_VOI);
            title(vlabels(j));
            if verLessThan('matlab','9.5')
                suptitle('uA/uF')    
            else
                sgtitle('uA/uF')    
            end
        end
    end
    
    % q_mem currents
%         ode(q_mem, t) = I_mem_CaB+I_mem_Na+I_mem_K+I_mem_K_ATP+I_mem_K1+I_mem_Kp+I_mem_Kr+I_mem_Ks+I_mem_LCC+I_mem_NaB+I_mem_NaK+I_mem_NCX+I_mem_ns_Ca+I_mem_pCa+I_mem_TCC+I_mem_TO+I_stim+I_mem_ns_Na+I_mem_ns_K+I_mem_funny;

    % fluxes
    vlabels = {'I_mem_CaB in component CaB (fA)', ...
        'I_mem_Na in component fast_Na (fA)',...
        'I_mem_K_ATP in component K_ATP (fA)',...
        'I_mem_K1 in component K1 (fA)',...
        'I_mem_Kp in component Kp (fA)',...
        'I_mem_Kr in component Kr (fA)',...
        'I_mem_Ks in component Ks (fA)',...
        'I_mem_LCC in component LCC (fA)',...
        'I_mem_NaB in component NaB (fA)',...
        'I_mem_NCX in component NCX (fA)',...
        'I_mem_ns_Ca in component ns (fA)',...
        'I_mem_pCa in component pCa (fA)',...
        'I_mem_TCC in component TCC (fA)',...
        'I_mem_TO in component TO (fA)',...
        'I_mem_funny in component funny (fA)'};
    [~, ~, i_alg] = find_indices(vlabels, cellstr(LEGEND_CONSTANTS), cellstr(LEGEND_STATES), cellstr(LEGEND_ALGEBRAIC));
    if true
        plot_selected(i_alg,VOI,ALGEBRAIC,'s',LEGEND_ALGEBRAIC,'I_mem FLUXES',ceil(sqrt(length(i_alg))))
    end

end            


function [i_con, i_st, i_alg] = find_indices(labels, LEGEND_CONSTANTS, LEGEND_STATES, LEGEND_ALGEBRAIC)
% return the indices for the selected labels
    all_legends = [LEGEND_CONSTANTS; LEGEND_STATES; LEGEND_ALGEBRAIC];
    
    i_con = [];
    for i = 1:length(labels)
        i_con = [i_con; find(strcmp(labels{i},LEGEND_CONSTANTS))];
    end
    i_st = [];
    for i = 1:length(labels)
        i_st = [i_st; find(strcmp(labels{i},LEGEND_STATES))];
    end
    i_alg = [];
    for i = 1:length(labels)
        i_alg = [i_alg; find(strcmp(labels{i},LEGEND_ALGEBRAIC))];
    end
    
    if length(i_con) + length(i_st) + length(i_alg) < length(labels)
        error('missing index');
    end
end


function [] = plot_selected(ids,x,y,legend_x,legend_y,titlestr,ns)
    istart = 1;
%     istart = find(x > 3.2, 1);
    figure();
%     plot stimuli
    for i = 1:length(ids)
        subplot(ns,ns,i)
        plotting_x = x(istart:end);
        plotting_y = y(istart:end,ids(i));
        if isempty(plotting_y) % probably a constant scalar
            plotting_y = repmat(y(ids(i)),2);
            plotting_x = [x(istart), x(end)];
        end
        plot(plotting_x, plotting_y);
        xlabel('time (s)');
        str = split(legend_y(ids(i),:), ' ');
        str = legend_y(ids(i),:);
        l = legend(str);
        set(l,'interpreter','none');
    end
    if verLessThan('matlab','9.5')
        suptitle(titlestr)    
    else
        sgtitle(titlestr)    
    end
end

function [LEGEND_STATES, LEGEND_ALGEBRAIC, LEGEND_VOI, LEGEND_CONSTANTS] = createLegends()
    LEGEND_STATES = ''; LEGEND_ALGEBRAIC = ''; LEGEND_VOI = ''; LEGEND_CONSTANTS = '';
    LEGEND_CONSTANTS(:,1) = strpad('kappa_b2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,2) = strpad('kappa_CaB in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,3) = strpad('kappa_K1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,4) = strpad('kappa_gK1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,5) = strpad('kappa_Kr in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,6) = strpad('kappa_xr10 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,7) = strpad('kappa_xr11 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,8) = strpad('kappa_xr20 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,9) = strpad('kappa_xr21 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,10) = strpad('kappa_Ks in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,11) = strpad('kappa_xs1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,12) = strpad('kappa_xs2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,13) = strpad('kappa_LCC_Ca1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,14) = strpad('kappa_LCC_Ca2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,15) = strpad('kappa_LCC_K1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,16) = strpad('kappa_LCC_K2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,17) = strpad('kappa_d000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,18) = strpad('kappa_d010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,19) = strpad('kappa_d020 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,20) = strpad('kappa_d001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,21) = strpad('kappa_d011 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,22) = strpad('kappa_d021 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,23) = strpad('kappa_f1_000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,24) = strpad('kappa_f1_100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,25) = strpad('kappa_f1_001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,26) = strpad('kappa_f1_101 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,27) = strpad('kappa_f2_000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,28) = strpad('kappa_f2_100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,29) = strpad('kappa_f2_001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,30) = strpad('kappa_f2_101 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,31) = strpad('kappa_f3_010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,32) = strpad('kappa_f3_110 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,33) = strpad('kappa_f3_011 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,34) = strpad('kappa_f3_111 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,35) = strpad('kappa_fCa000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,36) = strpad('kappa_fCa100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,37) = strpad('kappa_fCa010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,38) = strpad('kappa_fCa110 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,39) = strpad('kappa_fCa020 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,40) = strpad('kappa_fCa120 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,41) = strpad('kappa_1_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,42) = strpad('kappa_2_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,43) = strpad('kappa_3_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,44) = strpad('kappa_4_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,45) = strpad('kappa_5_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,46) = strpad('kappa_6_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,47) = strpad('kappa_NaB in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,48) = strpad('kappa_1_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,49) = strpad('kappa_2_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,50) = strpad('kappa_3_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,51) = strpad('kappa_4_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,52) = strpad('kappa_5_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,53) = strpad('kappa_6_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,54) = strpad('kappa_7_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,55) = strpad('kappa_8_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,56) = strpad('kappa_9_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,57) = strpad('kappa_10_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,58) = strpad('kappa_11_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,59) = strpad('kappa_12_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,60) = strpad('kappa_13_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,61) = strpad('kappa_14_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,62) = strpad('kappa_15_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,63) = strpad('kappa_TCC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,64) = strpad('kappa_R1_TCC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,65) = strpad('kappa_R2_TCC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,66) = strpad('kappa_R3_TCC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,67) = strpad('kappa_R4_TCC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,68) = strpad('kappa_b1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,69) = strpad('kappa_Na in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,70) = strpad('kappa_m000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,71) = strpad('kappa_m001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,72) = strpad('kappa_m010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,73) = strpad('kappa_m011 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,74) = strpad('kappa_m100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,75) = strpad('kappa_m101 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,76) = strpad('kappa_m110 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,77) = strpad('kappa_m111 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,78) = strpad('kappa_m200 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,79) = strpad('kappa_m201 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,80) = strpad('kappa_m210 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,81) = strpad('kappa_m211 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,82) = strpad('kappa_h000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,83) = strpad('kappa_h001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,84) = strpad('kappa_h100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,85) = strpad('kappa_h101 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,86) = strpad('kappa_h200 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,87) = strpad('kappa_h201 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,88) = strpad('kappa_h300 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,89) = strpad('kappa_h301 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,90) = strpad('kappa_j000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,91) = strpad('kappa_j010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,92) = strpad('kappa_j100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,93) = strpad('kappa_j110 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,94) = strpad('kappa_j200 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,95) = strpad('kappa_j210 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,96) = strpad('kappa_j300 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,97) = strpad('kappa_j310 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,98) = strpad('kappa_funny_Na in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,99) = strpad('kappa_funny_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,100) = strpad('kappa_R_xf in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,101) = strpad('kappa_pCa_R1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,102) = strpad('kappa_pCa_R2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,103) = strpad('kappa_leak in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,104) = strpad('kappa_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,105) = strpad('kappa_X00_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,106) = strpad('kappa_X10_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,107) = strpad('kappa_X01_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,108) = strpad('kappa_X11_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,109) = strpad('kappa_i00_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,110) = strpad('kappa_i10_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,111) = strpad('kappa_i20_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,112) = strpad('kappa_Kp in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,113) = strpad('kappa_gKp in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,114) = strpad('kappa_K_ATP in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,115) = strpad('kappa_ns_Ca in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,116) = strpad('kappa_ns_Na in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,117) = strpad('kappa_ns_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,118) = strpad('kappa_RyR in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,119) = strpad('kappa_OC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,120) = strpad('kappa_CCI in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,121) = strpad('kappa_CII in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,122) = strpad('kappa_IO in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,123) = strpad('kappa_SERCA_R1_2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,124) = strpad('kappa_SERCA_R2_4 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,125) = strpad('kappa_SERCA_R2_2a in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,126) = strpad('kappa_SERCA_R4_5 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,127) = strpad('kappa_SERCA_R5_6 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,128) = strpad('kappa_SERCA_R6_8 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,129) = strpad('kappa_SERCA_R8_9 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,130) = strpad('kappa_SERCA_R9_10 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,131) = strpad('kappa_SERCA_R10_1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,132) = strpad('kappa_TO in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,133) = strpad('kappa_gTO_1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,134) = strpad('kappa_gTO_2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,135) = strpad('kappa_gTO_3 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,136) = strpad('kappa_gTO_4 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,137) = strpad('K_Ca_i in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,138) = strpad('K_CMDN in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,139) = strpad('K_CMDN_Ca in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,140) = strpad('K_Ca_o in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,141) = strpad('K_K_i in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,142) = strpad('K_K_o in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,143) = strpad('K_C_K1 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,144) = strpad('K_O_K1 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,145) = strpad('K_Sa_Kr in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,146) = strpad('K_Sb_Kr in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,147) = strpad('K_Sc_Kr in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,148) = strpad('K_Sd_Kr in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,149) = strpad('K_S_Ks0 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,150) = strpad('K_S_Ks1 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,151) = strpad('K_S_Ks2 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,152) = strpad('K_000_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,153) = strpad('K_010_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,154) = strpad('K_020_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,155) = strpad('K_100_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,156) = strpad('K_110_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,157) = strpad('K_120_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,158) = strpad('K_001_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,159) = strpad('K_011_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,160) = strpad('K_021_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,161) = strpad('K_101_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,162) = strpad('K_111_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,163) = strpad('K_121_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,164) = strpad('K_1_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,165) = strpad('K_2_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,166) = strpad('K_3_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,167) = strpad('K_4_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,168) = strpad('K_5_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,169) = strpad('K_6_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,170) = strpad('K_Na_i in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,171) = strpad('K_Na_o in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,172) = strpad('K_1_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,173) = strpad('K_2_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,174) = strpad('K_3_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,175) = strpad('K_4_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,176) = strpad('K_5_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,177) = strpad('K_6_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,178) = strpad('K_7_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,179) = strpad('K_8_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,180) = strpad('K_9_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,181) = strpad('K_10_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,182) = strpad('K_11_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,183) = strpad('K_12_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,184) = strpad('K_13_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,185) = strpad('K_14_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,186) = strpad('K_15_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,187) = strpad('K_MgATP in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,188) = strpad('K_MgADP in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,189) = strpad('K_Pi in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,190) = strpad('K_H in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,191) = strpad('K_S00_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,192) = strpad('K_S10_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,193) = strpad('K_S01_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,194) = strpad('K_S11_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,195) = strpad('K_TRPN in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,196) = strpad('K_TRPN_Ca in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,197) = strpad('K_000_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,198) = strpad('K_100_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,199) = strpad('K_200_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,200) = strpad('K_300_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,201) = strpad('K_010_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,202) = strpad('K_110_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,203) = strpad('K_210_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,204) = strpad('K_310_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,205) = strpad('K_001_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,206) = strpad('K_101_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,207) = strpad('K_201_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,208) = strpad('K_301_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,209) = strpad('K_011_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,210) = strpad('K_111_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,211) = strpad('K_211_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,212) = strpad('K_311_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,213) = strpad('K_x0_funny in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,214) = strpad('K_x1_funny in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,215) = strpad('K_pCa in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,216) = strpad('K_pCa_Ca in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,217) = strpad('K_Ca_SR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,218) = strpad('K_S00_K in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,219) = strpad('K_S10_K in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,220) = strpad('K_S20_K in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,221) = strpad('K_S01_K in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,222) = strpad('K_S11_K in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,223) = strpad('K_S21_K in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,224) = strpad('K_C_Kp in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,225) = strpad('K_O_Kp in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,226) = strpad('K_C_RyR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,227) = strpad('K_CI_RyR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,228) = strpad('K_I_RyR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,229) = strpad('K_O_RyR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,230) = strpad('K_P1_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,231) = strpad('K_P2_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,232) = strpad('K_P2a_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,233) = strpad('K_P4_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,234) = strpad('K_P5_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,235) = strpad('K_P6_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,236) = strpad('K_P8_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,237) = strpad('K_P9_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,238) = strpad('K_P10_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,239) = strpad('K_r0s0_TO in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,240) = strpad('K_r1s0_TO in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,241) = strpad('K_r0s1_TO in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,242) = strpad('K_r1s1_TO in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,243) = strpad('zCa in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,244) = strpad('zK in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,245) = strpad('z_fK1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,246) = strpad('z_rK1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,247) = strpad('z_f_Kp in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,248) = strpad('z_r_Kp in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,249) = strpad('z_xr1_f in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,250) = strpad('z_xr1_r in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,251) = strpad('z_xr2_f in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,252) = strpad('z_xr2_r in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,253) = strpad('z_xs_f in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,254) = strpad('z_xs_r in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,255) = strpad('zf_NCX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,256) = strpad('zr_NCX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,257) = strpad('nNa_o_NCX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,258) = strpad('nNa_i_NCX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,259) = strpad('zNa in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,260) = strpad('zF_5 in component BG_parameters (C_per_mol)');
    LEGEND_CONSTANTS(:,261) = strpad('zF_8 in component BG_parameters (C_per_mol)');
    LEGEND_CONSTANTS(:,262) = strpad('z_df in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,263) = strpad('z_ff in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,264) = strpad('z_dr in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,265) = strpad('z_fr in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,266) = strpad('z_rTO_f in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,267) = strpad('z_sTO_f in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,268) = strpad('z_rTO_r in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,269) = strpad('z_sTO_r in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,270) = strpad('z_fh in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,271) = strpad('z_fj in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,272) = strpad('z_fm in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,273) = strpad('z_rh in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,274) = strpad('z_rj in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,275) = strpad('z_rm in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,276) = strpad('z_xff in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,277) = strpad('z_xfr in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,278) = strpad('z_fd in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,279) = strpad('z_ff1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,280) = strpad('z_ff2 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,281) = strpad('z_ff3 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,282) = strpad('z_rCa in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,283) = strpad('z_rd in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,284) = strpad('z_rf1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,285) = strpad('z_rf2 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,286) = strpad('z_rf3 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,287) = strpad('nK in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,288) = strpad('z_fX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,289) = strpad('z_fXi in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,290) = strpad('z_rX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,291) = strpad('z_rXi in component BG_parameters (dimensionless)');
    LEGEND_VOI = strpad('t in component environment (second)');
    LEGEND_CONSTANTS(:,292) = strpad('vol_myo in component environment (pL)');
    LEGEND_CONSTANTS(:,293) = strpad('C_m in component environment (fF)');
    LEGEND_STATES(:,1) = strpad('q_Ca_i in component environment (fmol)');
    LEGEND_STATES(:,2) = strpad('q_Ca_o in component environment (fmol)');
    LEGEND_STATES(:,3) = strpad('q_Ca_SR in component environment (fmol)');
    LEGEND_STATES(:,4) = strpad('q_CMDN in component environment (fmol)');
    LEGEND_STATES(:,5) = strpad('q_CMDN_Ca in component environment (fmol)');
    LEGEND_STATES(:,6) = strpad('q_Na_i in component environment (fmol)');
    LEGEND_STATES(:,7) = strpad('q_Na_o in component environment (fmol)');
    LEGEND_STATES(:,8) = strpad('q_K_i in component environment (fmol)');
    LEGEND_STATES(:,9) = strpad('q_K_o in component environment (fmol)');
    LEGEND_STATES(:,10) = strpad('q_MgATP in component environment (fmol)');
    LEGEND_STATES(:,11) = strpad('q_MgADP in component environment (fmol)');
    LEGEND_STATES(:,12) = strpad('q_Pi in component environment (fmol)');
    LEGEND_STATES(:,13) = strpad('q_H in component environment (fmol)');
    LEGEND_STATES(:,14) = strpad('q_pCa in component environment (fmol)');
    LEGEND_STATES(:,15) = strpad('q_pCa_Ca in component environment (fmol)');
    LEGEND_STATES(:,16) = strpad('q_TRPN in component environment (fmol)');
    LEGEND_STATES(:,17) = strpad('q_TRPN_Ca in component environment (fmol)');
    LEGEND_STATES(:,18) = strpad('q_mem in component environment (fC)');
    LEGEND_ALGEBRAIC(:,1) = strpad('V_mem in component environment (J_per_C)');
    LEGEND_STATES(:,19) = strpad('q_S00_K in component environment (fmol)');
    LEGEND_STATES(:,20) = strpad('q_S10_K in component environment (fmol)');
    LEGEND_STATES(:,21) = strpad('q_S20_K in component environment (fmol)');
    LEGEND_STATES(:,22) = strpad('q_S01_K in component environment (fmol)');
    LEGEND_STATES(:,23) = strpad('q_S11_K in component environment (fmol)');
    LEGEND_STATES(:,24) = strpad('q_S21_K in component environment (fmol)');
    LEGEND_STATES(:,25) = strpad('q_C_K1 in component environment (fmol)');
    LEGEND_STATES(:,26) = strpad('q_O_K1 in component environment (fmol)');
    LEGEND_STATES(:,27) = strpad('q_C_Kp in component environment (fmol)');
    LEGEND_STATES(:,28) = strpad('q_O_Kp in component environment (fmol)');
    LEGEND_STATES(:,29) = strpad('q_Sa_Kr in component environment (fmol)');
    LEGEND_STATES(:,30) = strpad('q_Sb_Kr in component environment (fmol)');
    LEGEND_STATES(:,31) = strpad('q_Sc_Kr in component environment (fmol)');
    LEGEND_STATES(:,32) = strpad('q_Sd_Kr in component environment (fmol)');
    LEGEND_STATES(:,33) = strpad('q_S_Ks0 in component environment (fmol)');
    LEGEND_STATES(:,34) = strpad('q_S_Ks1 in component environment (fmol)');
    LEGEND_STATES(:,35) = strpad('q_S_Ks2 in component environment (fmol)');
    LEGEND_STATES(:,36) = strpad('q_000_LCC in component environment (fmol)');
    LEGEND_STATES(:,37) = strpad('q_010_LCC in component environment (fmol)');
    LEGEND_STATES(:,38) = strpad('q_020_LCC in component environment (fmol)');
    LEGEND_STATES(:,39) = strpad('q_100_LCC in component environment (fmol)');
    LEGEND_STATES(:,40) = strpad('q_110_LCC in component environment (fmol)');
    LEGEND_STATES(:,41) = strpad('q_120_LCC in component environment (fmol)');
    LEGEND_STATES(:,42) = strpad('q_001_LCC in component environment (fmol)');
    LEGEND_STATES(:,43) = strpad('q_011_LCC in component environment (fmol)');
    LEGEND_STATES(:,44) = strpad('q_021_LCC in component environment (fmol)');
    LEGEND_STATES(:,45) = strpad('q_101_LCC in component environment (fmol)');
    LEGEND_STATES(:,46) = strpad('q_111_LCC in component environment (fmol)');
    LEGEND_STATES(:,47) = strpad('q_121_LCC in component environment (fmol)');
    LEGEND_STATES(:,48) = strpad('q_C_RyR in component environment (fmol)');
    LEGEND_STATES(:,49) = strpad('q_CI_RyR in component environment (fmol)');
    LEGEND_STATES(:,50) = strpad('q_I_RyR in component environment (fmol)');
    LEGEND_STATES(:,51) = strpad('q_O_RyR in component environment (fmol)');
    LEGEND_STATES(:,52) = strpad('q_S00_TCC in component environment (fmol)');
    LEGEND_STATES(:,53) = strpad('q_S10_TCC in component environment (fmol)');
    LEGEND_STATES(:,54) = strpad('q_S01_TCC in component environment (fmol)');
    LEGEND_STATES(:,55) = strpad('q_S11_TCC in component environment (fmol)');
    LEGEND_STATES(:,56) = strpad('q_r0s0_TO in component environment (fmol)');
    LEGEND_STATES(:,57) = strpad('q_r1s0_TO in component environment (fmol)');
    LEGEND_STATES(:,58) = strpad('q_r0s1_TO in component environment (fmol)');
    LEGEND_STATES(:,59) = strpad('q_r1s1_TO in component environment (fmol)');
    LEGEND_STATES(:,60) = strpad('q_000_Na in component environment (fmol)');
    LEGEND_STATES(:,61) = strpad('q_100_Na in component environment (fmol)');
    LEGEND_STATES(:,62) = strpad('q_200_Na in component environment (fmol)');
    LEGEND_STATES(:,63) = strpad('q_300_Na in component environment (fmol)');
    LEGEND_STATES(:,64) = strpad('q_010_Na in component environment (fmol)');
    LEGEND_STATES(:,65) = strpad('q_110_Na in component environment (fmol)');
    LEGEND_STATES(:,66) = strpad('q_210_Na in component environment (fmol)');
    LEGEND_STATES(:,67) = strpad('q_310_Na in component environment (fmol)');
    LEGEND_STATES(:,68) = strpad('q_001_Na in component environment (fmol)');
    LEGEND_STATES(:,69) = strpad('q_101_Na in component environment (fmol)');
    LEGEND_STATES(:,70) = strpad('q_201_Na in component environment (fmol)');
    LEGEND_STATES(:,71) = strpad('q_301_Na in component environment (fmol)');
    LEGEND_STATES(:,72) = strpad('q_011_Na in component environment (fmol)');
    LEGEND_STATES(:,73) = strpad('q_111_Na in component environment (fmol)');
    LEGEND_STATES(:,74) = strpad('q_211_Na in component environment (fmol)');
    LEGEND_STATES(:,75) = strpad('q_311_Na in component environment (fmol)');
    LEGEND_STATES(:,76) = strpad('q_x0_funny in component environment (fmol)');
    LEGEND_STATES(:,77) = strpad('q_x1_funny in component environment (fmol)');
    LEGEND_STATES(:,78) = strpad('q_P7 in component environment (fmol)');
    LEGEND_STATES(:,79) = strpad('q_P14 in component environment (fmol)');
    LEGEND_STATES(:,80) = strpad('q_P15 in component environment (fmol)');
    LEGEND_STATES(:,81) = strpad('q_P1 in component environment (fmol)');
    LEGEND_STATES(:,82) = strpad('q_P2 in component environment (fmol)');
    LEGEND_STATES(:,83) = strpad('q_P3 in component environment (fmol)');
    LEGEND_STATES(:,84) = strpad('q_P4 in component environment (fmol)');
    LEGEND_STATES(:,85) = strpad('q_P5 in component environment (fmol)');
    LEGEND_STATES(:,86) = strpad('q_P6 in component environment (fmol)');
    LEGEND_STATES(:,87) = strpad('q_P10 in component environment (fmol)');
    LEGEND_STATES(:,88) = strpad('q_P11 in component environment (fmol)');
    LEGEND_STATES(:,89) = strpad('q_P12 in component environment (fmol)');
    LEGEND_STATES(:,90) = strpad('q_P13 in component environment (fmol)');
    LEGEND_STATES(:,91) = strpad('q_P8 in component environment (fmol)');
    LEGEND_STATES(:,92) = strpad('q_P9 in component environment (fmol)');
    LEGEND_STATES(:,93) = strpad('q_P1_NCX in component environment (fmol)');
    LEGEND_STATES(:,94) = strpad('q_P2_NCX in component environment (fmol)');
    LEGEND_STATES(:,95) = strpad('q_P3_NCX in component environment (fmol)');
    LEGEND_STATES(:,96) = strpad('q_P4_NCX in component environment (fmol)');
    LEGEND_STATES(:,97) = strpad('q_P5_NCX in component environment (fmol)');
    LEGEND_STATES(:,98) = strpad('q_P6_NCX in component environment (fmol)');
    LEGEND_CONSTANTS(:,294) = strpad('q_P1_SERCA in component environment (fmol)');
    LEGEND_CONSTANTS(:,295) = strpad('q_P2_SERCA in component environment (fmol)');
    LEGEND_CONSTANTS(:,296) = strpad('q_P2a_SERCA in component environment (fmol)');
    LEGEND_CONSTANTS(:,297) = strpad('q_P4_SERCA in component environment (fmol)');
    LEGEND_CONSTANTS(:,298) = strpad('q_P5_SERCA in component environment (fmol)');
    LEGEND_CONSTANTS(:,299) = strpad('q_P6_SERCA in component environment (fmol)');
    LEGEND_CONSTANTS(:,300) = strpad('q_P8_SERCA in component environment (fmol)');
    LEGEND_CONSTANTS(:,301) = strpad('q_P9_SERCA in component environment (fmol)');
    LEGEND_CONSTANTS(:,302) = strpad('q_P10_SERCA in component environment (fmol)');
    LEGEND_ALGEBRAIC(:,36) = strpad('I_stim in component environment (fA)');
    LEGEND_CONSTANTS(:,303) = strpad('stimPeriod in component environment (second)');
    LEGEND_CONSTANTS(:,304) = strpad('stimDuration in component environment (second)');
    LEGEND_ALGEBRAIC(:,35) = strpad('tPeriod in component environment (second)');
    LEGEND_ALGEBRAIC(:,40) = strpad('v_CaB in component CaB (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,41) = strpad('I_mem_CaB in component CaB (fA)');
    LEGEND_ALGEBRAIC(:,44) = strpad('v_leak in component Ca_leak (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,50) = strpad('v_b2 in component CMDN_buffer (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,157) = strpad('v_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,159) = strpad('I_mem_Na in component fast_Na (fA)');
    LEGEND_ALGEBRAIC(:,691) = strpad('v_funny_K in component funny (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,692) = strpad('v_funny_Na in component funny (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,696) = strpad('I_mem_funny in component funny (fA)');
    LEGEND_ALGEBRAIC(:,215) = strpad('v_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,217) = strpad('I_mem_K in component K (fA)');
    LEGEND_ALGEBRAIC(:,166) = strpad('v_K_ATP in component K_ATP (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,167) = strpad('I_mem_K_ATP in component K_ATP (fA)');
    LEGEND_ALGEBRAIC(:,179) = strpad('v_K1 in component K1 (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,181) = strpad('I_mem_K1 in component K1 (fA)');
    LEGEND_ALGEBRAIC(:,229) = strpad('v_Kp in component Kp (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,231) = strpad('I_mem_Kp in component Kp (fA)');
    LEGEND_ALGEBRAIC(:,251) = strpad('v_Kr in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,259) = strpad('I_mem_Kr in component Kr (fA)');
    LEGEND_ALGEBRAIC(:,274) = strpad('v_Ks in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,279) = strpad('I_mem_Ks in component Ks (fA)');
    LEGEND_ALGEBRAIC(:,389) = strpad('v_Ca_o_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,390) = strpad('v_Ca_i_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,396) = strpad('v_K_o_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,397) = strpad('v_K_i_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,395) = strpad('I_mem_LCC in component LCC (fA)');
    LEGEND_ALGEBRAIC(:,484) = strpad('v_K_o_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,485) = strpad('v_K_i_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,488) = strpad('v_Na_o_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,489) = strpad('v_Na_i_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,483) = strpad('v_H_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,486) = strpad('v_MgADP_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,487) = strpad('v_MgATP_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,490) = strpad('v_Pi_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,478) = strpad('I_mem_NaK in component NaK (fA)');
    LEGEND_ALGEBRAIC(:,494) = strpad('v_NaB in component NaB (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,495) = strpad('I_mem_NaB in component NaB (fA)');
    LEGEND_ALGEBRAIC(:,542) = strpad('v_ns_Ca in component ns (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,549) = strpad('v_ns_Na in component ns (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,556) = strpad('v_ns_K in component ns (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,543) = strpad('I_mem_ns_Ca in component ns (fA)');
    LEGEND_ALGEBRAIC(:,550) = strpad('I_mem_ns_Na in component ns (fA)');
    LEGEND_ALGEBRAIC(:,557) = strpad('I_mem_ns_K in component ns (fA)');
    LEGEND_ALGEBRAIC(:,532) = strpad('v_Ca_o_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,533) = strpad('v_Ca_i_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,534) = strpad('v_Na_o_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,535) = strpad('v_Na_i_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,529) = strpad('I_mem_NCX in component NCX (fA)');
    LEGEND_ALGEBRAIC(:,562) = strpad('v_pCa_R1 in component pCa (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,563) = strpad('v_pCa_R2 in component pCa (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,564) = strpad('I_mem_pCa in component pCa (fA)');
    LEGEND_ALGEBRAIC(:,571) = strpad('v_RyR in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,576) = strpad('v_RyRgate_Ca_i in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,604) = strpad('v_Ca_i_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,609) = strpad('v_Ca_SR_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,616) = strpad('v_H_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,598) = strpad('v_MgADP_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,595) = strpad('v_MgATP_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,593) = strpad('v_Pi_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,635) = strpad('v_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,648) = strpad('I_mem_TCC in component TCC (fA)');
    LEGEND_ALGEBRAIC(:,669) = strpad('v_TO in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,677) = strpad('I_mem_TO in component TO (fA)');
    LEGEND_ALGEBRAIC(:,649) = strpad('v_b1 in component TRPN_buffer (fmol_per_sec)');
    LEGEND_CONSTANTS(:,305) = strpad('R in component constants (J_per_K_per_mol)');
    LEGEND_CONSTANTS(:,306) = strpad('T in component constants (kelvin)');
    LEGEND_CONSTANTS(:,307) = strpad('F in component constants (C_per_mol)');
    LEGEND_ALGEBRAIC(:,37) = strpad('mu_Ca_i in component CaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,38) = strpad('mu_Ca_o in component CaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,39) = strpad('Am_CaB in component CaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,42) = strpad('mu_Ca_SR in component Ca_leak (J_per_mol)');
    LEGEND_ALGEBRAIC(:,43) = strpad('mu_Ca_i in component Ca_leak (J_per_mol)');
    LEGEND_ALGEBRAIC(:,45) = strpad('mu_CMDN in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,46) = strpad('mu_CMDN_Ca in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,48) = strpad('mu_Ca_i in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,49) = strpad('Af_b2 in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,47) = strpad('Ar_b2 in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,52) = strpad('mu_Na_o in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,53) = strpad('mu_Na_i in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,2) = strpad('mu_S000_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,3) = strpad('mu_S010_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,4) = strpad('mu_S100_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,5) = strpad('mu_S110_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,6) = strpad('mu_S200_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,7) = strpad('mu_S210_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,8) = strpad('mu_S300_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,9) = strpad('mu_S310_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,10) = strpad('mu_S001_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,11) = strpad('mu_S011_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,12) = strpad('mu_S101_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,13) = strpad('mu_S111_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,14) = strpad('mu_S201_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,15) = strpad('mu_S211_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,16) = strpad('mu_S301_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,54) = strpad('mu_S311_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,84) = strpad('Am_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,55) = strpad('Af_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,85) = strpad('Ar_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,56) = strpad('Af_h000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,86) = strpad('Ar_h000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,87) = strpad('v_h000 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,57) = strpad('Af_h001 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,88) = strpad('Ar_h001 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,89) = strpad('v_h001 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,58) = strpad('Af_h100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,90) = strpad('Ar_h100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,91) = strpad('v_h100 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,59) = strpad('Af_h101 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,92) = strpad('Ar_h101 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,93) = strpad('v_h101 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,60) = strpad('Af_h200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,94) = strpad('Ar_h200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,95) = strpad('v_h200 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,61) = strpad('Af_h201 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,96) = strpad('Ar_h201 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,97) = strpad('v_h201 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,62) = strpad('Af_h300 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,98) = strpad('Ar_h300 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,99) = strpad('v_h300 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,63) = strpad('Af_h301 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,100) = strpad('Ar_h301 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,101) = strpad('v_h301 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,64) = strpad('Af_j000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,102) = strpad('Ar_j000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,103) = strpad('v_j000 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,65) = strpad('Af_j010 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,104) = strpad('Ar_j010 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,105) = strpad('v_j010 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,66) = strpad('Af_j100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,106) = strpad('Ar_j100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,107) = strpad('v_j100 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,67) = strpad('Af_j110 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,108) = strpad('Ar_j110 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,109) = strpad('v_j110 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,68) = strpad('Af_j200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,110) = strpad('Ar_j200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,111) = strpad('v_j200 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,69) = strpad('Af_j210 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,112) = strpad('Ar_j210 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,113) = strpad('v_j210 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,70) = strpad('Af_j300 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,114) = strpad('Ar_j300 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,115) = strpad('v_j300 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,71) = strpad('Af_j310 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,116) = strpad('Ar_j310 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,117) = strpad('v_j310 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,72) = strpad('Af_m000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,118) = strpad('Ar_m000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,119) = strpad('v_m000 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,73) = strpad('Af_m001 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,121) = strpad('Ar_m001 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,122) = strpad('v_m001 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,74) = strpad('Af_m010 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,124) = strpad('Ar_m010 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,125) = strpad('v_m010 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,75) = strpad('Af_m011 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,127) = strpad('Ar_m011 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,128) = strpad('v_m011 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,76) = strpad('Af_m100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,130) = strpad('Ar_m100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,131) = strpad('v_m100 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,77) = strpad('Af_m101 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,133) = strpad('Ar_m101 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,134) = strpad('v_m101 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,78) = strpad('Af_m110 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,136) = strpad('Ar_m110 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,137) = strpad('v_m110 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,79) = strpad('Af_m111 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,139) = strpad('Ar_m111 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,140) = strpad('v_m111 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,80) = strpad('Af_m200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,142) = strpad('Ar_m200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,143) = strpad('v_m200 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,81) = strpad('Af_m201 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,146) = strpad('Ar_m201 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,147) = strpad('v_m201 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,82) = strpad('Af_m210 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,150) = strpad('Ar_m210 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,151) = strpad('v_m210 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,83) = strpad('Af_m211 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,154) = strpad('Ar_m211 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,155) = strpad('v_m211 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,120) = strpad('v_S000_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,126) = strpad('v_S010_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,132) = strpad('v_S100_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,138) = strpad('v_S110_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,144) = strpad('v_S200_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,152) = strpad('v_S210_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,145) = strpad('v_S300_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,153) = strpad('v_S310_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,123) = strpad('v_S001_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,129) = strpad('v_S011_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,135) = strpad('v_S101_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,141) = strpad('v_S111_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,148) = strpad('v_S201_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,156) = strpad('v_S211_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,149) = strpad('v_S301_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,158) = strpad('v_S311_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,51) = strpad('V_mem in component fast_Na (volt)');
    LEGEND_ALGEBRAIC(:,161) = strpad('mu_K_o in component K_ATP (J_per_mol)');
    LEGEND_ALGEBRAIC(:,162) = strpad('mu_K_i in component K_ATP (J_per_mol)');
    LEGEND_ALGEBRAIC(:,164) = strpad('Am_K_ATP in component K_ATP (J_per_mol)');
    LEGEND_ALGEBRAIC(:,163) = strpad('Af_K_ATP in component K_ATP (J_per_mol)');
    LEGEND_ALGEBRAIC(:,165) = strpad('Ar_K_ATP in component K_ATP (J_per_mol)');
    LEGEND_ALGEBRAIC(:,160) = strpad('V_mem in component K_ATP (volt)');
    LEGEND_ALGEBRAIC(:,169) = strpad('mu_K_o in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,170) = strpad('mu_K_i in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,17) = strpad('mu_C_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,171) = strpad('mu_O_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,178) = strpad('v_C_K1 in component K1 (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,180) = strpad('v_O_K1 in component K1 (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,174) = strpad('Am_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,172) = strpad('Af_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,175) = strpad('Ar_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,173) = strpad('Af_gK1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,176) = strpad('Ar_gK1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,177) = strpad('v_gK1 in component K1 (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,168) = strpad('V_mem in component K1 (volt)');
    LEGEND_ALGEBRAIC(:,183) = strpad('mu_K_o in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,184) = strpad('mu_K_i in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,18) = strpad('mu_S00_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,19) = strpad('mu_S01_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,20) = strpad('mu_S10_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,21) = strpad('mu_S11_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,22) = strpad('mu_S20_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,185) = strpad('mu_S21_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,194) = strpad('Am_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,186) = strpad('Af_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,195) = strpad('Ar_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,187) = strpad('Af_X00 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,196) = strpad('Ar_X00 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,197) = strpad('v_X00 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,188) = strpad('Af_X01 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,198) = strpad('Ar_X01 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,199) = strpad('v_X01 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,189) = strpad('Af_X10 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,200) = strpad('Ar_X10 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,201) = strpad('v_X10 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,190) = strpad('Af_X11 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,202) = strpad('Ar_X11 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,203) = strpad('v_X11 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,191) = strpad('Af_i00 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,204) = strpad('Ar_i00 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,205) = strpad('v_i00 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,192) = strpad('Af_i10 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,208) = strpad('Ar_i10 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,209) = strpad('v_i10 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,193) = strpad('Af_i20 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,212) = strpad('Ar_i20 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,213) = strpad('v_i20 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,182) = strpad('V_mem in component K (volt)');
    LEGEND_ALGEBRAIC(:,206) = strpad('v_S00_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,207) = strpad('v_S01_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,210) = strpad('v_S10_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,211) = strpad('v_S11_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,214) = strpad('v_S20_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,216) = strpad('v_S21_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,219) = strpad('mu_K_o in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,220) = strpad('mu_K_i in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,23) = strpad('mu_C_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,221) = strpad('mu_O_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,224) = strpad('Am_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,222) = strpad('Af_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,225) = strpad('Ar_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,223) = strpad('Af_gKp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,226) = strpad('Ar_gKp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,227) = strpad('v_gKp in component Kp (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,228) = strpad('v_C_Kp in component Kp (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,230) = strpad('v_O_Kp in component Kp (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,218) = strpad('V_mem in component Kp (volt)');
    LEGEND_ALGEBRAIC(:,232) = strpad('u_K_i in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,233) = strpad('u_K_o in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,234) = strpad('V_mem in component Kr (J_per_C)');
    LEGEND_ALGEBRAIC(:,235) = strpad('Am_Kr in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,249) = strpad('Af_Kr in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,250) = strpad('Ar_Kr in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,247) = strpad('v_Sa in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,257) = strpad('v_Sb in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,255) = strpad('v_Sc in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,258) = strpad('v_Sd in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,242) = strpad('v_x10 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,254) = strpad('v_x11 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,246) = strpad('v_x20 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,256) = strpad('v_x21 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,236) = strpad('mu_Sa in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,239) = strpad('mu_Sb in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,243) = strpad('mu_Sc in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,248) = strpad('mu_Sd in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,237) = strpad('Af_x10 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,240) = strpad('Ar_x10 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,244) = strpad('Af_x11 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,252) = strpad('Ar_x11 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,238) = strpad('Af_x20 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,245) = strpad('Ar_x20 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,241) = strpad('Af_x21 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,253) = strpad('Ar_x21 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,260) = strpad('u_K_i in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,261) = strpad('u_K_o in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,262) = strpad('V_mem in component Ks (J_per_C)');
    LEGEND_ALGEBRAIC(:,263) = strpad('Am_Ks in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,272) = strpad('Af_Ks in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,273) = strpad('Ar_Ks in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,270) = strpad('v_S_Ks0 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,277) = strpad('v_S_Ks1 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,278) = strpad('v_S_Ks2 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,269) = strpad('v_xs1 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,276) = strpad('v_xs2 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,264) = strpad('mu_S_Ks0 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,266) = strpad('mu_S_Ks1 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,271) = strpad('mu_S_Ks2 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,265) = strpad('Af_xs1 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,267) = strpad('Ar_xs1 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,268) = strpad('Af_xs2 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,275) = strpad('Ar_xs2 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,281) = strpad('mu_Ca_o in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,282) = strpad('mu_Ca_i in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,283) = strpad('mu_K_o in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,284) = strpad('mu_K_i in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,280) = strpad('V_mem in component LCC (volt)');
    LEGEND_ALGEBRAIC(:,293) = strpad('Af_LCC_Ca1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,325) = strpad('Ar_LCC_Ca1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,321) = strpad('Am_LCC_Ca1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,386) = strpad('v_LCC_Ca1 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,294) = strpad('Af_LCC_Ca2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,326) = strpad('Ar_LCC_Ca2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,322) = strpad('Am_LCC_Ca2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,388) = strpad('v_LCC_Ca2 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,295) = strpad('Af_LCC_K1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,327) = strpad('Ar_LCC_K1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,323) = strpad('Am_LCC_K1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,391) = strpad('v_LCC_K1 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,296) = strpad('Af_LCC_K2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,328) = strpad('Ar_LCC_K2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,324) = strpad('Am_LCC_K2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,393) = strpad('v_LCC_K2 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,315) = strpad('Af_fCa00 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,365) = strpad('Ar_fCa00 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,366) = strpad('v_fCa00 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,316) = strpad('Af_fCa01 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,367) = strpad('Ar_fCa01 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,370) = strpad('v_fCa01 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,317) = strpad('Af_fCa02 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,371) = strpad('Ar_fCa02 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,374) = strpad('v_fCa02 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,318) = strpad('Af_fCa10 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,375) = strpad('Ar_fCa10 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,378) = strpad('v_fCa10 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,319) = strpad('Af_fCa11 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,379) = strpad('Ar_fCa11 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,382) = strpad('v_fCa11 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,320) = strpad('Af_fCa12 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,383) = strpad('Ar_fCa12 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,385) = strpad('v_fCa12 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,285) = strpad('mu_S000_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,368) = strpad('v_S000_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,286) = strpad('mu_S010_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,372) = strpad('v_S010_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,287) = strpad('mu_S020_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,376) = strpad('v_S020_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,288) = strpad('mu_S100_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,380) = strpad('v_S100_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,289) = strpad('mu_S110_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,384) = strpad('v_S110_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,291) = strpad('mu_S120_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,387) = strpad('v_S120_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,24) = strpad('mu_S001_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,369) = strpad('v_S001_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,25) = strpad('mu_S011_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,373) = strpad('v_S011_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,26) = strpad('mu_S021_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,377) = strpad('v_S021_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,27) = strpad('mu_S101_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,381) = strpad('v_S101_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,290) = strpad('mu_S111_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,392) = strpad('v_S111_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,292) = strpad('mu_S121_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,394) = strpad('v_S121_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,297) = strpad('Af_d000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,329) = strpad('Ar_d000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,330) = strpad('v_d000 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,299) = strpad('Af_d010 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,333) = strpad('Ar_d010 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,334) = strpad('v_d010 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,301) = strpad('Af_d020 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,337) = strpad('Ar_d020 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,338) = strpad('v_d020 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,303) = strpad('Af_f1_000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,341) = strpad('Ar_f1_000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,342) = strpad('v_f1_000 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,307) = strpad('Af_f2_000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,349) = strpad('Ar_f2_000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,350) = strpad('v_f2_000 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,311) = strpad('Af_f3_010 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,357) = strpad('Ar_f3_010 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,358) = strpad('v_f3_010 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,305) = strpad('Af_f1_100 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,345) = strpad('Ar_f1_100 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,346) = strpad('v_f1_100 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,309) = strpad('Af_f2_100 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,353) = strpad('Ar_f2_100 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,354) = strpad('v_f2_100 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,313) = strpad('Af_f3_110 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,361) = strpad('Ar_f3_110 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,362) = strpad('v_f3_110 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,298) = strpad('Af_d001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,331) = strpad('Ar_d001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,332) = strpad('v_d001 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,300) = strpad('Af_d011 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,335) = strpad('Ar_d011 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,336) = strpad('v_d011 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,302) = strpad('Af_d021 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,339) = strpad('Ar_d021 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,340) = strpad('v_d021 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,304) = strpad('Af_f1_001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,343) = strpad('Ar_f1_001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,344) = strpad('v_f1_001 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,308) = strpad('Af_f2_001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,351) = strpad('Ar_f2_001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,352) = strpad('v_f2_001 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,312) = strpad('Af_f3_011 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,359) = strpad('Ar_f3_011 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,360) = strpad('v_f3_011 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,306) = strpad('Af_f1_101 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,347) = strpad('Ar_f1_101 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,348) = strpad('v_f1_101 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,310) = strpad('Af_f2_101 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,355) = strpad('Ar_f2_101 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,356) = strpad('v_f2_101 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,314) = strpad('Af_f3_111 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,363) = strpad('Ar_f3_111 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,364) = strpad('v_f3_111 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,400) = strpad('mu_K_o in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,401) = strpad('mu_K_i in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,404) = strpad('mu_Na_o in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,405) = strpad('mu_Na_i in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,399) = strpad('mu_H in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,402) = strpad('mu_MgADP in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,403) = strpad('mu_MgATP in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,418) = strpad('mu_P7 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,421) = strpad('mu_Pi in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,411) = strpad('mu_P14 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,412) = strpad('mu_P15 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,406) = strpad('mu_P1 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,413) = strpad('mu_P2 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,414) = strpad('mu_P3 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,415) = strpad('mu_P4 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,416) = strpad('mu_P5 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,417) = strpad('mu_P6 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,407) = strpad('mu_P10 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,408) = strpad('mu_P11 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,409) = strpad('mu_P12 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,410) = strpad('mu_P13 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,419) = strpad('mu_P8 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,420) = strpad('mu_P9 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,452) = strpad('v_P14 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,457) = strpad('v_P15 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,458) = strpad('v_P1 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,459) = strpad('v_P2 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,462) = strpad('v_P3 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,465) = strpad('v_P4 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,468) = strpad('v_P5 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,471) = strpad('v_P6 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,481) = strpad('v_P10 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,443) = strpad('v_P11 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,446) = strpad('v_P12 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,449) = strpad('v_P13 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,474) = strpad('v_P7 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,477) = strpad('v_P8 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,482) = strpad('v_P9 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,422) = strpad('Af_R1 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,437) = strpad('Ar_R1 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,438) = strpad('v_R1 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,423) = strpad('Af_R10 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,439) = strpad('Ar_R10 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,440) = strpad('v_R10 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,424) = strpad('Af_R11 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,441) = strpad('Ar_R11 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,442) = strpad('v_R11 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,425) = strpad('Af_R12 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,444) = strpad('Ar_R12 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,445) = strpad('v_R12 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,426) = strpad('Af_R13 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,447) = strpad('Ar_R13 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,448) = strpad('v_R13 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,427) = strpad('Af_R14 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,450) = strpad('Ar_R14 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,451) = strpad('v_R14 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,428) = strpad('Af_R15 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,453) = strpad('Ar_R15 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,455) = strpad('v_R15 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,429) = strpad('Af_R2 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,454) = strpad('Ar_R2 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,456) = strpad('v_R2 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,430) = strpad('Af_R3 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,460) = strpad('Ar_R3 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,461) = strpad('v_R3 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,431) = strpad('Af_R4 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,463) = strpad('Ar_R4 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,464) = strpad('v_R4 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,432) = strpad('Af_R5 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,466) = strpad('Ar_R5 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,467) = strpad('v_R5 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,433) = strpad('Af_R6 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,469) = strpad('Ar_R6 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,470) = strpad('v_R6 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,434) = strpad('Af_R7 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,472) = strpad('Ar_R7 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,473) = strpad('v_R7 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,435) = strpad('Af_R8 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,475) = strpad('Ar_R8 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,476) = strpad('v_R8 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,436) = strpad('Af_R9 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,479) = strpad('Ar_R9 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,480) = strpad('v_R9 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,398) = strpad('V_mem in component NaK (volt)');
    LEGEND_ALGEBRAIC(:,491) = strpad('mu_Na_i in component NaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,492) = strpad('mu_Na_o in component NaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,493) = strpad('Am_NaB in component NaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,497) = strpad('mu_Ca_o in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,498) = strpad('mu_Ca_i in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,499) = strpad('mu_Na_o in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,500) = strpad('mu_Na_i in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,501) = strpad('mu_P1_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,502) = strpad('mu_P2_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,503) = strpad('mu_P3_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,504) = strpad('mu_P4_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,505) = strpad('mu_P5_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,506) = strpad('mu_P6_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,530) = strpad('v_P1_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,518) = strpad('v_P2_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,521) = strpad('v_P3_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,524) = strpad('v_P4_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,527) = strpad('v_P5_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,531) = strpad('v_P6_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,507) = strpad('Af_r1 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,513) = strpad('Ar_r1 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,514) = strpad('v_r1 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,508) = strpad('Af_r2 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,515) = strpad('Ar_r2 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,516) = strpad('v_r2 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,509) = strpad('Af_r3 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,517) = strpad('Ar_r3 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,519) = strpad('v_r3 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,510) = strpad('Af_r4 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,520) = strpad('Ar_r4 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,522) = strpad('v_r4 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,511) = strpad('Af_r5 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,523) = strpad('Ar_r5 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,525) = strpad('v_r5 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,512) = strpad('Af_r6 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,526) = strpad('Ar_r6 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,528) = strpad('v_r6 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,496) = strpad('V_mem in component NCX (volt)');
    LEGEND_ALGEBRAIC(:,536) = strpad('V_mem in component ns (volt)');
    LEGEND_ALGEBRAIC(:,537) = strpad('mu_Ca_o in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,538) = strpad('mu_Ca_i in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,540) = strpad('Am_ns_Ca in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,539) = strpad('Af_ns_Ca in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,541) = strpad('Ar_ns_Ca in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,544) = strpad('mu_Na_o in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,545) = strpad('mu_Na_i in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,547) = strpad('Am_ns_Na in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,546) = strpad('Af_ns_Na in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,548) = strpad('Ar_ns_Na in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,551) = strpad('mu_K_o in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,552) = strpad('mu_K_i in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,554) = strpad('Am_ns_K in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,553) = strpad('Af_ns_K in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,555) = strpad('Ar_ns_K in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,558) = strpad('mu_Ca_i in component pCa (J_per_mol)');
    LEGEND_ALGEBRAIC(:,559) = strpad('mu_Ca_o in component pCa (J_per_mol)');
    LEGEND_ALGEBRAIC(:,560) = strpad('mu_pCa in component pCa (J_per_mol)');
    LEGEND_ALGEBRAIC(:,561) = strpad('mu_pCa_Ca in component pCa (J_per_mol)');
    LEGEND_CONSTANTS(:,308) = strpad('nCa_1 in component RyR (dimensionless)');
    LEGEND_CONSTANTS(:,309) = strpad('nCa_2 in component RyR (dimensionless)');
    LEGEND_ALGEBRAIC(:,565) = strpad('mu_Ca_SR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,566) = strpad('mu_Ca_i in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,28) = strpad('q_Ca_gate_complexes in component RyR (fmol)');
    LEGEND_ALGEBRAIC(:,567) = strpad('mu_C_RyR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,568) = strpad('mu_CI_RyR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,569) = strpad('mu_I_RyR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,570) = strpad('mu_O_RyR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,572) = strpad('v_OC in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,573) = strpad('v_CCI in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,574) = strpad('v_CII in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,575) = strpad('v_IO in component RyR (fmol_per_sec)');
    LEGEND_CONSTANTS(:,310) = strpad('n_Ca_i in component SERCA (dimensionless)');
    LEGEND_CONSTANTS(:,311) = strpad('n_Ca_SR in component SERCA (dimensionless)');
    LEGEND_CONSTANTS(:,312) = strpad('n_H in component SERCA (dimensionless)');
    LEGEND_CONSTANTS(:,315) = strpad('q_SERCA_Ca_complexes in component SERCA (fmol)');
    LEGEND_ALGEBRAIC(:,29) = strpad('c_Ca_i in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,30) = strpad('c_Ca_SR in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,31) = strpad('c_H in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,32) = strpad('c_MgADP in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,33) = strpad('c_MgATP in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,34) = strpad('c_Pi in component SERCA (mM)');
    LEGEND_CONSTANTS(:,313) = strpad('vol_i in component SERCA (pL)');
    LEGEND_CONSTANTS(:,316) = strpad('vol_sr in component SERCA (pL)');
    LEGEND_CONSTANTS(:,318) = strpad('vol_isr in component SERCA (pL)');
    LEGEND_ALGEBRAIC(:,577) = strpad('mu_Ca_i in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,578) = strpad('mu_Ca_SR in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,579) = strpad('mu_H in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,580) = strpad('mu_MgADP in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,581) = strpad('mu_MgATP in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,314) = strpad('mu_P1 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,596) = strpad('v_P1 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,582) = strpad('mu_Pi in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,317) = strpad('mu_P2 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,603) = strpad('v_P2 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,319) = strpad('mu_P2a in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,600) = strpad('v_P2a in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,320) = strpad('mu_P4 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,606) = strpad('v_P4 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,321) = strpad('mu_P5 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,607) = strpad('v_P5 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,323) = strpad('mu_P6 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,611) = strpad('v_P6 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,324) = strpad('mu_P8 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,614) = strpad('v_P8 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,325) = strpad('mu_P9 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,617) = strpad('v_P9 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,322) = strpad('mu_P10 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,618) = strpad('v_P10 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,584) = strpad('Af_R1_2 in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,327) = strpad('Ar_R1_2 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,594) = strpad('v_SERCA_R1_2 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,328) = strpad('Af_R5_6 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,585) = strpad('Ar_R5_6 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,597) = strpad('v_SERCA_R5_6 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,586) = strpad('Af_R2_2a in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,329) = strpad('Ar_R2_2a in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,599) = strpad('v_SERCA_R2_2a in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,587) = strpad('Af_R2_4 in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,330) = strpad('Ar_R2_4 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,601) = strpad('v_SERCA_R2_4 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,331) = strpad('Af_R4_5 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,588) = strpad('Ar_R4_5 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,602) = strpad('v_SERCA_R4_5 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,332) = strpad('Af_R6_8 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,589) = strpad('Ar_R6_8 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,605) = strpad('v_SERCA_R6_8 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,590) = strpad('Af_R8_9 in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,333) = strpad('Ar_R8_9 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,610) = strpad('v_SERCA_R8_9 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,334) = strpad('Af_R9_10 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,591) = strpad('Ar_R9_10 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,613) = strpad('v_SERCA_R9_10 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,326) = strpad('Af_R10_1 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,583) = strpad('Ar_R10_1 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,592) = strpad('v_SERCA_R10_1 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,608) = strpad('u_Ca_i in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,612) = strpad('u_Ca_o in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,615) = strpad('V_mem in component TCC (J_per_C)');
    LEGEND_ALGEBRAIC(:,619) = strpad('Am_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,633) = strpad('Af_Ca in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,634) = strpad('Ar_Ca in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,631) = strpad('v_s00_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,646) = strpad('v_s10_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,643) = strpad('v_s01_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,647) = strpad('v_s11_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,626) = strpad('v_R1_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,641) = strpad('v_R2_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,630) = strpad('v_R3_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,644) = strpad('v_R4_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,620) = strpad('mu_s00_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,623) = strpad('mu_s10_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,627) = strpad('mu_s01_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,632) = strpad('mu_s11_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,621) = strpad('Af_R1_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,624) = strpad('Ar_R1_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,628) = strpad('Af_R2_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,637) = strpad('Ar_R2_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,622) = strpad('Af_R3_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,629) = strpad('Ar_R3_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,625) = strpad('Af_R4_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,639) = strpad('Ar_R4_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,650) = strpad('u_K_i in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,651) = strpad('u_K_o in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,652) = strpad('V_mem in component TO (J_per_C)');
    LEGEND_ALGEBRAIC(:,653) = strpad('Am_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,667) = strpad('Af_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,668) = strpad('Ar_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,665) = strpad('v_r0s0_TO in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,675) = strpad('v_r1s0_TO in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,673) = strpad('v_r0s1_TO in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,676) = strpad('v_r1s1_TO in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,660) = strpad('v_gTO_1 in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,664) = strpad('v_gTO_3 in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,672) = strpad('v_gTO_2 in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,674) = strpad('v_gTO_4 in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,654) = strpad('mu_r0s0_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,657) = strpad('mu_r1s0_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,661) = strpad('mu_r0s1_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,666) = strpad('mu_r1s1_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,655) = strpad('Af_gTO_1 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,658) = strpad('Ar_gTO_1 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,656) = strpad('Af_gTO_3 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,662) = strpad('Ar_gTO_3 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,663) = strpad('Af_gTO_2 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,670) = strpad('Ar_gTO_2 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,659) = strpad('Af_gTO_4 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,671) = strpad('Ar_gTO_4 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,636) = strpad('mu_TRPN in component TRPN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,638) = strpad('mu_TRPN_Ca in component TRPN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,640) = strpad('mu_Ca_i in component TRPN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,642) = strpad('Af_b1 in component TRPN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,645) = strpad('Ar_b1 in component TRPN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,678) = strpad('mu_K_i in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,679) = strpad('mu_K_o in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,680) = strpad('mu_Na_i in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,681) = strpad('mu_Na_o in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,682) = strpad('V_mem in component funny (J_per_C)');
    LEGEND_ALGEBRAIC(:,684) = strpad('Am_Na in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,683) = strpad('Am_K in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,687) = strpad('Af_K in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,688) = strpad('Ar_K in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,689) = strpad('Af_Na in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,690) = strpad('Ar_Na in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,685) = strpad('mu_x0_funny in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,686) = strpad('mu_x1_funny in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,693) = strpad('Af_R_xf in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,694) = strpad('Ar_R_xf in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,695) = strpad('v_xf in component funny (fmol_per_sec)');
    LEGEND_RATES(:,1) = strpad('d/dt q_Ca_i in component environment (fmol)');
    LEGEND_RATES(:,3) = strpad('d/dt q_Ca_SR in component environment (fmol)');
    LEGEND_RATES(:,4) = strpad('d/dt q_CMDN in component environment (fmol)');
    LEGEND_RATES(:,5) = strpad('d/dt q_CMDN_Ca in component environment (fmol)');
    LEGEND_RATES(:,6) = strpad('d/dt q_Na_i in component environment (fmol)');
    LEGEND_RATES(:,8) = strpad('d/dt q_K_i in component environment (fmol)');
    LEGEND_RATES(:,10) = strpad('d/dt q_MgATP in component environment (fmol)');
    LEGEND_RATES(:,11) = strpad('d/dt q_MgADP in component environment (fmol)');
    LEGEND_RATES(:,12) = strpad('d/dt q_Pi in component environment (fmol)');
    LEGEND_RATES(:,13) = strpad('d/dt q_H in component environment (fmol)');
    LEGEND_RATES(:,14) = strpad('d/dt q_pCa in component environment (fmol)');
    LEGEND_RATES(:,15) = strpad('d/dt q_pCa_Ca in component environment (fmol)');
    LEGEND_RATES(:,16) = strpad('d/dt q_TRPN in component environment (fmol)');
    LEGEND_RATES(:,17) = strpad('d/dt q_TRPN_Ca in component environment (fmol)');
    LEGEND_RATES(:,2) = strpad('d/dt q_Ca_o in component environment (fmol)');
    LEGEND_RATES(:,7) = strpad('d/dt q_Na_o in component environment (fmol)');
    LEGEND_RATES(:,9) = strpad('d/dt q_K_o in component environment (fmol)');
    LEGEND_RATES(:,18) = strpad('d/dt q_mem in component environment (fC)');
    LEGEND_RATES(:,60) = strpad('d/dt q_000_Na in component environment (fmol)');
    LEGEND_RATES(:,64) = strpad('d/dt q_010_Na in component environment (fmol)');
    LEGEND_RATES(:,61) = strpad('d/dt q_100_Na in component environment (fmol)');
    LEGEND_RATES(:,65) = strpad('d/dt q_110_Na in component environment (fmol)');
    LEGEND_RATES(:,62) = strpad('d/dt q_200_Na in component environment (fmol)');
    LEGEND_RATES(:,66) = strpad('d/dt q_210_Na in component environment (fmol)');
    LEGEND_RATES(:,63) = strpad('d/dt q_300_Na in component environment (fmol)');
    LEGEND_RATES(:,67) = strpad('d/dt q_310_Na in component environment (fmol)');
    LEGEND_RATES(:,68) = strpad('d/dt q_001_Na in component environment (fmol)');
    LEGEND_RATES(:,72) = strpad('d/dt q_011_Na in component environment (fmol)');
    LEGEND_RATES(:,69) = strpad('d/dt q_101_Na in component environment (fmol)');
    LEGEND_RATES(:,73) = strpad('d/dt q_111_Na in component environment (fmol)');
    LEGEND_RATES(:,70) = strpad('d/dt q_201_Na in component environment (fmol)');
    LEGEND_RATES(:,74) = strpad('d/dt q_211_Na in component environment (fmol)');
    LEGEND_RATES(:,71) = strpad('d/dt q_301_Na in component environment (fmol)');
    LEGEND_RATES(:,75) = strpad('d/dt q_311_Na in component environment (fmol)');
    LEGEND_RATES(:,25) = strpad('d/dt q_C_K1 in component environment (fmol)');
    LEGEND_RATES(:,26) = strpad('d/dt q_O_K1 in component environment (fmol)');
    LEGEND_RATES(:,19) = strpad('d/dt q_S00_K in component environment (fmol)');
    LEGEND_RATES(:,22) = strpad('d/dt q_S01_K in component environment (fmol)');
    LEGEND_RATES(:,20) = strpad('d/dt q_S10_K in component environment (fmol)');
    LEGEND_RATES(:,23) = strpad('d/dt q_S11_K in component environment (fmol)');
    LEGEND_RATES(:,21) = strpad('d/dt q_S20_K in component environment (fmol)');
    LEGEND_RATES(:,24) = strpad('d/dt q_S21_K in component environment (fmol)');
    LEGEND_RATES(:,27) = strpad('d/dt q_C_Kp in component environment (fmol)');
    LEGEND_RATES(:,28) = strpad('d/dt q_O_Kp in component environment (fmol)');
    LEGEND_RATES(:,29) = strpad('d/dt q_Sa_Kr in component environment (fmol)');
    LEGEND_RATES(:,30) = strpad('d/dt q_Sb_Kr in component environment (fmol)');
    LEGEND_RATES(:,31) = strpad('d/dt q_Sc_Kr in component environment (fmol)');
    LEGEND_RATES(:,32) = strpad('d/dt q_Sd_Kr in component environment (fmol)');
    LEGEND_RATES(:,33) = strpad('d/dt q_S_Ks0 in component environment (fmol)');
    LEGEND_RATES(:,34) = strpad('d/dt q_S_Ks1 in component environment (fmol)');
    LEGEND_RATES(:,35) = strpad('d/dt q_S_Ks2 in component environment (fmol)');
    LEGEND_RATES(:,36) = strpad('d/dt q_000_LCC in component environment (fmol)');
    LEGEND_RATES(:,37) = strpad('d/dt q_010_LCC in component environment (fmol)');
    LEGEND_RATES(:,38) = strpad('d/dt q_020_LCC in component environment (fmol)');
    LEGEND_RATES(:,39) = strpad('d/dt q_100_LCC in component environment (fmol)');
    LEGEND_RATES(:,40) = strpad('d/dt q_110_LCC in component environment (fmol)');
    LEGEND_RATES(:,41) = strpad('d/dt q_120_LCC in component environment (fmol)');
    LEGEND_RATES(:,42) = strpad('d/dt q_001_LCC in component environment (fmol)');
    LEGEND_RATES(:,43) = strpad('d/dt q_011_LCC in component environment (fmol)');
    LEGEND_RATES(:,44) = strpad('d/dt q_021_LCC in component environment (fmol)');
    LEGEND_RATES(:,45) = strpad('d/dt q_101_LCC in component environment (fmol)');
    LEGEND_RATES(:,46) = strpad('d/dt q_111_LCC in component environment (fmol)');
    LEGEND_RATES(:,47) = strpad('d/dt q_121_LCC in component environment (fmol)');
    LEGEND_RATES(:,78) = strpad('d/dt q_P7 in component environment (fmol)');
    LEGEND_RATES(:,79) = strpad('d/dt q_P14 in component environment (fmol)');
    LEGEND_RATES(:,80) = strpad('d/dt q_P15 in component environment (fmol)');
    LEGEND_RATES(:,81) = strpad('d/dt q_P1 in component environment (fmol)');
    LEGEND_RATES(:,82) = strpad('d/dt q_P2 in component environment (fmol)');
    LEGEND_RATES(:,83) = strpad('d/dt q_P3 in component environment (fmol)');
    LEGEND_RATES(:,84) = strpad('d/dt q_P4 in component environment (fmol)');
    LEGEND_RATES(:,85) = strpad('d/dt q_P5 in component environment (fmol)');
    LEGEND_RATES(:,86) = strpad('d/dt q_P6 in component environment (fmol)');
    LEGEND_RATES(:,87) = strpad('d/dt q_P10 in component environment (fmol)');
    LEGEND_RATES(:,88) = strpad('d/dt q_P11 in component environment (fmol)');
    LEGEND_RATES(:,89) = strpad('d/dt q_P12 in component environment (fmol)');
    LEGEND_RATES(:,90) = strpad('d/dt q_P13 in component environment (fmol)');
    LEGEND_RATES(:,91) = strpad('d/dt q_P8 in component environment (fmol)');
    LEGEND_RATES(:,92) = strpad('d/dt q_P9 in component environment (fmol)');
    LEGEND_RATES(:,93) = strpad('d/dt q_P1_NCX in component environment (fmol)');
    LEGEND_RATES(:,94) = strpad('d/dt q_P2_NCX in component environment (fmol)');
    LEGEND_RATES(:,95) = strpad('d/dt q_P3_NCX in component environment (fmol)');
    LEGEND_RATES(:,96) = strpad('d/dt q_P4_NCX in component environment (fmol)');
    LEGEND_RATES(:,97) = strpad('d/dt q_P5_NCX in component environment (fmol)');
    LEGEND_RATES(:,98) = strpad('d/dt q_P6_NCX in component environment (fmol)');
    LEGEND_RATES(:,51) = strpad('d/dt q_O_RyR in component environment (fmol)');
    LEGEND_RATES(:,48) = strpad('d/dt q_C_RyR in component environment (fmol)');
    LEGEND_RATES(:,49) = strpad('d/dt q_CI_RyR in component environment (fmol)');
    LEGEND_RATES(:,50) = strpad('d/dt q_I_RyR in component environment (fmol)');
    LEGEND_RATES(:,52) = strpad('d/dt q_S00_TCC in component environment (fmol)');
    LEGEND_RATES(:,53) = strpad('d/dt q_S10_TCC in component environment (fmol)');
    LEGEND_RATES(:,54) = strpad('d/dt q_S01_TCC in component environment (fmol)');
    LEGEND_RATES(:,55) = strpad('d/dt q_S11_TCC in component environment (fmol)');
    LEGEND_RATES(:,56) = strpad('d/dt q_r0s0_TO in component environment (fmol)');
    LEGEND_RATES(:,57) = strpad('d/dt q_r1s0_TO in component environment (fmol)');
    LEGEND_RATES(:,58) = strpad('d/dt q_r0s1_TO in component environment (fmol)');
    LEGEND_RATES(:,59) = strpad('d/dt q_r1s1_TO in component environment (fmol)');
    LEGEND_RATES(:,76) = strpad('d/dt q_x0_funny in component environment (fmol)');
    LEGEND_RATES(:,77) = strpad('d/dt q_x1_funny in component environment (fmol)');
    LEGEND_STATES  = LEGEND_STATES';
    LEGEND_ALGEBRAIC = LEGEND_ALGEBRAIC';
    LEGEND_RATES = LEGEND_RATES';
    LEGEND_CONSTANTS = LEGEND_CONSTANTS';
end

function [STATES, CONSTANTS] = initConsts()
    VOI = 0; CONSTANTS = []; STATES = []; ALGEBRAIC = [];
    CONSTANTS(:,1) = 1378.18;
    CONSTANTS(:,2) = 0.0183281;
    CONSTANTS(:,3) = 14.666;
    CONSTANTS(:,4) = 1013.54;
    CONSTANTS(:,5) = 334039;
    CONSTANTS(:,6) = 2.51352;
    CONSTANTS(:,7) = 0.0672974;
    CONSTANTS(:,8) = 8.45146;
    CONSTANTS(:,9) = 68.9799;
    CONSTANTS(:,10) = 17067.3;
    CONSTANTS(:,11) = 0.523159;
    CONSTANTS(:,12) = 1.86539;
    CONSTANTS(:,13) = 15.7563;
    CONSTANTS(:,14) = 20.7455;
    CONSTANTS(:,15) = 0.0260278;
    CONSTANTS(:,16) = 0.0342693;
    CONSTANTS(:,17) = 204.525;
    CONSTANTS(:,18) = 10.3285;
    CONSTANTS(:,19) = 13.5989;
    CONSTANTS(:,20) = 0.148452;
    CONSTANTS(:,21) = 0.0074968;
    CONSTANTS(:,22) = 0.0098706;
    CONSTANTS(:,23) = 19.7008;
    CONSTANTS(:,24) = 97.8293;
    CONSTANTS(:,25) = 0.0142996;
    CONSTANTS(:,26) = 0.071008;
    CONSTANTS(:,27) = 1.28048;
    CONSTANTS(:,28) = 6.35855;
    CONSTANTS(:,29) = 0.00092942;
    CONSTANTS(:,30) = 0.00461527;
    CONSTANTS(:,31) = 2793.76;
    CONSTANTS(:,32) = 13873.1;
    CONSTANTS(:,33) = 2.02781;
    CONSTANTS(:,34) = 10.0696;
    CONSTANTS(:,35) = 50829.8;
    CONSTANTS(:,36) = 252408;
    CONSTANTS(:,37) = 2566.9;
    CONSTANTS(:,38) = 12746.6;
    CONSTANTS(:,39) = 3379.68;
    CONSTANTS(:,40) = 16782.7;
    CONSTANTS(:,41) = 271903;
    CONSTANTS(:,42) = 2.57553e+07;
    CONSTANTS(:,43) = 11359.8;
    CONSTANTS(:,44) = 3.65342e+07;
    CONSTANTS(:,45) = 191683;
    CONSTANTS(:,46) = 4.30573;
    CONSTANTS(:,47) = 0.00105236;
    CONSTANTS(:,48) = 136.681;
    CONSTANTS(:,49) = 226141;
    CONSTANTS(:,50) = 640981;
    CONSTANTS(:,51) = 3.26998e+06;
    CONSTANTS(:,52) = 7193.8;
    CONSTANTS(:,53) = 10.2382;
    CONSTANTS(:,54) = 1.90007;
    CONSTANTS(:,55) = 1.82292;
    CONSTANTS(:,56) = 2259.11;
    CONSTANTS(:,57) = 699917;
    CONSTANTS(:,58) = 207331;
    CONSTANTS(:,59) = 1.94572e+06;
    CONSTANTS(:,60) = 174.89;
    CONSTANTS(:,61) = 29.3512;
    CONSTANTS(:,62) = 0.00640463;
    CONSTANTS(:,63) = 82302;
    CONSTANTS(:,64) = 1266.14;
    CONSTANTS(:,65) = 4.33488;
    CONSTANTS(:,66) = 1.34962;
    CONSTANTS(:,67) = 7.44777;
    CONSTANTS(:,68) = 819.29;
    CONSTANTS(:,69) = 23.803;
    CONSTANTS(:,70) = 5.15505e+06;
    CONSTANTS(:,71) = 1.5948;
    CONSTANTS(:,72) = 2.16147;
    CONSTANTS(:,73) = 6.68688e-07;
    CONSTANTS(:,74) = 1.61308e+09;
    CONSTANTS(:,75) = 499.033;
    CONSTANTS(:,76) = 676.351;
    CONSTANTS(:,77) = 0.000209241;
    CONSTANTS(:,78) = 1.26188e+11;
    CONSTANTS(:,79) = 39038.3;
    CONSTANTS(:,80) = 52909.6;
    CONSTANTS(:,81) = 0.0163685;
    CONSTANTS(:,82) = 0.0460452;
    CONSTANTS(:,83) = 1.42449e-08;
    CONSTANTS(:,84) = 21.6122;
    CONSTANTS(:,85) = 6.68609e-06;
    CONSTANTS(:,86) = 3381.36;
    CONSTANTS(:,87) = 0.00104608;
    CONSTANTS(:,88) = 176345;
    CONSTANTS(:,89) = 0.0545552;
    CONSTANTS(:,90) = 0.0179554;
    CONSTANTS(:,91) = 7.52858e-09;
    CONSTANTS(:,92) = 8.42771;
    CONSTANTS(:,93) = 3.53368e-06;
    CONSTANTS(:,94) = 1318.57;
    CONSTANTS(:,95) = 0.000552865;
    CONSTANTS(:,96) = 68766;
    CONSTANTS(:,97) = 0.0288331;
    CONSTANTS(:,98) = 0.0938275;
    CONSTANTS(:,99) = 0.000878706;
    CONSTANTS(:,100) = 0.188833;
    CONSTANTS(:,101) = 25090.5;
    CONSTANTS(:,102) = 3.48165e-05;
    CONSTANTS(:,103) = 0;
    CONSTANTS(:,104) = 0;
    CONSTANTS(:,105) = 0;
    CONSTANTS(:,106) = 0;
    CONSTANTS(:,107) = 0;
    CONSTANTS(:,108) = 0;
    CONSTANTS(:,109) = 0;
    CONSTANTS(:,110) = 0;
    CONSTANTS(:,111) = 0;
    CONSTANTS(:,112) = 0;
    CONSTANTS(:,113) = 0;
    CONSTANTS(:,114) = 0;
    CONSTANTS(:,115) = 0;
    CONSTANTS(:,116) = 0;
    CONSTANTS(:,117) = 0;
    CONSTANTS(:,118) = 0;
    CONSTANTS(:,119) = 0;
    CONSTANTS(:,120) = 0;
    CONSTANTS(:,121) = 0;
    CONSTANTS(:,122) = 0;
    CONSTANTS(:,123) = 0;
    CONSTANTS(:,124) = 0;
    CONSTANTS(:,125) = 0;
    CONSTANTS(:,126) = 0;
    CONSTANTS(:,127) = 0;
    CONSTANTS(:,128) = 0;
    CONSTANTS(:,129) = 0;
    CONSTANTS(:,130) = 0;
    CONSTANTS(:,131) = 0;
    CONSTANTS(:,132) = 0;
    CONSTANTS(:,133) = 0;
    CONSTANTS(:,134) = 0;
    CONSTANTS(:,135) = 0;
    CONSTANTS(:,136) = 0;
    CONSTANTS(:,137) = 0.245066;
    CONSTANTS(:,138) = 215.111;
    CONSTANTS(:,139) = 0.465475;
    CONSTANTS(:,140) = 0.372683;
    CONSTANTS(:,141) = 0.0531066;
    CONSTANTS(:,142) = 0.389448;
    CONSTANTS(:,143) = 1.11228;
    CONSTANTS(:,144) = 13363.9;
    CONSTANTS(:,145) = 1.47312;
    CONSTANTS(:,146) = 0.180487;
    CONSTANTS(:,147) = 55.02;
    CONSTANTS(:,148) = 6.74109;
    CONSTANTS(:,149) = 4.456;
    CONSTANTS(:,150) = 0.624857;
    CONSTANTS(:,151) = 0.350491;
    CONSTANTS(:,152) = 2.37996;
    CONSTANTS(:,153) = 47.128;
    CONSTANTS(:,154) = 35.7941;
    CONSTANTS(:,155) = 0.479275;
    CONSTANTS(:,156) = 9.49062;
    CONSTANTS(:,157) = 7.2082;
    CONSTANTS(:,158) = 3278.92;
    CONSTANTS(:,159) = 64929.3;
    CONSTANTS(:,160) = 49314.3;
    CONSTANTS(:,161) = 660.307;
    CONSTANTS(:,162) = 13075.4;
    CONSTANTS(:,163) = 9930.89;
    CONSTANTS(:,164) = 2.91306e+08;
    CONSTANTS(:,165) = 295.736;
    CONSTANTS(:,166) = 45889.7;
    CONSTANTS(:,167) = 70380.8;
    CONSTANTS(:,168) = 9.6036e+07;
    CONSTANTS(:,169) = 89.7689;
    CONSTANTS(:,170) = 0.0187362;
    CONSTANTS(:,171) = 0.115363;
    CONSTANTS(:,172) = 2.45754e+08;
    CONSTANTS(:,173) = 37133.9;
    CONSTANTS(:,174) = 22.4439;
    CONSTANTS(:,175) = 4.39946;
    CONSTANTS(:,176) = 3.44953;
    CONSTANTS(:,177) = 139.009;
    CONSTANTS(:,178) = 6086.52;
    CONSTANTS(:,179) = 19133.7;
    CONSTANTS(:,180) = 9.39922e+06;
    CONSTANTS(:,181) = 7584.42;
    CONSTANTS(:,182) = 24.4801;
    CONSTANTS(:,183) = 2.60855;
    CONSTANTS(:,184) = 1.11184;
    CONSTANTS(:,185) = 284.544;
    CONSTANTS(:,186) = 4.78246e+06;
    CONSTANTS(:,187) = 32.2739;
    CONSTANTS(:,188) = 0.000977143;
    CONSTANTS(:,189) = 0.640547;
    CONSTANTS(:,190) = 0.640547;
    CONSTANTS(:,191) = 2.10659;
    CONSTANTS(:,192) = 0.381738;
    CONSTANTS(:,193) = 615.294;
    CONSTANTS(:,194) = 111.498;
    CONSTANTS(:,195) = 361.853;
    CONSTANTS(:,196) = 0.164497;
    CONSTANTS(:,197) = 0.00728399;
    CONSTANTS(:,198) = 1.55187e-05;
    CONSTANTS(:,199) = 9.9189e-08;
    CONSTANTS(:,200) = 1.90192e-09;
    CONSTANTS(:,201) = 17372.1;
    CONSTANTS(:,202) = 37.0117;
    CONSTANTS(:,203) = 0.236563;
    CONSTANTS(:,204) = 0.00453602;
    CONSTANTS(:,205) = 23544.9;
    CONSTANTS(:,206) = 50.1629;
    CONSTANTS(:,207) = 0.320619;
    CONSTANTS(:,208) = 0.00614778;
    CONSTANTS(:,209) = 5.61538e+10;
    CONSTANTS(:,210) = 1.19637e+08;
    CONSTANTS(:,211) = 764668;
    CONSTANTS(:,212) = 14662.3;
    CONSTANTS(:,213) = 0.00306604;
    CONSTANTS(:,214) = 61.5887;
    CONSTANTS(:,215) = 0.465601;
    CONSTANTS(:,216) = 0.136312;
    CONSTANTS(:,217) = 1e-6;
    CONSTANTS(:,218) = 1e-6;
    CONSTANTS(:,219) = 1e-6;
    CONSTANTS(:,220) = 1e-6;
    CONSTANTS(:,221) = 1e-6;
    CONSTANTS(:,222) = 1e-6;
    CONSTANTS(:,223) = 1e-6;
    CONSTANTS(:,224) = 1e-6;
    CONSTANTS(:,225) = 1e-6;
    CONSTANTS(:,226) = 1e-6;
    CONSTANTS(:,227) = 1e-6;
    CONSTANTS(:,228) = 1e-6;
    CONSTANTS(:,229) = 1e-6;
    CONSTANTS(:,230) = 1e-6;
    CONSTANTS(:,231) = 1e-6;
    CONSTANTS(:,232) = 1e-6;
    CONSTANTS(:,233) = 1e-6;
    CONSTANTS(:,234) = 1e-6;
    CONSTANTS(:,235) = 1e-6;
    CONSTANTS(:,236) = 1e-6;
    CONSTANTS(:,237) = 1e-6;
    CONSTANTS(:,238) = 1e-6;
    CONSTANTS(:,239) = 1e-6;
    CONSTANTS(:,240) = 1e-6;
    CONSTANTS(:,241) = 1e-6;
    CONSTANTS(:,242) = 1e-6;
    CONSTANTS(:,243) = 2;
    CONSTANTS(:,244) = 1;
    CONSTANTS(:,245) = 0.033569;
    CONSTANTS(:,246) = 3.1153;
    CONSTANTS(:,247) = 0;
    CONSTANTS(:,248) = -4.4669;
    CONSTANTS(:,249) = 1.6149028778859738;
    CONSTANTS(:,250) = -1.3218634652232777;
    CONSTANTS(:,251) = -1.0273976425216251;
    CONSTANTS(:,252) = -0.18153135376657775;
    CONSTANTS(:,253) = 0.000400323747581994;
    CONSTANTS(:,254) = -1.41544821457997;
    CONSTANTS(:,255) = -0.55679;
    CONSTANTS(:,256) = 0.44321;
    CONSTANTS(:,257) = 3;
    CONSTANTS(:,258) = 3;
    CONSTANTS(:,259) = 1;
    CONSTANTS(:,260) = -5301.979;
    CONSTANTS(:,261) = -91183.021;
    CONSTANTS(:,262) = 0.876568910405296;
    CONSTANTS(:,263) = -0.576510778245838;
    CONSTANTS(:,264) = -0.872117216889333;
    CONSTANTS(:,265) = 1.73582739545622;
    CONSTANTS(:,266) = 2.28623234372134;
    CONSTANTS(:,267) = -1.51477720975217;
    CONSTANTS(:,268) = -0.131848324558065;
    CONSTANTS(:,269) = 1.75042355789096;
    CONSTANTS(:,270) = -4.1892;
    CONSTANTS(:,271) = -4.0381;
    CONSTANTS(:,272) = 0.49541;
    CONSTANTS(:,273) = 1.2995;
    CONSTANTS(:,274) = 1.4281;
    CONSTANTS(:,275) = -2.4284;
    CONSTANTS(:,276) = -2.29569;
    CONSTANTS(:,277) = 0.707659;
    CONSTANTS(:,278) = 2.1404;
    CONSTANTS(:,279) = -1.1495;
    CONSTANTS(:,280) = 0.72162;
    CONSTANTS(:,281) = 4.2933;
    CONSTANTS(:,282) = 2;
    CONSTANTS(:,283) = -2.1404;
    CONSTANTS(:,284) = 1.8993;
    CONSTANTS(:,285) = -0.52288;
    CONSTANTS(:,286) = 0;
    CONSTANTS(:,287) = 0.5;
    CONSTANTS(:,288) = 0.51923;
    CONSTANTS(:,289) = 0;
    CONSTANTS(:,290) = -0.73169;
    CONSTANTS(:,291) = 0.83216;
    CONSTANTS(:,292) = 3.71;
    CONSTANTS(:,293) = 60e3;
    STATES(:,1) = 0.000813639;
    STATES(:,2) = 0.911127273;
    STATES(:,3) = 0.074590321;
    STATES(:,4) = 88.298;
    STATES(:,5) = 0.008904;
    STATES(:,6) = 26.61236736;
    STATES(:,7) = 70.86545455;
    STATES(:,8) = 388.8276362;
    STATES(:,9) = 2.733381818;
    STATES(:,10) = 25.7845;
    STATES(:,11) = 0.12985;
    STATES(:,12) = 1.473241;
    STATES(:,13) = 0.000298108;
    STATES(:,14) = 1.82664e-7;
    STATES(:,15) = 1.82664e-7;
    STATES(:,16) = 104.7196316;
    STATES(:,17) = 0.050264642;
    STATES(:,18) = -4535.796;
    STATES(:,19) = 2.13107e-07;
    STATES(:,20) = 2.13107e-07;
    STATES(:,21) = 2.13107e-07;
    STATES(:,22) = 2.13107e-07;
    STATES(:,23) = 2.13107e-07;
    STATES(:,24) = 2.13107e-07;
    STATES(:,25) = 1.01378e-06;
    STATES(:,26) = 1.01378e-06;
    STATES(:,27) = 8.67652e-08;
    STATES(:,28) = 8.67652e-08;
    STATES(:,29) = 3.19661e-07;
    STATES(:,30) = 3.19661e-07;
    STATES(:,31) = 3.19661e-07;
    STATES(:,32) = 3.19661e-07;
    STATES(:,33) = 4.26215e-07;
    STATES(:,34) = 4.26215e-07;
    STATES(:,35) = 4.26215e-07;
    STATES(:,36) = 1.97886e-06;
    STATES(:,37) = 1.97886e-06;
    STATES(:,38) = 1.97886e-06;
    STATES(:,39) = 1.97886e-06;
    STATES(:,40) = 1.97886e-06;
    STATES(:,41) = 1.97886e-06;
    STATES(:,42) = 1.97886e-06;
    STATES(:,43) = 1.97886e-06;
    STATES(:,44) = 1.97886e-06;
    STATES(:,45) = 1.97886e-06;
    STATES(:,46) = 1.97886e-06;
    STATES(:,47) = 1.97886e-06;
    STATES(:,48) = 5.93657e-06;
    STATES(:,49) = 5.93657e-06;
    STATES(:,50) = 5.93657e-06;
    STATES(:,51) = 5.93657e-06;
    STATES(:,52) = 1.36998e-05;
    STATES(:,53) = 1.36998e-05;
    STATES(:,54) = 1.36998e-05;
    STATES(:,55) = 1.36998e-05;
    STATES(:,56) = 9.13318e-08;
    STATES(:,57) = 9.13318e-08;
    STATES(:,58) = 9.13318e-08;
    STATES(:,59) = 9.13318e-08;
    STATES(:,60) = 3.65327e-06;
    STATES(:,61) = 3.65327e-06;
    STATES(:,62) = 3.65327e-06;
    STATES(:,63) = 3.65327e-06;
    STATES(:,64) = 3.65327e-06;
    STATES(:,65) = 3.65327e-06;
    STATES(:,66) = 3.65327e-06;
    STATES(:,67) = 3.65327e-06;
    STATES(:,68) = 3.65327e-06;
    STATES(:,69) = 3.65327e-06;
    STATES(:,70) = 3.65327e-06;
    STATES(:,71) = 3.65327e-06;
    STATES(:,72) = 3.65327e-06;
    STATES(:,73) = 3.65327e-06;
    STATES(:,74) = 3.65327e-06;
    STATES(:,75) = 3.65327e-06;
    STATES(:,76) = 1.82664e-07;
    STATES(:,77) = 1.82664e-07;
    STATES(:,78) = 7.6683E-04;
    STATES(:,79) = 7.6683E-04;
    STATES(:,80) = 7.6683E-04;
    STATES(:,81) = 7.6683E-04;
    STATES(:,82) = 7.6683E-04;
    STATES(:,83) = 7.6683E-04;
    STATES(:,84) = 7.6683E-04;
    STATES(:,85) = 7.6683E-04;
    STATES(:,86) = 7.6683E-04;
    STATES(:,87) = 7.6683E-04;
    STATES(:,88) = 7.6683E-04;
    STATES(:,89) = 7.6683E-04;
    STATES(:,90) = 7.6683E-04;
    STATES(:,91) = 7.6683E-04;
    STATES(:,92) = 7.6683E-04;
    STATES(:,93) = 7.04646E-05;
    STATES(:,94) = 7.04646E-05;
    STATES(:,95) = 7.04646E-05;
    STATES(:,96) = 7.04646E-05;
    STATES(:,97) = 7.04646E-05;
    STATES(:,98) = 7.04646E-05;
    CONSTANTS(:,294) = 4.05919e-15;
    CONSTANTS(:,295) = 4.05919e-15;
    CONSTANTS(:,296) = 4.05919e-15;
    CONSTANTS(:,297) = 4.05919e-15;
    CONSTANTS(:,298) = 4.05919e-15;
    CONSTANTS(:,299) = 4.05919e-15;
    CONSTANTS(:,300) = 4.05919e-15;
    CONSTANTS(:,301) = 4.05919e-15;
    CONSTANTS(:,302) = 4.05919e-15;
    CONSTANTS(:,303) = 1;
    CONSTANTS(:,304) = 0.0001;
    CONSTANTS(:,305) = 8.31;
    CONSTANTS(:,306) = 310;
    CONSTANTS(:,307) = 96485;
    CONSTANTS(:,308) = 1;
    CONSTANTS(:,309) = 2;
    CONSTANTS(:,310) = 2;
    CONSTANTS(:,311) = 2;
    CONSTANTS(:,312) = 2;
    CONSTANTS(:,313) = 34.0;
    CONSTANTS(:,314) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,230).*CONSTANTS(:,294));
    CONSTANTS(:,315) =  CONSTANTS(:,310).*CONSTANTS(:,297)+ CONSTANTS(:,310).*CONSTANTS(:,298)+ CONSTANTS(:,311).*CONSTANTS(:,299);
    CONSTANTS(:,316) =  CONSTANTS(:,313).*0.0350000;
    CONSTANTS(:,317) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,231).*CONSTANTS(:,295));
    CONSTANTS(:,318) = CONSTANTS(:,313)+CONSTANTS(:,316);
    CONSTANTS(:,319) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,232).*CONSTANTS(:,296));
    CONSTANTS(:,320) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,233).*CONSTANTS(:,297));
    CONSTANTS(:,321) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,234).*CONSTANTS(:,298));
    CONSTANTS(:,322) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,238).*CONSTANTS(:,302));
    CONSTANTS(:,323) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,235).*CONSTANTS(:,299));
    CONSTANTS(:,324) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,236).*CONSTANTS(:,300));
    CONSTANTS(:,325) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,237).*CONSTANTS(:,301));
    CONSTANTS(:,326) = CONSTANTS(:,322);
    CONSTANTS(:,327) = CONSTANTS(:,317);
    CONSTANTS(:,328) = CONSTANTS(:,321);
    CONSTANTS(:,329) = CONSTANTS(:,319);
    CONSTANTS(:,330) = CONSTANTS(:,320);
    CONSTANTS(:,331) = CONSTANTS(:,320);
    CONSTANTS(:,332) = CONSTANTS(:,323);
    CONSTANTS(:,333) = CONSTANTS(:,325);
    CONSTANTS(:,334) = CONSTANTS(:,325);
    if (isempty(STATES)), warning('Initial values for states not set');, end
end

function [RATES, ALGEBRAIC] = computeRates(VOI, STATES, CONSTANTS)
	disp(VOI)			   
    global algebraicVariableCount;
    statesSize = size(STATES);
    statesColumnCount = statesSize(2);
    if ( statesColumnCount == 1)
        STATES = STATES';
        ALGEBRAIC = zeros(1, algebraicVariableCount);
        utilOnes = 1;
    else
        statesRowCount = statesSize(1);
        ALGEBRAIC = zeros(statesRowCount, algebraicVariableCount);
        RATES = zeros(statesRowCount, statesColumnCount);
        utilOnes = ones(statesRowCount, 1);
    end
    ALGEBRAIC(:,45) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,138).*STATES(:,4));
    ALGEBRAIC(:,48) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,49) = ALGEBRAIC(:,48)+ALGEBRAIC(:,45);
    ALGEBRAIC(:,46) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,139).*STATES(:,5));
    ALGEBRAIC(:,47) = ALGEBRAIC(:,46);
    ALGEBRAIC(:,50) =  CONSTANTS(:,1).*(exp(ALGEBRAIC(:,49)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,47)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    RATES(:,4) =  - ALGEBRAIC(:,50);
    RATES(:,5) = ALGEBRAIC(:,50);
    ALGEBRAIC(:,51) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,56) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,197).*STATES(:,60))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,86) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,201).*STATES(:,64))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,87) =  CONSTANTS(:,82).*(exp(ALGEBRAIC(:,56)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,86)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,64) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,197).*STATES(:,60))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,102) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,205).*STATES(:,68))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,103) =  CONSTANTS(:,90).*(exp(ALGEBRAIC(:,64)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,102)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,72) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,197).*STATES(:,60))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,118) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,198).*STATES(:,61))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,119) =  CONSTANTS(:,70).*(exp(ALGEBRAIC(:,72)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,118)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,120) = ( - ALGEBRAIC(:,119) - ALGEBRAIC(:,87)) - ALGEBRAIC(:,103);
    RATES(:,60) = ALGEBRAIC(:,120);
    ALGEBRAIC(:,57) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,205).*STATES(:,68))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,88) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,209).*STATES(:,72))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,89) =  CONSTANTS(:,83).*(exp(ALGEBRAIC(:,57)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,88)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,73) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,205).*STATES(:,68))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,121) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,206).*STATES(:,69))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,122) =  CONSTANTS(:,71).*(exp(ALGEBRAIC(:,73)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,121)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,123) = ( - ALGEBRAIC(:,122) - ALGEBRAIC(:,89)) -  - ALGEBRAIC(:,103);
    RATES(:,68) = ALGEBRAIC(:,123);
    ALGEBRAIC(:,65) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,201).*STATES(:,64))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,104) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,209).*STATES(:,72))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,105) =  CONSTANTS(:,91).*(exp(ALGEBRAIC(:,65)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,104)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,74) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,201).*STATES(:,64))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,124) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,202).*STATES(:,65))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,125) =  CONSTANTS(:,72).*(exp(ALGEBRAIC(:,74)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,124)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,126) = ( - ALGEBRAIC(:,125)+ALGEBRAIC(:,87)) - ALGEBRAIC(:,105);
    RATES(:,64) = ALGEBRAIC(:,126);
    ALGEBRAIC(:,75) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,209).*STATES(:,72))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,127) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,210).*STATES(:,73))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,128) =  CONSTANTS(:,73).*(exp(ALGEBRAIC(:,75)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,127)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,129) = ( - ALGEBRAIC(:,128)+ALGEBRAIC(:,89)) -  - ALGEBRAIC(:,105);
    RATES(:,72) = ALGEBRAIC(:,129);
    ALGEBRAIC(:,58) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,198).*STATES(:,61))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,90) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,202).*STATES(:,65))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,91) =  CONSTANTS(:,84).*(exp(ALGEBRAIC(:,58)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,90)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,66) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,198).*STATES(:,61))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,106) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,206).*STATES(:,69))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,107) =  CONSTANTS(:,92).*(exp(ALGEBRAIC(:,66)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,106)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,76) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,198).*STATES(:,61))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,130) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,199).*STATES(:,62))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,131) =  CONSTANTS(:,74).*(exp(ALGEBRAIC(:,76)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,130)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,132) = ((ALGEBRAIC(:,119) - ALGEBRAIC(:,131)) - ALGEBRAIC(:,91)) - ALGEBRAIC(:,107);
    RATES(:,61) = ALGEBRAIC(:,132);
    ALGEBRAIC(:,59) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,206).*STATES(:,69))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,92) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,210).*STATES(:,73))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,93) =  CONSTANTS(:,85).*(exp(ALGEBRAIC(:,59)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,92)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,77) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,206).*STATES(:,69))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,133) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,207).*STATES(:,70))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,134) =  CONSTANTS(:,75).*(exp(ALGEBRAIC(:,77)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,133)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,135) = ((ALGEBRAIC(:,122) - ALGEBRAIC(:,134)) - ALGEBRAIC(:,93)) -  - ALGEBRAIC(:,107);
    RATES(:,69) = ALGEBRAIC(:,135);
    ALGEBRAIC(:,67) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,202).*STATES(:,65))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,108) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,210).*STATES(:,73))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,109) =  CONSTANTS(:,93).*(exp(ALGEBRAIC(:,67)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,108)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,78) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,202).*STATES(:,65))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,136) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,203).*STATES(:,66))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,137) =  CONSTANTS(:,76).*(exp(ALGEBRAIC(:,78)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,136)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,138) = ((ALGEBRAIC(:,125) - ALGEBRAIC(:,137))+ALGEBRAIC(:,91)) - ALGEBRAIC(:,109);
    RATES(:,65) = ALGEBRAIC(:,138);
    ALGEBRAIC(:,79) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,210).*STATES(:,73))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,139) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,211).*STATES(:,74))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,140) =  CONSTANTS(:,77).*(exp(ALGEBRAIC(:,79)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,139)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,141) = ((ALGEBRAIC(:,128) - ALGEBRAIC(:,140))+ALGEBRAIC(:,93)) -  - ALGEBRAIC(:,109);
    RATES(:,73) = ALGEBRAIC(:,141);
    ALGEBRAIC(:,60) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,199).*STATES(:,62))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,94) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,203).*STATES(:,66))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,95) =  CONSTANTS(:,86).*(exp(ALGEBRAIC(:,60)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,94)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,68) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,199).*STATES(:,62))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,110) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,207).*STATES(:,70))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,111) =  CONSTANTS(:,94).*(exp(ALGEBRAIC(:,68)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,110)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,80) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,199).*STATES(:,62))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,142) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,200).*STATES(:,63))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,143) =  CONSTANTS(:,78).*(exp(ALGEBRAIC(:,80)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,142)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,144) = ((ALGEBRAIC(:,131) - ALGEBRAIC(:,143)) - ALGEBRAIC(:,95)) - ALGEBRAIC(:,111);
    RATES(:,62) = ALGEBRAIC(:,144);
    ALGEBRAIC(:,62) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,200).*STATES(:,63))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,98) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,204).*STATES(:,67))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,99) =  CONSTANTS(:,88).*(exp(ALGEBRAIC(:,62)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,98)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,70) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,200).*STATES(:,63))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,114) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,208).*STATES(:,71))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,115) =  CONSTANTS(:,96).*(exp(ALGEBRAIC(:,70)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,114)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,145) = (ALGEBRAIC(:,143) - ALGEBRAIC(:,99)) - ALGEBRAIC(:,115);
    RATES(:,63) = ALGEBRAIC(:,145);
    ALGEBRAIC(:,61) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,207).*STATES(:,70))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,96) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,211).*STATES(:,74))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,97) =  CONSTANTS(:,87).*(exp(ALGEBRAIC(:,61)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,96)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,81) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,207).*STATES(:,70))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,146) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,208).*STATES(:,71))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,147) =  CONSTANTS(:,79).*(exp(ALGEBRAIC(:,81)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,146)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,148) = ((ALGEBRAIC(:,134) - ALGEBRAIC(:,147)) - ALGEBRAIC(:,97)) -  - ALGEBRAIC(:,111);
    RATES(:,70) = ALGEBRAIC(:,148);
    ALGEBRAIC(:,63) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,208).*STATES(:,71))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,100) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,212).*STATES(:,75))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,101) =  CONSTANTS(:,89).*(exp(ALGEBRAIC(:,63)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,100)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,149) = (ALGEBRAIC(:,147) - ALGEBRAIC(:,101)) -  - ALGEBRAIC(:,115);
    RATES(:,71) = ALGEBRAIC(:,149);
    ALGEBRAIC(:,69) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,203).*STATES(:,66))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,112) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,211).*STATES(:,74))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,113) =  CONSTANTS(:,95).*(exp(ALGEBRAIC(:,69)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,112)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,82) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,203).*STATES(:,66))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,150) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,204).*STATES(:,67))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,151) =  CONSTANTS(:,80).*(exp(ALGEBRAIC(:,82)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,150)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,152) = ((ALGEBRAIC(:,137) - ALGEBRAIC(:,151))+ALGEBRAIC(:,95)) - ALGEBRAIC(:,113);
    RATES(:,66) = ALGEBRAIC(:,152);
    ALGEBRAIC(:,71) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,204).*STATES(:,67))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,116) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,212).*STATES(:,75))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,117) =  CONSTANTS(:,97).*(exp(ALGEBRAIC(:,71)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,116)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,153) = (ALGEBRAIC(:,151)+ALGEBRAIC(:,99)) - ALGEBRAIC(:,117);
    RATES(:,67) = ALGEBRAIC(:,153);
    ALGEBRAIC(:,83) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,211).*STATES(:,74))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,154) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,212).*STATES(:,75))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,155) =  CONSTANTS(:,81).*(exp(ALGEBRAIC(:,83)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,154)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,156) = ((ALGEBRAIC(:,140) - ALGEBRAIC(:,155))+ALGEBRAIC(:,97)) -  - ALGEBRAIC(:,113);
    RATES(:,74) = ALGEBRAIC(:,156);
    ALGEBRAIC(:,84) =  CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,53) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,170).*STATES(:,6));
    ALGEBRAIC(:,54) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,212).*STATES(:,75));
    ALGEBRAIC(:,55) = ALGEBRAIC(:,53)+ CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,51)+ALGEBRAIC(:,54);
    ALGEBRAIC(:,52) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7));
    ALGEBRAIC(:,85) = ALGEBRAIC(:,52)+ALGEBRAIC(:,54);
    ALGEBRAIC(:,157) = piecewise({ALGEBRAIC(:,84)==0.00000,  CONSTANTS(:,69).*(exp(ALGEBRAIC(:,55)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,85)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,69).*ALGEBRAIC(:,84))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,84)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,55)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,85)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,158) = (ALGEBRAIC(:,155)+ALGEBRAIC(:,101)) - (( - ALGEBRAIC(:,117)+ALGEBRAIC(:,157)) - ALGEBRAIC(:,157));
    RATES(:,75) = ALGEBRAIC(:,158);
    ALGEBRAIC(:,168) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,173) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,143).*STATES(:,25))+ CONSTANTS(:,245).*CONSTANTS(:,307).*ALGEBRAIC(:,168);
    ALGEBRAIC(:,176) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,144).*STATES(:,26))+ CONSTANTS(:,246).*CONSTANTS(:,307).*ALGEBRAIC(:,168);
    ALGEBRAIC(:,177) =  CONSTANTS(:,4).*(exp(ALGEBRAIC(:,173)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,176)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,178) =  - ALGEBRAIC(:,177);
    RATES(:,25) = ALGEBRAIC(:,178);
    ALGEBRAIC(:,174) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,168);
    ALGEBRAIC(:,169) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,170) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,171) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,144).*STATES(:,26));
    ALGEBRAIC(:,172) = ALGEBRAIC(:,170)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,168)+ALGEBRAIC(:,171)+ CONSTANTS(:,287).*ALGEBRAIC(:,169);
    ALGEBRAIC(:,175) = ALGEBRAIC(:,169)+ALGEBRAIC(:,171)+ CONSTANTS(:,287).*ALGEBRAIC(:,169);
    ALGEBRAIC(:,179) = piecewise({ALGEBRAIC(:,174)==0.00000,  CONSTANTS(:,3).*(exp(ALGEBRAIC(:,172)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,175)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,3).*ALGEBRAIC(:,174))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,174)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,172)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,175)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,180) = ALGEBRAIC(:,177) - (ALGEBRAIC(:,179) - ALGEBRAIC(:,179));
    RATES(:,26) = ALGEBRAIC(:,180);
    ALGEBRAIC(:,182) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,187) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,218).*STATES(:,19))+ CONSTANTS(:,288).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,196) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,219).*STATES(:,20))+ CONSTANTS(:,290).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,197) =  CONSTANTS(:,105).*(exp(ALGEBRAIC(:,187)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,196)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,191) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,218).*STATES(:,19))+ CONSTANTS(:,289).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,204) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,221).*STATES(:,22))+ CONSTANTS(:,291).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,205) =  CONSTANTS(:,109).*(exp(ALGEBRAIC(:,191)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,204)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,206) =  - ALGEBRAIC(:,197) - ALGEBRAIC(:,205);
    RATES(:,19) = ALGEBRAIC(:,206);
    ALGEBRAIC(:,188) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,221).*STATES(:,22))+ CONSTANTS(:,288).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,198) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,222).*STATES(:,23))+ CONSTANTS(:,290).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,199) =  CONSTANTS(:,107).*(exp(ALGEBRAIC(:,188)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,198)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,207) =  - ALGEBRAIC(:,199)+ALGEBRAIC(:,205);
    RATES(:,22) = ALGEBRAIC(:,207);
    ALGEBRAIC(:,189) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,219).*STATES(:,20))+ CONSTANTS(:,288).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,200) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,220).*STATES(:,21))+ CONSTANTS(:,290).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,201) =  CONSTANTS(:,106).*(exp(ALGEBRAIC(:,189)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,200)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,192) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,219).*STATES(:,20))+ CONSTANTS(:,289).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,208) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,222).*STATES(:,23))+ CONSTANTS(:,291).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,209) =  CONSTANTS(:,110).*(exp(ALGEBRAIC(:,192)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,208)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,210) = (ALGEBRAIC(:,197) - ALGEBRAIC(:,201)) - ALGEBRAIC(:,209);
    RATES(:,20) = ALGEBRAIC(:,210);
    ALGEBRAIC(:,190) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,222).*STATES(:,23))+ CONSTANTS(:,288).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,202) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,223).*STATES(:,24))+ CONSTANTS(:,290).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,203) =  CONSTANTS(:,108).*(exp(ALGEBRAIC(:,190)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,202)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,211) = (ALGEBRAIC(:,199) - ALGEBRAIC(:,203))+ALGEBRAIC(:,209);
    RATES(:,23) = ALGEBRAIC(:,211);
    ALGEBRAIC(:,193) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,220).*STATES(:,21))+ CONSTANTS(:,289).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,212) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,223).*STATES(:,24))+ CONSTANTS(:,291).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,213) =  CONSTANTS(:,111).*(exp(ALGEBRAIC(:,193)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,212)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,214) = ALGEBRAIC(:,201) - ALGEBRAIC(:,213);
    RATES(:,21) = ALGEBRAIC(:,214);
    ALGEBRAIC(:,194) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,183) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,184) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,185) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,223).*STATES(:,24));
    ALGEBRAIC(:,186) = ALGEBRAIC(:,184)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,182)+ALGEBRAIC(:,185)+ CONSTANTS(:,287).*ALGEBRAIC(:,183);
    ALGEBRAIC(:,195) = ALGEBRAIC(:,183)+ALGEBRAIC(:,185)+ CONSTANTS(:,287).*ALGEBRAIC(:,183);
    ALGEBRAIC(:,215) = piecewise({ALGEBRAIC(:,194)==0.00000,  CONSTANTS(:,104).*(exp(ALGEBRAIC(:,186)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,195)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,104).*ALGEBRAIC(:,194))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,194)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,186)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,195)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,216) = (ALGEBRAIC(:,203)+ALGEBRAIC(:,213)) - (ALGEBRAIC(:,215) - ALGEBRAIC(:,215));
    RATES(:,24) = ALGEBRAIC(:,216);
    ALGEBRAIC(:,218) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,223) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,224).*STATES(:,27))+ CONSTANTS(:,247).*CONSTANTS(:,307).*ALGEBRAIC(:,218);
    ALGEBRAIC(:,226) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,225).*STATES(:,28))+ CONSTANTS(:,248).*CONSTANTS(:,307).*ALGEBRAIC(:,218);
    ALGEBRAIC(:,227) =  CONSTANTS(:,113).*(exp(ALGEBRAIC(:,223)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,226)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,228) =  - ALGEBRAIC(:,227);
    RATES(:,27) = ALGEBRAIC(:,228);
    ALGEBRAIC(:,224) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,218);
    ALGEBRAIC(:,220) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,221) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,225).*STATES(:,28));
    ALGEBRAIC(:,222) = ALGEBRAIC(:,220)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,218)+ALGEBRAIC(:,221);
    ALGEBRAIC(:,219) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,225) = ALGEBRAIC(:,219)+ALGEBRAIC(:,221);
    ALGEBRAIC(:,229) = piecewise({ALGEBRAIC(:,224)==0.00000,  CONSTANTS(:,112).*(exp(ALGEBRAIC(:,222)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,225)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,112).*ALGEBRAIC(:,224))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,224)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,222)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,225)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,230) = ALGEBRAIC(:,227) - (ALGEBRAIC(:,229) - ALGEBRAIC(:,229));
    RATES(:,28) = ALGEBRAIC(:,230);
    ALGEBRAIC(:,234) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,236) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,145).*STATES(:,29));
    ALGEBRAIC(:,237) = ALGEBRAIC(:,236)+ CONSTANTS(:,249).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,239) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,146).*STATES(:,30));
    ALGEBRAIC(:,240) = ALGEBRAIC(:,239)+ CONSTANTS(:,250).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,242) =  CONSTANTS(:,6).*(exp(ALGEBRAIC(:,237)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,240)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,238) = ALGEBRAIC(:,236)+ CONSTANTS(:,251).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,243) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,147).*STATES(:,31));
    ALGEBRAIC(:,245) = ALGEBRAIC(:,243)+ CONSTANTS(:,252).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,246) =  CONSTANTS(:,8).*(exp(ALGEBRAIC(:,238)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,245)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,247) =  - ALGEBRAIC(:,242) - ALGEBRAIC(:,246);
    RATES(:,29) = ALGEBRAIC(:,247);
    ALGEBRAIC(:,244) = ALGEBRAIC(:,243)+ CONSTANTS(:,249).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,248) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,148).*STATES(:,32));
    ALGEBRAIC(:,252) = ALGEBRAIC(:,248)+ CONSTANTS(:,250).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,254) =  CONSTANTS(:,7).*(exp(ALGEBRAIC(:,244)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,252)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,255) = ALGEBRAIC(:,246) - ALGEBRAIC(:,254);
    RATES(:,31) = ALGEBRAIC(:,255);
    ALGEBRAIC(:,241) = ALGEBRAIC(:,239)+ CONSTANTS(:,251).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,253) = ALGEBRAIC(:,248)+ CONSTANTS(:,252).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,256) =  CONSTANTS(:,9).*(exp(ALGEBRAIC(:,241)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,253)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,257) = ALGEBRAIC(:,242) - ALGEBRAIC(:,256);
    RATES(:,30) = ALGEBRAIC(:,257);
    ALGEBRAIC(:,258) = ALGEBRAIC(:,254)+ALGEBRAIC(:,256);
    RATES(:,32) = ALGEBRAIC(:,258);
    ALGEBRAIC(:,262) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,264) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,149).*STATES(:,33));
    ALGEBRAIC(:,265) = ALGEBRAIC(:,264)+ CONSTANTS(:,253).*CONSTANTS(:,307).*ALGEBRAIC(:,262);
    ALGEBRAIC(:,266) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,150).*STATES(:,34));
    ALGEBRAIC(:,267) = ALGEBRAIC(:,266)+ CONSTANTS(:,254).*CONSTANTS(:,307).*ALGEBRAIC(:,262);
    ALGEBRAIC(:,269) =  CONSTANTS(:,11).*(exp(ALGEBRAIC(:,265)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,267)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,270) =  - ALGEBRAIC(:,269);
    RATES(:,33) = ALGEBRAIC(:,270);
    ALGEBRAIC(:,268) = ALGEBRAIC(:,266)+ CONSTANTS(:,253).*CONSTANTS(:,307).*ALGEBRAIC(:,262);
    ALGEBRAIC(:,271) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,151).*STATES(:,35));
    ALGEBRAIC(:,275) = ALGEBRAIC(:,271)+ CONSTANTS(:,254).*CONSTANTS(:,307).*ALGEBRAIC(:,262);
    ALGEBRAIC(:,276) =  CONSTANTS(:,12).*(exp(ALGEBRAIC(:,268)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,275)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,277) = ALGEBRAIC(:,269) - ALGEBRAIC(:,276);
    RATES(:,34) = ALGEBRAIC(:,277);
    ALGEBRAIC(:,278) = ALGEBRAIC(:,276);
    RATES(:,35) = ALGEBRAIC(:,278);
    ALGEBRAIC(:,285) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,152).*STATES(:,36));
    ALGEBRAIC(:,315) = ALGEBRAIC(:,285);
    ALGEBRAIC(:,282) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,365) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,158).*STATES(:,42))+ CONSTANTS(:,282).*ALGEBRAIC(:,282);
    ALGEBRAIC(:,366) =  CONSTANTS(:,35).*(exp(ALGEBRAIC(:,315)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,365)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,280) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,297) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,152).*STATES(:,36))+ CONSTANTS(:,278).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,329) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,155).*STATES(:,39))+ CONSTANTS(:,283).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,330) =  CONSTANTS(:,17).*(exp(ALGEBRAIC(:,297)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,329)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,303) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,152).*STATES(:,36))+ CONSTANTS(:,279).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,341) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,153).*STATES(:,37))+ CONSTANTS(:,284).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,342) =  CONSTANTS(:,23).*(exp(ALGEBRAIC(:,303)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,341)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,307) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,152).*STATES(:,36))+ CONSTANTS(:,280).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,349) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,154).*STATES(:,38))+ CONSTANTS(:,285).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,350) =  CONSTANTS(:,27).*(exp(ALGEBRAIC(:,307)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,349)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,368) = (( - ALGEBRAIC(:,330) - ALGEBRAIC(:,342)) - ALGEBRAIC(:,350)) - ALGEBRAIC(:,366);
    RATES(:,36) = ALGEBRAIC(:,368);
    ALGEBRAIC(:,298) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,158).*STATES(:,42))+ CONSTANTS(:,278).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,331) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,161).*STATES(:,45))+ CONSTANTS(:,283).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,332) =  CONSTANTS(:,20).*(exp(ALGEBRAIC(:,298)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,331)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,304) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,158).*STATES(:,42))+ CONSTANTS(:,279).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,343) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,159).*STATES(:,43))+ CONSTANTS(:,284).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,344) =  CONSTANTS(:,25).*(exp(ALGEBRAIC(:,304)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,343)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,308) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,158).*STATES(:,42))+ CONSTANTS(:,280).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,351) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,160).*STATES(:,44))+ CONSTANTS(:,285).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,352) =  CONSTANTS(:,29).*(exp(ALGEBRAIC(:,308)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,351)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,369) = (( - ALGEBRAIC(:,332) - ALGEBRAIC(:,344)) - ALGEBRAIC(:,352)) -  - ALGEBRAIC(:,366);
    RATES(:,42) = ALGEBRAIC(:,369);
    ALGEBRAIC(:,286) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,153).*STATES(:,37));
    ALGEBRAIC(:,316) = ALGEBRAIC(:,286);
    ALGEBRAIC(:,367) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,159).*STATES(:,43))+ CONSTANTS(:,282).*ALGEBRAIC(:,282);
    ALGEBRAIC(:,370) =  CONSTANTS(:,37).*(exp(ALGEBRAIC(:,316)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,367)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,299) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,153).*STATES(:,37))+ CONSTANTS(:,278).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,333) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,156).*STATES(:,40))+ CONSTANTS(:,283).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,334) =  CONSTANTS(:,18).*(exp(ALGEBRAIC(:,299)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,333)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,311) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,153).*STATES(:,37))+ CONSTANTS(:,281).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,357) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,154).*STATES(:,38))+ CONSTANTS(:,286).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,358) =  CONSTANTS(:,31).*(exp(ALGEBRAIC(:,311)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,357)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,372) = (( - ALGEBRAIC(:,334)+ALGEBRAIC(:,342)) - ALGEBRAIC(:,370)) - ALGEBRAIC(:,358);
    RATES(:,37) = ALGEBRAIC(:,372);
    ALGEBRAIC(:,300) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,159).*STATES(:,43))+ CONSTANTS(:,278).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,335) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,162).*STATES(:,46))+ CONSTANTS(:,283).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,336) =  CONSTANTS(:,21).*(exp(ALGEBRAIC(:,300)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,335)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,312) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,159).*STATES(:,43))+ CONSTANTS(:,281).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,359) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,160).*STATES(:,44))+ CONSTANTS(:,286).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,360) =  CONSTANTS(:,33).*(exp(ALGEBRAIC(:,312)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,359)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,373) = (( - ALGEBRAIC(:,336)+ALGEBRAIC(:,344)) -  - ALGEBRAIC(:,370)) - ALGEBRAIC(:,360);
    RATES(:,43) = ALGEBRAIC(:,373);
    ALGEBRAIC(:,287) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,154).*STATES(:,38));
    ALGEBRAIC(:,317) = ALGEBRAIC(:,287);
    ALGEBRAIC(:,371) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,160).*STATES(:,44))+ CONSTANTS(:,282).*ALGEBRAIC(:,282);
    ALGEBRAIC(:,374) =  CONSTANTS(:,39).*(exp(ALGEBRAIC(:,317)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,371)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,301) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,154).*STATES(:,38))+ CONSTANTS(:,278).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,337) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,157).*STATES(:,41))+ CONSTANTS(:,283).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,338) =  CONSTANTS(:,19).*(exp(ALGEBRAIC(:,301)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,337)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,376) = (( - ALGEBRAIC(:,338)+ALGEBRAIC(:,350)) - ALGEBRAIC(:,374))+ALGEBRAIC(:,358);
    RATES(:,38) = ALGEBRAIC(:,376);
    ALGEBRAIC(:,302) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,160).*STATES(:,44))+ CONSTANTS(:,278).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,339) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,163).*STATES(:,47))+ CONSTANTS(:,283).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,340) =  CONSTANTS(:,22).*(exp(ALGEBRAIC(:,302)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,339)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,377) = (( - ALGEBRAIC(:,340)+ALGEBRAIC(:,352)) -  - ALGEBRAIC(:,374))+ALGEBRAIC(:,360);
    RATES(:,44) = ALGEBRAIC(:,377);
    ALGEBRAIC(:,288) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,155).*STATES(:,39));
    ALGEBRAIC(:,318) = ALGEBRAIC(:,288);
    ALGEBRAIC(:,375) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,161).*STATES(:,45))+ CONSTANTS(:,282).*ALGEBRAIC(:,282);
    ALGEBRAIC(:,378) =  CONSTANTS(:,36).*(exp(ALGEBRAIC(:,318)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,375)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,305) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,155).*STATES(:,39))+ CONSTANTS(:,279).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,345) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,156).*STATES(:,40))+ CONSTANTS(:,284).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,346) =  CONSTANTS(:,24).*(exp(ALGEBRAIC(:,305)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,345)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,309) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,155).*STATES(:,39))+ CONSTANTS(:,280).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,353) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,157).*STATES(:,41))+ CONSTANTS(:,285).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,354) =  CONSTANTS(:,28).*(exp(ALGEBRAIC(:,309)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,353)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,380) = (( - ALGEBRAIC(:,354)+ALGEBRAIC(:,330)) - ALGEBRAIC(:,346)) - ALGEBRAIC(:,378);
    RATES(:,39) = ALGEBRAIC(:,380);
    ALGEBRAIC(:,306) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,161).*STATES(:,45))+ CONSTANTS(:,279).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,347) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,162).*STATES(:,46))+ CONSTANTS(:,284).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,348) =  CONSTANTS(:,26).*(exp(ALGEBRAIC(:,306)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,347)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,310) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,161).*STATES(:,45))+ CONSTANTS(:,280).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,355) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,163).*STATES(:,47))+ CONSTANTS(:,285).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,356) =  CONSTANTS(:,30).*(exp(ALGEBRAIC(:,310)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,355)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,381) = (( - ALGEBRAIC(:,356)+ALGEBRAIC(:,332)) - ALGEBRAIC(:,348)) -  - ALGEBRAIC(:,378);
    RATES(:,45) = ALGEBRAIC(:,381);
    ALGEBRAIC(:,289) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,156).*STATES(:,40));
    ALGEBRAIC(:,319) = ALGEBRAIC(:,289);
    ALGEBRAIC(:,379) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,162).*STATES(:,46))+ CONSTANTS(:,282).*ALGEBRAIC(:,282);
    ALGEBRAIC(:,382) =  CONSTANTS(:,38).*(exp(ALGEBRAIC(:,319)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,379)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,313) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,156).*STATES(:,40))+ CONSTANTS(:,281).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,361) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,157).*STATES(:,41))+ CONSTANTS(:,286).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,362) =  CONSTANTS(:,32).*(exp(ALGEBRAIC(:,313)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,361)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,384) = ((ALGEBRAIC(:,346)+ALGEBRAIC(:,334)) - ALGEBRAIC(:,382)) - ALGEBRAIC(:,362);
    RATES(:,40) = ALGEBRAIC(:,384);
    ALGEBRAIC(:,291) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,157).*STATES(:,41));
    ALGEBRAIC(:,320) = ALGEBRAIC(:,291);
    ALGEBRAIC(:,383) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,163).*STATES(:,47))+ CONSTANTS(:,282).*ALGEBRAIC(:,282);
    ALGEBRAIC(:,385) =  CONSTANTS(:,40).*(exp(ALGEBRAIC(:,320)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,383)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,387) = ((ALGEBRAIC(:,354)+ALGEBRAIC(:,338)) - ALGEBRAIC(:,385))+ALGEBRAIC(:,362);
    RATES(:,41) = ALGEBRAIC(:,387);
    ALGEBRAIC(:,290) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,162).*STATES(:,46));
    ALGEBRAIC(:,293) = ALGEBRAIC(:,282)+ CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,280)+ALGEBRAIC(:,290);
    ALGEBRAIC(:,281) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,140).*STATES(:,2));
    ALGEBRAIC(:,325) = ALGEBRAIC(:,281)+ALGEBRAIC(:,290);
    ALGEBRAIC(:,321) =  CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,386) = piecewise({ALGEBRAIC(:,321)==0.00000,  CONSTANTS(:,13).*(exp(ALGEBRAIC(:,293)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,325)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,13).*ALGEBRAIC(:,321))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,321)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,293)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,325)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,284) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,295) = ALGEBRAIC(:,284)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,280)+ALGEBRAIC(:,290);
    ALGEBRAIC(:,283) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,327) = ALGEBRAIC(:,283)+ALGEBRAIC(:,290);
    ALGEBRAIC(:,323) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,391) = piecewise({ALGEBRAIC(:,323)==0.00000,  CONSTANTS(:,15).*(exp(ALGEBRAIC(:,295)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,327)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,15).*ALGEBRAIC(:,323))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,323)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,295)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,327)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,314) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,162).*STATES(:,46))+ CONSTANTS(:,281).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,363) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,163).*STATES(:,47))+ CONSTANTS(:,286).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,364) =  CONSTANTS(:,34).*(exp(ALGEBRAIC(:,314)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,363)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,392) = ((ALGEBRAIC(:,348)+ALGEBRAIC(:,336)) - (((( - ALGEBRAIC(:,382)+ALGEBRAIC(:,386)) - ALGEBRAIC(:,386))+ALGEBRAIC(:,391)) - ALGEBRAIC(:,391))) - ALGEBRAIC(:,364);
    RATES(:,46) = ALGEBRAIC(:,392);
    ALGEBRAIC(:,292) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,163).*STATES(:,47));
    ALGEBRAIC(:,294) = ALGEBRAIC(:,282)+ CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,280)+ALGEBRAIC(:,292);
    ALGEBRAIC(:,326) = ALGEBRAIC(:,281)+ALGEBRAIC(:,292);
    ALGEBRAIC(:,322) =  CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,388) = piecewise({ALGEBRAIC(:,322)==0.00000,  CONSTANTS(:,14).*(exp(ALGEBRAIC(:,294)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,326)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,14).*ALGEBRAIC(:,322))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,322)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,294)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,326)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,296) = ALGEBRAIC(:,284)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,280)+ALGEBRAIC(:,292);
    ALGEBRAIC(:,328) = ALGEBRAIC(:,283)+ALGEBRAIC(:,292);
    ALGEBRAIC(:,324) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,393) = piecewise({ALGEBRAIC(:,324)==0.00000,  CONSTANTS(:,16).*(exp(ALGEBRAIC(:,296)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,328)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,16).*ALGEBRAIC(:,324))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,324)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,296)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,328)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,394) = ((ALGEBRAIC(:,356)+ALGEBRAIC(:,340)) - (((( - ALGEBRAIC(:,385)+ALGEBRAIC(:,388)) - ALGEBRAIC(:,388))+ALGEBRAIC(:,393)) - ALGEBRAIC(:,393)))+ALGEBRAIC(:,364);
    RATES(:,47) = ALGEBRAIC(:,394);
    ALGEBRAIC(:,407) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,181).*STATES(:,87));
    ALGEBRAIC(:,423) = ALGEBRAIC(:,407);
    ALGEBRAIC(:,404) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7));
    ALGEBRAIC(:,408) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,182).*STATES(:,88));
    ALGEBRAIC(:,439) = ALGEBRAIC(:,404)+ALGEBRAIC(:,408);
    ALGEBRAIC(:,440) =  CONSTANTS(:,57).*(exp(ALGEBRAIC(:,423)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,439)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,400) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,424) = ALGEBRAIC(:,408)+ALGEBRAIC(:,400);
    ALGEBRAIC(:,409) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,183).*STATES(:,89));
    ALGEBRAIC(:,441) = ALGEBRAIC(:,409);
    ALGEBRAIC(:,442) =  CONSTANTS(:,58).*(exp(ALGEBRAIC(:,424)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,441)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,443) = ALGEBRAIC(:,440) - ALGEBRAIC(:,442);
    RATES(:,88) = ALGEBRAIC(:,443);
    ALGEBRAIC(:,425) = ALGEBRAIC(:,409)+ALGEBRAIC(:,400);
    ALGEBRAIC(:,410) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,184).*STATES(:,90));
    ALGEBRAIC(:,444) = ALGEBRAIC(:,410);
    ALGEBRAIC(:,445) =  CONSTANTS(:,59).*(exp(ALGEBRAIC(:,425)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,444)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,446) =  - ALGEBRAIC(:,445)+ALGEBRAIC(:,442);
    RATES(:,89) = ALGEBRAIC(:,446);
    ALGEBRAIC(:,426) = ALGEBRAIC(:,410);
    ALGEBRAIC(:,399) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,190).*STATES(:,13));
    ALGEBRAIC(:,421) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,189).*STATES(:,12));
    ALGEBRAIC(:,411) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,185).*STATES(:,79));
    ALGEBRAIC(:,447) = ALGEBRAIC(:,399)+ALGEBRAIC(:,421)+ALGEBRAIC(:,411);
    ALGEBRAIC(:,448) =  CONSTANTS(:,60).*(exp(ALGEBRAIC(:,426)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,447)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,449) = ALGEBRAIC(:,445) - ALGEBRAIC(:,448);
    RATES(:,90) = ALGEBRAIC(:,449);
    ALGEBRAIC(:,403) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,187).*STATES(:,10));
    ALGEBRAIC(:,427) = ALGEBRAIC(:,411)+ALGEBRAIC(:,403);
    ALGEBRAIC(:,412) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,186).*STATES(:,80));
    ALGEBRAIC(:,450) = ALGEBRAIC(:,412);
    ALGEBRAIC(:,451) =  CONSTANTS(:,61).*(exp(ALGEBRAIC(:,427)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,450)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,452) =  - ALGEBRAIC(:,451)+ALGEBRAIC(:,448);
    RATES(:,79) = ALGEBRAIC(:,452);
    ALGEBRAIC(:,428) = ALGEBRAIC(:,412);
    ALGEBRAIC(:,406) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,172).*STATES(:,81));
    ALGEBRAIC(:,453) = ALGEBRAIC(:,406);
    ALGEBRAIC(:,455) =  CONSTANTS(:,62).*(exp(ALGEBRAIC(:,428)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,453)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,457) = ALGEBRAIC(:,451) - ALGEBRAIC(:,455);
    RATES(:,80) = ALGEBRAIC(:,457);
    ALGEBRAIC(:,422) = ALGEBRAIC(:,406);
    ALGEBRAIC(:,401) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,413) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,173).*STATES(:,82));
    ALGEBRAIC(:,437) = ALGEBRAIC(:,401)+ALGEBRAIC(:,413);
    ALGEBRAIC(:,438) =  CONSTANTS(:,48).*(exp(ALGEBRAIC(:,422)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,437)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,458) =  - ALGEBRAIC(:,438)+ALGEBRAIC(:,455);
    RATES(:,81) = ALGEBRAIC(:,458);
    ALGEBRAIC(:,429) = ALGEBRAIC(:,413);
    ALGEBRAIC(:,414) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,174).*STATES(:,83));
    ALGEBRAIC(:,454) = ALGEBRAIC(:,414)+ALGEBRAIC(:,401);
    ALGEBRAIC(:,456) =  CONSTANTS(:,49).*(exp(ALGEBRAIC(:,429)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,454)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,459) =  - ALGEBRAIC(:,456)+ALGEBRAIC(:,438);
    RATES(:,82) = ALGEBRAIC(:,459);
    ALGEBRAIC(:,405) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,170).*STATES(:,6));
    ALGEBRAIC(:,430) = ALGEBRAIC(:,414)+ALGEBRAIC(:,405);
    ALGEBRAIC(:,415) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,175).*STATES(:,84));
    ALGEBRAIC(:,460) = ALGEBRAIC(:,415);
    ALGEBRAIC(:,461) =  CONSTANTS(:,50).*(exp(ALGEBRAIC(:,430)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,460)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,462) = ALGEBRAIC(:,456) - ALGEBRAIC(:,461);
    RATES(:,83) = ALGEBRAIC(:,462);
    ALGEBRAIC(:,431) = ALGEBRAIC(:,415)+ALGEBRAIC(:,405);
    ALGEBRAIC(:,416) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,176).*STATES(:,85));
    ALGEBRAIC(:,463) = ALGEBRAIC(:,416);
    ALGEBRAIC(:,464) =  CONSTANTS(:,51).*(exp(ALGEBRAIC(:,431)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,463)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,465) = ALGEBRAIC(:,461) - ALGEBRAIC(:,464);
    RATES(:,84) = ALGEBRAIC(:,465);
    ALGEBRAIC(:,432) = ALGEBRAIC(:,416)+ALGEBRAIC(:,405);
    ALGEBRAIC(:,398) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,466) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,177).*STATES(:,86))+ CONSTANTS(:,260).*ALGEBRAIC(:,398);
    ALGEBRAIC(:,467) =  CONSTANTS(:,52).*(exp(ALGEBRAIC(:,432)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,466)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,468) = ALGEBRAIC(:,464) - ALGEBRAIC(:,467);
    RATES(:,85) = ALGEBRAIC(:,468);
    ALGEBRAIC(:,417) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,177).*STATES(:,86));
    ALGEBRAIC(:,433) = ALGEBRAIC(:,417);
    ALGEBRAIC(:,402) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,188).*STATES(:,11));
    ALGEBRAIC(:,418) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,178).*STATES(:,78));
    ALGEBRAIC(:,469) = ALGEBRAIC(:,418)+ALGEBRAIC(:,402);
    ALGEBRAIC(:,470) =  CONSTANTS(:,53).*(exp(ALGEBRAIC(:,433)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,469)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,471) = ALGEBRAIC(:,467) - ALGEBRAIC(:,470);
    RATES(:,86) = ALGEBRAIC(:,471);
    ALGEBRAIC(:,434) = ALGEBRAIC(:,418);
    ALGEBRAIC(:,419) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,179).*STATES(:,91));
    ALGEBRAIC(:,472) = ALGEBRAIC(:,419);
    ALGEBRAIC(:,473) =  CONSTANTS(:,54).*(exp(ALGEBRAIC(:,434)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,472)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,474) = ALGEBRAIC(:,470) - ALGEBRAIC(:,473);
    RATES(:,78) = ALGEBRAIC(:,474);
    ALGEBRAIC(:,435) = ALGEBRAIC(:,419);
    ALGEBRAIC(:,475) =  CONSTANTS(:,261).*ALGEBRAIC(:,398)+ CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7))+ CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,180).*STATES(:,92));
    ALGEBRAIC(:,476) =  CONSTANTS(:,55).*(exp(ALGEBRAIC(:,435)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,475)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,477) =  - ALGEBRAIC(:,476)+ALGEBRAIC(:,473);
    RATES(:,91) = ALGEBRAIC(:,477);
    ALGEBRAIC(:,420) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,180).*STATES(:,92));
    ALGEBRAIC(:,436) = ALGEBRAIC(:,420);
    ALGEBRAIC(:,479) = ALGEBRAIC(:,407)+ALGEBRAIC(:,404);
    ALGEBRAIC(:,480) =  CONSTANTS(:,56).*(exp(ALGEBRAIC(:,436)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,479)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,481) = ALGEBRAIC(:,480) - ALGEBRAIC(:,440);
    RATES(:,87) = ALGEBRAIC(:,481);
    ALGEBRAIC(:,482) = ALGEBRAIC(:,476) - ALGEBRAIC(:,480);
    RATES(:,92) = ALGEBRAIC(:,482);
    ALGEBRAIC(:,501) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,164).*STATES(:,93));
    ALGEBRAIC(:,507) = ALGEBRAIC(:,501);
    ALGEBRAIC(:,500) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,170).*STATES(:,6));
    ALGEBRAIC(:,502) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,165).*STATES(:,94));
    ALGEBRAIC(:,513) =  CONSTANTS(:,258).*ALGEBRAIC(:,500)+ALGEBRAIC(:,502);
    ALGEBRAIC(:,514) =  CONSTANTS(:,41).*(exp(ALGEBRAIC(:,507)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,513)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,498) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,508) = ALGEBRAIC(:,502)+ALGEBRAIC(:,498);
    ALGEBRAIC(:,503) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,166).*STATES(:,95));
    ALGEBRAIC(:,515) = ALGEBRAIC(:,503);
    ALGEBRAIC(:,516) =  CONSTANTS(:,42).*(exp(ALGEBRAIC(:,508)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,515)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,518) = ALGEBRAIC(:,514) - ALGEBRAIC(:,516);
    RATES(:,94) = ALGEBRAIC(:,518);
    ALGEBRAIC(:,509) = ALGEBRAIC(:,503);
    ALGEBRAIC(:,504) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,167).*STATES(:,96));
    ALGEBRAIC(:,517) = ALGEBRAIC(:,504);
    ALGEBRAIC(:,519) =  CONSTANTS(:,43).*(exp(ALGEBRAIC(:,509)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,517)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,521) = ALGEBRAIC(:,516) - ALGEBRAIC(:,519);
    RATES(:,95) = ALGEBRAIC(:,521);
    ALGEBRAIC(:,510) = ALGEBRAIC(:,504);
    ALGEBRAIC(:,497) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,140).*STATES(:,2));
    ALGEBRAIC(:,505) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,168).*STATES(:,97));
    ALGEBRAIC(:,520) = ALGEBRAIC(:,505)+ALGEBRAIC(:,497);
    ALGEBRAIC(:,522) =  CONSTANTS(:,44).*(exp(ALGEBRAIC(:,510)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,520)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,524) =  - ALGEBRAIC(:,522)+ALGEBRAIC(:,519);
    RATES(:,96) = ALGEBRAIC(:,524);
    ALGEBRAIC(:,499) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7));
    ALGEBRAIC(:,511) = ALGEBRAIC(:,505)+ CONSTANTS(:,257).*ALGEBRAIC(:,499);
    ALGEBRAIC(:,506) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,169).*STATES(:,98));
    ALGEBRAIC(:,523) = ALGEBRAIC(:,506);
    ALGEBRAIC(:,525) =  CONSTANTS(:,45).*(exp(ALGEBRAIC(:,511)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,523)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,527) =  - ALGEBRAIC(:,525)+ALGEBRAIC(:,522);
    RATES(:,97) = ALGEBRAIC(:,527);
    ALGEBRAIC(:,496) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,512) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,169).*STATES(:,98))+ CONSTANTS(:,255).*CONSTANTS(:,307).*ALGEBRAIC(:,496);
    ALGEBRAIC(:,526) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,164).*STATES(:,93))+ CONSTANTS(:,256).*CONSTANTS(:,307).*ALGEBRAIC(:,496);
    ALGEBRAIC(:,528) =  CONSTANTS(:,46).*(exp(ALGEBRAIC(:,512)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,526)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,530) = ALGEBRAIC(:,528) - ALGEBRAIC(:,514);
    RATES(:,93) = ALGEBRAIC(:,530);
    ALGEBRAIC(:,531) =  - ALGEBRAIC(:,528)+ALGEBRAIC(:,525);
    RATES(:,98) = ALGEBRAIC(:,531);
    ALGEBRAIC(:,558) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,560) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,215).*STATES(:,14));
    ALGEBRAIC(:,561) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,216).*STATES(:,15));
    ALGEBRAIC(:,562) =  CONSTANTS(:,101).*(exp((ALGEBRAIC(:,558)+ALGEBRAIC(:,560))./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,561)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,559) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,140).*STATES(:,2));
    ALGEBRAIC(:,563) =  CONSTANTS(:,102).*(exp(ALGEBRAIC(:,561)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp((ALGEBRAIC(:,559)+ALGEBRAIC(:,560))./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    RATES(:,14) =  - ALGEBRAIC(:,562)+ALGEBRAIC(:,563);
    RATES(:,15) = ALGEBRAIC(:,562) - ALGEBRAIC(:,563);
    ALGEBRAIC(:,566) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,567) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,226).*STATES(:,48));
    ALGEBRAIC(:,570) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,229).*STATES(:,51));
    ALGEBRAIC(:,572) =  CONSTANTS(:,119).*(exp(ALGEBRAIC(:,570)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp((ALGEBRAIC(:,567)+ CONSTANTS(:,309).*ALGEBRAIC(:,566))./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,568) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,227).*STATES(:,49));
    ALGEBRAIC(:,573) =  CONSTANTS(:,120).*(exp((ALGEBRAIC(:,567)+ CONSTANTS(:,308).*ALGEBRAIC(:,566))./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,568)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    RATES(:,48) = ALGEBRAIC(:,572) - ALGEBRAIC(:,573);
    ALGEBRAIC(:,569) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,228).*STATES(:,50));
    ALGEBRAIC(:,574) =  CONSTANTS(:,121).*(exp((ALGEBRAIC(:,568)+ CONSTANTS(:,309).*ALGEBRAIC(:,566))./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,569)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    RATES(:,49) = ALGEBRAIC(:,573) - ALGEBRAIC(:,574);
    ALGEBRAIC(:,575) =  CONSTANTS(:,122).*(exp(ALGEBRAIC(:,569)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp((ALGEBRAIC(:,570)+ CONSTANTS(:,308).*ALGEBRAIC(:,566))./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    RATES(:,51) = ALGEBRAIC(:,575) - ALGEBRAIC(:,572);
    RATES(:,50) = ALGEBRAIC(:,574) - ALGEBRAIC(:,575);
    ALGEBRAIC(:,490) = ALGEBRAIC(:,448);
    ALGEBRAIC(:,582) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,189).*STATES(:,12));
    ALGEBRAIC(:,583) = CONSTANTS(:,314)+ALGEBRAIC(:,582);
    ALGEBRAIC(:,592) =  CONSTANTS(:,131).*(exp(CONSTANTS(:,326)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,583)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,593) = ALGEBRAIC(:,592);
    RATES(:,12) = ALGEBRAIC(:,490)+ALGEBRAIC(:,593);
    ALGEBRAIC(:,487) =  - ALGEBRAIC(:,451);
    ALGEBRAIC(:,581) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,187).*STATES(:,10));
    ALGEBRAIC(:,584) = CONSTANTS(:,314)+ALGEBRAIC(:,581);
    ALGEBRAIC(:,594) =  CONSTANTS(:,123).*(exp(ALGEBRAIC(:,584)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(CONSTANTS(:,327)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,595) =  - ALGEBRAIC(:,594);
    RATES(:,10) = ALGEBRAIC(:,487)+ALGEBRAIC(:,595);
    ALGEBRAIC(:,486) = ALGEBRAIC(:,470);
    ALGEBRAIC(:,580) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,188).*STATES(:,11));
    ALGEBRAIC(:,585) = ALGEBRAIC(:,580)+CONSTANTS(:,323);
    ALGEBRAIC(:,597) =  CONSTANTS(:,127).*(exp(CONSTANTS(:,328)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,585)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,598) = ALGEBRAIC(:,597);
    RATES(:,11) = ALGEBRAIC(:,486)+ALGEBRAIC(:,598);
    ALGEBRAIC(:,42) =  ( CONSTANTS(:,305).*CONSTANTS(:,306)).*log( CONSTANTS(:,217).*STATES(:,3));
    ALGEBRAIC(:,43) =  ( CONSTANTS(:,305).*CONSTANTS(:,306)).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,44) =  CONSTANTS(:,103).*(exp(ALGEBRAIC(:,42)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,43)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,565) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,217).*STATES(:,3));
    ALGEBRAIC(:,571) =  CONSTANTS(:,118).*exp(ALGEBRAIC(:,570)./( CONSTANTS(:,305).*CONSTANTS(:,306))).*(exp(ALGEBRAIC(:,565)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,566)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,578) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,217).*STATES(:,3));
    ALGEBRAIC(:,589) = CONSTANTS(:,324)+ CONSTANTS(:,311).*ALGEBRAIC(:,578);
    ALGEBRAIC(:,605) =  CONSTANTS(:,128).*(exp(CONSTANTS(:,332)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,589)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,609) =  CONSTANTS(:,311).*ALGEBRAIC(:,605);
    RATES(:,3) = ( - ALGEBRAIC(:,44) - ALGEBRAIC(:,571))+ALGEBRAIC(:,609);
    ALGEBRAIC(:,483) = ALGEBRAIC(:,448);
    ALGEBRAIC(:,579) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,190).*STATES(:,13));
    ALGEBRAIC(:,586) = CONSTANTS(:,317)+ALGEBRAIC(:,579);
    ALGEBRAIC(:,599) =  CONSTANTS(:,125).*(exp(ALGEBRAIC(:,586)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(CONSTANTS(:,329)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,588) = CONSTANTS(:,321)+ CONSTANTS(:,312).*ALGEBRAIC(:,579);
    ALGEBRAIC(:,602) =  CONSTANTS(:,126).*(exp(CONSTANTS(:,331)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,588)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,590) = CONSTANTS(:,324)+ CONSTANTS(:,312).*ALGEBRAIC(:,579);
    ALGEBRAIC(:,610) =  CONSTANTS(:,129).*(exp(ALGEBRAIC(:,590)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(CONSTANTS(:,333)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,591) = ALGEBRAIC(:,579)+CONSTANTS(:,322);
    ALGEBRAIC(:,613) =  CONSTANTS(:,130).*(exp(CONSTANTS(:,334)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,591)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,616) = (( CONSTANTS(:,312).*ALGEBRAIC(:,602) - ALGEBRAIC(:,599)) -  CONSTANTS(:,312).*ALGEBRAIC(:,610))+ALGEBRAIC(:,613);
    RATES(:,13) = ALGEBRAIC(:,483)+ALGEBRAIC(:,616);
    ALGEBRAIC(:,615) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,620) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,191).*STATES(:,52));
    ALGEBRAIC(:,621) = ALGEBRAIC(:,620)+ CONSTANTS(:,262).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,623) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,192).*STATES(:,53));
    ALGEBRAIC(:,624) = ALGEBRAIC(:,623)+ CONSTANTS(:,264).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,626) =  CONSTANTS(:,64).*(exp(ALGEBRAIC(:,621)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,624)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,622) = ALGEBRAIC(:,620)+ CONSTANTS(:,263).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,627) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,193).*STATES(:,54));
    ALGEBRAIC(:,629) = ALGEBRAIC(:,627)+ CONSTANTS(:,265).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,630) =  CONSTANTS(:,66).*(exp(ALGEBRAIC(:,622)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,629)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,631) =  - ALGEBRAIC(:,626) - ALGEBRAIC(:,630);
    RATES(:,52) = ALGEBRAIC(:,631);
    ALGEBRAIC(:,37) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,38) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,140).*STATES(:,2));
    ALGEBRAIC(:,1) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,39) =  CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,1);
    ALGEBRAIC(:,40) = piecewise({ALGEBRAIC(:,39)==0.00000,  CONSTANTS(:,2).*(exp(ALGEBRAIC(:,37)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,38)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,2).*ALGEBRAIC(:,39))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,39)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,37)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,38)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,389) = ALGEBRAIC(:,388)+ALGEBRAIC(:,386);
    ALGEBRAIC(:,536) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,540) =  CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,538) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,539) = ALGEBRAIC(:,538)+ CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,537) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,140).*STATES(:,2));
    ALGEBRAIC(:,541) = ALGEBRAIC(:,537);
    ALGEBRAIC(:,542) = piecewise({ALGEBRAIC(:,540)==0.00000,  CONSTANTS(:,115).*(exp(ALGEBRAIC(:,539)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,541)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,115).*ALGEBRAIC(:,540))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,540)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,539)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,541)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,532) = ALGEBRAIC(:,522);
    ALGEBRAIC(:,619) =  CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,608) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,632) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,194).*STATES(:,55));
    ALGEBRAIC(:,633) = ALGEBRAIC(:,632)+ALGEBRAIC(:,608)+ALGEBRAIC(:,619);
    ALGEBRAIC(:,612) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,140).*STATES(:,2));
    ALGEBRAIC(:,634) = ALGEBRAIC(:,632)+ALGEBRAIC(:,612);
    ALGEBRAIC(:,635) = piecewise({ALGEBRAIC(:,619)==0.00000,  CONSTANTS(:,63).*(exp(ALGEBRAIC(:,633)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,634)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,63).*ALGEBRAIC(:,619))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,619)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,633)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,634)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    RATES(:,2) =  1.00000.*(ALGEBRAIC(:,40)+ALGEBRAIC(:,389)+ALGEBRAIC(:,532)+ALGEBRAIC(:,563)+ALGEBRAIC(:,635)+ALGEBRAIC(:,542));
    ALGEBRAIC(:,628) = ALGEBRAIC(:,627)+ CONSTANTS(:,262).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,637) = ALGEBRAIC(:,632)+ CONSTANTS(:,264).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,641) =  CONSTANTS(:,65).*(exp(ALGEBRAIC(:,628)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,637)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,643) = ALGEBRAIC(:,630) - ALGEBRAIC(:,641);
    RATES(:,54) = ALGEBRAIC(:,643);
    ALGEBRAIC(:,625) = ALGEBRAIC(:,623)+ CONSTANTS(:,263).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,639) = ALGEBRAIC(:,632)+ CONSTANTS(:,265).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,644) =  CONSTANTS(:,67).*(exp(ALGEBRAIC(:,625)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,639)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,646) = ALGEBRAIC(:,626) - ALGEBRAIC(:,644);
    RATES(:,53) = ALGEBRAIC(:,646);
    ALGEBRAIC(:,647) = ALGEBRAIC(:,641)+ALGEBRAIC(:,644);
    RATES(:,55) = ALGEBRAIC(:,647);
    ALGEBRAIC(:,390) = (( (CONSTANTS(:,282)).*ALGEBRAIC(:,378)+ CONSTANTS(:,282).*ALGEBRAIC(:,382)+ CONSTANTS(:,282).*ALGEBRAIC(:,374)+ CONSTANTS(:,282).*ALGEBRAIC(:,370)+ CONSTANTS(:,282).*ALGEBRAIC(:,366)+ CONSTANTS(:,282).*ALGEBRAIC(:,385)) - ALGEBRAIC(:,386)) - ALGEBRAIC(:,388);
    ALGEBRAIC(:,533) =  - ALGEBRAIC(:,516);
    ALGEBRAIC(:,576) = (( CONSTANTS(:,309).*ALGEBRAIC(:,572) -  CONSTANTS(:,308).*ALGEBRAIC(:,573)) -  CONSTANTS(:,309).*ALGEBRAIC(:,574))+ CONSTANTS(:,308).*ALGEBRAIC(:,575);
    ALGEBRAIC(:,577) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,587) = CONSTANTS(:,317)+ CONSTANTS(:,310).*ALGEBRAIC(:,577);
    ALGEBRAIC(:,601) =  CONSTANTS(:,124).*(exp(ALGEBRAIC(:,587)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(CONSTANTS(:,330)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,604) =   - CONSTANTS(:,310).*ALGEBRAIC(:,601);
    ALGEBRAIC(:,636) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,195).*STATES(:,16));
    ALGEBRAIC(:,640) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,642) = ALGEBRAIC(:,640)+ALGEBRAIC(:,636);
    ALGEBRAIC(:,638) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,196).*STATES(:,17));
    ALGEBRAIC(:,645) = ALGEBRAIC(:,638);
    ALGEBRAIC(:,649) =  CONSTANTS(:,68).*(exp(ALGEBRAIC(:,642)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,645)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    RATES(:,1) = ((((((( - ALGEBRAIC(:,40)+ALGEBRAIC(:,44)) - ALGEBRAIC(:,50))+ALGEBRAIC(:,390)+ALGEBRAIC(:,533)) - ALGEBRAIC(:,562))+ALGEBRAIC(:,571)+ALGEBRAIC(:,576)+ALGEBRAIC(:,604)) - ALGEBRAIC(:,635)) - ALGEBRAIC(:,542)) - ALGEBRAIC(:,649);
    RATES(:,16) =  - ALGEBRAIC(:,649);
    RATES(:,17) = ALGEBRAIC(:,649);
    ALGEBRAIC(:,652) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,654) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,239).*STATES(:,56));
    ALGEBRAIC(:,655) = ALGEBRAIC(:,654)+ CONSTANTS(:,266).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,657) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,240).*STATES(:,57));
    ALGEBRAIC(:,658) = ALGEBRAIC(:,657)+ CONSTANTS(:,268).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,660) =  CONSTANTS(:,133).*(exp(ALGEBRAIC(:,655)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,658)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,656) = ALGEBRAIC(:,654)+ CONSTANTS(:,267).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,661) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,241).*STATES(:,58));
    ALGEBRAIC(:,662) = ALGEBRAIC(:,661)+ CONSTANTS(:,269).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,664) =  CONSTANTS(:,135).*(exp(ALGEBRAIC(:,656)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,662)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,665) =  - ALGEBRAIC(:,660)+ALGEBRAIC(:,664);
    RATES(:,56) = ALGEBRAIC(:,665);
    ALGEBRAIC(:,663) = ALGEBRAIC(:,661)+ CONSTANTS(:,266).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,666) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,242).*STATES(:,59));
    ALGEBRAIC(:,670) = ALGEBRAIC(:,666)+ CONSTANTS(:,268).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,672) =  CONSTANTS(:,134).*(exp(ALGEBRAIC(:,663)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,670)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,673) =  - ALGEBRAIC(:,672)+ALGEBRAIC(:,664);
    RATES(:,58) = ALGEBRAIC(:,673);
    ALGEBRAIC(:,659) = ALGEBRAIC(:,657)+ CONSTANTS(:,267).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,671) = ALGEBRAIC(:,666)+ CONSTANTS(:,269).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,674) =  CONSTANTS(:,136).*(exp(ALGEBRAIC(:,659)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,671)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,675) = ALGEBRAIC(:,660) - ALGEBRAIC(:,674);
    RATES(:,57) = ALGEBRAIC(:,675);
    ALGEBRAIC(:,676) = ALGEBRAIC(:,672)+ALGEBRAIC(:,674);
    RATES(:,59) = ALGEBRAIC(:,676);
    ALGEBRAIC(:,682) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,683) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,682);
    ALGEBRAIC(:,678) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,686) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,214).*STATES(:,77));
    ALGEBRAIC(:,687) = ALGEBRAIC(:,686)+ALGEBRAIC(:,678)+ALGEBRAIC(:,683);
    ALGEBRAIC(:,679) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,688) = ALGEBRAIC(:,686)+ALGEBRAIC(:,679);
    ALGEBRAIC(:,691) = piecewise({ALGEBRAIC(:,683)==0.00000,  1.00000.*CONSTANTS(:,99).*(exp(ALGEBRAIC(:,687)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,688)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( 1.00000.*CONSTANTS(:,99).*ALGEBRAIC(:,683))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,683)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,687)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,688)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,160) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,164) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,160);
    ALGEBRAIC(:,162) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,163) = ALGEBRAIC(:,162)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,160);
    ALGEBRAIC(:,161) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,165) = ALGEBRAIC(:,161);
    ALGEBRAIC(:,166) = piecewise({ALGEBRAIC(:,164)==0.00000,  CONSTANTS(:,114).*(exp(ALGEBRAIC(:,163)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,165)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,114).*ALGEBRAIC(:,164))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,164)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,163)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,165)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,235) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,232) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,249) = ALGEBRAIC(:,248)+ALGEBRAIC(:,232)+ALGEBRAIC(:,235);
    ALGEBRAIC(:,233) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,250) = ALGEBRAIC(:,248)+ALGEBRAIC(:,233);
    ALGEBRAIC(:,251) = piecewise({ALGEBRAIC(:,235)==0.00000,  1.00000.*CONSTANTS(:,5).*(exp(ALGEBRAIC(:,249)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,250)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( 1.00000.*CONSTANTS(:,5).*ALGEBRAIC(:,235))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,235)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,249)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,250)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,263) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,262);
    ALGEBRAIC(:,260) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,272) = ALGEBRAIC(:,271)+ALGEBRAIC(:,260)+ALGEBRAIC(:,263);
    ALGEBRAIC(:,261) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,273) = ALGEBRAIC(:,271)+ALGEBRAIC(:,261);
    ALGEBRAIC(:,274) = piecewise({ALGEBRAIC(:,263)==0.00000,  1.00000.*CONSTANTS(:,10).*(exp(ALGEBRAIC(:,272)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,273)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( 1.00000.*CONSTANTS(:,10).*ALGEBRAIC(:,263))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,263)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,272)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,273)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,397) =  - ALGEBRAIC(:,391) - ALGEBRAIC(:,393);
    ALGEBRAIC(:,485) = ALGEBRAIC(:,438)+ALGEBRAIC(:,456);
    ALGEBRAIC(:,554) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,552) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,553) = ALGEBRAIC(:,552)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,551) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,555) = ALGEBRAIC(:,551);
    ALGEBRAIC(:,556) = piecewise({ALGEBRAIC(:,554)==0.00000,  CONSTANTS(:,117).*(exp(ALGEBRAIC(:,553)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,555)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,117).*ALGEBRAIC(:,554))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,554)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,553)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,555)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,653) =  CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,650) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,667) = ALGEBRAIC(:,666)+ALGEBRAIC(:,650)+ALGEBRAIC(:,653);
    ALGEBRAIC(:,651) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,668) = ALGEBRAIC(:,666)+ALGEBRAIC(:,651);
    ALGEBRAIC(:,669) = piecewise({ALGEBRAIC(:,653)==0.00000,  1.00000.*CONSTANTS(:,132).*(exp(ALGEBRAIC(:,667)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,668)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( 1.00000.*CONSTANTS(:,132).*ALGEBRAIC(:,653))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,653)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,667)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,668)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    RATES(:,8) = (((((((( - ALGEBRAIC(:,215) - ALGEBRAIC(:,179)) - ALGEBRAIC(:,229)) - ALGEBRAIC(:,251)) - ALGEBRAIC(:,274))+ALGEBRAIC(:,397)+ALGEBRAIC(:,485)) - ALGEBRAIC(:,669)) - ALGEBRAIC(:,166)) - ALGEBRAIC(:,556)) - ALGEBRAIC(:,691);
    ALGEBRAIC(:,396) = ALGEBRAIC(:,393)+ALGEBRAIC(:,391);
    ALGEBRAIC(:,484) =  - ALGEBRAIC(:,442) - ALGEBRAIC(:,445);
    RATES(:,9) =  1.00000.*(ALGEBRAIC(:,215)+ALGEBRAIC(:,179)+ALGEBRAIC(:,229)+ALGEBRAIC(:,251)+ALGEBRAIC(:,274)+ALGEBRAIC(:,396)+ALGEBRAIC(:,484)+ALGEBRAIC(:,669)+ALGEBRAIC(:,166)+ALGEBRAIC(:,556)+ALGEBRAIC(:,691));
    ALGEBRAIC(:,684) =  CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,682);
    ALGEBRAIC(:,680) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,170).*STATES(:,6));
    ALGEBRAIC(:,689) = ALGEBRAIC(:,686)+ALGEBRAIC(:,680)+ALGEBRAIC(:,684);
    ALGEBRAIC(:,681) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7));
    ALGEBRAIC(:,690) = ALGEBRAIC(:,686)+ALGEBRAIC(:,681);
    ALGEBRAIC(:,692) = piecewise({ALGEBRAIC(:,684)==0.00000,  1.00000.*CONSTANTS(:,98).*(exp(ALGEBRAIC(:,689)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,690)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( 1.00000.*CONSTANTS(:,98).*ALGEBRAIC(:,684))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,684)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,689)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,690)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,489) =  - ALGEBRAIC(:,461) - (ALGEBRAIC(:,464)+ALGEBRAIC(:,467));
    ALGEBRAIC(:,491) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,170).*STATES(:,6));
    ALGEBRAIC(:,492) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7));
    ALGEBRAIC(:,493) =  CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,1);
    ALGEBRAIC(:,494) = piecewise({ALGEBRAIC(:,493)==0.00000,  CONSTANTS(:,47).*(exp(ALGEBRAIC(:,491)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,492)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,47).*ALGEBRAIC(:,493))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,493)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,491)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,492)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,547) =  CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,545) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,170).*STATES(:,6));
    ALGEBRAIC(:,546) = ALGEBRAIC(:,545)+ CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,544) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7));
    ALGEBRAIC(:,548) = ALGEBRAIC(:,544);
    ALGEBRAIC(:,549) = piecewise({ALGEBRAIC(:,547)==0.00000,  CONSTANTS(:,116).*(exp(ALGEBRAIC(:,546)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,548)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,116).*ALGEBRAIC(:,547))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,547)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,546)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,548)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,535) =  CONSTANTS(:,258).*ALGEBRAIC(:,514);
    RATES(:,6) = (((( - ALGEBRAIC(:,157)+ALGEBRAIC(:,489)) - ALGEBRAIC(:,494))+ALGEBRAIC(:,535)) - ALGEBRAIC(:,549)) - ALGEBRAIC(:,692);
    ALGEBRAIC(:,488) = ALGEBRAIC(:,476)+ALGEBRAIC(:,480)+ALGEBRAIC(:,440);
    ALGEBRAIC(:,534) =   - CONSTANTS(:,257).*ALGEBRAIC(:,525);
    RATES(:,7) =  1.00000.*(ALGEBRAIC(:,157)+ALGEBRAIC(:,488)+ALGEBRAIC(:,494)+ALGEBRAIC(:,534)+ALGEBRAIC(:,549)+ALGEBRAIC(:,692));
    ALGEBRAIC(:,685) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,213).*STATES(:,76));
    ALGEBRAIC(:,693) = ALGEBRAIC(:,685)+ CONSTANTS(:,276).*CONSTANTS(:,307).*ALGEBRAIC(:,682);
    ALGEBRAIC(:,694) = ALGEBRAIC(:,686)+ CONSTANTS(:,277).*CONSTANTS(:,307).*ALGEBRAIC(:,682);
    ALGEBRAIC(:,695) =  CONSTANTS(:,100).*(exp(ALGEBRAIC(:,693)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,694)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    RATES(:,76) =  - ALGEBRAIC(:,695);
    RATES(:,77) = ALGEBRAIC(:,695);
    ALGEBRAIC(:,35) = VOI -  floor(VOI./CONSTANTS(:,303)).*CONSTANTS(:,303);
    ALGEBRAIC(:,36) = piecewise({ALGEBRAIC(:,35)>=0.300000&ALGEBRAIC(:,35)<=0.300000+CONSTANTS(:,304), ( 1.00000.*0.0750000.*CONSTANTS(:,293))./CONSTANTS(:,304) }, 0.00000);
    ALGEBRAIC(:,41) =   - CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,40);
    ALGEBRAIC(:,159) =  CONSTANTS(:,307).*(((((((((((((((((((((((((((((  - CONSTANTS(:,259).*ALGEBRAIC(:,157)+ CONSTANTS(:,275).*ALGEBRAIC(:,119)) -  CONSTANTS(:,272).*ALGEBRAIC(:,119)+ CONSTANTS(:,275).*ALGEBRAIC(:,131)) -  CONSTANTS(:,272).*ALGEBRAIC(:,131)+ CONSTANTS(:,275).*ALGEBRAIC(:,125)) -  CONSTANTS(:,272).*ALGEBRAIC(:,125)+ CONSTANTS(:,275).*ALGEBRAIC(:,137)) -  CONSTANTS(:,272).*ALGEBRAIC(:,137)+ CONSTANTS(:,275).*ALGEBRAIC(:,151)) -  CONSTANTS(:,272).*ALGEBRAIC(:,151)+ CONSTANTS(:,273).*ALGEBRAIC(:,87)) -  CONSTANTS(:,270).*ALGEBRAIC(:,87)+ CONSTANTS(:,273).*ALGEBRAIC(:,95)) -  CONSTANTS(:,270).*ALGEBRAIC(:,95)+ CONSTANTS(:,274).*ALGEBRAIC(:,107)) -  CONSTANTS(:,271).*ALGEBRAIC(:,107)+ CONSTANTS(:,274).*ALGEBRAIC(:,111)) -  CONSTANTS(:,271).*ALGEBRAIC(:,111)+ CONSTANTS(:,274).*ALGEBRAIC(:,115)) -  CONSTANTS(:,271).*ALGEBRAIC(:,115)+ CONSTANTS(:,275).*ALGEBRAIC(:,143)) -  CONSTANTS(:,272).*ALGEBRAIC(:,143)+ CONSTANTS(:,273).*ALGEBRAIC(:,91)) -  CONSTANTS(:,270).*ALGEBRAIC(:,91)+ CONSTANTS(:,273).*ALGEBRAIC(:,99)) -  CONSTANTS(:,270).*ALGEBRAIC(:,99)+ CONSTANTS(:,274).*ALGEBRAIC(:,103)) -  CONSTANTS(:,271).*ALGEBRAIC(:,103)+ CONSTANTS(:,275).*ALGEBRAIC(:,122)) -  CONSTANTS(:,272).*ALGEBRAIC(:,122)+ CONSTANTS(:,275).*ALGEBRAIC(:,134)) -  CONSTANTS(:,272).*ALGEBRAIC(:,134)+ CONSTANTS(:,275).*ALGEBRAIC(:,128)) -  CONSTANTS(:,272).*ALGEBRAIC(:,128)+ CONSTANTS(:,275).*ALGEBRAIC(:,140)) -  CONSTANTS(:,272).*ALGEBRAIC(:,140)+ CONSTANTS(:,275).*ALGEBRAIC(:,155)) -  CONSTANTS(:,272).*ALGEBRAIC(:,155)+ CONSTANTS(:,273).*ALGEBRAIC(:,89)) -  CONSTANTS(:,270).*ALGEBRAIC(:,89)+ CONSTANTS(:,273).*ALGEBRAIC(:,97)) -  CONSTANTS(:,270).*ALGEBRAIC(:,97)+ CONSTANTS(:,274).*ALGEBRAIC(:,105)) -  CONSTANTS(:,271).*ALGEBRAIC(:,105)+ CONSTANTS(:,274).*ALGEBRAIC(:,109)) -  CONSTANTS(:,271).*ALGEBRAIC(:,109)+ CONSTANTS(:,274).*ALGEBRAIC(:,113)) -  CONSTANTS(:,271).*ALGEBRAIC(:,113)+ CONSTANTS(:,274).*ALGEBRAIC(:,117)) -  CONSTANTS(:,271).*ALGEBRAIC(:,117)+ CONSTANTS(:,275).*ALGEBRAIC(:,147)) -  CONSTANTS(:,272).*ALGEBRAIC(:,147)+ CONSTANTS(:,273).*ALGEBRAIC(:,93)) -  CONSTANTS(:,270).*ALGEBRAIC(:,93)+ CONSTANTS(:,273).*ALGEBRAIC(:,101)) -  CONSTANTS(:,270).*ALGEBRAIC(:,101));
    ALGEBRAIC(:,696) =  CONSTANTS(:,307).*((  - CONSTANTS(:,244).*ALGEBRAIC(:,691)+ CONSTANTS(:,259).*ALGEBRAIC(:,692)+ CONSTANTS(:,277).*ALGEBRAIC(:,695)) -  CONSTANTS(:,276).*ALGEBRAIC(:,695));
    ALGEBRAIC(:,217) =  CONSTANTS(:,307).*((((((((((((((  - CONSTANTS(:,244).*ALGEBRAIC(:,215)+ CONSTANTS(:,291).*ALGEBRAIC(:,209)) -  CONSTANTS(:,289).*ALGEBRAIC(:,209))+ CONSTANTS(:,291).*ALGEBRAIC(:,205)) -  CONSTANTS(:,289).*ALGEBRAIC(:,205))+ CONSTANTS(:,290).*ALGEBRAIC(:,201)) -  CONSTANTS(:,288).*ALGEBRAIC(:,201))+ CONSTANTS(:,290).*ALGEBRAIC(:,197)) -  CONSTANTS(:,288).*ALGEBRAIC(:,197))+ CONSTANTS(:,291).*ALGEBRAIC(:,213)) -  CONSTANTS(:,289).*ALGEBRAIC(:,213))+ CONSTANTS(:,290).*ALGEBRAIC(:,203)) -  CONSTANTS(:,288).*ALGEBRAIC(:,203))+ CONSTANTS(:,290).*ALGEBRAIC(:,199)) -  CONSTANTS(:,288).*ALGEBRAIC(:,199));
    ALGEBRAIC(:,167) =  CONSTANTS(:,307).* - CONSTANTS(:,244).*ALGEBRAIC(:,166);
    ALGEBRAIC(:,181) =  CONSTANTS(:,307).*((  - CONSTANTS(:,244).*ALGEBRAIC(:,179)+ CONSTANTS(:,246).*ALGEBRAIC(:,177)) -  CONSTANTS(:,245).*ALGEBRAIC(:,177));
    ALGEBRAIC(:,231) =  CONSTANTS(:,307).*((  - CONSTANTS(:,244).*ALGEBRAIC(:,229)+ CONSTANTS(:,248).*ALGEBRAIC(:,227)) -  CONSTANTS(:,247).*ALGEBRAIC(:,227));
    ALGEBRAIC(:,259) =  CONSTANTS(:,307).*(  - CONSTANTS(:,244).*ALGEBRAIC(:,251)+ ALGEBRAIC(:,242).*(CONSTANTS(:,250) - CONSTANTS(:,249))+ ALGEBRAIC(:,254).*(CONSTANTS(:,250) - CONSTANTS(:,250))+ ALGEBRAIC(:,246).*(CONSTANTS(:,252) - CONSTANTS(:,251))+ ALGEBRAIC(:,256).*(CONSTANTS(:,252) - CONSTANTS(:,251)));
    ALGEBRAIC(:,279) =  CONSTANTS(:,307).*(  - CONSTANTS(:,244).*ALGEBRAIC(:,274)+ (ALGEBRAIC(:,269)+ALGEBRAIC(:,276)).*(CONSTANTS(:,254) - CONSTANTS(:,253)));
    ALGEBRAIC(:,395) =  CONSTANTS(:,307).*(((((((((((((((((((( CONSTANTS(:,285).*ALGEBRAIC(:,352) -  CONSTANTS(:,280).*ALGEBRAIC(:,352))+ CONSTANTS(:,286).*ALGEBRAIC(:,360) -  CONSTANTS(:,281).*ALGEBRAIC(:,360))+ CONSTANTS(:,284).*ALGEBRAIC(:,348) -  CONSTANTS(:,279).*ALGEBRAIC(:,348))+ CONSTANTS(:,285).*ALGEBRAIC(:,356) -  CONSTANTS(:,280).*ALGEBRAIC(:,356))+ CONSTANTS(:,286).*ALGEBRAIC(:,364) -  CONSTANTS(:,281).*ALGEBRAIC(:,364))+ CONSTANTS(:,284).*ALGEBRAIC(:,344) -  CONSTANTS(:,279).*ALGEBRAIC(:,344))+ CONSTANTS(:,283).*ALGEBRAIC(:,340) -  CONSTANTS(:,278).*ALGEBRAIC(:,340))+ CONSTANTS(:,283).*ALGEBRAIC(:,336) -  CONSTANTS(:,278).*ALGEBRAIC(:,336))+ CONSTANTS(:,283).*ALGEBRAIC(:,332) -  CONSTANTS(:,278).*ALGEBRAIC(:,332))+ CONSTANTS(:,286).*ALGEBRAIC(:,362) -  CONSTANTS(:,281).*ALGEBRAIC(:,362))+ CONSTANTS(:,285).*ALGEBRAIC(:,354) -  CONSTANTS(:,280).*ALGEBRAIC(:,354))+ CONSTANTS(:,284).*ALGEBRAIC(:,346) -  CONSTANTS(:,279).*ALGEBRAIC(:,346))+ CONSTANTS(:,286).*ALGEBRAIC(:,358) -  CONSTANTS(:,281).*ALGEBRAIC(:,358))+ CONSTANTS(:,285).*ALGEBRAIC(:,350) -  CONSTANTS(:,280).*ALGEBRAIC(:,350))+ CONSTANTS(:,284).*ALGEBRAIC(:,342) -  CONSTANTS(:,279).*ALGEBRAIC(:,342))+ CONSTANTS(:,283).*ALGEBRAIC(:,338) -  CONSTANTS(:,278).*ALGEBRAIC(:,338))+ CONSTANTS(:,283).*ALGEBRAIC(:,334) -  CONSTANTS(:,278).*ALGEBRAIC(:,334))+ CONSTANTS(:,283).*ALGEBRAIC(:,330) -  CONSTANTS(:,278).*ALGEBRAIC(:,330)) - ( CONSTANTS(:,243).*ALGEBRAIC(:,386)+ CONSTANTS(:,243).*ALGEBRAIC(:,388))) - ( CONSTANTS(:,244).*ALGEBRAIC(:,391)+ CONSTANTS(:,244).*ALGEBRAIC(:,393)));
    ALGEBRAIC(:,478) =  CONSTANTS(:,261).*ALGEBRAIC(:,476)+ CONSTANTS(:,260).*ALGEBRAIC(:,467);
    ALGEBRAIC(:,495) =   - CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,494);
    ALGEBRAIC(:,543) =  CONSTANTS(:,307).* - CONSTANTS(:,243).*ALGEBRAIC(:,542);
    ALGEBRAIC(:,550) =  CONSTANTS(:,307).* - CONSTANTS(:,259).*ALGEBRAIC(:,549);
    ALGEBRAIC(:,557) =  CONSTANTS(:,307).* - CONSTANTS(:,244).*ALGEBRAIC(:,556);
    ALGEBRAIC(:,529) =  CONSTANTS(:,307).*(  - CONSTANTS(:,255).*ALGEBRAIC(:,528)+ CONSTANTS(:,256).*ALGEBRAIC(:,528));
    ALGEBRAIC(:,564) =   - CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,563);
    ALGEBRAIC(:,648) =  CONSTANTS(:,307).*(  - CONSTANTS(:,243).*ALGEBRAIC(:,635)+ ALGEBRAIC(:,626).*(CONSTANTS(:,264) - CONSTANTS(:,262))+ ALGEBRAIC(:,641).*(CONSTANTS(:,264) - CONSTANTS(:,262))+ ALGEBRAIC(:,630).*(CONSTANTS(:,265) - CONSTANTS(:,263))+ ALGEBRAIC(:,644).*(CONSTANTS(:,265) - CONSTANTS(:,263)));
    ALGEBRAIC(:,677) =  CONSTANTS(:,307).*(  - CONSTANTS(:,244).*ALGEBRAIC(:,669)+ (ALGEBRAIC(:,660)+ALGEBRAIC(:,672)).*(CONSTANTS(:,268) - CONSTANTS(:,266))+ (ALGEBRAIC(:,664)+ALGEBRAIC(:,674)).*(CONSTANTS(:,269) - CONSTANTS(:,267)));
    RATES(:,18) = ALGEBRAIC(:,41)+ALGEBRAIC(:,159)+ALGEBRAIC(:,217)+ALGEBRAIC(:,167)+ALGEBRAIC(:,181)+ALGEBRAIC(:,231)+ALGEBRAIC(:,259)+ALGEBRAIC(:,279)+ALGEBRAIC(:,395)+ALGEBRAIC(:,495)+ALGEBRAIC(:,478)+ALGEBRAIC(:,529)+ALGEBRAIC(:,543)+ALGEBRAIC(:,564)+ALGEBRAIC(:,648)+ALGEBRAIC(:,677)+ALGEBRAIC(:,36)+ALGEBRAIC(:,550)+ALGEBRAIC(:,557)+ALGEBRAIC(:,696);
   RATES = RATES';
end

% Calculate algebraic variables
function ALGEBRAIC = computeAlgebraic(ALGEBRAIC, CONSTANTS, STATES, VOI)
    statesSize = size(STATES);
    statesColumnCount = statesSize(2);
    if ( statesColumnCount == 1)
        STATES = STATES';
        utilOnes = 1;
    else
        statesRowCount = statesSize(1);
        utilOnes = ones(statesRowCount, 1);
    end
    ALGEBRAIC(:,45) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,138).*STATES(:,4));
    ALGEBRAIC(:,48) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,49) = ALGEBRAIC(:,48)+ALGEBRAIC(:,45);
    ALGEBRAIC(:,46) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,139).*STATES(:,5));
    ALGEBRAIC(:,47) = ALGEBRAIC(:,46);
    ALGEBRAIC(:,50) =  CONSTANTS(:,1).*(exp(ALGEBRAIC(:,49)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,47)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,51) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,56) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,197).*STATES(:,60))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,86) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,201).*STATES(:,64))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,87) =  CONSTANTS(:,82).*(exp(ALGEBRAIC(:,56)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,86)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,64) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,197).*STATES(:,60))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,102) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,205).*STATES(:,68))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,103) =  CONSTANTS(:,90).*(exp(ALGEBRAIC(:,64)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,102)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,72) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,197).*STATES(:,60))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,118) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,198).*STATES(:,61))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,119) =  CONSTANTS(:,70).*(exp(ALGEBRAIC(:,72)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,118)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,120) = ( - ALGEBRAIC(:,119) - ALGEBRAIC(:,87)) - ALGEBRAIC(:,103);
    ALGEBRAIC(:,57) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,205).*STATES(:,68))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,88) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,209).*STATES(:,72))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,89) =  CONSTANTS(:,83).*(exp(ALGEBRAIC(:,57)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,88)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,73) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,205).*STATES(:,68))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,121) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,206).*STATES(:,69))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,122) =  CONSTANTS(:,71).*(exp(ALGEBRAIC(:,73)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,121)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,123) = ( - ALGEBRAIC(:,122) - ALGEBRAIC(:,89)) -  - ALGEBRAIC(:,103);
    ALGEBRAIC(:,65) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,201).*STATES(:,64))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,104) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,209).*STATES(:,72))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,105) =  CONSTANTS(:,91).*(exp(ALGEBRAIC(:,65)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,104)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,74) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,201).*STATES(:,64))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,124) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,202).*STATES(:,65))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,125) =  CONSTANTS(:,72).*(exp(ALGEBRAIC(:,74)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,124)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,126) = ( - ALGEBRAIC(:,125)+ALGEBRAIC(:,87)) - ALGEBRAIC(:,105);
    ALGEBRAIC(:,75) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,209).*STATES(:,72))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,127) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,210).*STATES(:,73))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,128) =  CONSTANTS(:,73).*(exp(ALGEBRAIC(:,75)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,127)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,129) = ( - ALGEBRAIC(:,128)+ALGEBRAIC(:,89)) -  - ALGEBRAIC(:,105);
    ALGEBRAIC(:,58) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,198).*STATES(:,61))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,90) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,202).*STATES(:,65))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,91) =  CONSTANTS(:,84).*(exp(ALGEBRAIC(:,58)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,90)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,66) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,198).*STATES(:,61))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,106) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,206).*STATES(:,69))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,107) =  CONSTANTS(:,92).*(exp(ALGEBRAIC(:,66)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,106)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,76) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,198).*STATES(:,61))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,130) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,199).*STATES(:,62))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,131) =  CONSTANTS(:,74).*(exp(ALGEBRAIC(:,76)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,130)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,132) = ((ALGEBRAIC(:,119) - ALGEBRAIC(:,131)) - ALGEBRAIC(:,91)) - ALGEBRAIC(:,107);
    ALGEBRAIC(:,59) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,206).*STATES(:,69))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,92) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,210).*STATES(:,73))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,93) =  CONSTANTS(:,85).*(exp(ALGEBRAIC(:,59)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,92)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,77) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,206).*STATES(:,69))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,133) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,207).*STATES(:,70))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,134) =  CONSTANTS(:,75).*(exp(ALGEBRAIC(:,77)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,133)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,135) = ((ALGEBRAIC(:,122) - ALGEBRAIC(:,134)) - ALGEBRAIC(:,93)) -  - ALGEBRAIC(:,107);
    ALGEBRAIC(:,67) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,202).*STATES(:,65))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,108) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,210).*STATES(:,73))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,109) =  CONSTANTS(:,93).*(exp(ALGEBRAIC(:,67)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,108)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,78) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,202).*STATES(:,65))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,136) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,203).*STATES(:,66))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,137) =  CONSTANTS(:,76).*(exp(ALGEBRAIC(:,78)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,136)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,138) = ((ALGEBRAIC(:,125) - ALGEBRAIC(:,137))+ALGEBRAIC(:,91)) - ALGEBRAIC(:,109);
    ALGEBRAIC(:,79) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,210).*STATES(:,73))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,139) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,211).*STATES(:,74))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,140) =  CONSTANTS(:,77).*(exp(ALGEBRAIC(:,79)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,139)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,141) = ((ALGEBRAIC(:,128) - ALGEBRAIC(:,140))+ALGEBRAIC(:,93)) -  - ALGEBRAIC(:,109);
    ALGEBRAIC(:,60) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,199).*STATES(:,62))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,94) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,203).*STATES(:,66))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,95) =  CONSTANTS(:,86).*(exp(ALGEBRAIC(:,60)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,94)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,68) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,199).*STATES(:,62))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,110) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,207).*STATES(:,70))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,111) =  CONSTANTS(:,94).*(exp(ALGEBRAIC(:,68)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,110)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,80) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,199).*STATES(:,62))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,142) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,200).*STATES(:,63))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,143) =  CONSTANTS(:,78).*(exp(ALGEBRAIC(:,80)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,142)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,144) = ((ALGEBRAIC(:,131) - ALGEBRAIC(:,143)) - ALGEBRAIC(:,95)) - ALGEBRAIC(:,111);
    ALGEBRAIC(:,62) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,200).*STATES(:,63))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,98) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,204).*STATES(:,67))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,99) =  CONSTANTS(:,88).*(exp(ALGEBRAIC(:,62)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,98)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,70) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,200).*STATES(:,63))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,114) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,208).*STATES(:,71))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,115) =  CONSTANTS(:,96).*(exp(ALGEBRAIC(:,70)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,114)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,145) = (ALGEBRAIC(:,143) - ALGEBRAIC(:,99)) - ALGEBRAIC(:,115);
    ALGEBRAIC(:,61) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,207).*STATES(:,70))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,96) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,211).*STATES(:,74))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,97) =  CONSTANTS(:,87).*(exp(ALGEBRAIC(:,61)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,96)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,81) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,207).*STATES(:,70))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,146) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,208).*STATES(:,71))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,147) =  CONSTANTS(:,79).*(exp(ALGEBRAIC(:,81)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,146)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,148) = ((ALGEBRAIC(:,134) - ALGEBRAIC(:,147)) - ALGEBRAIC(:,97)) -  - ALGEBRAIC(:,111);
    ALGEBRAIC(:,63) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,208).*STATES(:,71))+ CONSTANTS(:,270).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,100) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,212).*STATES(:,75))+ CONSTANTS(:,273).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,101) =  CONSTANTS(:,89).*(exp(ALGEBRAIC(:,63)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,100)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,149) = (ALGEBRAIC(:,147) - ALGEBRAIC(:,101)) -  - ALGEBRAIC(:,115);
    ALGEBRAIC(:,69) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,203).*STATES(:,66))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,112) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,211).*STATES(:,74))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,113) =  CONSTANTS(:,95).*(exp(ALGEBRAIC(:,69)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,112)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,82) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,203).*STATES(:,66))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,150) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,204).*STATES(:,67))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,151) =  CONSTANTS(:,80).*(exp(ALGEBRAIC(:,82)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,150)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,152) = ((ALGEBRAIC(:,137) - ALGEBRAIC(:,151))+ALGEBRAIC(:,95)) - ALGEBRAIC(:,113);
    ALGEBRAIC(:,71) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,204).*STATES(:,67))+ CONSTANTS(:,271).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,116) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,212).*STATES(:,75))+ CONSTANTS(:,274).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,117) =  CONSTANTS(:,97).*(exp(ALGEBRAIC(:,71)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,116)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,153) = (ALGEBRAIC(:,151)+ALGEBRAIC(:,99)) - ALGEBRAIC(:,117);
    ALGEBRAIC(:,83) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,211).*STATES(:,74))+ CONSTANTS(:,272).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,154) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,212).*STATES(:,75))+ CONSTANTS(:,275).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,155) =  CONSTANTS(:,81).*(exp(ALGEBRAIC(:,83)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,154)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,156) = ((ALGEBRAIC(:,140) - ALGEBRAIC(:,155))+ALGEBRAIC(:,97)) -  - ALGEBRAIC(:,113);
    ALGEBRAIC(:,84) =  CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,51);
    ALGEBRAIC(:,53) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,170).*STATES(:,6));
    ALGEBRAIC(:,54) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,212).*STATES(:,75));
    ALGEBRAIC(:,55) = ALGEBRAIC(:,53)+ CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,51)+ALGEBRAIC(:,54);
    ALGEBRAIC(:,52) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7));
    ALGEBRAIC(:,85) = ALGEBRAIC(:,52)+ALGEBRAIC(:,54);
    ALGEBRAIC(:,157) = piecewise({ALGEBRAIC(:,84)==0.00000,  CONSTANTS(:,69).*(exp(ALGEBRAIC(:,55)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,85)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,69).*ALGEBRAIC(:,84))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,84)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,55)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,85)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,158) = (ALGEBRAIC(:,155)+ALGEBRAIC(:,101)) - (( - ALGEBRAIC(:,117)+ALGEBRAIC(:,157)) - ALGEBRAIC(:,157));
    ALGEBRAIC(:,168) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,173) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,143).*STATES(:,25))+ CONSTANTS(:,245).*CONSTANTS(:,307).*ALGEBRAIC(:,168);
    ALGEBRAIC(:,176) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,144).*STATES(:,26))+ CONSTANTS(:,246).*CONSTANTS(:,307).*ALGEBRAIC(:,168);
    ALGEBRAIC(:,177) =  CONSTANTS(:,4).*(exp(ALGEBRAIC(:,173)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,176)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,178) =  - ALGEBRAIC(:,177);
    ALGEBRAIC(:,174) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,168);
    ALGEBRAIC(:,169) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,170) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,171) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,144).*STATES(:,26));
    ALGEBRAIC(:,172) = ALGEBRAIC(:,170)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,168)+ALGEBRAIC(:,171)+ CONSTANTS(:,287).*ALGEBRAIC(:,169);
    ALGEBRAIC(:,175) = ALGEBRAIC(:,169)+ALGEBRAIC(:,171)+ CONSTANTS(:,287).*ALGEBRAIC(:,169);
    ALGEBRAIC(:,179) = piecewise({ALGEBRAIC(:,174)==0.00000,  CONSTANTS(:,3).*(exp(ALGEBRAIC(:,172)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,175)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,3).*ALGEBRAIC(:,174))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,174)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,172)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,175)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,180) = ALGEBRAIC(:,177) - (ALGEBRAIC(:,179) - ALGEBRAIC(:,179));
    ALGEBRAIC(:,182) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,187) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,218).*STATES(:,19))+ CONSTANTS(:,288).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,196) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,219).*STATES(:,20))+ CONSTANTS(:,290).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,197) =  CONSTANTS(:,105).*(exp(ALGEBRAIC(:,187)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,196)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,191) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,218).*STATES(:,19))+ CONSTANTS(:,289).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,204) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,221).*STATES(:,22))+ CONSTANTS(:,291).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,205) =  CONSTANTS(:,109).*(exp(ALGEBRAIC(:,191)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,204)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,206) =  - ALGEBRAIC(:,197) - ALGEBRAIC(:,205);
    ALGEBRAIC(:,188) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,221).*STATES(:,22))+ CONSTANTS(:,288).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,198) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,222).*STATES(:,23))+ CONSTANTS(:,290).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,199) =  CONSTANTS(:,107).*(exp(ALGEBRAIC(:,188)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,198)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,207) =  - ALGEBRAIC(:,199)+ALGEBRAIC(:,205);
    ALGEBRAIC(:,189) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,219).*STATES(:,20))+ CONSTANTS(:,288).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,200) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,220).*STATES(:,21))+ CONSTANTS(:,290).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,201) =  CONSTANTS(:,106).*(exp(ALGEBRAIC(:,189)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,200)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,192) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,219).*STATES(:,20))+ CONSTANTS(:,289).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,208) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,222).*STATES(:,23))+ CONSTANTS(:,291).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,209) =  CONSTANTS(:,110).*(exp(ALGEBRAIC(:,192)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,208)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,210) = (ALGEBRAIC(:,197) - ALGEBRAIC(:,201)) - ALGEBRAIC(:,209);
    ALGEBRAIC(:,190) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,222).*STATES(:,23))+ CONSTANTS(:,288).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,202) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,223).*STATES(:,24))+ CONSTANTS(:,290).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,203) =  CONSTANTS(:,108).*(exp(ALGEBRAIC(:,190)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,202)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,211) = (ALGEBRAIC(:,199) - ALGEBRAIC(:,203))+ALGEBRAIC(:,209);
    ALGEBRAIC(:,193) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,220).*STATES(:,21))+ CONSTANTS(:,289).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,212) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,223).*STATES(:,24))+ CONSTANTS(:,291).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,213) =  CONSTANTS(:,111).*(exp(ALGEBRAIC(:,193)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,212)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,214) = ALGEBRAIC(:,201) - ALGEBRAIC(:,213);
    ALGEBRAIC(:,194) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,183) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,184) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,185) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,223).*STATES(:,24));
    ALGEBRAIC(:,186) = ALGEBRAIC(:,184)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,182)+ALGEBRAIC(:,185)+ CONSTANTS(:,287).*ALGEBRAIC(:,183);
    ALGEBRAIC(:,195) = ALGEBRAIC(:,183)+ALGEBRAIC(:,185)+ CONSTANTS(:,287).*ALGEBRAIC(:,183);
    ALGEBRAIC(:,215) = piecewise({ALGEBRAIC(:,194)==0.00000,  CONSTANTS(:,104).*(exp(ALGEBRAIC(:,186)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,195)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,104).*ALGEBRAIC(:,194))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,194)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,186)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,195)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,216) = (ALGEBRAIC(:,203)+ALGEBRAIC(:,213)) - (ALGEBRAIC(:,215) - ALGEBRAIC(:,215));
    ALGEBRAIC(:,218) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,223) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,224).*STATES(:,27))+ CONSTANTS(:,247).*CONSTANTS(:,307).*ALGEBRAIC(:,218);
    ALGEBRAIC(:,226) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,225).*STATES(:,28))+ CONSTANTS(:,248).*CONSTANTS(:,307).*ALGEBRAIC(:,218);
    ALGEBRAIC(:,227) =  CONSTANTS(:,113).*(exp(ALGEBRAIC(:,223)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,226)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,228) =  - ALGEBRAIC(:,227);
    ALGEBRAIC(:,224) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,218);
    ALGEBRAIC(:,220) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,221) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,225).*STATES(:,28));
    ALGEBRAIC(:,222) = ALGEBRAIC(:,220)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,218)+ALGEBRAIC(:,221);
    ALGEBRAIC(:,219) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,225) = ALGEBRAIC(:,219)+ALGEBRAIC(:,221);
    ALGEBRAIC(:,229) = piecewise({ALGEBRAIC(:,224)==0.00000,  CONSTANTS(:,112).*(exp(ALGEBRAIC(:,222)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,225)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,112).*ALGEBRAIC(:,224))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,224)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,222)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,225)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,230) = ALGEBRAIC(:,227) - (ALGEBRAIC(:,229) - ALGEBRAIC(:,229));
    ALGEBRAIC(:,234) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,236) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,145).*STATES(:,29));
    ALGEBRAIC(:,237) = ALGEBRAIC(:,236)+ CONSTANTS(:,249).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,239) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,146).*STATES(:,30));
    ALGEBRAIC(:,240) = ALGEBRAIC(:,239)+ CONSTANTS(:,250).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,242) =  CONSTANTS(:,6).*(exp(ALGEBRAIC(:,237)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,240)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,238) = ALGEBRAIC(:,236)+ CONSTANTS(:,251).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,243) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,147).*STATES(:,31));
    ALGEBRAIC(:,245) = ALGEBRAIC(:,243)+ CONSTANTS(:,252).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,246) =  CONSTANTS(:,8).*(exp(ALGEBRAIC(:,238)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,245)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,247) =  - ALGEBRAIC(:,242) - ALGEBRAIC(:,246);
    ALGEBRAIC(:,244) = ALGEBRAIC(:,243)+ CONSTANTS(:,249).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,248) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,148).*STATES(:,32));
    ALGEBRAIC(:,252) = ALGEBRAIC(:,248)+ CONSTANTS(:,250).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,254) =  CONSTANTS(:,7).*(exp(ALGEBRAIC(:,244)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,252)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,255) = ALGEBRAIC(:,246) - ALGEBRAIC(:,254);
    ALGEBRAIC(:,241) = ALGEBRAIC(:,239)+ CONSTANTS(:,251).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,253) = ALGEBRAIC(:,248)+ CONSTANTS(:,252).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,256) =  CONSTANTS(:,9).*(exp(ALGEBRAIC(:,241)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,253)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,257) = ALGEBRAIC(:,242) - ALGEBRAIC(:,256);
    ALGEBRAIC(:,258) = ALGEBRAIC(:,254)+ALGEBRAIC(:,256);
    ALGEBRAIC(:,262) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,264) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,149).*STATES(:,33));
    ALGEBRAIC(:,265) = ALGEBRAIC(:,264)+ CONSTANTS(:,253).*CONSTANTS(:,307).*ALGEBRAIC(:,262);
    ALGEBRAIC(:,266) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,150).*STATES(:,34));
    ALGEBRAIC(:,267) = ALGEBRAIC(:,266)+ CONSTANTS(:,254).*CONSTANTS(:,307).*ALGEBRAIC(:,262);
    ALGEBRAIC(:,269) =  CONSTANTS(:,11).*(exp(ALGEBRAIC(:,265)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,267)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,270) =  - ALGEBRAIC(:,269);
    ALGEBRAIC(:,268) = ALGEBRAIC(:,266)+ CONSTANTS(:,253).*CONSTANTS(:,307).*ALGEBRAIC(:,262);
    ALGEBRAIC(:,271) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,151).*STATES(:,35));
    ALGEBRAIC(:,275) = ALGEBRAIC(:,271)+ CONSTANTS(:,254).*CONSTANTS(:,307).*ALGEBRAIC(:,262);
    ALGEBRAIC(:,276) =  CONSTANTS(:,12).*(exp(ALGEBRAIC(:,268)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,275)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,277) = ALGEBRAIC(:,269) - ALGEBRAIC(:,276);
    ALGEBRAIC(:,278) = ALGEBRAIC(:,276);
    ALGEBRAIC(:,285) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,152).*STATES(:,36));
    ALGEBRAIC(:,315) = ALGEBRAIC(:,285);
    ALGEBRAIC(:,282) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,365) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,158).*STATES(:,42))+ CONSTANTS(:,282).*ALGEBRAIC(:,282);
    ALGEBRAIC(:,366) =  CONSTANTS(:,35).*(exp(ALGEBRAIC(:,315)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,365)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,280) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,297) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,152).*STATES(:,36))+ CONSTANTS(:,278).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,329) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,155).*STATES(:,39))+ CONSTANTS(:,283).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,330) =  CONSTANTS(:,17).*(exp(ALGEBRAIC(:,297)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,329)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,303) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,152).*STATES(:,36))+ CONSTANTS(:,279).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,341) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,153).*STATES(:,37))+ CONSTANTS(:,284).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,342) =  CONSTANTS(:,23).*(exp(ALGEBRAIC(:,303)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,341)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,307) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,152).*STATES(:,36))+ CONSTANTS(:,280).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,349) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,154).*STATES(:,38))+ CONSTANTS(:,285).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,350) =  CONSTANTS(:,27).*(exp(ALGEBRAIC(:,307)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,349)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,368) = (( - ALGEBRAIC(:,330) - ALGEBRAIC(:,342)) - ALGEBRAIC(:,350)) - ALGEBRAIC(:,366);
    ALGEBRAIC(:,298) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,158).*STATES(:,42))+ CONSTANTS(:,278).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,331) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,161).*STATES(:,45))+ CONSTANTS(:,283).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,332) =  CONSTANTS(:,20).*(exp(ALGEBRAIC(:,298)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,331)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,304) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,158).*STATES(:,42))+ CONSTANTS(:,279).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,343) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,159).*STATES(:,43))+ CONSTANTS(:,284).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,344) =  CONSTANTS(:,25).*(exp(ALGEBRAIC(:,304)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,343)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,308) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,158).*STATES(:,42))+ CONSTANTS(:,280).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,351) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,160).*STATES(:,44))+ CONSTANTS(:,285).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,352) =  CONSTANTS(:,29).*(exp(ALGEBRAIC(:,308)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,351)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,369) = (( - ALGEBRAIC(:,332) - ALGEBRAIC(:,344)) - ALGEBRAIC(:,352)) -  - ALGEBRAIC(:,366);
    ALGEBRAIC(:,286) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,153).*STATES(:,37));
    ALGEBRAIC(:,316) = ALGEBRAIC(:,286);
    ALGEBRAIC(:,367) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,159).*STATES(:,43))+ CONSTANTS(:,282).*ALGEBRAIC(:,282);
    ALGEBRAIC(:,370) =  CONSTANTS(:,37).*(exp(ALGEBRAIC(:,316)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,367)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,299) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,153).*STATES(:,37))+ CONSTANTS(:,278).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,333) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,156).*STATES(:,40))+ CONSTANTS(:,283).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,334) =  CONSTANTS(:,18).*(exp(ALGEBRAIC(:,299)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,333)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,311) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,153).*STATES(:,37))+ CONSTANTS(:,281).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,357) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,154).*STATES(:,38))+ CONSTANTS(:,286).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,358) =  CONSTANTS(:,31).*(exp(ALGEBRAIC(:,311)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,357)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,372) = (( - ALGEBRAIC(:,334)+ALGEBRAIC(:,342)) - ALGEBRAIC(:,370)) - ALGEBRAIC(:,358);
    ALGEBRAIC(:,300) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,159).*STATES(:,43))+ CONSTANTS(:,278).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,335) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,162).*STATES(:,46))+ CONSTANTS(:,283).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,336) =  CONSTANTS(:,21).*(exp(ALGEBRAIC(:,300)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,335)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,312) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,159).*STATES(:,43))+ CONSTANTS(:,281).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,359) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,160).*STATES(:,44))+ CONSTANTS(:,286).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,360) =  CONSTANTS(:,33).*(exp(ALGEBRAIC(:,312)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,359)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,373) = (( - ALGEBRAIC(:,336)+ALGEBRAIC(:,344)) -  - ALGEBRAIC(:,370)) - ALGEBRAIC(:,360);
    ALGEBRAIC(:,287) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,154).*STATES(:,38));
    ALGEBRAIC(:,317) = ALGEBRAIC(:,287);
    ALGEBRAIC(:,371) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,160).*STATES(:,44))+ CONSTANTS(:,282).*ALGEBRAIC(:,282);
    ALGEBRAIC(:,374) =  CONSTANTS(:,39).*(exp(ALGEBRAIC(:,317)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,371)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,301) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,154).*STATES(:,38))+ CONSTANTS(:,278).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,337) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,157).*STATES(:,41))+ CONSTANTS(:,283).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,338) =  CONSTANTS(:,19).*(exp(ALGEBRAIC(:,301)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,337)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,376) = (( - ALGEBRAIC(:,338)+ALGEBRAIC(:,350)) - ALGEBRAIC(:,374))+ALGEBRAIC(:,358);
    ALGEBRAIC(:,302) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,160).*STATES(:,44))+ CONSTANTS(:,278).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,339) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,163).*STATES(:,47))+ CONSTANTS(:,283).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,340) =  CONSTANTS(:,22).*(exp(ALGEBRAIC(:,302)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,339)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,377) = (( - ALGEBRAIC(:,340)+ALGEBRAIC(:,352)) -  - ALGEBRAIC(:,374))+ALGEBRAIC(:,360);
    ALGEBRAIC(:,288) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,155).*STATES(:,39));
    ALGEBRAIC(:,318) = ALGEBRAIC(:,288);
    ALGEBRAIC(:,375) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,161).*STATES(:,45))+ CONSTANTS(:,282).*ALGEBRAIC(:,282);
    ALGEBRAIC(:,378) =  CONSTANTS(:,36).*(exp(ALGEBRAIC(:,318)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,375)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,305) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,155).*STATES(:,39))+ CONSTANTS(:,279).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,345) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,156).*STATES(:,40))+ CONSTANTS(:,284).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,346) =  CONSTANTS(:,24).*(exp(ALGEBRAIC(:,305)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,345)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,309) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,155).*STATES(:,39))+ CONSTANTS(:,280).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,353) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,157).*STATES(:,41))+ CONSTANTS(:,285).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,354) =  CONSTANTS(:,28).*(exp(ALGEBRAIC(:,309)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,353)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,380) = (( - ALGEBRAIC(:,354)+ALGEBRAIC(:,330)) - ALGEBRAIC(:,346)) - ALGEBRAIC(:,378);
    ALGEBRAIC(:,306) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,161).*STATES(:,45))+ CONSTANTS(:,279).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,347) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,162).*STATES(:,46))+ CONSTANTS(:,284).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,348) =  CONSTANTS(:,26).*(exp(ALGEBRAIC(:,306)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,347)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,310) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,161).*STATES(:,45))+ CONSTANTS(:,280).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,355) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,163).*STATES(:,47))+ CONSTANTS(:,285).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,356) =  CONSTANTS(:,30).*(exp(ALGEBRAIC(:,310)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,355)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,381) = (( - ALGEBRAIC(:,356)+ALGEBRAIC(:,332)) - ALGEBRAIC(:,348)) -  - ALGEBRAIC(:,378);
    ALGEBRAIC(:,289) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,156).*STATES(:,40));
    ALGEBRAIC(:,319) = ALGEBRAIC(:,289);
    ALGEBRAIC(:,379) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,162).*STATES(:,46))+ CONSTANTS(:,282).*ALGEBRAIC(:,282);
    ALGEBRAIC(:,382) =  CONSTANTS(:,38).*(exp(ALGEBRAIC(:,319)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,379)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,313) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,156).*STATES(:,40))+ CONSTANTS(:,281).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,361) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,157).*STATES(:,41))+ CONSTANTS(:,286).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,362) =  CONSTANTS(:,32).*(exp(ALGEBRAIC(:,313)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,361)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,384) = ((ALGEBRAIC(:,346)+ALGEBRAIC(:,334)) - ALGEBRAIC(:,382)) - ALGEBRAIC(:,362);
    ALGEBRAIC(:,291) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,157).*STATES(:,41));
    ALGEBRAIC(:,320) = ALGEBRAIC(:,291);
    ALGEBRAIC(:,383) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,163).*STATES(:,47))+ CONSTANTS(:,282).*ALGEBRAIC(:,282);
    ALGEBRAIC(:,385) =  CONSTANTS(:,40).*(exp(ALGEBRAIC(:,320)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,383)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,387) = ((ALGEBRAIC(:,354)+ALGEBRAIC(:,338)) - ALGEBRAIC(:,385))+ALGEBRAIC(:,362);
    ALGEBRAIC(:,290) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,162).*STATES(:,46));
    ALGEBRAIC(:,293) = ALGEBRAIC(:,282)+ CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,280)+ALGEBRAIC(:,290);
    ALGEBRAIC(:,281) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,140).*STATES(:,2));
    ALGEBRAIC(:,325) = ALGEBRAIC(:,281)+ALGEBRAIC(:,290);
    ALGEBRAIC(:,321) =  CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,386) = piecewise({ALGEBRAIC(:,321)==0.00000,  CONSTANTS(:,13).*(exp(ALGEBRAIC(:,293)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,325)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,13).*ALGEBRAIC(:,321))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,321)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,293)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,325)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,284) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,295) = ALGEBRAIC(:,284)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,280)+ALGEBRAIC(:,290);
    ALGEBRAIC(:,283) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,327) = ALGEBRAIC(:,283)+ALGEBRAIC(:,290);
    ALGEBRAIC(:,323) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,391) = piecewise({ALGEBRAIC(:,323)==0.00000,  CONSTANTS(:,15).*(exp(ALGEBRAIC(:,295)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,327)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,15).*ALGEBRAIC(:,323))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,323)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,295)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,327)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,314) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,162).*STATES(:,46))+ CONSTANTS(:,281).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,363) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,163).*STATES(:,47))+ CONSTANTS(:,286).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,364) =  CONSTANTS(:,34).*(exp(ALGEBRAIC(:,314)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,363)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,392) = ((ALGEBRAIC(:,348)+ALGEBRAIC(:,336)) - (((( - ALGEBRAIC(:,382)+ALGEBRAIC(:,386)) - ALGEBRAIC(:,386))+ALGEBRAIC(:,391)) - ALGEBRAIC(:,391))) - ALGEBRAIC(:,364);
    ALGEBRAIC(:,292) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,163).*STATES(:,47));
    ALGEBRAIC(:,294) = ALGEBRAIC(:,282)+ CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,280)+ALGEBRAIC(:,292);
    ALGEBRAIC(:,326) = ALGEBRAIC(:,281)+ALGEBRAIC(:,292);
    ALGEBRAIC(:,322) =  CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,388) = piecewise({ALGEBRAIC(:,322)==0.00000,  CONSTANTS(:,14).*(exp(ALGEBRAIC(:,294)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,326)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,14).*ALGEBRAIC(:,322))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,322)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,294)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,326)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,296) = ALGEBRAIC(:,284)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,280)+ALGEBRAIC(:,292);
    ALGEBRAIC(:,328) = ALGEBRAIC(:,283)+ALGEBRAIC(:,292);
    ALGEBRAIC(:,324) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,280);
    ALGEBRAIC(:,393) = piecewise({ALGEBRAIC(:,324)==0.00000,  CONSTANTS(:,16).*(exp(ALGEBRAIC(:,296)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,328)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,16).*ALGEBRAIC(:,324))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,324)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,296)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,328)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,394) = ((ALGEBRAIC(:,356)+ALGEBRAIC(:,340)) - (((( - ALGEBRAIC(:,385)+ALGEBRAIC(:,388)) - ALGEBRAIC(:,388))+ALGEBRAIC(:,393)) - ALGEBRAIC(:,393)))+ALGEBRAIC(:,364);
    ALGEBRAIC(:,407) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,181).*STATES(:,87));
    ALGEBRAIC(:,423) = ALGEBRAIC(:,407);
    ALGEBRAIC(:,404) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7));
    ALGEBRAIC(:,408) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,182).*STATES(:,88));
    ALGEBRAIC(:,439) = ALGEBRAIC(:,404)+ALGEBRAIC(:,408);
    ALGEBRAIC(:,440) =  CONSTANTS(:,57).*(exp(ALGEBRAIC(:,423)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,439)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,400) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,424) = ALGEBRAIC(:,408)+ALGEBRAIC(:,400);
    ALGEBRAIC(:,409) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,183).*STATES(:,89));
    ALGEBRAIC(:,441) = ALGEBRAIC(:,409);
    ALGEBRAIC(:,442) =  CONSTANTS(:,58).*(exp(ALGEBRAIC(:,424)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,441)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,443) = ALGEBRAIC(:,440) - ALGEBRAIC(:,442);
    ALGEBRAIC(:,425) = ALGEBRAIC(:,409)+ALGEBRAIC(:,400);
    ALGEBRAIC(:,410) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,184).*STATES(:,90));
    ALGEBRAIC(:,444) = ALGEBRAIC(:,410);
    ALGEBRAIC(:,445) =  CONSTANTS(:,59).*(exp(ALGEBRAIC(:,425)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,444)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,446) =  - ALGEBRAIC(:,445)+ALGEBRAIC(:,442);
    ALGEBRAIC(:,426) = ALGEBRAIC(:,410);
    ALGEBRAIC(:,399) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,190).*STATES(:,13));
    ALGEBRAIC(:,421) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,189).*STATES(:,12));
    ALGEBRAIC(:,411) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,185).*STATES(:,79));
    ALGEBRAIC(:,447) = ALGEBRAIC(:,399)+ALGEBRAIC(:,421)+ALGEBRAIC(:,411);
    ALGEBRAIC(:,448) =  CONSTANTS(:,60).*(exp(ALGEBRAIC(:,426)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,447)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,449) = ALGEBRAIC(:,445) - ALGEBRAIC(:,448);
    ALGEBRAIC(:,403) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,187).*STATES(:,10));
    ALGEBRAIC(:,427) = ALGEBRAIC(:,411)+ALGEBRAIC(:,403);
    ALGEBRAIC(:,412) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,186).*STATES(:,80));
    ALGEBRAIC(:,450) = ALGEBRAIC(:,412);
    ALGEBRAIC(:,451) =  CONSTANTS(:,61).*(exp(ALGEBRAIC(:,427)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,450)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,452) =  - ALGEBRAIC(:,451)+ALGEBRAIC(:,448);
    ALGEBRAIC(:,428) = ALGEBRAIC(:,412);
    ALGEBRAIC(:,406) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,172).*STATES(:,81));
    ALGEBRAIC(:,453) = ALGEBRAIC(:,406);
    ALGEBRAIC(:,455) =  CONSTANTS(:,62).*(exp(ALGEBRAIC(:,428)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,453)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,457) = ALGEBRAIC(:,451) - ALGEBRAIC(:,455);
    ALGEBRAIC(:,422) = ALGEBRAIC(:,406);
    ALGEBRAIC(:,401) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,413) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,173).*STATES(:,82));
    ALGEBRAIC(:,437) = ALGEBRAIC(:,401)+ALGEBRAIC(:,413);
    ALGEBRAIC(:,438) =  CONSTANTS(:,48).*(exp(ALGEBRAIC(:,422)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,437)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,458) =  - ALGEBRAIC(:,438)+ALGEBRAIC(:,455);
    ALGEBRAIC(:,429) = ALGEBRAIC(:,413);
    ALGEBRAIC(:,414) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,174).*STATES(:,83));
    ALGEBRAIC(:,454) = ALGEBRAIC(:,414)+ALGEBRAIC(:,401);
    ALGEBRAIC(:,456) =  CONSTANTS(:,49).*(exp(ALGEBRAIC(:,429)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,454)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,459) =  - ALGEBRAIC(:,456)+ALGEBRAIC(:,438);
    ALGEBRAIC(:,405) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,170).*STATES(:,6));
    ALGEBRAIC(:,430) = ALGEBRAIC(:,414)+ALGEBRAIC(:,405);
    ALGEBRAIC(:,415) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,175).*STATES(:,84));
    ALGEBRAIC(:,460) = ALGEBRAIC(:,415);
    ALGEBRAIC(:,461) =  CONSTANTS(:,50).*(exp(ALGEBRAIC(:,430)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,460)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,462) = ALGEBRAIC(:,456) - ALGEBRAIC(:,461);
    ALGEBRAIC(:,431) = ALGEBRAIC(:,415)+ALGEBRAIC(:,405);
    ALGEBRAIC(:,416) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,176).*STATES(:,85));
    ALGEBRAIC(:,463) = ALGEBRAIC(:,416);
    ALGEBRAIC(:,464) =  CONSTANTS(:,51).*(exp(ALGEBRAIC(:,431)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,463)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,465) = ALGEBRAIC(:,461) - ALGEBRAIC(:,464);
    ALGEBRAIC(:,432) = ALGEBRAIC(:,416)+ALGEBRAIC(:,405);
    ALGEBRAIC(:,398) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,466) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,177).*STATES(:,86))+ CONSTANTS(:,260).*ALGEBRAIC(:,398);
    ALGEBRAIC(:,467) =  CONSTANTS(:,52).*(exp(ALGEBRAIC(:,432)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,466)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,468) = ALGEBRAIC(:,464) - ALGEBRAIC(:,467);
    ALGEBRAIC(:,417) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,177).*STATES(:,86));
    ALGEBRAIC(:,433) = ALGEBRAIC(:,417);
    ALGEBRAIC(:,402) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,188).*STATES(:,11));
    ALGEBRAIC(:,418) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,178).*STATES(:,78));
    ALGEBRAIC(:,469) = ALGEBRAIC(:,418)+ALGEBRAIC(:,402);
    ALGEBRAIC(:,470) =  CONSTANTS(:,53).*(exp(ALGEBRAIC(:,433)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,469)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,471) = ALGEBRAIC(:,467) - ALGEBRAIC(:,470);
    ALGEBRAIC(:,434) = ALGEBRAIC(:,418);
    ALGEBRAIC(:,419) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,179).*STATES(:,91));
    ALGEBRAIC(:,472) = ALGEBRAIC(:,419);
    ALGEBRAIC(:,473) =  CONSTANTS(:,54).*(exp(ALGEBRAIC(:,434)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,472)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,474) = ALGEBRAIC(:,470) - ALGEBRAIC(:,473);
    ALGEBRAIC(:,435) = ALGEBRAIC(:,419);
    ALGEBRAIC(:,475) =  CONSTANTS(:,261).*ALGEBRAIC(:,398)+ CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7))+ CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,180).*STATES(:,92));
    ALGEBRAIC(:,476) =  CONSTANTS(:,55).*(exp(ALGEBRAIC(:,435)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,475)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,477) =  - ALGEBRAIC(:,476)+ALGEBRAIC(:,473);
    ALGEBRAIC(:,420) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,180).*STATES(:,92));
    ALGEBRAIC(:,436) = ALGEBRAIC(:,420);
    ALGEBRAIC(:,479) = ALGEBRAIC(:,407)+ALGEBRAIC(:,404);
    ALGEBRAIC(:,480) =  CONSTANTS(:,56).*(exp(ALGEBRAIC(:,436)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,479)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,481) = ALGEBRAIC(:,480) - ALGEBRAIC(:,440);
    ALGEBRAIC(:,482) = ALGEBRAIC(:,476) - ALGEBRAIC(:,480);
    ALGEBRAIC(:,501) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,164).*STATES(:,93));
    ALGEBRAIC(:,507) = ALGEBRAIC(:,501);
    ALGEBRAIC(:,500) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,170).*STATES(:,6));
    ALGEBRAIC(:,502) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,165).*STATES(:,94));
    ALGEBRAIC(:,513) =  CONSTANTS(:,258).*ALGEBRAIC(:,500)+ALGEBRAIC(:,502);
    ALGEBRAIC(:,514) =  CONSTANTS(:,41).*(exp(ALGEBRAIC(:,507)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,513)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,498) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,508) = ALGEBRAIC(:,502)+ALGEBRAIC(:,498);
    ALGEBRAIC(:,503) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,166).*STATES(:,95));
    ALGEBRAIC(:,515) = ALGEBRAIC(:,503);
    ALGEBRAIC(:,516) =  CONSTANTS(:,42).*(exp(ALGEBRAIC(:,508)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,515)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,518) = ALGEBRAIC(:,514) - ALGEBRAIC(:,516);
    ALGEBRAIC(:,509) = ALGEBRAIC(:,503);
    ALGEBRAIC(:,504) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,167).*STATES(:,96));
    ALGEBRAIC(:,517) = ALGEBRAIC(:,504);
    ALGEBRAIC(:,519) =  CONSTANTS(:,43).*(exp(ALGEBRAIC(:,509)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,517)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,521) = ALGEBRAIC(:,516) - ALGEBRAIC(:,519);
    ALGEBRAIC(:,510) = ALGEBRAIC(:,504);
    ALGEBRAIC(:,497) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,140).*STATES(:,2));
    ALGEBRAIC(:,505) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,168).*STATES(:,97));
    ALGEBRAIC(:,520) = ALGEBRAIC(:,505)+ALGEBRAIC(:,497);
    ALGEBRAIC(:,522) =  CONSTANTS(:,44).*(exp(ALGEBRAIC(:,510)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,520)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,524) =  - ALGEBRAIC(:,522)+ALGEBRAIC(:,519);
    ALGEBRAIC(:,499) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7));
    ALGEBRAIC(:,511) = ALGEBRAIC(:,505)+ CONSTANTS(:,257).*ALGEBRAIC(:,499);
    ALGEBRAIC(:,506) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,169).*STATES(:,98));
    ALGEBRAIC(:,523) = ALGEBRAIC(:,506);
    ALGEBRAIC(:,525) =  CONSTANTS(:,45).*(exp(ALGEBRAIC(:,511)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,523)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,527) =  - ALGEBRAIC(:,525)+ALGEBRAIC(:,522);
    ALGEBRAIC(:,496) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,512) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,169).*STATES(:,98))+ CONSTANTS(:,255).*CONSTANTS(:,307).*ALGEBRAIC(:,496);
    ALGEBRAIC(:,526) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,164).*STATES(:,93))+ CONSTANTS(:,256).*CONSTANTS(:,307).*ALGEBRAIC(:,496);
    ALGEBRAIC(:,528) =  CONSTANTS(:,46).*(exp(ALGEBRAIC(:,512)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,526)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,530) = ALGEBRAIC(:,528) - ALGEBRAIC(:,514);
    ALGEBRAIC(:,531) =  - ALGEBRAIC(:,528)+ALGEBRAIC(:,525);
    ALGEBRAIC(:,558) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,560) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,215).*STATES(:,14));
    ALGEBRAIC(:,561) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,216).*STATES(:,15));
    ALGEBRAIC(:,562) =  CONSTANTS(:,101).*(exp((ALGEBRAIC(:,558)+ALGEBRAIC(:,560))./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,561)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,559) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,140).*STATES(:,2));
    ALGEBRAIC(:,563) =  CONSTANTS(:,102).*(exp(ALGEBRAIC(:,561)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp((ALGEBRAIC(:,559)+ALGEBRAIC(:,560))./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,566) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,567) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,226).*STATES(:,48));
    ALGEBRAIC(:,570) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,229).*STATES(:,51));
    ALGEBRAIC(:,572) =  CONSTANTS(:,119).*(exp(ALGEBRAIC(:,570)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp((ALGEBRAIC(:,567)+ CONSTANTS(:,309).*ALGEBRAIC(:,566))./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,568) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,227).*STATES(:,49));
    ALGEBRAIC(:,573) =  CONSTANTS(:,120).*(exp((ALGEBRAIC(:,567)+ CONSTANTS(:,308).*ALGEBRAIC(:,566))./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,568)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,569) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,228).*STATES(:,50));
    ALGEBRAIC(:,574) =  CONSTANTS(:,121).*(exp((ALGEBRAIC(:,568)+ CONSTANTS(:,309).*ALGEBRAIC(:,566))./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,569)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,575) =  CONSTANTS(:,122).*(exp(ALGEBRAIC(:,569)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp((ALGEBRAIC(:,570)+ CONSTANTS(:,308).*ALGEBRAIC(:,566))./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,490) = ALGEBRAIC(:,448);
    ALGEBRAIC(:,582) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,189).*STATES(:,12));
    ALGEBRAIC(:,583) = CONSTANTS(:,314)+ALGEBRAIC(:,582);
    ALGEBRAIC(:,592) =  CONSTANTS(:,131).*(exp(CONSTANTS(:,326)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,583)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,593) = ALGEBRAIC(:,592);
    ALGEBRAIC(:,487) =  - ALGEBRAIC(:,451);
    ALGEBRAIC(:,581) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,187).*STATES(:,10));
    ALGEBRAIC(:,584) = CONSTANTS(:,314)+ALGEBRAIC(:,581);
    ALGEBRAIC(:,594) =  CONSTANTS(:,123).*(exp(ALGEBRAIC(:,584)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(CONSTANTS(:,327)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,595) =  - ALGEBRAIC(:,594);
    ALGEBRAIC(:,486) = ALGEBRAIC(:,470);
    ALGEBRAIC(:,580) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,188).*STATES(:,11));
    ALGEBRAIC(:,585) = ALGEBRAIC(:,580)+CONSTANTS(:,323);
    ALGEBRAIC(:,597) =  CONSTANTS(:,127).*(exp(CONSTANTS(:,328)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,585)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,598) = ALGEBRAIC(:,597);
    ALGEBRAIC(:,42) =  ( CONSTANTS(:,305).*CONSTANTS(:,306)).*log( CONSTANTS(:,217).*STATES(:,3));
    ALGEBRAIC(:,43) =  ( CONSTANTS(:,305).*CONSTANTS(:,306)).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,44) =  CONSTANTS(:,103).*(exp(ALGEBRAIC(:,42)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,43)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,565) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,217).*STATES(:,3));
    ALGEBRAIC(:,571) =  CONSTANTS(:,118).*exp(ALGEBRAIC(:,570)./( CONSTANTS(:,305).*CONSTANTS(:,306))).*(exp(ALGEBRAIC(:,565)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,566)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,578) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,217).*STATES(:,3));
    ALGEBRAIC(:,589) = CONSTANTS(:,324)+ CONSTANTS(:,311).*ALGEBRAIC(:,578);
    ALGEBRAIC(:,605) =  CONSTANTS(:,128).*(exp(CONSTANTS(:,332)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,589)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,609) =  CONSTANTS(:,311).*ALGEBRAIC(:,605);
    ALGEBRAIC(:,483) = ALGEBRAIC(:,448);
    ALGEBRAIC(:,579) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,190).*STATES(:,13));
    ALGEBRAIC(:,586) = CONSTANTS(:,317)+ALGEBRAIC(:,579);
    ALGEBRAIC(:,599) =  CONSTANTS(:,125).*(exp(ALGEBRAIC(:,586)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(CONSTANTS(:,329)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,588) = CONSTANTS(:,321)+ CONSTANTS(:,312).*ALGEBRAIC(:,579);
    ALGEBRAIC(:,602) =  CONSTANTS(:,126).*(exp(CONSTANTS(:,331)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,588)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,590) = CONSTANTS(:,324)+ CONSTANTS(:,312).*ALGEBRAIC(:,579);
    ALGEBRAIC(:,610) =  CONSTANTS(:,129).*(exp(ALGEBRAIC(:,590)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(CONSTANTS(:,333)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,591) = ALGEBRAIC(:,579)+CONSTANTS(:,322);
    ALGEBRAIC(:,613) =  CONSTANTS(:,130).*(exp(CONSTANTS(:,334)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,591)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,616) = (( CONSTANTS(:,312).*ALGEBRAIC(:,602) - ALGEBRAIC(:,599)) -  CONSTANTS(:,312).*ALGEBRAIC(:,610))+ALGEBRAIC(:,613);
    ALGEBRAIC(:,615) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,620) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,191).*STATES(:,52));
    ALGEBRAIC(:,621) = ALGEBRAIC(:,620)+ CONSTANTS(:,262).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,623) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,192).*STATES(:,53));
    ALGEBRAIC(:,624) = ALGEBRAIC(:,623)+ CONSTANTS(:,264).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,626) =  CONSTANTS(:,64).*(exp(ALGEBRAIC(:,621)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,624)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,622) = ALGEBRAIC(:,620)+ CONSTANTS(:,263).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,627) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,193).*STATES(:,54));
    ALGEBRAIC(:,629) = ALGEBRAIC(:,627)+ CONSTANTS(:,265).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,630) =  CONSTANTS(:,66).*(exp(ALGEBRAIC(:,622)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,629)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,631) =  - ALGEBRAIC(:,626) - ALGEBRAIC(:,630);
    ALGEBRAIC(:,37) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,38) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,140).*STATES(:,2));
    ALGEBRAIC(:,1) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,39) =  CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,1);
    ALGEBRAIC(:,40) = piecewise({ALGEBRAIC(:,39)==0.00000,  CONSTANTS(:,2).*(exp(ALGEBRAIC(:,37)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,38)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,2).*ALGEBRAIC(:,39))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,39)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,37)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,38)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,389) = ALGEBRAIC(:,388)+ALGEBRAIC(:,386);
    ALGEBRAIC(:,536) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,540) =  CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,538) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,539) = ALGEBRAIC(:,538)+ CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,537) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,140).*STATES(:,2));
    ALGEBRAIC(:,541) = ALGEBRAIC(:,537);
    ALGEBRAIC(:,542) = piecewise({ALGEBRAIC(:,540)==0.00000,  CONSTANTS(:,115).*(exp(ALGEBRAIC(:,539)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,541)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,115).*ALGEBRAIC(:,540))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,540)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,539)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,541)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,532) = ALGEBRAIC(:,522);
    ALGEBRAIC(:,619) =  CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,608) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,632) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,194).*STATES(:,55));
    ALGEBRAIC(:,633) = ALGEBRAIC(:,632)+ALGEBRAIC(:,608)+ALGEBRAIC(:,619);
    ALGEBRAIC(:,612) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,140).*STATES(:,2));
    ALGEBRAIC(:,634) = ALGEBRAIC(:,632)+ALGEBRAIC(:,612);
    ALGEBRAIC(:,635) = piecewise({ALGEBRAIC(:,619)==0.00000,  CONSTANTS(:,63).*(exp(ALGEBRAIC(:,633)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,634)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,63).*ALGEBRAIC(:,619))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,619)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,633)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,634)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,628) = ALGEBRAIC(:,627)+ CONSTANTS(:,262).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,637) = ALGEBRAIC(:,632)+ CONSTANTS(:,264).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,641) =  CONSTANTS(:,65).*(exp(ALGEBRAIC(:,628)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,637)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,643) = ALGEBRAIC(:,630) - ALGEBRAIC(:,641);
    ALGEBRAIC(:,625) = ALGEBRAIC(:,623)+ CONSTANTS(:,263).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,639) = ALGEBRAIC(:,632)+ CONSTANTS(:,265).*CONSTANTS(:,307).*ALGEBRAIC(:,615);
    ALGEBRAIC(:,644) =  CONSTANTS(:,67).*(exp(ALGEBRAIC(:,625)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,639)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,646) = ALGEBRAIC(:,626) - ALGEBRAIC(:,644);
    ALGEBRAIC(:,647) = ALGEBRAIC(:,641)+ALGEBRAIC(:,644);
    ALGEBRAIC(:,390) = (( (CONSTANTS(:,282)).*ALGEBRAIC(:,378)+ CONSTANTS(:,282).*ALGEBRAIC(:,382)+ CONSTANTS(:,282).*ALGEBRAIC(:,374)+ CONSTANTS(:,282).*ALGEBRAIC(:,370)+ CONSTANTS(:,282).*ALGEBRAIC(:,366)+ CONSTANTS(:,282).*ALGEBRAIC(:,385)) - ALGEBRAIC(:,386)) - ALGEBRAIC(:,388);
    ALGEBRAIC(:,533) =  - ALGEBRAIC(:,516);
    ALGEBRAIC(:,576) = (( CONSTANTS(:,309).*ALGEBRAIC(:,572) -  CONSTANTS(:,308).*ALGEBRAIC(:,573)) -  CONSTANTS(:,309).*ALGEBRAIC(:,574))+ CONSTANTS(:,308).*ALGEBRAIC(:,575);
    ALGEBRAIC(:,577) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,587) = CONSTANTS(:,317)+ CONSTANTS(:,310).*ALGEBRAIC(:,577);
    ALGEBRAIC(:,601) =  CONSTANTS(:,124).*(exp(ALGEBRAIC(:,587)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(CONSTANTS(:,330)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,604) =   - CONSTANTS(:,310).*ALGEBRAIC(:,601);
    ALGEBRAIC(:,636) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,195).*STATES(:,16));
    ALGEBRAIC(:,640) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,642) = ALGEBRAIC(:,640)+ALGEBRAIC(:,636);
    ALGEBRAIC(:,638) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,196).*STATES(:,17));
    ALGEBRAIC(:,645) = ALGEBRAIC(:,638);
    ALGEBRAIC(:,649) =  CONSTANTS(:,68).*(exp(ALGEBRAIC(:,642)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,645)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,652) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,654) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,239).*STATES(:,56));
    ALGEBRAIC(:,655) = ALGEBRAIC(:,654)+ CONSTANTS(:,266).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,657) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,240).*STATES(:,57));
    ALGEBRAIC(:,658) = ALGEBRAIC(:,657)+ CONSTANTS(:,268).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,660) =  CONSTANTS(:,133).*(exp(ALGEBRAIC(:,655)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,658)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,656) = ALGEBRAIC(:,654)+ CONSTANTS(:,267).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,661) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,241).*STATES(:,58));
    ALGEBRAIC(:,662) = ALGEBRAIC(:,661)+ CONSTANTS(:,269).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,664) =  CONSTANTS(:,135).*(exp(ALGEBRAIC(:,656)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,662)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,665) =  - ALGEBRAIC(:,660)+ALGEBRAIC(:,664);
    ALGEBRAIC(:,663) = ALGEBRAIC(:,661)+ CONSTANTS(:,266).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,666) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,242).*STATES(:,59));
    ALGEBRAIC(:,670) = ALGEBRAIC(:,666)+ CONSTANTS(:,268).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,672) =  CONSTANTS(:,134).*(exp(ALGEBRAIC(:,663)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,670)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,673) =  - ALGEBRAIC(:,672)+ALGEBRAIC(:,664);
    ALGEBRAIC(:,659) = ALGEBRAIC(:,657)+ CONSTANTS(:,267).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,671) = ALGEBRAIC(:,666)+ CONSTANTS(:,269).*CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,674) =  CONSTANTS(:,136).*(exp(ALGEBRAIC(:,659)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,671)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,675) = ALGEBRAIC(:,660) - ALGEBRAIC(:,674);
    ALGEBRAIC(:,676) = ALGEBRAIC(:,672)+ALGEBRAIC(:,674);
    ALGEBRAIC(:,682) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,683) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,682);
    ALGEBRAIC(:,678) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,686) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,214).*STATES(:,77));
    ALGEBRAIC(:,687) = ALGEBRAIC(:,686)+ALGEBRAIC(:,678)+ALGEBRAIC(:,683);
    ALGEBRAIC(:,679) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,688) = ALGEBRAIC(:,686)+ALGEBRAIC(:,679);
    ALGEBRAIC(:,691) = piecewise({ALGEBRAIC(:,683)==0.00000,  1.00000.*CONSTANTS(:,99).*(exp(ALGEBRAIC(:,687)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,688)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( 1.00000.*CONSTANTS(:,99).*ALGEBRAIC(:,683))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,683)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,687)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,688)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,160) = STATES(:,18)./CONSTANTS(:,293);
    ALGEBRAIC(:,164) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,160);
    ALGEBRAIC(:,162) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,163) = ALGEBRAIC(:,162)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,160);
    ALGEBRAIC(:,161) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,165) = ALGEBRAIC(:,161);
    ALGEBRAIC(:,166) = piecewise({ALGEBRAIC(:,164)==0.00000,  CONSTANTS(:,114).*(exp(ALGEBRAIC(:,163)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,165)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,114).*ALGEBRAIC(:,164))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,164)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,163)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,165)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,235) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,234);
    ALGEBRAIC(:,232) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,249) = ALGEBRAIC(:,248)+ALGEBRAIC(:,232)+ALGEBRAIC(:,235);
    ALGEBRAIC(:,233) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,250) = ALGEBRAIC(:,248)+ALGEBRAIC(:,233);
    ALGEBRAIC(:,251) = piecewise({ALGEBRAIC(:,235)==0.00000,  1.00000.*CONSTANTS(:,5).*(exp(ALGEBRAIC(:,249)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,250)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( 1.00000.*CONSTANTS(:,5).*ALGEBRAIC(:,235))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,235)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,249)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,250)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,263) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,262);
    ALGEBRAIC(:,260) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,272) = ALGEBRAIC(:,271)+ALGEBRAIC(:,260)+ALGEBRAIC(:,263);
    ALGEBRAIC(:,261) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,273) = ALGEBRAIC(:,271)+ALGEBRAIC(:,261);
    ALGEBRAIC(:,274) = piecewise({ALGEBRAIC(:,263)==0.00000,  1.00000.*CONSTANTS(:,10).*(exp(ALGEBRAIC(:,272)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,273)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( 1.00000.*CONSTANTS(:,10).*ALGEBRAIC(:,263))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,263)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,272)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,273)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,397) =  - ALGEBRAIC(:,391) - ALGEBRAIC(:,393);
    ALGEBRAIC(:,485) = ALGEBRAIC(:,438)+ALGEBRAIC(:,456);
    ALGEBRAIC(:,554) =  CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,552) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,553) = ALGEBRAIC(:,552)+ CONSTANTS(:,244).*CONSTANTS(:,307).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,551) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,555) = ALGEBRAIC(:,551);
    ALGEBRAIC(:,556) = piecewise({ALGEBRAIC(:,554)==0.00000,  CONSTANTS(:,117).*(exp(ALGEBRAIC(:,553)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,555)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,117).*ALGEBRAIC(:,554))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,554)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,553)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,555)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,653) =  CONSTANTS(:,307).*ALGEBRAIC(:,652);
    ALGEBRAIC(:,650) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,141).*STATES(:,8));
    ALGEBRAIC(:,667) = ALGEBRAIC(:,666)+ALGEBRAIC(:,650)+ALGEBRAIC(:,653);
    ALGEBRAIC(:,651) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,142).*STATES(:,9));
    ALGEBRAIC(:,668) = ALGEBRAIC(:,666)+ALGEBRAIC(:,651);
    ALGEBRAIC(:,669) = piecewise({ALGEBRAIC(:,653)==0.00000,  1.00000.*CONSTANTS(:,132).*(exp(ALGEBRAIC(:,667)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,668)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( 1.00000.*CONSTANTS(:,132).*ALGEBRAIC(:,653))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,653)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,667)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,668)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,396) = ALGEBRAIC(:,393)+ALGEBRAIC(:,391);
    ALGEBRAIC(:,484) =  - ALGEBRAIC(:,442) - ALGEBRAIC(:,445);
    ALGEBRAIC(:,684) =  CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,682);
    ALGEBRAIC(:,680) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,170).*STATES(:,6));
    ALGEBRAIC(:,689) = ALGEBRAIC(:,686)+ALGEBRAIC(:,680)+ALGEBRAIC(:,684);
    ALGEBRAIC(:,681) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7));
    ALGEBRAIC(:,690) = ALGEBRAIC(:,686)+ALGEBRAIC(:,681);
    ALGEBRAIC(:,692) = piecewise({ALGEBRAIC(:,684)==0.00000,  1.00000.*CONSTANTS(:,98).*(exp(ALGEBRAIC(:,689)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,690)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( 1.00000.*CONSTANTS(:,98).*ALGEBRAIC(:,684))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,684)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,689)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,690)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,489) =  - ALGEBRAIC(:,461) - (ALGEBRAIC(:,464)+ALGEBRAIC(:,467));
    ALGEBRAIC(:,491) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,170).*STATES(:,6));
    ALGEBRAIC(:,492) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7));
    ALGEBRAIC(:,493) =  CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,1);
    ALGEBRAIC(:,494) = piecewise({ALGEBRAIC(:,493)==0.00000,  CONSTANTS(:,47).*(exp(ALGEBRAIC(:,491)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,492)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,47).*ALGEBRAIC(:,493))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,493)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,491)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,492)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,547) =  CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,545) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,170).*STATES(:,6));
    ALGEBRAIC(:,546) = ALGEBRAIC(:,545)+ CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,544) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,171).*STATES(:,7));
    ALGEBRAIC(:,548) = ALGEBRAIC(:,544);
    ALGEBRAIC(:,549) = piecewise({ALGEBRAIC(:,547)==0.00000,  CONSTANTS(:,116).*(exp(ALGEBRAIC(:,546)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,548)./( CONSTANTS(:,305).*CONSTANTS(:,306)))) },  ((( CONSTANTS(:,116).*ALGEBRAIC(:,547))./( CONSTANTS(:,305).*CONSTANTS(:,306)))./(exp(ALGEBRAIC(:,547)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - 1.00000)).*(exp(ALGEBRAIC(:,546)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,548)./( CONSTANTS(:,305).*CONSTANTS(:,306)))));
    ALGEBRAIC(:,535) =  CONSTANTS(:,258).*ALGEBRAIC(:,514);
    ALGEBRAIC(:,488) = ALGEBRAIC(:,476)+ALGEBRAIC(:,480)+ALGEBRAIC(:,440);
    ALGEBRAIC(:,534) =   - CONSTANTS(:,257).*ALGEBRAIC(:,525);
    ALGEBRAIC(:,685) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,213).*STATES(:,76));
    ALGEBRAIC(:,693) = ALGEBRAIC(:,685)+ CONSTANTS(:,276).*CONSTANTS(:,307).*ALGEBRAIC(:,682);
    ALGEBRAIC(:,694) = ALGEBRAIC(:,686)+ CONSTANTS(:,277).*CONSTANTS(:,307).*ALGEBRAIC(:,682);
    ALGEBRAIC(:,695) =  CONSTANTS(:,100).*(exp(ALGEBRAIC(:,693)./( CONSTANTS(:,305).*CONSTANTS(:,306))) - exp(ALGEBRAIC(:,694)./( CONSTANTS(:,305).*CONSTANTS(:,306))));
    ALGEBRAIC(:,35) = VOI -  floor(VOI./CONSTANTS(:,303)).*CONSTANTS(:,303);
    ALGEBRAIC(:,36) = piecewise({ALGEBRAIC(:,35)>=0.300000&ALGEBRAIC(:,35)<=0.300000+CONSTANTS(:,304), ( 1.00000.*0.0750000.*CONSTANTS(:,293))./CONSTANTS(:,304) }, 0.00000);
    ALGEBRAIC(:,41) =   - CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,40);
    ALGEBRAIC(:,159) =  CONSTANTS(:,307).*(((((((((((((((((((((((((((((  - CONSTANTS(:,259).*ALGEBRAIC(:,157)+ CONSTANTS(:,275).*ALGEBRAIC(:,119)) -  CONSTANTS(:,272).*ALGEBRAIC(:,119)+ CONSTANTS(:,275).*ALGEBRAIC(:,131)) -  CONSTANTS(:,272).*ALGEBRAIC(:,131)+ CONSTANTS(:,275).*ALGEBRAIC(:,125)) -  CONSTANTS(:,272).*ALGEBRAIC(:,125)+ CONSTANTS(:,275).*ALGEBRAIC(:,137)) -  CONSTANTS(:,272).*ALGEBRAIC(:,137)+ CONSTANTS(:,275).*ALGEBRAIC(:,151)) -  CONSTANTS(:,272).*ALGEBRAIC(:,151)+ CONSTANTS(:,273).*ALGEBRAIC(:,87)) -  CONSTANTS(:,270).*ALGEBRAIC(:,87)+ CONSTANTS(:,273).*ALGEBRAIC(:,95)) -  CONSTANTS(:,270).*ALGEBRAIC(:,95)+ CONSTANTS(:,274).*ALGEBRAIC(:,107)) -  CONSTANTS(:,271).*ALGEBRAIC(:,107)+ CONSTANTS(:,274).*ALGEBRAIC(:,111)) -  CONSTANTS(:,271).*ALGEBRAIC(:,111)+ CONSTANTS(:,274).*ALGEBRAIC(:,115)) -  CONSTANTS(:,271).*ALGEBRAIC(:,115)+ CONSTANTS(:,275).*ALGEBRAIC(:,143)) -  CONSTANTS(:,272).*ALGEBRAIC(:,143)+ CONSTANTS(:,273).*ALGEBRAIC(:,91)) -  CONSTANTS(:,270).*ALGEBRAIC(:,91)+ CONSTANTS(:,273).*ALGEBRAIC(:,99)) -  CONSTANTS(:,270).*ALGEBRAIC(:,99)+ CONSTANTS(:,274).*ALGEBRAIC(:,103)) -  CONSTANTS(:,271).*ALGEBRAIC(:,103)+ CONSTANTS(:,275).*ALGEBRAIC(:,122)) -  CONSTANTS(:,272).*ALGEBRAIC(:,122)+ CONSTANTS(:,275).*ALGEBRAIC(:,134)) -  CONSTANTS(:,272).*ALGEBRAIC(:,134)+ CONSTANTS(:,275).*ALGEBRAIC(:,128)) -  CONSTANTS(:,272).*ALGEBRAIC(:,128)+ CONSTANTS(:,275).*ALGEBRAIC(:,140)) -  CONSTANTS(:,272).*ALGEBRAIC(:,140)+ CONSTANTS(:,275).*ALGEBRAIC(:,155)) -  CONSTANTS(:,272).*ALGEBRAIC(:,155)+ CONSTANTS(:,273).*ALGEBRAIC(:,89)) -  CONSTANTS(:,270).*ALGEBRAIC(:,89)+ CONSTANTS(:,273).*ALGEBRAIC(:,97)) -  CONSTANTS(:,270).*ALGEBRAIC(:,97)+ CONSTANTS(:,274).*ALGEBRAIC(:,105)) -  CONSTANTS(:,271).*ALGEBRAIC(:,105)+ CONSTANTS(:,274).*ALGEBRAIC(:,109)) -  CONSTANTS(:,271).*ALGEBRAIC(:,109)+ CONSTANTS(:,274).*ALGEBRAIC(:,113)) -  CONSTANTS(:,271).*ALGEBRAIC(:,113)+ CONSTANTS(:,274).*ALGEBRAIC(:,117)) -  CONSTANTS(:,271).*ALGEBRAIC(:,117)+ CONSTANTS(:,275).*ALGEBRAIC(:,147)) -  CONSTANTS(:,272).*ALGEBRAIC(:,147)+ CONSTANTS(:,273).*ALGEBRAIC(:,93)) -  CONSTANTS(:,270).*ALGEBRAIC(:,93)+ CONSTANTS(:,273).*ALGEBRAIC(:,101)) -  CONSTANTS(:,270).*ALGEBRAIC(:,101));
    ALGEBRAIC(:,696) =  CONSTANTS(:,307).*((  - CONSTANTS(:,244).*ALGEBRAIC(:,691)+ CONSTANTS(:,259).*ALGEBRAIC(:,692)+ CONSTANTS(:,277).*ALGEBRAIC(:,695)) -  CONSTANTS(:,276).*ALGEBRAIC(:,695));
    ALGEBRAIC(:,217) =  CONSTANTS(:,307).*((((((((((((((  - CONSTANTS(:,244).*ALGEBRAIC(:,215)+ CONSTANTS(:,291).*ALGEBRAIC(:,209)) -  CONSTANTS(:,289).*ALGEBRAIC(:,209))+ CONSTANTS(:,291).*ALGEBRAIC(:,205)) -  CONSTANTS(:,289).*ALGEBRAIC(:,205))+ CONSTANTS(:,290).*ALGEBRAIC(:,201)) -  CONSTANTS(:,288).*ALGEBRAIC(:,201))+ CONSTANTS(:,290).*ALGEBRAIC(:,197)) -  CONSTANTS(:,288).*ALGEBRAIC(:,197))+ CONSTANTS(:,291).*ALGEBRAIC(:,213)) -  CONSTANTS(:,289).*ALGEBRAIC(:,213))+ CONSTANTS(:,290).*ALGEBRAIC(:,203)) -  CONSTANTS(:,288).*ALGEBRAIC(:,203))+ CONSTANTS(:,290).*ALGEBRAIC(:,199)) -  CONSTANTS(:,288).*ALGEBRAIC(:,199));
    ALGEBRAIC(:,167) =  CONSTANTS(:,307).* - CONSTANTS(:,244).*ALGEBRAIC(:,166);
    ALGEBRAIC(:,181) =  CONSTANTS(:,307).*((  - CONSTANTS(:,244).*ALGEBRAIC(:,179)+ CONSTANTS(:,246).*ALGEBRAIC(:,177)) -  CONSTANTS(:,245).*ALGEBRAIC(:,177));
    ALGEBRAIC(:,231) =  CONSTANTS(:,307).*((  - CONSTANTS(:,244).*ALGEBRAIC(:,229)+ CONSTANTS(:,248).*ALGEBRAIC(:,227)) -  CONSTANTS(:,247).*ALGEBRAIC(:,227));
    ALGEBRAIC(:,259) =  CONSTANTS(:,307).*(  - CONSTANTS(:,244).*ALGEBRAIC(:,251)+ ALGEBRAIC(:,242).*(CONSTANTS(:,250) - CONSTANTS(:,249))+ ALGEBRAIC(:,254).*(CONSTANTS(:,250) - CONSTANTS(:,250))+ ALGEBRAIC(:,246).*(CONSTANTS(:,252) - CONSTANTS(:,251))+ ALGEBRAIC(:,256).*(CONSTANTS(:,252) - CONSTANTS(:,251)));
    ALGEBRAIC(:,279) =  CONSTANTS(:,307).*(  - CONSTANTS(:,244).*ALGEBRAIC(:,274)+ (ALGEBRAIC(:,269)+ALGEBRAIC(:,276)).*(CONSTANTS(:,254) - CONSTANTS(:,253)));
    ALGEBRAIC(:,395) =  CONSTANTS(:,307).*(((((((((((((((((((( CONSTANTS(:,285).*ALGEBRAIC(:,352) -  CONSTANTS(:,280).*ALGEBRAIC(:,352))+ CONSTANTS(:,286).*ALGEBRAIC(:,360) -  CONSTANTS(:,281).*ALGEBRAIC(:,360))+ CONSTANTS(:,284).*ALGEBRAIC(:,348) -  CONSTANTS(:,279).*ALGEBRAIC(:,348))+ CONSTANTS(:,285).*ALGEBRAIC(:,356) -  CONSTANTS(:,280).*ALGEBRAIC(:,356))+ CONSTANTS(:,286).*ALGEBRAIC(:,364) -  CONSTANTS(:,281).*ALGEBRAIC(:,364))+ CONSTANTS(:,284).*ALGEBRAIC(:,344) -  CONSTANTS(:,279).*ALGEBRAIC(:,344))+ CONSTANTS(:,283).*ALGEBRAIC(:,340) -  CONSTANTS(:,278).*ALGEBRAIC(:,340))+ CONSTANTS(:,283).*ALGEBRAIC(:,336) -  CONSTANTS(:,278).*ALGEBRAIC(:,336))+ CONSTANTS(:,283).*ALGEBRAIC(:,332) -  CONSTANTS(:,278).*ALGEBRAIC(:,332))+ CONSTANTS(:,286).*ALGEBRAIC(:,362) -  CONSTANTS(:,281).*ALGEBRAIC(:,362))+ CONSTANTS(:,285).*ALGEBRAIC(:,354) -  CONSTANTS(:,280).*ALGEBRAIC(:,354))+ CONSTANTS(:,284).*ALGEBRAIC(:,346) -  CONSTANTS(:,279).*ALGEBRAIC(:,346))+ CONSTANTS(:,286).*ALGEBRAIC(:,358) -  CONSTANTS(:,281).*ALGEBRAIC(:,358))+ CONSTANTS(:,285).*ALGEBRAIC(:,350) -  CONSTANTS(:,280).*ALGEBRAIC(:,350))+ CONSTANTS(:,284).*ALGEBRAIC(:,342) -  CONSTANTS(:,279).*ALGEBRAIC(:,342))+ CONSTANTS(:,283).*ALGEBRAIC(:,338) -  CONSTANTS(:,278).*ALGEBRAIC(:,338))+ CONSTANTS(:,283).*ALGEBRAIC(:,334) -  CONSTANTS(:,278).*ALGEBRAIC(:,334))+ CONSTANTS(:,283).*ALGEBRAIC(:,330) -  CONSTANTS(:,278).*ALGEBRAIC(:,330)) - ( CONSTANTS(:,243).*ALGEBRAIC(:,386)+ CONSTANTS(:,243).*ALGEBRAIC(:,388))) - ( CONSTANTS(:,244).*ALGEBRAIC(:,391)+ CONSTANTS(:,244).*ALGEBRAIC(:,393)));
    ALGEBRAIC(:,478) =  CONSTANTS(:,261).*ALGEBRAIC(:,476)+ CONSTANTS(:,260).*ALGEBRAIC(:,467);
    ALGEBRAIC(:,495) =   - CONSTANTS(:,259).*CONSTANTS(:,307).*ALGEBRAIC(:,494);
    ALGEBRAIC(:,543) =  CONSTANTS(:,307).* - CONSTANTS(:,243).*ALGEBRAIC(:,542);
    ALGEBRAIC(:,550) =  CONSTANTS(:,307).* - CONSTANTS(:,259).*ALGEBRAIC(:,549);
    ALGEBRAIC(:,557) =  CONSTANTS(:,307).* - CONSTANTS(:,244).*ALGEBRAIC(:,556);
    ALGEBRAIC(:,529) =  CONSTANTS(:,307).*(  - CONSTANTS(:,255).*ALGEBRAIC(:,528)+ CONSTANTS(:,256).*ALGEBRAIC(:,528));
    ALGEBRAIC(:,564) =   - CONSTANTS(:,243).*CONSTANTS(:,307).*ALGEBRAIC(:,563);
    ALGEBRAIC(:,648) =  CONSTANTS(:,307).*(  - CONSTANTS(:,243).*ALGEBRAIC(:,635)+ ALGEBRAIC(:,626).*(CONSTANTS(:,264) - CONSTANTS(:,262))+ ALGEBRAIC(:,641).*(CONSTANTS(:,264) - CONSTANTS(:,262))+ ALGEBRAIC(:,630).*(CONSTANTS(:,265) - CONSTANTS(:,263))+ ALGEBRAIC(:,644).*(CONSTANTS(:,265) - CONSTANTS(:,263)));
    ALGEBRAIC(:,677) =  CONSTANTS(:,307).*(  - CONSTANTS(:,244).*ALGEBRAIC(:,669)+ (ALGEBRAIC(:,660)+ALGEBRAIC(:,672)).*(CONSTANTS(:,268) - CONSTANTS(:,266))+ (ALGEBRAIC(:,664)+ALGEBRAIC(:,674)).*(CONSTANTS(:,269) - CONSTANTS(:,267)));
    ALGEBRAIC(:,2) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,197).*STATES(:,60));
    ALGEBRAIC(:,3) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,201).*STATES(:,64));
    ALGEBRAIC(:,4) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,198).*STATES(:,61));
    ALGEBRAIC(:,5) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,202).*STATES(:,65));
    ALGEBRAIC(:,6) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,199).*STATES(:,62));
    ALGEBRAIC(:,7) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,203).*STATES(:,66));
    ALGEBRAIC(:,8) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,200).*STATES(:,63));
    ALGEBRAIC(:,9) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,204).*STATES(:,67));
    ALGEBRAIC(:,10) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,205).*STATES(:,68));
    ALGEBRAIC(:,11) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,209).*STATES(:,72));
    ALGEBRAIC(:,12) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,206).*STATES(:,69));
    ALGEBRAIC(:,13) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,210).*STATES(:,73));
    ALGEBRAIC(:,14) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,207).*STATES(:,70));
    ALGEBRAIC(:,15) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,211).*STATES(:,74));
    ALGEBRAIC(:,16) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,208).*STATES(:,71));
    ALGEBRAIC(:,17) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,143).*STATES(:,25));
    ALGEBRAIC(:,18) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,218).*STATES(:,19));
    ALGEBRAIC(:,19) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,221).*STATES(:,22));
    ALGEBRAIC(:,20) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,219).*STATES(:,20));
    ALGEBRAIC(:,21) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,222).*STATES(:,23));
    ALGEBRAIC(:,22) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,220).*STATES(:,21));
    ALGEBRAIC(:,23) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,224).*STATES(:,27));
    ALGEBRAIC(:,24) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,158).*STATES(:,42));
    ALGEBRAIC(:,25) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,159).*STATES(:,43));
    ALGEBRAIC(:,26) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,160).*STATES(:,44));
    ALGEBRAIC(:,27) =  CONSTANTS(:,305).*CONSTANTS(:,306).*log( CONSTANTS(:,161).*STATES(:,45));
    ALGEBRAIC(:,28) =  CONSTANTS(:,309).*STATES(:,51)+ CONSTANTS(:,308).*STATES(:,49)+ (CONSTANTS(:,308)+CONSTANTS(:,309)).*STATES(:,50);
    ALGEBRAIC(:,29) = STATES(:,1)./CONSTANTS(:,313);
    ALGEBRAIC(:,30) = STATES(:,3)./CONSTANTS(:,316);
    ALGEBRAIC(:,31) = STATES(:,13)./CONSTANTS(:,318);
    ALGEBRAIC(:,32) = STATES(:,11)./CONSTANTS(:,313);
    ALGEBRAIC(:,33) = STATES(:,10)./CONSTANTS(:,313);
    ALGEBRAIC(:,34) = STATES(:,12)./CONSTANTS(:,313);
    ALGEBRAIC(:,596) = ALGEBRAIC(:,592) - ALGEBRAIC(:,594);
    ALGEBRAIC(:,600) = ALGEBRAIC(:,599);
    ALGEBRAIC(:,603) = ALGEBRAIC(:,594) - ALGEBRAIC(:,601);
    ALGEBRAIC(:,606) = ALGEBRAIC(:,601) - ALGEBRAIC(:,602);
    ALGEBRAIC(:,607) = ALGEBRAIC(:,602) - ALGEBRAIC(:,597);
    ALGEBRAIC(:,611) = ALGEBRAIC(:,597) - ALGEBRAIC(:,605);
    ALGEBRAIC(:,614) = ALGEBRAIC(:,605) - ALGEBRAIC(:,610);
    ALGEBRAIC(:,617) = ALGEBRAIC(:,610) - ALGEBRAIC(:,613);
    ALGEBRAIC(:,618) = ALGEBRAIC(:,613) - ALGEBRAIC(:,592);
end

% Compute result of a piecewise function
function x = piecewise(cases, default)
    set = [0];
    for i = 1:2:length(cases)
        if (length(cases{i+1}) == 1)
            x(cases{i} & ~set,:) = cases{i+1};
        else
            x(cases{i} & ~set,:) = cases{i+1}(cases{i} & ~set);
        end
        set = set | cases{i};
        if(set), break, end
    end
    if (length(default) == 1)
        x(~set,:) = default;
    else
        x(~set,:) = default(~set);
    end
end

% Pad out or shorten strings to a set length
function strout = strpad(strin)
    req_length = 160;
    insize = size(strin,2);
    if insize > req_length
        strout = strin(1:req_length);
    else
        strout = [strin, blanks(req_length - insize)];
    end
end

