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 =677;
end
% There are a total of 100 entries in each of the rate and state variable arrays.
% There are a total of 341 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, 4e-12];

    % 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)',...
        '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
        plot_selected(i_st,VOI,STATES,'s',LEGEND_STATES,'STATES',ceil(sqrt(length(i_st))))
    end
    plot_selected(i_alg,VOI,ALGEBRAIC,'s',LEGEND_ALGEBRAIC,'ALGEBRAIC',ceil(sqrt(length(i_alg))))

    % fluxes
    if true
        vlabels = {'v_CaB in component CaB (fmol_per_sec)', ...
            'v_leak in component Ca_leak (fmol_per_sec)', ...
            'v_b2 in component CMDN_buffer (fmol_per_sec)', ...
            'v_Na in component fast_Na (fmol_per_sec)', ...
            'v_funny_Na in component funny (fmol_per_sec)', ...
            'v_funny_K in component funny (fmol_per_sec)', ...
            'v_K1 in component K1 (fmol_per_sec)', ...
            'v_Kp in component Kp (fmol_per_sec)', ...
            'v_Kr in component Kr (fmol_per_sec)', ...
            'v_Ks in component Ks (fmol_per_sec)', ...
            'v_Ca_i_LCC in component LCC (fmol_per_sec)', ...
            'v_K_i_LCC in component LCC (fmol_per_sec)', ...
            'v_K_i_NaK in component NaK (fmol_per_sec)', ...
            'v_Na_i_NaK in component NaK (fmol_per_sec)', ...
            'v_H_NaK in component NaK (fmol_per_sec)', ...
            'v_MgADP_NaK in component NaK (fmol_per_sec)', ...
            'v_MgATP_NaK in component NaK (fmol_per_sec)', ...
            'v_Pi_NaK in component NaK (fmol_per_sec)', ...
            'v_NaB in component NaB (fmol_per_sec)', ...
            'v_Ca_i_NCX in component NCX (fmol_per_sec)', ...
            'v_Na_i_NCX in component NCX (fmol_per_sec)', ...
            'v_pCa_R1 in component pCa (fmol_per_sec)', ...
            'v_pCa_R2 in component pCa (fmol_per_sec)', ...
            'v_RyR in component RyR (fmol_per_sec)', ...
            'v_Ca_i_SERCA in component SERCA (fmol_per_sec)', ...
            'v_H_SERCA in component SERCA (fmol_per_sec)', ...
            'v_MgADP_SERCA in component SERCA (fmol_per_sec)', ...
            'v_MgATP_SERCA in component SERCA (fmol_per_sec)', ...
            'v_Pi_SERCA in component SERCA (fmol_per_sec)', ...
            'v_TCC in component TCC (fmol_per_sec)', ...
            'v_to in component to (fmol_per_sec)', ...
            'v_b1 in component TRPN_buffer (fmol_per_sec)'};
        [~, i_st, i_alg] = find_indices(vlabels, cellstr(LEGEND_CONSTANTS), cellstr(LEGEND_STATES), cellstr(LEGEND_ALGEBRAIC));
        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
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;
    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
    suptitle(titlestr)    
end

function [LEGEND_STATES, LEGEND_ALGEBRAIC, LEGEND_VOI, LEGEND_CONSTANTS] = createLegends()
    LEGEND_STATES = ''; LEGEND_ALGEBRAIC = ''; LEGEND_VOI = ''; LEGEND_CONSTANTS = '';
    LEGEND_CONSTANTS(:,1) = strpad('kappa_CaB in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,2) = strpad('kappa_leak in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,3) = strpad('kappa_b2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,4) = strpad('kappa_Na in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,5) = strpad('kappa_m000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,6) = strpad('kappa_m001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,7) = strpad('kappa_m010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,8) = strpad('kappa_m011 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,9) = strpad('kappa_m100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,10) = strpad('kappa_m101 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,11) = strpad('kappa_m110 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,12) = strpad('kappa_m111 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,13) = strpad('kappa_m200 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,14) = strpad('kappa_m201 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,15) = strpad('kappa_m210 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,16) = strpad('kappa_m211 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,17) = strpad('kappa_h000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,18) = strpad('kappa_h001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,19) = strpad('kappa_h100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,20) = strpad('kappa_h101 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,21) = strpad('kappa_h200 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,22) = strpad('kappa_h201 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,23) = strpad('kappa_h300 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,24) = strpad('kappa_h301 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,25) = strpad('kappa_j000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,26) = strpad('kappa_j010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,27) = strpad('kappa_j100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,28) = strpad('kappa_j110 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,29) = strpad('kappa_j200 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,30) = strpad('kappa_j210 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,31) = strpad('kappa_j300 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,32) = strpad('kappa_j310 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,33) = strpad('kappa_funny_Na in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,34) = strpad('kappa_funny_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,35) = strpad('kappa_R_xf in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,36) = strpad('kappa_K1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,37) = strpad('kappa_gK1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,38) = strpad('kappa_Kp in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,39) = strpad('kappa_gKp in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,40) = strpad('kappa_Kr in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,41) = strpad('kappa_rC3 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,42) = strpad('kappa_rC2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,43) = strpad('kappa_rC1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,44) = strpad('kappa_rC1IF in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,45) = strpad('kappa_rOIF in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,46) = strpad('kappa_Ks in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,47) = strpad('kappa_x10 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,48) = strpad('kappa_x11 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,49) = strpad('kappa_x20 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,50) = strpad('kappa_x21 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,51) = strpad('kappa_LCC_Ca1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,52) = strpad('kappa_LCC_Ca2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,53) = strpad('kappa_LCC_K1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,54) = strpad('kappa_LCC_K2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,55) = strpad('kappa_d000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,56) = strpad('kappa_d010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,57) = strpad('kappa_d020 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,58) = strpad('kappa_d001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,59) = strpad('kappa_d011 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,60) = strpad('kappa_d021 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,61) = strpad('kappa_f1_000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,62) = strpad('kappa_f1_100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,63) = strpad('kappa_f1_001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,64) = strpad('kappa_f1_101 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,65) = strpad('kappa_f2_000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,66) = strpad('kappa_f2_100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,67) = strpad('kappa_f2_001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,68) = strpad('kappa_f2_101 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,69) = strpad('kappa_f3_010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,70) = strpad('kappa_f3_110 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,71) = strpad('kappa_f3_011 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,72) = strpad('kappa_f3_111 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,73) = strpad('kappa_fCa000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,74) = strpad('kappa_fCa100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,75) = strpad('kappa_fCa010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,76) = strpad('kappa_fCa110 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,77) = strpad('kappa_fCa020 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,78) = strpad('kappa_fCa120 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,79) = strpad('kappa_1_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,80) = strpad('kappa_2_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,81) = strpad('kappa_3_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,82) = strpad('kappa_4_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,83) = strpad('kappa_5_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,84) = strpad('kappa_6_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,85) = strpad('kappa_7_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,86) = strpad('kappa_8_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,87) = strpad('kappa_9_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,88) = strpad('kappa_10_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,89) = strpad('kappa_11_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,90) = strpad('kappa_12_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,91) = strpad('kappa_13_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,92) = strpad('kappa_14_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,93) = strpad('kappa_15_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,94) = strpad('kappa_NaB in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,95) = strpad('kappa_1_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,96) = strpad('kappa_2_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,97) = strpad('kappa_3_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,98) = strpad('kappa_4_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,99) = strpad('kappa_5_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,100) = strpad('kappa_6_NCX 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_RyR in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,104) = strpad('kappa_OC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,105) = strpad('kappa_CCI in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,106) = strpad('kappa_CII in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,107) = strpad('kappa_IO in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,108) = strpad('kappa_SERCA_R1_2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,109) = strpad('kappa_SERCA_R2_4 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,110) = strpad('kappa_SERCA_R2_2a in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,111) = strpad('kappa_SERCA_R4_5 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,112) = strpad('kappa_SERCA_R5_6 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,113) = strpad('kappa_SERCA_R6_8 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,114) = strpad('kappa_SERCA_R8_9 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,115) = strpad('kappa_SERCA_R9_10 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,116) = strpad('kappa_SERCA_R10_1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,117) = strpad('kappa_TCC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,118) = strpad('kappa_b00 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,119) = strpad('kappa_b01 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,120) = strpad('kappa_b10 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,121) = strpad('kappa_b11 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,122) = strpad('kappa_g00 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,123) = strpad('kappa_g10 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,124) = strpad('kappa_g20 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,125) = strpad('kappa_to in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,126) = strpad('kappa_z00 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,127) = strpad('kappa_z01 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,128) = strpad('kappa_z10 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,129) = strpad('kappa_z11 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,130) = strpad('kappa_z20 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,131) = strpad('kappa_z21 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,132) = strpad('kappa_y00 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,133) = strpad('kappa_y10 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,134) = strpad('kappa_y20 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,135) = strpad('kappa_y30 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,136) = strpad('kappa_b1 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_Ca_o in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,139) = strpad('K_Ca_SR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,140) = strpad('K_CMDN in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,141) = strpad('K_CMDN_Ca in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,142) = strpad('K_Na_i in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,143) = strpad('K_Na_o in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,144) = strpad('K_000_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,145) = strpad('K_100_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,146) = strpad('K_200_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,147) = strpad('K_300_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,148) = strpad('K_010_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,149) = strpad('K_110_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,150) = strpad('K_210_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,151) = strpad('K_310_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,152) = strpad('K_001_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,153) = strpad('K_101_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,154) = strpad('K_201_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,155) = strpad('K_301_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,156) = strpad('K_011_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,157) = strpad('K_111_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,158) = strpad('K_211_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,159) = strpad('K_311_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,160) = strpad('K_K_i in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,161) = strpad('K_K_o in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,162) = strpad('K_x0_funny in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,163) = strpad('K_x1_funny in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,164) = strpad('K_C_K1 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,165) = strpad('K_O_K1 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,166) = strpad('K_C_Kp in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,167) = strpad('K_O_Kp in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,168) = strpad('K_C3 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,169) = strpad('K_C2 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,170) = strpad('K_C1 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,171) = strpad('K_O in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,172) = strpad('K_I in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,173) = strpad('K_Sa in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,174) = strpad('K_Sb in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,175) = strpad('K_Sc in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,176) = strpad('K_Sd in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,177) = strpad('K_000_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,178) = strpad('K_010_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,179) = strpad('K_020_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,180) = strpad('K_100_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,181) = strpad('K_110_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,182) = strpad('K_120_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,183) = strpad('K_001_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,184) = strpad('K_011_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,185) = strpad('K_021_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,186) = strpad('K_101_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,187) = strpad('K_111_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,188) = strpad('K_121_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,189) = strpad('K_1_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,190) = strpad('K_2_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,191) = strpad('K_3_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,192) = strpad('K_4_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,193) = strpad('K_5_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,194) = strpad('K_6_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,195) = strpad('K_7_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,196) = strpad('K_8_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,197) = strpad('K_9_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,198) = strpad('K_10_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,199) = strpad('K_11_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,200) = strpad('K_12_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,201) = strpad('K_13_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,202) = strpad('K_14_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,203) = strpad('K_15_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,204) = strpad('K_MgATP in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,205) = strpad('K_MgADP in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,206) = strpad('K_Pi in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,207) = strpad('K_H in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,208) = strpad('K_1_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,209) = strpad('K_2_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,210) = strpad('K_3_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,211) = strpad('K_4_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,212) = strpad('K_5_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,213) = strpad('K_6_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,214) = strpad('K_pCa in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,215) = strpad('K_pCa_Ca in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,216) = strpad('K_C_RyR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,217) = strpad('K_CI_RyR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,218) = strpad('K_I_RyR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,219) = strpad('K_O_RyR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,220) = strpad('K_P1_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,221) = strpad('K_P2_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,222) = strpad('K_P2a_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,223) = strpad('K_P4_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,224) = strpad('K_P5_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,225) = strpad('K_P6_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,226) = strpad('K_P8_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,227) = strpad('K_P9_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,228) = strpad('K_P10_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,229) = strpad('K_S00_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,230) = strpad('K_S10_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,231) = strpad('K_S20_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,232) = strpad('K_S01_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,233) = strpad('K_S11_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,234) = strpad('K_S21_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,235) = strpad('K_S00_to in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,236) = strpad('K_S10_to in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,237) = strpad('K_S20_to in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,238) = strpad('K_S30_to in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,239) = strpad('K_S01_to in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,240) = strpad('K_S11_to in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,241) = strpad('K_S21_to in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,242) = strpad('K_S31_to in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,243) = strpad('K_TRPN in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,244) = strpad('K_TRPN_Ca in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,245) = strpad('zK in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,246) = strpad('zNa in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,247) = strpad('zCa in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,248) = strpad('z_fh in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,249) = strpad('z_fj in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,250) = strpad('z_fm in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,251) = strpad('z_rh in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,252) = strpad('z_rj in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,253) = strpad('z_rm in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,254) = strpad('z_xff in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,255) = strpad('z_xfr in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,256) = strpad('z_fK1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,257) = strpad('z_rK1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,258) = strpad('z_f_Kp in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,259) = strpad('z_r_Kp in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,260) = strpad('z_fC3 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,261) = strpad('z_fC2 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,262) = strpad('z_fC1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,263) = strpad('z_fC1IF in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,264) = strpad('z_fOIF in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,265) = strpad('z_rC3 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,266) = strpad('z_rC2 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,267) = strpad('z_rC1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,268) = strpad('z_rC1IF in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,269) = strpad('z_rOIF in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,270) = strpad('z_xs1_f in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,271) = strpad('z_xs1_r in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,272) = strpad('z_xs2_f in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,273) = strpad('z_xs2_r in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,274) = strpad('z_fd in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,275) = strpad('z_ff1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,276) = strpad('z_ff2 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,277) = strpad('z_ff3 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,278) = strpad('z_rCa in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,279) = strpad('z_rd in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,280) = strpad('z_rf1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,281) = strpad('z_rf2 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,282) = strpad('z_rf3 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,283) = strpad('zF_5 in component BG_parameters (C_per_mol)');
    LEGEND_CONSTANTS(:,284) = strpad('zF_8 in component BG_parameters (C_per_mol)');
    LEGEND_CONSTANTS(:,285) = strpad('zf_NCX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,286) = strpad('zr_NCX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,287) = strpad('nNa_o_NCX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,288) = strpad('nNa_i_NCX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,289) = strpad('z_bf in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,290) = strpad('z_gf in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,291) = strpad('z_br in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,292) = strpad('z_gr in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,293) = strpad('z_zf in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,294) = strpad('z_yf in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,295) = strpad('z_zr in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,296) = strpad('z_yr in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,297) = strpad('nK in component BG_parameters (dimensionless)');
    LEGEND_VOI = strpad('t in component environment (second)');
    LEGEND_CONSTANTS(:,298) = strpad('vol_myo in component environment (pL)');
    LEGEND_CONSTANTS(:,299) = strpad('C_m in component environment (fF)');
    LEGEND_CONSTANTS(:,300) = strpad('freq in component environment (dimensionless)');
    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(:,16) = strpad('V_mem in component environment (J_per_C)');
    LEGEND_ALGEBRAIC(:,33) = strpad('v_CaB in component CaB (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,34) = strpad('I_mem_CaB in component CaB (fA)');
    LEGEND_ALGEBRAIC(:,37) = strpad('v_leak in component Ca_leak (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,43) = strpad('v_b2 in component CMDN_buffer (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,150) = strpad('v_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,152) = strpad('I_mem_Na in component fast_Na (fA)');
    LEGEND_ALGEBRAIC(:,167) = strpad('v_funny_Na in component funny (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,166) = strpad('v_funny_K in component funny (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,171) = strpad('I_mem_funny in component funny (fA)');
    LEGEND_ALGEBRAIC(:,183) = strpad('v_K1 in component K1 (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,185) = strpad('I_mem_K1 in component K1 (fA)');
    LEGEND_ALGEBRAIC(:,197) = strpad('v_Kp in component Kp (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,199) = strpad('I_mem_Kp in component Kp (fA)');
    LEGEND_ALGEBRAIC(:,220) = strpad('v_Kr in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,232) = strpad('I_mem_Kr in component Kr (fA)');
    LEGEND_ALGEBRAIC(:,252) = strpad('v_Ks in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,260) = strpad('I_mem_Ks in component Ks (fA)');
    LEGEND_ALGEBRAIC(:,370) = strpad('v_Ca_o_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,371) = strpad('v_Ca_i_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,377) = strpad('v_K_o_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,378) = strpad('v_K_i_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,376) = strpad('I_mem_LCC in component LCC (fA)');
    LEGEND_ALGEBRAIC(:,465) = strpad('v_K_o_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,466) = strpad('v_K_i_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,469) = strpad('v_Na_o_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,470) = strpad('v_Na_i_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,464) = strpad('v_H_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,467) = strpad('v_MgADP_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,468) = strpad('v_MgATP_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,471) = strpad('v_Pi_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,459) = strpad('I_mem_NaK in component NaK (fA)');
    LEGEND_ALGEBRAIC(:,475) = strpad('v_NaB in component NaB (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,476) = strpad('I_mem_NaB in component NaB (fA)');
    LEGEND_ALGEBRAIC(:,515) = strpad('v_Ca_o_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,516) = strpad('v_Ca_i_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,508) = strpad('v_Na_o_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,497) = strpad('v_Na_i_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,514) = strpad('I_mem_NCX in component NCX (fA)');
    LEGEND_ALGEBRAIC(:,521) = strpad('v_pCa_R1 in component pCa (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,522) = strpad('v_pCa_R2 in component pCa (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,523) = strpad('I_mem_pCa in component pCa (fA)');
    LEGEND_ALGEBRAIC(:,530) = strpad('v_RyR in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,535) = strpad('v_RyRgate_Ca_i in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,563) = strpad('v_Ca_i_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,568) = strpad('v_Ca_SR_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,575) = strpad('v_H_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,557) = strpad('v_MgADP_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,554) = strpad('v_MgATP_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,552) = strpad('v_Pi_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,607) = strpad('v_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,620) = strpad('I_mem_TCC in component TCC (fA)');
    LEGEND_ALGEBRAIC(:,671) = strpad('v_to in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,673) = strpad('I_mem_to in component to (fA)');
    LEGEND_ALGEBRAIC(:,621) = strpad('v_b1 in component TRPN_buffer (fmol_per_sec)');
    LEGEND_CONSTANTS(:,301) = strpad('R in component constants (J_per_K_per_mol)');
    LEGEND_CONSTANTS(:,302) = strpad('T in component constants (kelvin)');
    LEGEND_CONSTANTS(:,303) = strpad('F in component constants (C_per_mol)');
    LEGEND_ALGEBRAIC(:,30) = strpad('mu_Ca_i in component CaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,31) = strpad('mu_Ca_o in component CaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,32) = strpad('Am_CaB in component CaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,35) = strpad('mu_Ca_SR in component Ca_leak (J_per_mol)');
    LEGEND_ALGEBRAIC(:,36) = strpad('mu_Ca_i in component Ca_leak (J_per_mol)');
    LEGEND_ALGEBRAIC(:,38) = strpad('mu_CMDN in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,39) = strpad('mu_CMDN_Ca in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,41) = strpad('mu_Ca_i in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,42) = strpad('Af_b2 in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,40) = strpad('Ar_b2 in component CMDN_buffer (J_per_mol)');
    LEGEND_STATES(:,19) = strpad('q_S000_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,20) = strpad('q_S010_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,21) = strpad('q_S100_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,22) = strpad('q_S110_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,23) = strpad('q_S200_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,24) = strpad('q_S210_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,25) = strpad('q_S300_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,26) = strpad('q_S310_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,27) = strpad('q_S001_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,28) = strpad('q_S011_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,29) = strpad('q_S101_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,30) = strpad('q_S111_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,31) = strpad('q_S201_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,32) = strpad('q_S211_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,33) = strpad('q_S301_Na in component fast_Na (fmol)');
    LEGEND_STATES(:,34) = strpad('q_S311_Na in component fast_Na (fmol)');
    LEGEND_ALGEBRAIC(:,45) = strpad('mu_Na_o in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,46) = strpad('mu_Na_i in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,1) = strpad('mu_S000_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,2) = strpad('mu_S010_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,3) = strpad('mu_S100_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,4) = strpad('mu_S110_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,5) = strpad('mu_S200_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,6) = strpad('mu_S210_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,7) = strpad('mu_S300_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,8) = strpad('mu_S310_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,9) = strpad('mu_S001_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,10) = strpad('mu_S011_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,11) = strpad('mu_S101_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,12) = strpad('mu_S111_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,13) = strpad('mu_S201_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,14) = strpad('mu_S211_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,15) = strpad('mu_S301_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,47) = strpad('mu_S311_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,77) = strpad('Am_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,48) = strpad('Af_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,78) = strpad('Ar_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,49) = strpad('Af_h000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,79) = strpad('Ar_h000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,80) = strpad('v_h000 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,50) = strpad('Af_h001 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,81) = strpad('Ar_h001 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,82) = strpad('v_h001 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,51) = strpad('Af_h100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,83) = strpad('Ar_h100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,84) = strpad('v_h100 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,52) = strpad('Af_h101 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,85) = strpad('Ar_h101 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,86) = strpad('v_h101 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,53) = strpad('Af_h200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,87) = strpad('Ar_h200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,88) = strpad('v_h200 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,54) = strpad('Af_h201 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,89) = strpad('Ar_h201 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,90) = strpad('v_h201 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,55) = strpad('Af_h300 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,91) = strpad('Ar_h300 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,92) = strpad('v_h300 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,56) = strpad('Af_h301 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,93) = strpad('Ar_h301 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,94) = strpad('v_h301 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,57) = strpad('Af_j000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,95) = strpad('Ar_j000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,96) = strpad('v_j000 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,58) = strpad('Af_j010 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,97) = strpad('Ar_j010 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,98) = strpad('v_j010 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,59) = strpad('Af_j100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,99) = strpad('Ar_j100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,100) = strpad('v_j100 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,60) = strpad('Af_j110 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,101) = strpad('Ar_j110 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,102) = strpad('v_j110 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,61) = strpad('Af_j200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,103) = strpad('Ar_j200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,104) = strpad('v_j200 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,62) = strpad('Af_j210 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,105) = strpad('Ar_j210 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,106) = strpad('v_j210 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,63) = strpad('Af_j300 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,107) = strpad('Ar_j300 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,108) = strpad('v_j300 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,64) = strpad('Af_j310 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,109) = strpad('Ar_j310 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,110) = strpad('v_j310 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,65) = strpad('Af_m000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,111) = strpad('Ar_m000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,112) = strpad('v_m000 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,66) = strpad('Af_m001 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,114) = strpad('Ar_m001 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,115) = strpad('v_m001 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,67) = strpad('Af_m010 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,117) = strpad('Ar_m010 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,118) = strpad('v_m010 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,68) = strpad('Af_m011 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,120) = strpad('Ar_m011 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,121) = strpad('v_m011 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,69) = strpad('Af_m100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,123) = strpad('Ar_m100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,124) = strpad('v_m100 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,70) = strpad('Af_m101 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,126) = strpad('Ar_m101 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,127) = strpad('v_m101 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,71) = strpad('Af_m110 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,129) = strpad('Ar_m110 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,130) = strpad('v_m110 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,72) = strpad('Af_m111 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,132) = strpad('Ar_m111 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,133) = strpad('v_m111 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,73) = strpad('Af_m200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,135) = strpad('Ar_m200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,136) = strpad('v_m200 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,74) = strpad('Af_m201 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,139) = strpad('Ar_m201 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,140) = strpad('v_m201 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,75) = strpad('Af_m210 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,143) = strpad('Ar_m210 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,144) = strpad('v_m210 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,76) = strpad('Af_m211 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,147) = strpad('Ar_m211 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,148) = strpad('v_m211 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,113) = strpad('v_S000_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,119) = strpad('v_S010_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,125) = strpad('v_S100_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,131) = strpad('v_S110_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,137) = strpad('v_S200_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,145) = strpad('v_S210_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,138) = strpad('v_S300_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,146) = strpad('v_S310_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,116) = strpad('v_S001_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,122) = strpad('v_S011_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,128) = strpad('v_S101_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,134) = strpad('v_S111_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,141) = strpad('v_S201_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,149) = strpad('v_S211_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,142) = strpad('v_S301_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,151) = strpad('v_S311_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,44) = strpad('V_mem in component fast_Na (volt)');
    LEGEND_ALGEBRAIC(:,153) = strpad('mu_K_i in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,154) = strpad('mu_K_o in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,155) = strpad('mu_Na_i in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,156) = strpad('mu_Na_o in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,157) = strpad('V_mem in component funny (J_per_C)');
    LEGEND_ALGEBRAIC(:,159) = strpad('Am_Na in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,158) = strpad('Am_K in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,162) = strpad('Af_K in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,163) = strpad('Ar_K in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,164) = strpad('Af_Na in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,165) = strpad('Ar_Na in component funny (J_per_mol)');
    LEGEND_STATES(:,35) = strpad('q_x0_funny in component funny (fmol)');
    LEGEND_STATES(:,36) = strpad('q_x1_funny in component funny (fmol)');
    LEGEND_ALGEBRAIC(:,160) = strpad('mu_x0_funny in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,161) = strpad('mu_x1_funny in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,168) = strpad('Af_R_xf in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,169) = strpad('Ar_R_xf in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,170) = strpad('v_xf in component funny (fmol_per_sec)');
    LEGEND_STATES(:,37) = strpad('q_C_K1 in component K1 (fmol)');
    LEGEND_STATES(:,38) = strpad('q_O_K1 in component K1 (fmol)');
    LEGEND_ALGEBRAIC(:,173) = strpad('mu_K_o in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,174) = 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(:,175) = strpad('mu_O_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,182) = strpad('v_C_K1 in component K1 (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,184) = strpad('v_O_K1 in component K1 (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,178) = strpad('Am_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,176) = strpad('Af_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,179) = strpad('Ar_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,177) = strpad('Af_gK1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,180) = strpad('Ar_gK1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,181) = strpad('v_gK1 in component K1 (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,172) = strpad('V_mem in component K1 (volt)');
    LEGEND_STATES(:,39) = strpad('q_C_Kp in component Kp (fmol)');
    LEGEND_STATES(:,40) = strpad('q_O_Kp in component Kp (fmol)');
    LEGEND_ALGEBRAIC(:,187) = strpad('mu_K_o in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,188) = strpad('mu_K_i in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,18) = strpad('mu_C_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,189) = strpad('mu_O_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,192) = strpad('Am_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,190) = strpad('Af_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,193) = strpad('Ar_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,191) = strpad('Af_gKp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,194) = strpad('Ar_gKp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,195) = strpad('v_gKp in component Kp (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,196) = strpad('v_C_Kp in component Kp (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,198) = strpad('v_O_Kp in component Kp (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,186) = strpad('V_mem in component Kp (volt)');
    LEGEND_ALGEBRAIC(:,200) = strpad('mu_K_i in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,201) = strpad('mu_K_o in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,202) = strpad('V_mem in component Kr (J_per_C)');
    LEGEND_ALGEBRAIC(:,203) = strpad('Am_Kr in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,218) = strpad('Af_K in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,219) = strpad('Ar_K in component Kr (J_per_mol)');
    LEGEND_STATES(:,41) = strpad('q_sC3 in component Kr (fmol)');
    LEGEND_STATES(:,42) = strpad('q_sC2 in component Kr (fmol)');
    LEGEND_STATES(:,43) = strpad('q_sC1 in component Kr (fmol)');
    LEGEND_STATES(:,44) = strpad('q_sO in component Kr (fmol)');
    LEGEND_STATES(:,45) = strpad('q_sI in component Kr (fmol)');
    LEGEND_ALGEBRAIC(:,210) = strpad('v_sC3 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,216) = strpad('v_sC2 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,228) = strpad('v_sC1 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,230) = strpad('v_sO in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,231) = strpad('v_sI in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,209) = strpad('v_rC3 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,215) = strpad('v_rC2 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,223) = strpad('v_rC1 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,227) = strpad('v_rC1IF in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,229) = strpad('v_rOIF in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,204) = strpad('mu_sC3 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,206) = strpad('mu_sC2 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,211) = strpad('mu_sC1 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,217) = strpad('mu_sO in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,224) = strpad('mu_sI in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,205) = strpad('Af_rC3 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,207) = strpad('Ar_rC3 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,208) = strpad('Af_rC2 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,212) = strpad('Ar_rC2 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,213) = strpad('Af_rC1 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,221) = strpad('Ar_rC1 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,214) = strpad('Af_rC1IF in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,225) = strpad('Ar_rC1IF in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,222) = strpad('Af_rOIF in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,226) = strpad('Ar_rOIF in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,233) = strpad('u_K_i in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,234) = strpad('u_K_o in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,235) = strpad('V_mem in component Ks (J_per_C)');
    LEGEND_ALGEBRAIC(:,236) = strpad('Am_Ks in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,250) = strpad('Af_Ks in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,251) = strpad('Ar_Ks in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,248) = strpad('v_Sa in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,258) = strpad('v_Sb in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,256) = strpad('v_Sc in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,259) = strpad('v_Sd in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,243) = strpad('v_x10 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,255) = strpad('v_x11 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,247) = strpad('v_x20 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,257) = strpad('v_x21 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,237) = strpad('mu_Sa in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,240) = strpad('mu_Sb in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,244) = strpad('mu_Sc in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,249) = strpad('mu_Sd in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,238) = strpad('Af_x10 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,241) = strpad('Ar_x10 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,245) = strpad('Af_x11 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,253) = strpad('Ar_x11 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,239) = strpad('Af_x20 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,246) = strpad('Ar_x20 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,242) = strpad('Af_x21 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,254) = strpad('Ar_x21 in component Ks (J_per_mol)');
    LEGEND_STATES(:,46) = strpad('q_Sa in component Ks (fmol)');
    LEGEND_STATES(:,47) = strpad('q_Sb in component Ks (fmol)');
    LEGEND_STATES(:,48) = strpad('q_Sc in component Ks (fmol)');
    LEGEND_STATES(:,49) = strpad('q_Sd in component Ks (fmol)');
    LEGEND_STATES(:,50) = strpad('q_S000_LCC in component LCC (fmol)');
    LEGEND_STATES(:,51) = strpad('q_S010_LCC in component LCC (fmol)');
    LEGEND_STATES(:,52) = strpad('q_S020_LCC in component LCC (fmol)');
    LEGEND_STATES(:,53) = strpad('q_S100_LCC in component LCC (fmol)');
    LEGEND_STATES(:,54) = strpad('q_S110_LCC in component LCC (fmol)');
    LEGEND_STATES(:,55) = strpad('q_S120_LCC in component LCC (fmol)');
    LEGEND_STATES(:,56) = strpad('q_S001_LCC in component LCC (fmol)');
    LEGEND_STATES(:,57) = strpad('q_S011_LCC in component LCC (fmol)');
    LEGEND_STATES(:,58) = strpad('q_S021_LCC in component LCC (fmol)');
    LEGEND_STATES(:,59) = strpad('q_S101_LCC in component LCC (fmol)');
    LEGEND_STATES(:,60) = strpad('q_S111_LCC in component LCC (fmol)');
    LEGEND_STATES(:,61) = strpad('q_S121_LCC in component LCC (fmol)');
    LEGEND_ALGEBRAIC(:,262) = strpad('mu_Ca_o in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,263) = strpad('mu_Ca_i in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,264) = strpad('mu_K_o in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,265) = strpad('mu_K_i in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,261) = strpad('V_mem in component LCC (volt)');
    LEGEND_ALGEBRAIC(:,274) = strpad('Af_LCC_Ca1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,306) = strpad('Ar_LCC_Ca1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,302) = strpad('Am_LCC_Ca1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,367) = strpad('v_LCC_Ca1 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,275) = strpad('Af_LCC_Ca2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,307) = strpad('Ar_LCC_Ca2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,303) = strpad('Am_LCC_Ca2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,369) = strpad('v_LCC_Ca2 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,276) = strpad('Af_LCC_K1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,308) = strpad('Ar_LCC_K1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,304) = strpad('Am_LCC_K1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,372) = strpad('v_LCC_K1 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,277) = strpad('Af_LCC_K2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,309) = strpad('Ar_LCC_K2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,305) = strpad('Am_LCC_K2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,374) = strpad('v_LCC_K2 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,296) = strpad('Af_fCa00 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,346) = strpad('Ar_fCa00 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,347) = strpad('v_fCa00 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,297) = strpad('Af_fCa01 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,348) = strpad('Ar_fCa01 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,351) = strpad('v_fCa01 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,298) = strpad('Af_fCa02 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,352) = strpad('Ar_fCa02 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,355) = strpad('v_fCa02 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,299) = strpad('Af_fCa10 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,356) = strpad('Ar_fCa10 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,359) = strpad('v_fCa10 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,300) = strpad('Af_fCa11 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,360) = strpad('Ar_fCa11 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,363) = strpad('v_fCa11 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,301) = strpad('Af_fCa12 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,364) = strpad('Ar_fCa12 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,366) = strpad('v_fCa12 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,266) = strpad('mu_S000_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,349) = strpad('v_S000_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,267) = strpad('mu_S010_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,353) = strpad('v_S010_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,268) = strpad('mu_S020_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,357) = strpad('v_S020_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,269) = strpad('mu_S100_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,361) = strpad('v_S100_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,270) = strpad('mu_S110_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,365) = strpad('v_S110_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,272) = strpad('mu_S120_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,368) = strpad('v_S120_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,19) = strpad('mu_S001_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,350) = strpad('v_S001_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,20) = strpad('mu_S011_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,354) = strpad('v_S011_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,21) = strpad('mu_S021_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,358) = strpad('v_S021_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,22) = strpad('mu_S101_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,362) = strpad('v_S101_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,271) = strpad('mu_S111_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,373) = strpad('v_S111_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,273) = strpad('mu_S121_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,375) = strpad('v_S121_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,278) = strpad('Af_d000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,310) = strpad('Ar_d000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,311) = strpad('v_d000 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,280) = strpad('Af_d010 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,314) = strpad('Ar_d010 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,315) = strpad('v_d010 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,282) = strpad('Af_d020 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,318) = strpad('Ar_d020 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,319) = strpad('v_d020 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,284) = strpad('Af_f1_000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,322) = strpad('Ar_f1_000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,323) = strpad('v_f1_000 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,288) = strpad('Af_f2_000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,330) = strpad('Ar_f2_000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,331) = strpad('v_f2_000 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,292) = strpad('Af_f3_010 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,338) = strpad('Ar_f3_010 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,339) = strpad('v_f3_010 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,286) = strpad('Af_f1_100 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,326) = strpad('Ar_f1_100 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,327) = strpad('v_f1_100 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,290) = strpad('Af_f2_100 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,334) = strpad('Ar_f2_100 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,335) = strpad('v_f2_100 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,294) = strpad('Af_f3_110 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,342) = strpad('Ar_f3_110 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,343) = strpad('v_f3_110 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,279) = strpad('Af_d001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,312) = strpad('Ar_d001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,313) = strpad('v_d001 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,281) = strpad('Af_d011 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,316) = strpad('Ar_d011 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,317) = strpad('v_d011 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,283) = strpad('Af_d021 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,320) = strpad('Ar_d021 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,321) = strpad('v_d021 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,285) = strpad('Af_f1_001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,324) = strpad('Ar_f1_001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,325) = strpad('v_f1_001 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,289) = strpad('Af_f2_001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,332) = strpad('Ar_f2_001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,333) = strpad('v_f2_001 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,293) = strpad('Af_f3_011 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,340) = strpad('Ar_f3_011 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,341) = strpad('v_f3_011 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,287) = strpad('Af_f1_101 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,328) = strpad('Ar_f1_101 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,329) = strpad('v_f1_101 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,291) = strpad('Af_f2_101 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,336) = strpad('Ar_f2_101 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,337) = strpad('v_f2_101 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,295) = strpad('Af_f3_111 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,344) = strpad('Ar_f3_111 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,345) = strpad('v_f3_111 in component LCC (fmol_per_sec)');
    LEGEND_STATES(:,62) = strpad('q_P7 in component NaK (fmol)');
    LEGEND_STATES(:,63) = strpad('q_P14 in component NaK (fmol)');
    LEGEND_STATES(:,64) = strpad('q_P15 in component NaK (fmol)');
    LEGEND_STATES(:,65) = strpad('q_P1 in component NaK (fmol)');
    LEGEND_STATES(:,66) = strpad('q_P2 in component NaK (fmol)');
    LEGEND_STATES(:,67) = strpad('q_P3 in component NaK (fmol)');
    LEGEND_STATES(:,68) = strpad('q_P4 in component NaK (fmol)');
    LEGEND_STATES(:,69) = strpad('q_P5 in component NaK (fmol)');
    LEGEND_STATES(:,70) = strpad('q_P6 in component NaK (fmol)');
    LEGEND_STATES(:,71) = strpad('q_P10 in component NaK (fmol)');
    LEGEND_STATES(:,72) = strpad('q_P11 in component NaK (fmol)');
    LEGEND_STATES(:,73) = strpad('q_P12 in component NaK (fmol)');
    LEGEND_STATES(:,74) = strpad('q_P13 in component NaK (fmol)');
    LEGEND_STATES(:,75) = strpad('q_P8 in component NaK (fmol)');
    LEGEND_STATES(:,76) = strpad('q_P9 in component NaK (fmol)');
    LEGEND_ALGEBRAIC(:,381) = strpad('mu_K_o in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,382) = strpad('mu_K_i in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,385) = strpad('mu_Na_o in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,386) = strpad('mu_Na_i in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,380) = strpad('mu_H in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,383) = strpad('mu_MgADP in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,384) = strpad('mu_MgATP in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,399) = strpad('mu_P7 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,402) = strpad('mu_Pi in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,392) = strpad('mu_P14 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,393) = strpad('mu_P15 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,387) = strpad('mu_P1 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,394) = strpad('mu_P2 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,395) = strpad('mu_P3 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,396) = strpad('mu_P4 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,397) = strpad('mu_P5 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,398) = strpad('mu_P6 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,388) = strpad('mu_P10 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,389) = strpad('mu_P11 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,390) = strpad('mu_P12 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,391) = strpad('mu_P13 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,400) = strpad('mu_P8 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,401) = strpad('mu_P9 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,433) = strpad('v_P14 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,438) = strpad('v_P15 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,439) = strpad('v_P1 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,440) = strpad('v_P2 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,443) = strpad('v_P3 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,446) = strpad('v_P4 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,449) = strpad('v_P5 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,452) = strpad('v_P6 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,462) = strpad('v_P10 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,424) = strpad('v_P11 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,427) = strpad('v_P12 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,430) = strpad('v_P13 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,455) = strpad('v_P7 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,458) = strpad('v_P8 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,463) = strpad('v_P9 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,403) = strpad('Af_R1 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,418) = strpad('Ar_R1 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,419) = strpad('v_R1 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,404) = strpad('Af_R10 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,420) = strpad('Ar_R10 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,421) = strpad('v_R10 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,405) = strpad('Af_R11 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,422) = strpad('Ar_R11 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,423) = strpad('v_R11 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,406) = strpad('Af_R12 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,425) = strpad('Ar_R12 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,426) = strpad('v_R12 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,407) = strpad('Af_R13 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,428) = strpad('Ar_R13 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,429) = strpad('v_R13 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,408) = strpad('Af_R14 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,431) = strpad('Ar_R14 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,432) = strpad('v_R14 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,409) = strpad('Af_R15 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,434) = strpad('Ar_R15 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,436) = strpad('v_R15 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,410) = strpad('Af_R2 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,435) = strpad('Ar_R2 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,437) = strpad('v_R2 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,411) = strpad('Af_R3 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,441) = strpad('Ar_R3 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,442) = strpad('v_R3 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,412) = strpad('Af_R4 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,444) = strpad('Ar_R4 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,445) = strpad('v_R4 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,413) = strpad('Af_R5 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,447) = strpad('Ar_R5 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,448) = strpad('v_R5 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,414) = strpad('Af_R6 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,450) = strpad('Ar_R6 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,451) = strpad('v_R6 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,415) = strpad('Af_R7 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,453) = strpad('Ar_R7 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,454) = strpad('v_R7 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,416) = strpad('Af_R8 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,456) = strpad('Ar_R8 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,457) = strpad('v_R8 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,417) = strpad('Af_R9 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,460) = strpad('Ar_R9 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,461) = strpad('v_R9 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,379) = strpad('V_mem in component NaK (volt)');
    LEGEND_ALGEBRAIC(:,472) = strpad('mu_Na_i in component NaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,473) = strpad('mu_Na_o in component NaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,474) = strpad('Am_NaB in component NaB (J_per_mol)');
    LEGEND_STATES(:,77) = strpad('q_P1_NCX in component NCX (fmol)');
    LEGEND_STATES(:,78) = strpad('q_P2_NCX in component NCX (fmol)');
    LEGEND_STATES(:,79) = strpad('q_P3_NCX in component NCX (fmol)');
    LEGEND_STATES(:,80) = strpad('q_P4_NCX in component NCX (fmol)');
    LEGEND_STATES(:,81) = strpad('q_P5_NCX in component NCX (fmol)');
    LEGEND_STATES(:,82) = strpad('q_P6_NCX in component NCX (fmol)');
    LEGEND_ALGEBRAIC(:,478) = strpad('mu_Ca_o in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,479) = strpad('mu_Ca_i in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,480) = strpad('mu_Na_o in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,481) = strpad('mu_Na_i in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,482) = strpad('mu_P1_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,483) = strpad('mu_P2_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,484) = strpad('mu_P3_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,485) = strpad('mu_P4_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,486) = strpad('mu_P5_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,487) = strpad('mu_P6_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,512) = strpad('v_P1_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,500) = strpad('v_P2_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,503) = strpad('v_P3_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,506) = strpad('v_P4_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,509) = strpad('v_P5_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,513) = strpad('v_P6_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,488) = strpad('Af_r1 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,494) = strpad('Ar_r1 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,495) = strpad('v_r1 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,489) = strpad('Af_r2 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,496) = strpad('Ar_r2 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,498) = strpad('v_r2 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,490) = strpad('Af_r3 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,499) = strpad('Ar_r3 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,501) = strpad('v_r3 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,491) = strpad('Af_r4 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,502) = strpad('Ar_r4 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,504) = strpad('v_r4 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,492) = strpad('Af_r5 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,505) = strpad('Ar_r5 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,507) = strpad('v_r5 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,493) = strpad('Af_r6 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,510) = strpad('Ar_r6 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,511) = strpad('v_r6 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,477) = strpad('V_mem in component NCX (volt)');
    LEGEND_ALGEBRAIC(:,517) = strpad('mu_Ca_i in component pCa (J_per_mol)');
    LEGEND_ALGEBRAIC(:,518) = strpad('mu_Ca_o in component pCa (J_per_mol)');
    LEGEND_ALGEBRAIC(:,519) = strpad('mu_pCa in component pCa (J_per_mol)');
    LEGEND_ALGEBRAIC(:,520) = strpad('mu_pCa_Ca in component pCa (J_per_mol)');
    LEGEND_CONSTANTS(:,304) = strpad('nCa_1 in component RyR (dimensionless)');
    LEGEND_CONSTANTS(:,305) = strpad('nCa_2 in component RyR (dimensionless)');
    LEGEND_ALGEBRAIC(:,524) = strpad('mu_Ca_SR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,525) = strpad('mu_Ca_i in component RyR (J_per_mol)');
    LEGEND_STATES(:,83) = strpad('q_C_RyR in component RyR (fmol)');
    LEGEND_STATES(:,84) = strpad('q_CI_RyR in component RyR (fmol)');
    LEGEND_STATES(:,85) = strpad('q_I_RyR in component RyR (fmol)');
    LEGEND_STATES(:,86) = strpad('q_O_RyR in component RyR (fmol)');
    LEGEND_ALGEBRAIC(:,23) = strpad('q_Ca_gate_complexes in component RyR (fmol)');
    LEGEND_ALGEBRAIC(:,526) = strpad('mu_C_RyR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,527) = strpad('mu_CI_RyR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,528) = strpad('mu_I_RyR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,529) = strpad('mu_O_RyR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,531) = strpad('v_OC in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,532) = strpad('v_CCI in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,533) = strpad('v_CII in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,534) = strpad('v_IO in component RyR (fmol_per_sec)');
    LEGEND_CONSTANTS(:,306) = strpad('n_Ca_i in component SERCA (dimensionless)');
    LEGEND_CONSTANTS(:,307) = strpad('n_Ca_SR in component SERCA (dimensionless)');
    LEGEND_CONSTANTS(:,308) = strpad('n_H in component SERCA (dimensionless)');
    LEGEND_CONSTANTS(:,309) = strpad('q_P1_SERCA in component SERCA (fmol)');
    LEGEND_CONSTANTS(:,310) = strpad('q_P2_SERCA in component SERCA (fmol)');
    LEGEND_CONSTANTS(:,311) = strpad('q_P2a_SERCA in component SERCA (fmol)');
    LEGEND_CONSTANTS(:,312) = strpad('q_P4_SERCA in component SERCA (fmol)');
    LEGEND_CONSTANTS(:,313) = strpad('q_P5_SERCA in component SERCA (fmol)');
    LEGEND_CONSTANTS(:,314) = strpad('q_P10_SERCA in component SERCA (fmol)');
    LEGEND_CONSTANTS(:,315) = strpad('q_P6_SERCA in component SERCA (fmol)');
    LEGEND_CONSTANTS(:,316) = strpad('q_P8_SERCA in component SERCA (fmol)');
    LEGEND_CONSTANTS(:,317) = strpad('q_P9_SERCA in component SERCA (fmol)');
    LEGEND_CONSTANTS(:,322) = strpad('q_SERCA_Ca_complexes in component SERCA (fmol)');
    LEGEND_ALGEBRAIC(:,24) = strpad('c_Ca_i in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,25) = strpad('c_Ca_SR in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,26) = strpad('c_H in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,27) = strpad('c_MgADP in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,28) = strpad('c_MgATP in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,29) = strpad('c_Pi in component SERCA (mM)');
    LEGEND_CONSTANTS(:,318) = strpad('vol_i in component SERCA (pL)');
    LEGEND_CONSTANTS(:,323) = strpad('vol_sr in component SERCA (pL)');
    LEGEND_CONSTANTS(:,325) = strpad('vol_isr in component SERCA (pL)');
    LEGEND_ALGEBRAIC(:,536) = strpad('mu_Ca_i in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,537) = strpad('mu_Ca_SR in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,538) = strpad('mu_H in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,539) = strpad('mu_MgADP in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,540) = strpad('mu_MgATP in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,321) = strpad('mu_P1 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,555) = strpad('v_P1 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,541) = strpad('mu_Pi in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,324) = strpad('mu_P2 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,562) = strpad('v_P2 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,326) = strpad('mu_P2a in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,559) = strpad('v_P2a in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,327) = strpad('mu_P4 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,565) = strpad('v_P4 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,328) = strpad('mu_P5 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,566) = strpad('v_P5 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,330) = strpad('mu_P6 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,570) = strpad('v_P6 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,331) = strpad('mu_P8 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,573) = strpad('v_P8 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,332) = strpad('mu_P9 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,576) = strpad('v_P9 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,329) = strpad('mu_P10 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,577) = strpad('v_P10 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,543) = strpad('Af_R1_2 in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,334) = strpad('Ar_R1_2 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,553) = strpad('v_SERCA_R1_2 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,335) = strpad('Af_R5_6 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,544) = strpad('Ar_R5_6 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,556) = strpad('v_SERCA_R5_6 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,545) = strpad('Af_R2_2a in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,336) = strpad('Ar_R2_2a in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,558) = strpad('v_SERCA_R2_2a in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,546) = strpad('Af_R2_4 in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,337) = strpad('Ar_R2_4 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,560) = strpad('v_SERCA_R2_4 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,338) = strpad('Af_R4_5 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,547) = strpad('Ar_R4_5 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,561) = strpad('v_SERCA_R4_5 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,339) = strpad('Af_R6_8 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,548) = strpad('Ar_R6_8 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,564) = strpad('v_SERCA_R6_8 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,549) = strpad('Af_R8_9 in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,340) = strpad('Ar_R8_9 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,569) = strpad('v_SERCA_R8_9 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,341) = strpad('Af_R9_10 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,550) = strpad('Ar_R9_10 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,572) = strpad('v_SERCA_R9_10 in component SERCA (fmol_per_sec)');
    LEGEND_CONSTANTS(:,333) = strpad('Af_R10_1 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,542) = strpad('Ar_R10_1 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,551) = strpad('v_SERCA_R10_1 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,567) = strpad('u_Ca_i in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,571) = strpad('u_Ca_o in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,574) = strpad('V_mem in component TCC (J_per_C)');
    LEGEND_ALGEBRAIC(:,578) = strpad('Am_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,605) = strpad('Af_Ca in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,606) = strpad('Ar_Ca in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,595) = strpad('v_s00_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,603) = strpad('v_s10_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,618) = strpad('v_s20_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,601) = strpad('v_s01_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,615) = strpad('v_s11_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,619) = strpad('v_s21_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,586) = strpad('v_b00 in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,590) = strpad('v_b10 in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,600) = strpad('v_b01 in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,613) = strpad('v_b11 in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,594) = strpad('v_g00 in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,602) = strpad('v_g10 in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,616) = strpad('v_g20 in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,579) = strpad('mu_s00_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,582) = strpad('mu_s10_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,587) = strpad('mu_s20_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,591) = strpad('mu_s01_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,596) = strpad('mu_s11_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,604) = strpad('mu_s21_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,580) = strpad('Af_b00 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,583) = strpad('Ar_b00 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,584) = strpad('Af_b10 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,588) = strpad('Ar_b10 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,592) = strpad('Af_b01 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,597) = strpad('Ar_b01 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,598) = strpad('Af_b11 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,609) = strpad('Ar_b11 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,581) = strpad('Af_g00 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,593) = strpad('Ar_g00 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,585) = strpad('Af_g10 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,599) = strpad('Ar_g10 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,589) = strpad('Af_g20 in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,611) = strpad('Ar_g20 in component TCC (J_per_mol)');
    LEGEND_STATES(:,87) = strpad('q_s00_TCC in component TCC (fmol)');
    LEGEND_STATES(:,88) = strpad('q_s10_TCC in component TCC (fmol)');
    LEGEND_STATES(:,89) = strpad('q_s20_TCC in component TCC (fmol)');
    LEGEND_STATES(:,90) = strpad('q_s01_TCC in component TCC (fmol)');
    LEGEND_STATES(:,91) = strpad('q_s11_TCC in component TCC (fmol)');
    LEGEND_STATES(:,92) = strpad('q_s21_TCC in component TCC (fmol)');
    LEGEND_ALGEBRAIC(:,622) = strpad('u_K_i in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,623) = strpad('u_K_o in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,624) = strpad('V_mem in component to (J_per_C)');
    LEGEND_ALGEBRAIC(:,625) = strpad('Am_to in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,667) = strpad('Af_K in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,669) = strpad('Ar_K in component to (J_per_mol)');
    LEGEND_CONSTANTS(:,319) = strpad('k_P in component to (volt)');
    LEGEND_ALGEBRAIC(:,626) = strpad('q_P in component to (fmol)');
    LEGEND_CONSTANTS(:,320) = strpad('K_P in component to (per_fmol)');
    LEGEND_ALGEBRAIC(:,627) = strpad('mu_P in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,649) = strpad('v_s00_to in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,657) = strpad('v_s10_to in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,665) = strpad('v_s20_to in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,676) = strpad('v_s30_to in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,655) = strpad('v_s01_to in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,663) = strpad('v_s11_to in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,674) = strpad('v_s21_to in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,677) = strpad('v_s31_to in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,635) = strpad('v_z00 in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,640) = strpad('v_z10 in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,644) = strpad('v_z20 in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,654) = strpad('v_z01 in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,662) = strpad('v_z11 in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,672) = strpad('v_z21 in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,648) = strpad('v_y00 in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,656) = strpad('v_y10 in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,664) = strpad('v_y20 in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,675) = strpad('v_y30 in component to (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,628) = strpad('mu_s00_to in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,631) = strpad('mu_s10_to in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,636) = strpad('mu_s20_to in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,641) = strpad('mu_s30_to in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,645) = strpad('mu_s01_to in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,650) = strpad('mu_s11_to in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,658) = strpad('mu_s21_to in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,666) = strpad('mu_s31_to in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,629) = strpad('Af_z00 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,632) = strpad('Ar_z00 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,633) = strpad('Af_z10 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,637) = strpad('Ar_z10 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,638) = strpad('Af_z20 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,642) = strpad('Ar_z20 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,646) = strpad('Af_z01 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,651) = strpad('Ar_z01 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,652) = strpad('Af_z11 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,659) = strpad('Ar_z11 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,660) = strpad('Af_z21 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,668) = strpad('Ar_z21 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,630) = strpad('Af_y00 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,647) = strpad('Ar_y00 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,634) = strpad('Af_y10 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,653) = strpad('Ar_y10 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,639) = strpad('Af_y20 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,661) = strpad('Ar_y20 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,643) = strpad('Af_y30 in component to (J_per_mol)');
    LEGEND_ALGEBRAIC(:,670) = strpad('Ar_y30 in component to (J_per_mol)');
    LEGEND_STATES(:,93) = strpad('q_s00_to in component to (fmol)');
    LEGEND_STATES(:,94) = strpad('q_s10_to in component to (fmol)');
    LEGEND_STATES(:,95) = strpad('q_s20_to in component to (fmol)');
    LEGEND_STATES(:,96) = strpad('q_s30_to in component to (fmol)');
    LEGEND_STATES(:,97) = strpad('q_s01_to in component to (fmol)');
    LEGEND_STATES(:,98) = strpad('q_s11_to in component to (fmol)');
    LEGEND_STATES(:,99) = strpad('q_s21_to in component to (fmol)');
    LEGEND_STATES(:,100) = strpad('q_s31_to in component to (fmol)');
    LEGEND_ALGEBRAIC(:,608) = strpad('mu_TRPN in component TRPN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,610) = strpad('mu_TRPN_Ca in component TRPN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,612) = strpad('mu_Ca_i in component TRPN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,614) = strpad('Af_b1 in component TRPN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,617) = strpad('Ar_b1 in component TRPN_buffer (J_per_mol)');
    LEGEND_RATES(:,1) = strpad('d/dt q_Ca_i in component environment (fmol)');
    LEGEND_RATES(:,2) = strpad('d/dt q_Ca_o 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(:,7) = strpad('d/dt q_Na_o in component environment (fmol)');
    LEGEND_RATES(:,8) = strpad('d/dt q_K_i in component environment (fmol)');
    LEGEND_RATES(:,9) = strpad('d/dt q_K_o 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(:,18) = strpad('d/dt q_mem in component environment (fC)');
    LEGEND_RATES(:,19) = strpad('d/dt q_S000_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,20) = strpad('d/dt q_S010_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,21) = strpad('d/dt q_S100_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,22) = strpad('d/dt q_S110_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,23) = strpad('d/dt q_S200_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,24) = strpad('d/dt q_S210_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,25) = strpad('d/dt q_S300_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,26) = strpad('d/dt q_S310_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,27) = strpad('d/dt q_S001_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,28) = strpad('d/dt q_S011_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,29) = strpad('d/dt q_S101_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,30) = strpad('d/dt q_S111_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,31) = strpad('d/dt q_S201_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,32) = strpad('d/dt q_S211_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,33) = strpad('d/dt q_S301_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,34) = strpad('d/dt q_S311_Na in component fast_Na (fmol)');
    LEGEND_RATES(:,35) = strpad('d/dt q_x0_funny in component funny (fmol)');
    LEGEND_RATES(:,36) = strpad('d/dt q_x1_funny in component funny (fmol)');
    LEGEND_RATES(:,37) = strpad('d/dt q_C_K1 in component K1 (fmol)');
    LEGEND_RATES(:,38) = strpad('d/dt q_O_K1 in component K1 (fmol)');
    LEGEND_RATES(:,39) = strpad('d/dt q_C_Kp in component Kp (fmol)');
    LEGEND_RATES(:,40) = strpad('d/dt q_O_Kp in component Kp (fmol)');
    LEGEND_RATES(:,41) = strpad('d/dt q_sC3 in component Kr (fmol)');
    LEGEND_RATES(:,42) = strpad('d/dt q_sC2 in component Kr (fmol)');
    LEGEND_RATES(:,43) = strpad('d/dt q_sC1 in component Kr (fmol)');
    LEGEND_RATES(:,44) = strpad('d/dt q_sO in component Kr (fmol)');
    LEGEND_RATES(:,45) = strpad('d/dt q_sI in component Kr (fmol)');
    LEGEND_RATES(:,46) = strpad('d/dt q_Sa in component Ks (fmol)');
    LEGEND_RATES(:,47) = strpad('d/dt q_Sb in component Ks (fmol)');
    LEGEND_RATES(:,48) = strpad('d/dt q_Sc in component Ks (fmol)');
    LEGEND_RATES(:,49) = strpad('d/dt q_Sd in component Ks (fmol)');
    LEGEND_RATES(:,50) = strpad('d/dt q_S000_LCC in component LCC (fmol)');
    LEGEND_RATES(:,51) = strpad('d/dt q_S010_LCC in component LCC (fmol)');
    LEGEND_RATES(:,52) = strpad('d/dt q_S020_LCC in component LCC (fmol)');
    LEGEND_RATES(:,53) = strpad('d/dt q_S100_LCC in component LCC (fmol)');
    LEGEND_RATES(:,54) = strpad('d/dt q_S110_LCC in component LCC (fmol)');
    LEGEND_RATES(:,55) = strpad('d/dt q_S120_LCC in component LCC (fmol)');
    LEGEND_RATES(:,56) = strpad('d/dt q_S001_LCC in component LCC (fmol)');
    LEGEND_RATES(:,57) = strpad('d/dt q_S011_LCC in component LCC (fmol)');
    LEGEND_RATES(:,58) = strpad('d/dt q_S021_LCC in component LCC (fmol)');
    LEGEND_RATES(:,59) = strpad('d/dt q_S101_LCC in component LCC (fmol)');
    LEGEND_RATES(:,60) = strpad('d/dt q_S111_LCC in component LCC (fmol)');
    LEGEND_RATES(:,61) = strpad('d/dt q_S121_LCC in component LCC (fmol)');
    LEGEND_RATES(:,62) = strpad('d/dt q_P7 in component NaK (fmol)');
    LEGEND_RATES(:,63) = strpad('d/dt q_P14 in component NaK (fmol)');
    LEGEND_RATES(:,64) = strpad('d/dt q_P15 in component NaK (fmol)');
    LEGEND_RATES(:,65) = strpad('d/dt q_P1 in component NaK (fmol)');
    LEGEND_RATES(:,66) = strpad('d/dt q_P2 in component NaK (fmol)');
    LEGEND_RATES(:,67) = strpad('d/dt q_P3 in component NaK (fmol)');
    LEGEND_RATES(:,68) = strpad('d/dt q_P4 in component NaK (fmol)');
    LEGEND_RATES(:,69) = strpad('d/dt q_P5 in component NaK (fmol)');
    LEGEND_RATES(:,70) = strpad('d/dt q_P6 in component NaK (fmol)');
    LEGEND_RATES(:,71) = strpad('d/dt q_P10 in component NaK (fmol)');
    LEGEND_RATES(:,72) = strpad('d/dt q_P11 in component NaK (fmol)');
    LEGEND_RATES(:,73) = strpad('d/dt q_P12 in component NaK (fmol)');
    LEGEND_RATES(:,74) = strpad('d/dt q_P13 in component NaK (fmol)');
    LEGEND_RATES(:,75) = strpad('d/dt q_P8 in component NaK (fmol)');
    LEGEND_RATES(:,76) = strpad('d/dt q_P9 in component NaK (fmol)');
    LEGEND_RATES(:,77) = strpad('d/dt q_P1_NCX in component NCX (fmol)');
    LEGEND_RATES(:,78) = strpad('d/dt q_P2_NCX in component NCX (fmol)');
    LEGEND_RATES(:,79) = strpad('d/dt q_P3_NCX in component NCX (fmol)');
    LEGEND_RATES(:,80) = strpad('d/dt q_P4_NCX in component NCX (fmol)');
    LEGEND_RATES(:,81) = strpad('d/dt q_P5_NCX in component NCX (fmol)');
    LEGEND_RATES(:,82) = strpad('d/dt q_P6_NCX in component NCX (fmol)');
    LEGEND_RATES(:,86) = strpad('d/dt q_O_RyR in component RyR (fmol)');
    LEGEND_RATES(:,83) = strpad('d/dt q_C_RyR in component RyR (fmol)');
    LEGEND_RATES(:,84) = strpad('d/dt q_CI_RyR in component RyR (fmol)');
    LEGEND_RATES(:,85) = strpad('d/dt q_I_RyR in component RyR (fmol)');
    LEGEND_RATES(:,87) = strpad('d/dt q_s00_TCC in component TCC (fmol)');
    LEGEND_RATES(:,88) = strpad('d/dt q_s10_TCC in component TCC (fmol)');
    LEGEND_RATES(:,89) = strpad('d/dt q_s20_TCC in component TCC (fmol)');
    LEGEND_RATES(:,90) = strpad('d/dt q_s01_TCC in component TCC (fmol)');
    LEGEND_RATES(:,91) = strpad('d/dt q_s11_TCC in component TCC (fmol)');
    LEGEND_RATES(:,92) = strpad('d/dt q_s21_TCC in component TCC (fmol)');
    LEGEND_RATES(:,93) = strpad('d/dt q_s00_to in component to (fmol)');
    LEGEND_RATES(:,94) = strpad('d/dt q_s10_to in component to (fmol)');
    LEGEND_RATES(:,95) = strpad('d/dt q_s20_to in component to (fmol)');
    LEGEND_RATES(:,96) = strpad('d/dt q_s30_to in component to (fmol)');
    LEGEND_RATES(:,97) = strpad('d/dt q_s01_to in component to (fmol)');
    LEGEND_RATES(:,98) = strpad('d/dt q_s11_to in component to (fmol)');
    LEGEND_RATES(:,99) = strpad('d/dt q_s21_to in component to (fmol)');
    LEGEND_RATES(:,100) = strpad('d/dt q_s31_to in component to (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) = 242371;
    CONSTANTS(:,2) = 0.168787;
    CONSTANTS(:,3) = 824.522;
    CONSTANTS(:,4) = 15.1933;
    CONSTANTS(:,5) = 5.20792e+06;
    CONSTANTS(:,6) = 1.61116;
    CONSTANTS(:,7) = 2.18364;
    CONSTANTS(:,8) = 6.75546e-07;
    CONSTANTS(:,9) = 1.62962e+09;
    CONSTANTS(:,10) = 504.151;
    CONSTANTS(:,11) = 683.288;
    CONSTANTS(:,12) = 0.000211387;
    CONSTANTS(:,13) = 1.27482e+11;
    CONSTANTS(:,14) = 39438.7;
    CONSTANTS(:,15) = 53452.3;
    CONSTANTS(:,16) = 0.0165364;
    CONSTANTS(:,17) = 0.0465175;
    CONSTANTS(:,18) = 1.4391e-08;
    CONSTANTS(:,19) = 21.8338;
    CONSTANTS(:,20) = 6.75466e-06;
    CONSTANTS(:,21) = 3416.03;
    CONSTANTS(:,22) = 0.00105681;
    CONSTANTS(:,23) = 178153;
    CONSTANTS(:,24) = 0.0551147;
    CONSTANTS(:,25) = 0.0181396;
    CONSTANTS(:,26) = 7.60579e-09;
    CONSTANTS(:,27) = 8.51415;
    CONSTANTS(:,28) = 3.56992e-06;
    CONSTANTS(:,29) = 1332.09;
    CONSTANTS(:,30) = 0.000558535;
    CONSTANTS(:,31) = 69471.2;
    CONSTANTS(:,32) = 0.0291288;
    CONSTANTS(:,33) = 3.06997e+07;
    CONSTANTS(:,34) = 1.25681e+06;
    CONSTANTS(:,35) = 0.000937554;
    CONSTANTS(:,36) = 0.340284;
    CONSTANTS(:,37) = 3553.55;
    CONSTANTS(:,38) = 14.1957;
    CONSTANTS(:,39) = 62.6864;
    CONSTANTS(:,40) = 1412.58;
    CONSTANTS(:,41) = 0.374318;
    CONSTANTS(:,42) = 0.344937;
    CONSTANTS(:,43) = 3.96058;
    CONSTANTS(:,44) = 151.064;
    CONSTANTS(:,45) = 23.2033;
    CONSTANTS(:,46) = 23349;
    CONSTANTS(:,47) = 1.70139;
    CONSTANTS(:,48) = 1.79332;
    CONSTANTS(:,49) = 0.391403;
    CONSTANTS(:,50) = 0.395408;
    CONSTANTS(:,51) = 2.41865;
    CONSTANTS(:,52) = 4.52281;
    CONSTANTS(:,53) = 0.000574327;
    CONSTANTS(:,54) = 0.00107398;
    CONSTANTS(:,55) = 3657.49;
    CONSTANTS(:,56) = 90.236;
    CONSTANTS(:,57) = 168.739;
    CONSTANTS(:,58) = 0.121729;
    CONSTANTS(:,59) = 0.00300325;
    CONSTANTS(:,60) = 0.005616;
    CONSTANTS(:,61) = 6.73801;
    CONSTANTS(:,62) = 33.4593;
    CONSTANTS(:,63) = 0.000224256;
    CONSTANTS(:,64) = 0.0011136;
    CONSTANTS(:,65) = 12.3403;
    CONSTANTS(:,66) = 61.2788;
    CONSTANTS(:,67) = 0.000410712;
    CONSTANTS(:,68) = 0.00203949;
    CONSTANTS(:,69) = 34665.6;
    CONSTANTS(:,70) = 172140;
    CONSTANTS(:,71) = 1.15375;
    CONSTANTS(:,72) = 5.72922;
    CONSTANTS(:,73) = 41680;
    CONSTANTS(:,74) = 206972;
    CONSTANTS(:,75) = 1028.31;
    CONSTANTS(:,76) = 5106.33;
    CONSTANTS(:,77) = 1922.91;
    CONSTANTS(:,78) = 9548.69;
    CONSTANTS(:,79) = 6.4601;
    CONSTANTS(:,80) = 4260.15;
    CONSTANTS(:,81) = 550354;
    CONSTANTS(:,82) = 1.67861e+06;
    CONSTANTS(:,83) = 2207.88;
    CONSTANTS(:,84) = 4.74267;
    CONSTANTS(:,85) = 0.448596;
    CONSTANTS(:,86) = 0.649586;
    CONSTANTS(:,87) = 4822.81;
    CONSTANTS(:,88) = 8.95167e+06;
    CONSTANTS(:,89) = 230978;
    CONSTANTS(:,90) = 47568.8;
    CONSTANTS(:,91) = 6.45343;
    CONSTANTS(:,92) = 175.793;
    CONSTANTS(:,93) = 0.0578966;
    CONSTANTS(:,94) = 63482.9;
    CONSTANTS(:,95) = 127540;
    CONSTANTS(:,96) = 2.04686e+07;
    CONSTANTS(:,97) = 7564.8;
    CONSTANTS(:,98) = 2.6755e+07;
    CONSTANTS(:,99) = 97573;
    CONSTANTS(:,100) = 0.771004;
    CONSTANTS(:,101) = 69249.3;
    CONSTANTS(:,102) = 3.54612e-07;
    CONSTANTS(:,103) = 1.86016e+06;
    CONSTANTS(:,104) = 8.83262;
    CONSTANTS(:,105) = 0.12618;
    CONSTANTS(:,106) = 883.262;
    CONSTANTS(:,107) = 73.6052;
    CONSTANTS(:,108) = 9.74564e-05;
    CONSTANTS(:,109) = 55564.8;
    CONSTANTS(:,110) = 5.31429e+06;
    CONSTANTS(:,111) = 36814.4;
    CONSTANTS(:,112) = 2620.93;
    CONSTANTS(:,113) = 4.1109e+06;
    CONSTANTS(:,114) = 6.6322e+06;
    CONSTANTS(:,115) = 4.39415e+06;
    CONSTANTS(:,116) = 0.00293513;
    CONSTANTS(:,117) = 51536.7;
    CONSTANTS(:,118) = 54.3421;
    CONSTANTS(:,119) = 2.00823;
    CONSTANTS(:,120) = 147.348;
    CONSTANTS(:,121) = 5.44529;
    CONSTANTS(:,122) = 0.363554;
    CONSTANTS(:,123) = 1.97154;
    CONSTANTS(:,124) = 2.6729;
    CONSTANTS(:,125) = 21540.5;
    CONSTANTS(:,126) = 192.53;
    CONSTANTS(:,127) = 3.81216;
    CONSTANTS(:,128) = 1135.74;
    CONSTANTS(:,129) = 22.4882;
    CONSTANTS(:,130) = 1674.95;
    CONSTANTS(:,131) = 33.1647;
    CONSTANTS(:,132) = 0.0529623;
    CONSTANTS(:,133) = 0.468641;
    CONSTANTS(:,134) = 1.38227;
    CONSTANTS(:,135) = 1.35902;
    CONSTANTS(:,136) = 490.155;
    CONSTANTS(:,137) = 0.123427;
    CONSTANTS(:,138) = 0.127155;
    CONSTANTS(:,139) = 0.0817766;
    CONSTANTS(:,140) = 8.30366;
    CONSTANTS(:,141) = 0.0839104;
    CONSTANTS(:,142) = 0.00510117;
    CONSTANTS(:,143) = 0.00673432;
    CONSTANTS(:,144) = 0.000209594;
    CONSTANTS(:,145) = 4.46546e-07;
    CONSTANTS(:,146) = 2.85413e-09;
    CONSTANTS(:,147) = 5.47271e-11;
    CONSTANTS(:,148) = 499.876;
    CONSTANTS(:,149) = 1.065;
    CONSTANTS(:,150) = 0.00680701;
    CONSTANTS(:,151) = 0.000130522;
    CONSTANTS(:,152) = 677.495;
    CONSTANTS(:,153) = 1.44342;
    CONSTANTS(:,154) = 0.00922571;
    CONSTANTS(:,155) = 0.0001769;
    CONSTANTS(:,156) = 1.61581e+09;
    CONSTANTS(:,157) = 3.44251e+06;
    CONSTANTS(:,158) = 22003;
    CONSTANTS(:,159) = 421.902;
    CONSTANTS(:,160) = 0.436621;
    CONSTANTS(:,161) = 0.393921;
    CONSTANTS(:,162) = 2.73065e-06;
    CONSTANTS(:,163) = 0.290144;
    CONSTANTS(:,164) = 0.00922219;
    CONSTANTS(:,165) = 110.803;
    CONSTANTS(:,166) = 0.463662;
    CONSTANTS(:,167) = 1.62186;
    CONSTANTS(:,168) = 2.21515;
    CONSTANTS(:,169) = 0.183046;
    CONSTANTS(:,170) = 0.0907647;
    CONSTANTS(:,171) = 0.0154927;
    CONSTANTS(:,172) = 0.0652603;
    CONSTANTS(:,173) = 0.0248663;
    CONSTANTS(:,174) = 0.0246145;
    CONSTANTS(:,175) = 0.0235917;
    CONSTANTS(:,176) = 0.0233527;
    CONSTANTS(:,177) = 0.00386879;
    CONSTANTS(:,178) = 0.156812;
    CONSTANTS(:,179) = 0.0838578;
    CONSTANTS(:,180) = 0.000779095;
    CONSTANTS(:,181) = 0.0315787;
    CONSTANTS(:,182) = 0.0168872;
    CONSTANTS(:,183) = 116.242;
    CONSTANTS(:,184) = 4711.57;
    CONSTANTS(:,185) = 2519.6;
    CONSTANTS(:,186) = 23.4087;
    CONSTANTS(:,187) = 948.814;
    CONSTANTS(:,188) = 507.395;
    CONSTANTS(:,189) = 643270;
    CONSTANTS(:,190) = 243.864;
    CONSTANTS(:,191) = 0.369796;
    CONSTANTS(:,192) = 0.121242;
    CONSTANTS(:,193) = 0.159003;
    CONSTANTS(:,194) = 10.7171;
    CONSTANTS(:,195) = 920.695;
    CONSTANTS(:,196) = 1917.62;
    CONSTANTS(:,197) = 157240;
    CONSTANTS(:,198) = 21.1786;
    CONSTANTS(:,199) = 0.0114102;
    CONSTANTS(:,200) = 0.0554042;
    CONSTANTS(:,201) = 1.0761;
    CONSTANTS(:,202) = 0.0238738;
    CONSTANTS(:,203) = 18894.1;
    CONSTANTS(:,204) = 247.372;
    CONSTANTS(:,205) = 3.5586e-05;
    CONSTANTS(:,206) = 0.0713185;
    CONSTANTS(:,207) = 511.426;
    CONSTANTS(:,208) = 1.00251e+07;
    CONSTANTS(:,209) = 2.35415;
    CONSTANTS(:,210) = 623.171;
    CONSTANTS(:,211) = 2937.1;
    CONSTANTS(:,212) = 38902.4;
    CONSTANTS(:,213) = 14.274;
    CONSTANTS(:,214) = 0.0981353;
    CONSTANTS(:,215) = 0.000211459;
    CONSTANTS(:,216) = 115.191;
    CONSTANTS(:,217) = 1.15191;
    CONSTANTS(:,218) = 0.00197471;
    CONSTANTS(:,219) = 0.197471;
    CONSTANTS(:,220) = 738.977;
    CONSTANTS(:,221) = 738.803;
    CONSTANTS(:,222) = 141.676;
    CONSTANTS(:,223) = 16646.9;
    CONSTANTS(:,224) = 0.0229313;
    CONSTANTS(:,225) = 748.013;
    CONSTANTS(:,226) = 28.4329;
    CONSTANTS(:,227) = 139.468;
    CONSTANTS(:,228) = 165.264;
    CONSTANTS(:,229) = 0.141778;
    CONSTANTS(:,230) = 0.026144;
    CONSTANTS(:,231) = 0.0192839;
    CONSTANTS(:,232) = 3.83647;
    CONSTANTS(:,233) = 0.707449;
    CONSTANTS(:,234) = 0.521817;
    CONSTANTS(:,235) = 0.777577;
    CONSTANTS(:,236) = 0.0878759;
    CONSTANTS(:,237) = 0.0297932;
    CONSTANTS(:,238) = 0.030303;
    CONSTANTS(:,239) = 39.2709;
    CONSTANTS(:,240) = 4.4381;
    CONSTANTS(:,241) = 1.50468;
    CONSTANTS(:,242) = 1.53043;
    CONSTANTS(:,243) = 13.9681;
    CONSTANTS(:,244) = 0.0296536;
    CONSTANTS(:,245) = 1;
    CONSTANTS(:,246) = 1;
    CONSTANTS(:,247) = 2;
    CONSTANTS(:,248) = -4.1892;
    CONSTANTS(:,249) = -4.0381;
    CONSTANTS(:,250) = 0.49541;
    CONSTANTS(:,251) = 1.2995;
    CONSTANTS(:,252) = 1.4281;
    CONSTANTS(:,253) = -2.4284;
    CONSTANTS(:,254) = -2.29569;
    CONSTANTS(:,255) = 0.707659;
    CONSTANTS(:,256) = 0.033569;
    CONSTANTS(:,257) = 3.1153;
    CONSTANTS(:,258) = 0;
    CONSTANTS(:,259) = -4.4669;
    CONSTANTS(:,260) = 1.4817742126948799;
    CONSTANTS(:,261) = -9.725716585291577E-10;
    CONSTANTS(:,262) = 1.4817741191419156;
    CONSTANTS(:,263) = 0.025163022463863618;
    CONSTANTS(:,264) = 1.4817747544708493;
    CONSTANTS(:,265) = -0.9773508897589006;
    CONSTANTS(:,266) = 2.160329184802016E-9;
    CONSTANTS(:,267) = -0.5764521068716814;
    CONSTANTS(:,268) = -0.6282742056664367;
    CONSTANTS(:,269) = 4.193438208614746;
    CONSTANTS(:,270) = 0.713913791;
    CONSTANTS(:,271) = -0.487104094;
    CONSTANTS(:,272) = 0.779849565;
    CONSTANTS(:,273) = -0.518794843;
    CONSTANTS(:,274) = 2.1404;
    CONSTANTS(:,275) = -1.1495;
    CONSTANTS(:,276) = 0.72162;
    CONSTANTS(:,277) = 4.2933;
    CONSTANTS(:,278) = 2;
    CONSTANTS(:,279) = -2.1404;
    CONSTANTS(:,280) = 1.8993;
    CONSTANTS(:,281) = -0.52288;
    CONSTANTS(:,282) = 0;
    CONSTANTS(:,283) = -5301.979;
    CONSTANTS(:,284) = -91183.021;
    CONSTANTS(:,285) = -0.55679;
    CONSTANTS(:,286) = 0.44321;
    CONSTANTS(:,287) = 3;
    CONSTANTS(:,288) = 3;
    CONSTANTS(:,289) = 0.3429854720383411;
    CONSTANTS(:,290) = -0.4500912005641351;
    CONSTANTS(:,291) = -0.2775102001007474;
    CONSTANTS(:,292) = 0.375200850350315;
    CONSTANTS(:,293) = 0.668915;
    CONSTANTS(:,294) = -0.652791;
    CONSTANTS(:,295) = -0.604422;
    CONSTANTS(:,296) = 0.591213;
    CONSTANTS(:,297) = 0.5;
    CONSTANTS(:,298) = 34.4;
    CONSTANTS(:,299) = 153400;
    CONSTANTS(:,300) = 500;
    STATES(:,1) = 0.00456;
    STATES(:,2) = 9.3276;
    STATES(:,3) = 6.41e-1;
    STATES(:,4) = 1.8088;
    STATES(:,5) = 0.0912;
    STATES(:,6) = 380;
    STATES(:,7) = 725.48;
    STATES(:,8) = 5510;
    STATES(:,9) = 27.9828;
    STATES(:,10) = 264.1;
    STATES(:,11) = 1.33;
    STATES(:,12) = 15.0898;
    STATES(:,13) = 0.0030534;
    STATES(:,14) = 1.203919e-06;
    STATES(:,15) = 1e-12;
    STATES(:,16) = 2.1452;
    STATES(:,17) = 0.51484;
    STATES(:,18) = -13039;
    CONSTANTS(:,301) = 8.31;
    CONSTANTS(:,302) = 310;
    CONSTANTS(:,303) = 96485;
    STATES(:,19) = 0.00012033;
    STATES(:,20) = 1.337e-05;
    STATES(:,21) = 4.0111e-05;
    STATES(:,22) = 4.4568e-06;
    STATES(:,23) = 4.4568e-06;
    STATES(:,24) = 4.952e-07;
    STATES(:,25) = 1.6507e-07;
    STATES(:,26) = 1.8341e-08;
    STATES(:,27) = 1.337e-05;
    STATES(:,28) = 1.4856e-06;
    STATES(:,29) = 4.4568e-06;
    STATES(:,30) = 4.952e-07;
    STATES(:,31) = 4.952e-07;
    STATES(:,32) = 5.5022e-08;
    STATES(:,33) = 1.8341e-08;
    STATES(:,34) = 2.0379e-09;
    STATES(:,35) = 1;
    STATES(:,36) = 1e-12;
    STATES(:,37) = 5.6606e-06;
    STATES(:,38) = 1.4151e-06;
    STATES(:,39) = 9.6314e-07;
    STATES(:,40) = 2.4078e-07;
    STATES(:,41) = 1.65881420e-4;
    STATES(:,42) = 1.42042000e-5;
    STATES(:,43) = 2.23800000e-5;
    STATES(:,44) = 3.560000000e-5;
    STATES(:,45) = 2.03995940e-5;
    STATES(:,46) = 0.999997;
    STATES(:,47) = 1e-6;
    STATES(:,48) = 1e-6;
    STATES(:,49) = 1e-6;
    STATES(:,50) = 3.6989e-07;
    STATES(:,51) = 7.3239e-05;
    STATES(:,52) = 3.6989e-07;
    STATES(:,53) = 3.7363e-09;
    STATES(:,54) = 7.3979e-07;
    STATES(:,55) = 3.7363e-09;
    STATES(:,56) = 4.1099e-08;
    STATES(:,57) = 8.1377e-06;
    STATES(:,58) = 4.1099e-08;
    STATES(:,59) = 4.1514e-10;
    STATES(:,60) = 8.2199e-08;
    STATES(:,61) = 4.1514e-10;
    STATES(:,62) = 0.0078543;
    STATES(:,63) = 0.0078543;
    STATES(:,64) = 0.0078543;
    STATES(:,65) = 0.0078543;
    STATES(:,66) = 0.0078543;
    STATES(:,67) = 0.0078543;
    STATES(:,68) = 0.0078543;
    STATES(:,69) = 0.0078543;
    STATES(:,70) = 0.0078543;
    STATES(:,71) = 0.0078543;
    STATES(:,72) = 0.0078543;
    STATES(:,73) = 0.0078543;
    STATES(:,74) = 0.0078543;
    STATES(:,75) = 0.0078543;
    STATES(:,76) = 0.0078543;
    STATES(:,77) = 0.00072174;
    STATES(:,78) = 0.00072174;
    STATES(:,79) = 0.00072174;
    STATES(:,80) = 0.00072174;
    STATES(:,81) = 0.00072174;
    STATES(:,82) = 0.00072174;
    CONSTANTS(:,304) = 1;
    CONSTANTS(:,305) = 2;
    STATES(:,83) = 0.25e-3;
    STATES(:,84) = 0.25e-3;
    STATES(:,85) = 0.25e-3;
    STATES(:,86) = 0.25e-3;
    CONSTANTS(:,306) = 2;
    CONSTANTS(:,307) = 2;
    CONSTANTS(:,308) = 2;
    CONSTANTS(:,309) = 0.11111;
    CONSTANTS(:,310) = 0.11111;
    CONSTANTS(:,311) = 0.11111;
    CONSTANTS(:,312) = 0.11111;
    CONSTANTS(:,313) = 0.11111;
    CONSTANTS(:,314) = 0.11111;
    CONSTANTS(:,315) = 0.11111;
    CONSTANTS(:,316) = 0.11111;
    CONSTANTS(:,317) = 0.11111;
    CONSTANTS(:,318) = 34.0;
    STATES(:,87) = 0.999995;
    STATES(:,88) = 1e-6;
    STATES(:,89) = 1e-6;
    STATES(:,90) = 1e-6;
    STATES(:,91) = 1e-6;
    STATES(:,92) = 1e-6;
    CONSTANTS(:,319) = 1;
    CONSTANTS(:,320) = 1;
    STATES(:,93) = 0.999993;
    STATES(:,94) = 1e-6;
    STATES(:,95) = 1e-6;
    STATES(:,96) = 1e-6;
    STATES(:,97) = 1e-6;
    STATES(:,98) = 1e-6;
    STATES(:,99) = 1e-6;
    STATES(:,100) = 1e-6;
    CONSTANTS(:,321) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,220).*CONSTANTS(:,309));
    CONSTANTS(:,322) =  CONSTANTS(:,306).*CONSTANTS(:,312)+ CONSTANTS(:,306).*CONSTANTS(:,313)+ CONSTANTS(:,307).*CONSTANTS(:,315);
    CONSTANTS(:,323) =  CONSTANTS(:,318).*0.0350000;
    CONSTANTS(:,324) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,221).*CONSTANTS(:,310));
    CONSTANTS(:,325) = CONSTANTS(:,318)+CONSTANTS(:,323);
    CONSTANTS(:,326) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,222).*CONSTANTS(:,311));
    CONSTANTS(:,327) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,223).*CONSTANTS(:,312));
    CONSTANTS(:,328) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,224).*CONSTANTS(:,313));
    CONSTANTS(:,329) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,228).*CONSTANTS(:,314));
    CONSTANTS(:,330) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,225).*CONSTANTS(:,315));
    CONSTANTS(:,331) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,226).*CONSTANTS(:,316));
    CONSTANTS(:,332) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,227).*CONSTANTS(:,317));
    CONSTANTS(:,333) = CONSTANTS(:,329);
    CONSTANTS(:,334) = CONSTANTS(:,324);
    CONSTANTS(:,335) = CONSTANTS(:,328);
    CONSTANTS(:,336) = CONSTANTS(:,326);
    CONSTANTS(:,337) = CONSTANTS(:,327);
    CONSTANTS(:,338) = CONSTANTS(:,327);
    CONSTANTS(:,339) = CONSTANTS(:,330);
    CONSTANTS(:,340) = CONSTANTS(:,332);
    CONSTANTS(:,341) = CONSTANTS(:,332);
    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(:,38) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,140).*STATES(:,4));
    ALGEBRAIC(:,41) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,42) = ALGEBRAIC(:,41)+ALGEBRAIC(:,38);
    ALGEBRAIC(:,39) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,141).*STATES(:,5));
    ALGEBRAIC(:,40) = ALGEBRAIC(:,39);
    ALGEBRAIC(:,43) =  CONSTANTS(:,3).*(exp(ALGEBRAIC(:,42)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,40)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    RATES(:,4) =  - ALGEBRAIC(:,43);
    RATES(:,5) = ALGEBRAIC(:,43);
    ALGEBRAIC(:,44) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,49) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,144).*STATES(:,19))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,79) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,148).*STATES(:,20))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,80) =  CONSTANTS(:,17).*(exp(ALGEBRAIC(:,49)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,79)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,57) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,144).*STATES(:,19))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,95) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,152).*STATES(:,27))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,96) =  CONSTANTS(:,25).*(exp(ALGEBRAIC(:,57)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,95)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,65) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,144).*STATES(:,19))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,111) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,145).*STATES(:,21))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,112) =  CONSTANTS(:,5).*(exp(ALGEBRAIC(:,65)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,111)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,113) = ( - ALGEBRAIC(:,112) - ALGEBRAIC(:,80)) - ALGEBRAIC(:,96);
    RATES(:,19) = ALGEBRAIC(:,113);
    ALGEBRAIC(:,50) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,152).*STATES(:,27))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,81) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,156).*STATES(:,28))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,82) =  CONSTANTS(:,18).*(exp(ALGEBRAIC(:,50)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,81)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,66) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,152).*STATES(:,27))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,114) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,153).*STATES(:,29))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,115) =  CONSTANTS(:,6).*(exp(ALGEBRAIC(:,66)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,114)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,116) = ( - ALGEBRAIC(:,115) - ALGEBRAIC(:,82)) -  - ALGEBRAIC(:,96);
    RATES(:,27) = ALGEBRAIC(:,116);
    ALGEBRAIC(:,58) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,148).*STATES(:,20))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,97) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,156).*STATES(:,28))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,98) =  CONSTANTS(:,26).*(exp(ALGEBRAIC(:,58)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,97)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,67) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,148).*STATES(:,20))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,117) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,149).*STATES(:,22))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,118) =  CONSTANTS(:,7).*(exp(ALGEBRAIC(:,67)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,117)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,119) = ( - ALGEBRAIC(:,118)+ALGEBRAIC(:,80)) - ALGEBRAIC(:,98);
    RATES(:,20) = ALGEBRAIC(:,119);
    ALGEBRAIC(:,68) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,156).*STATES(:,28))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,120) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,157).*STATES(:,30))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,121) =  CONSTANTS(:,8).*(exp(ALGEBRAIC(:,68)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,120)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,122) = ( - ALGEBRAIC(:,121)+ALGEBRAIC(:,82)) -  - ALGEBRAIC(:,98);
    RATES(:,28) = ALGEBRAIC(:,122);
    ALGEBRAIC(:,51) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,145).*STATES(:,21))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,83) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,149).*STATES(:,22))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,84) =  CONSTANTS(:,19).*(exp(ALGEBRAIC(:,51)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,83)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,59) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,145).*STATES(:,21))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,99) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,153).*STATES(:,29))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,100) =  CONSTANTS(:,27).*(exp(ALGEBRAIC(:,59)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,99)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,69) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,145).*STATES(:,21))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,123) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,146).*STATES(:,23))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,124) =  CONSTANTS(:,9).*(exp(ALGEBRAIC(:,69)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,123)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,125) = ((ALGEBRAIC(:,112) - ALGEBRAIC(:,124)) - ALGEBRAIC(:,84)) - ALGEBRAIC(:,100);
    RATES(:,21) = ALGEBRAIC(:,125);
    ALGEBRAIC(:,52) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,153).*STATES(:,29))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,85) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,157).*STATES(:,30))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,86) =  CONSTANTS(:,20).*(exp(ALGEBRAIC(:,52)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,85)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,70) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,153).*STATES(:,29))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,126) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,154).*STATES(:,31))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,127) =  CONSTANTS(:,10).*(exp(ALGEBRAIC(:,70)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,126)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,128) = ((ALGEBRAIC(:,115) - ALGEBRAIC(:,127)) - ALGEBRAIC(:,86)) -  - ALGEBRAIC(:,100);
    RATES(:,29) = ALGEBRAIC(:,128);
    ALGEBRAIC(:,60) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,149).*STATES(:,22))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,101) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,157).*STATES(:,30))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,102) =  CONSTANTS(:,28).*(exp(ALGEBRAIC(:,60)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,101)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,71) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,149).*STATES(:,22))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,129) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,150).*STATES(:,24))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,130) =  CONSTANTS(:,11).*(exp(ALGEBRAIC(:,71)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,129)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,131) = ((ALGEBRAIC(:,118) - ALGEBRAIC(:,130))+ALGEBRAIC(:,84)) - ALGEBRAIC(:,102);
    RATES(:,22) = ALGEBRAIC(:,131);
    ALGEBRAIC(:,72) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,157).*STATES(:,30))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,132) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,158).*STATES(:,32))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,133) =  CONSTANTS(:,12).*(exp(ALGEBRAIC(:,72)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,132)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,134) = ((ALGEBRAIC(:,121) - ALGEBRAIC(:,133))+ALGEBRAIC(:,86)) -  - ALGEBRAIC(:,102);
    RATES(:,30) = ALGEBRAIC(:,134);
    ALGEBRAIC(:,53) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,146).*STATES(:,23))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,87) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,150).*STATES(:,24))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,88) =  CONSTANTS(:,21).*(exp(ALGEBRAIC(:,53)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,87)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,61) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,146).*STATES(:,23))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,103) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,154).*STATES(:,31))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,104) =  CONSTANTS(:,29).*(exp(ALGEBRAIC(:,61)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,103)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,73) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,146).*STATES(:,23))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,135) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,147).*STATES(:,25))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,136) =  CONSTANTS(:,13).*(exp(ALGEBRAIC(:,73)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,135)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,137) = ((ALGEBRAIC(:,124) - ALGEBRAIC(:,136)) - ALGEBRAIC(:,88)) - ALGEBRAIC(:,104);
    RATES(:,23) = ALGEBRAIC(:,137);
    ALGEBRAIC(:,55) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,147).*STATES(:,25))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,91) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,151).*STATES(:,26))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,92) =  CONSTANTS(:,23).*(exp(ALGEBRAIC(:,55)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,91)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,63) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,147).*STATES(:,25))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,107) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,155).*STATES(:,33))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,108) =  CONSTANTS(:,31).*(exp(ALGEBRAIC(:,63)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,107)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,138) = (ALGEBRAIC(:,136) - ALGEBRAIC(:,92)) - ALGEBRAIC(:,108);
    RATES(:,25) = ALGEBRAIC(:,138);
    ALGEBRAIC(:,54) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,154).*STATES(:,31))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,89) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,158).*STATES(:,32))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,90) =  CONSTANTS(:,22).*(exp(ALGEBRAIC(:,54)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,89)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,74) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,154).*STATES(:,31))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,139) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,155).*STATES(:,33))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,140) =  CONSTANTS(:,14).*(exp(ALGEBRAIC(:,74)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,139)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,141) = ((ALGEBRAIC(:,127) - ALGEBRAIC(:,140)) - ALGEBRAIC(:,90)) -  - ALGEBRAIC(:,104);
    RATES(:,31) = ALGEBRAIC(:,141);
    ALGEBRAIC(:,56) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,155).*STATES(:,33))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,93) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,159).*STATES(:,34))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,94) =  CONSTANTS(:,24).*(exp(ALGEBRAIC(:,56)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,93)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,142) = (ALGEBRAIC(:,140) - ALGEBRAIC(:,94)) -  - ALGEBRAIC(:,108);
    RATES(:,33) = ALGEBRAIC(:,142);
    ALGEBRAIC(:,62) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,150).*STATES(:,24))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,105) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,158).*STATES(:,32))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,106) =  CONSTANTS(:,30).*(exp(ALGEBRAIC(:,62)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,105)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,75) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,150).*STATES(:,24))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,143) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,151).*STATES(:,26))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,144) =  CONSTANTS(:,15).*(exp(ALGEBRAIC(:,75)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,143)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,145) = ((ALGEBRAIC(:,130) - ALGEBRAIC(:,144))+ALGEBRAIC(:,88)) - ALGEBRAIC(:,106);
    RATES(:,24) = ALGEBRAIC(:,145);
    ALGEBRAIC(:,64) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,151).*STATES(:,26))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,109) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,159).*STATES(:,34))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,110) =  CONSTANTS(:,32).*(exp(ALGEBRAIC(:,64)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,109)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,146) = (ALGEBRAIC(:,144)+ALGEBRAIC(:,92)) - ALGEBRAIC(:,110);
    RATES(:,26) = ALGEBRAIC(:,146);
    ALGEBRAIC(:,76) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,158).*STATES(:,32))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,147) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,159).*STATES(:,34))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,148) =  CONSTANTS(:,16).*(exp(ALGEBRAIC(:,76)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,147)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,149) = ((ALGEBRAIC(:,133) - ALGEBRAIC(:,148))+ALGEBRAIC(:,90)) -  - ALGEBRAIC(:,106);
    RATES(:,32) = ALGEBRAIC(:,149);
    ALGEBRAIC(:,77) =  CONSTANTS(:,246).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,46) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,142).*STATES(:,6));
    ALGEBRAIC(:,47) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,159).*STATES(:,34));
    ALGEBRAIC(:,48) = ALGEBRAIC(:,46)+ CONSTANTS(:,246).*CONSTANTS(:,303).*ALGEBRAIC(:,44)+ALGEBRAIC(:,47);
    ALGEBRAIC(:,45) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,143).*STATES(:,7));
    ALGEBRAIC(:,78) = ALGEBRAIC(:,45)+ALGEBRAIC(:,47);
    ALGEBRAIC(:,150) = piecewise({ALGEBRAIC(:,77)==0.000000,  CONSTANTS(:,4).*(exp(ALGEBRAIC(:,48)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,78)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,4).*ALGEBRAIC(:,77))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,77)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,48)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,78)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,151) = (ALGEBRAIC(:,148)+ALGEBRAIC(:,94)) - (( - ALGEBRAIC(:,110)+ALGEBRAIC(:,150)) - ALGEBRAIC(:,150));
    RATES(:,34) = ALGEBRAIC(:,151);
    ALGEBRAIC(:,157) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,160) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,162).*STATES(:,35));
    ALGEBRAIC(:,168) = ALGEBRAIC(:,160)+ CONSTANTS(:,254).*CONSTANTS(:,303).*ALGEBRAIC(:,157);
    ALGEBRAIC(:,161) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,163).*STATES(:,36));
    ALGEBRAIC(:,169) = ALGEBRAIC(:,161)+ CONSTANTS(:,255).*CONSTANTS(:,303).*ALGEBRAIC(:,157);
    ALGEBRAIC(:,170) =  CONSTANTS(:,35).*(exp(ALGEBRAIC(:,168)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,169)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    RATES(:,35) =  - ALGEBRAIC(:,170);
    RATES(:,36) = ALGEBRAIC(:,170);
    ALGEBRAIC(:,172) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,177) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,164).*STATES(:,37))+ CONSTANTS(:,256).*CONSTANTS(:,303).*ALGEBRAIC(:,172);
    ALGEBRAIC(:,180) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,165).*STATES(:,38))+ CONSTANTS(:,257).*CONSTANTS(:,303).*ALGEBRAIC(:,172);
    ALGEBRAIC(:,181) =  CONSTANTS(:,37).*(exp(ALGEBRAIC(:,177)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,180)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,182) =  - ALGEBRAIC(:,181);
    RATES(:,37) = ALGEBRAIC(:,182);
    ALGEBRAIC(:,178) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,172);
    ALGEBRAIC(:,173) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,174) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,175) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,165).*STATES(:,38));
    ALGEBRAIC(:,176) = ALGEBRAIC(:,174)+ CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,172)+ALGEBRAIC(:,175)+ CONSTANTS(:,297).*ALGEBRAIC(:,173);
    ALGEBRAIC(:,179) = ALGEBRAIC(:,173)+ALGEBRAIC(:,175)+ CONSTANTS(:,297).*ALGEBRAIC(:,173);
    ALGEBRAIC(:,183) = piecewise({ALGEBRAIC(:,178)==0.000000,  CONSTANTS(:,36).*(exp(ALGEBRAIC(:,176)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,179)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,36).*ALGEBRAIC(:,178))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,178)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,176)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,179)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,184) = ALGEBRAIC(:,181) - (ALGEBRAIC(:,183) - ALGEBRAIC(:,183));
    RATES(:,38) = ALGEBRAIC(:,184);
    ALGEBRAIC(:,186) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,191) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,166).*STATES(:,39))+ CONSTANTS(:,258).*CONSTANTS(:,303).*ALGEBRAIC(:,186);
    ALGEBRAIC(:,194) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,167).*STATES(:,40))+ CONSTANTS(:,259).*CONSTANTS(:,303).*ALGEBRAIC(:,186);
    ALGEBRAIC(:,195) =  CONSTANTS(:,39).*(exp(ALGEBRAIC(:,191)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,194)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,196) =  - ALGEBRAIC(:,195);
    RATES(:,39) = ALGEBRAIC(:,196);
    ALGEBRAIC(:,192) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,186);
    ALGEBRAIC(:,188) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,189) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,167).*STATES(:,40));
    ALGEBRAIC(:,190) = ALGEBRAIC(:,188)+ CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,186)+ALGEBRAIC(:,189);
    ALGEBRAIC(:,187) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,193) = ALGEBRAIC(:,187)+ALGEBRAIC(:,189);
    ALGEBRAIC(:,197) = piecewise({ALGEBRAIC(:,192)==0.000000,  CONSTANTS(:,38).*(exp(ALGEBRAIC(:,190)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,193)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,38).*ALGEBRAIC(:,192))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,192)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,190)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,193)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,198) = ALGEBRAIC(:,195) - (ALGEBRAIC(:,197) - ALGEBRAIC(:,197));
    RATES(:,40) = ALGEBRAIC(:,198);
    ALGEBRAIC(:,202) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,204) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,168).*STATES(:,41));
    ALGEBRAIC(:,205) = ALGEBRAIC(:,204)+ CONSTANTS(:,260).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,206) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,169).*STATES(:,42));
    ALGEBRAIC(:,207) = ALGEBRAIC(:,206)+ CONSTANTS(:,265).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,209) =  CONSTANTS(:,41).*(exp(ALGEBRAIC(:,205)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,207)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,210) =  - ALGEBRAIC(:,209);
    RATES(:,41) = ALGEBRAIC(:,210);
    ALGEBRAIC(:,208) = ALGEBRAIC(:,206)+ CONSTANTS(:,261).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,211) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,170).*STATES(:,43));
    ALGEBRAIC(:,212) = ALGEBRAIC(:,211)+ CONSTANTS(:,266).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,215) =  CONSTANTS(:,42).*(exp(ALGEBRAIC(:,208)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,212)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,216) = ALGEBRAIC(:,209) - ALGEBRAIC(:,215);
    RATES(:,42) = ALGEBRAIC(:,216);
    ALGEBRAIC(:,213) = ALGEBRAIC(:,211)+ CONSTANTS(:,262).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,217) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,171).*STATES(:,44));
    ALGEBRAIC(:,221) = ALGEBRAIC(:,217)+ CONSTANTS(:,267).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,223) =  CONSTANTS(:,43).*(exp(ALGEBRAIC(:,213)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,221)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,214) = ALGEBRAIC(:,211)+ CONSTANTS(:,263).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,224) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,172).*STATES(:,45));
    ALGEBRAIC(:,225) = ALGEBRAIC(:,224)+ CONSTANTS(:,268).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,227) =  CONSTANTS(:,44).*(exp(ALGEBRAIC(:,214)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,225)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,228) = (ALGEBRAIC(:,215) - ALGEBRAIC(:,223)) - ALGEBRAIC(:,227);
    RATES(:,43) = ALGEBRAIC(:,228);
    ALGEBRAIC(:,222) = ALGEBRAIC(:,217)+ CONSTANTS(:,264).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,226) = ALGEBRAIC(:,224)+ CONSTANTS(:,269).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,229) =  CONSTANTS(:,45).*(exp(ALGEBRAIC(:,222)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,226)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,230) = ALGEBRAIC(:,223) - ALGEBRAIC(:,229);
    RATES(:,44) = ALGEBRAIC(:,230);
    ALGEBRAIC(:,231) = ALGEBRAIC(:,227)+ALGEBRAIC(:,229);
    RATES(:,45) = ALGEBRAIC(:,231);
    ALGEBRAIC(:,235) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,237) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,173).*STATES(:,46));
    ALGEBRAIC(:,238) = ALGEBRAIC(:,237)+ CONSTANTS(:,270).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,240) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,174).*STATES(:,47));
    ALGEBRAIC(:,241) = ALGEBRAIC(:,240)+ CONSTANTS(:,271).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,243) =  CONSTANTS(:,47).*(exp(ALGEBRAIC(:,238)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,241)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,239) = ALGEBRAIC(:,237)+ CONSTANTS(:,272).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,244) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,175).*STATES(:,48));
    ALGEBRAIC(:,246) = ALGEBRAIC(:,244)+ CONSTANTS(:,273).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,247) =  CONSTANTS(:,49).*(exp(ALGEBRAIC(:,239)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,246)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,248) =  - ALGEBRAIC(:,243) - ALGEBRAIC(:,247);
    RATES(:,46) = ALGEBRAIC(:,248);
    ALGEBRAIC(:,245) = ALGEBRAIC(:,244)+ CONSTANTS(:,270).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,249) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,176).*STATES(:,49));
    ALGEBRAIC(:,253) = ALGEBRAIC(:,249)+ CONSTANTS(:,271).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,255) =  CONSTANTS(:,48).*(exp(ALGEBRAIC(:,245)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,253)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,256) = ALGEBRAIC(:,247) - ALGEBRAIC(:,255);
    RATES(:,48) = ALGEBRAIC(:,256);
    ALGEBRAIC(:,242) = ALGEBRAIC(:,240)+ CONSTANTS(:,272).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,254) = ALGEBRAIC(:,249)+ CONSTANTS(:,273).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,257) =  CONSTANTS(:,50).*(exp(ALGEBRAIC(:,242)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,254)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,258) = ALGEBRAIC(:,243) - ALGEBRAIC(:,257);
    RATES(:,47) = ALGEBRAIC(:,258);
    ALGEBRAIC(:,259) = ALGEBRAIC(:,255)+ALGEBRAIC(:,257);
    RATES(:,49) = ALGEBRAIC(:,259);
    ALGEBRAIC(:,266) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,177).*STATES(:,50));
    ALGEBRAIC(:,296) = ALGEBRAIC(:,266);
    ALGEBRAIC(:,263) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,346) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,183).*STATES(:,56))+ CONSTANTS(:,278).*ALGEBRAIC(:,263);
    ALGEBRAIC(:,347) =  CONSTANTS(:,73).*(exp(ALGEBRAIC(:,296)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,346)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,261) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,278) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,177).*STATES(:,50))+ CONSTANTS(:,274).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,310) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,180).*STATES(:,53))+ CONSTANTS(:,279).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,311) =  CONSTANTS(:,55).*(exp(ALGEBRAIC(:,278)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,310)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,284) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,177).*STATES(:,50))+ CONSTANTS(:,275).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,322) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,178).*STATES(:,51))+ CONSTANTS(:,280).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,323) =  CONSTANTS(:,61).*(exp(ALGEBRAIC(:,284)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,322)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,288) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,177).*STATES(:,50))+ CONSTANTS(:,276).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,330) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,179).*STATES(:,52))+ CONSTANTS(:,281).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,331) =  CONSTANTS(:,65).*(exp(ALGEBRAIC(:,288)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,330)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,349) = (( - ALGEBRAIC(:,311) - ALGEBRAIC(:,323)) - ALGEBRAIC(:,331)) - ALGEBRAIC(:,347);
    RATES(:,50) = ALGEBRAIC(:,349);
    ALGEBRAIC(:,279) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,183).*STATES(:,56))+ CONSTANTS(:,274).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,312) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,186).*STATES(:,59))+ CONSTANTS(:,279).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,313) =  CONSTANTS(:,58).*(exp(ALGEBRAIC(:,279)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,312)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,285) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,183).*STATES(:,56))+ CONSTANTS(:,275).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,324) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,184).*STATES(:,57))+ CONSTANTS(:,280).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,325) =  CONSTANTS(:,63).*(exp(ALGEBRAIC(:,285)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,324)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,289) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,183).*STATES(:,56))+ CONSTANTS(:,276).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,332) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,185).*STATES(:,58))+ CONSTANTS(:,281).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,333) =  CONSTANTS(:,67).*(exp(ALGEBRAIC(:,289)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,332)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,350) = (( - ALGEBRAIC(:,313) - ALGEBRAIC(:,325)) - ALGEBRAIC(:,333)) -  - ALGEBRAIC(:,347);
    RATES(:,56) = ALGEBRAIC(:,350);
    ALGEBRAIC(:,267) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,178).*STATES(:,51));
    ALGEBRAIC(:,297) = ALGEBRAIC(:,267);
    ALGEBRAIC(:,348) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,184).*STATES(:,57))+ CONSTANTS(:,278).*ALGEBRAIC(:,263);
    ALGEBRAIC(:,351) =  CONSTANTS(:,75).*(exp(ALGEBRAIC(:,297)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,348)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,280) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,178).*STATES(:,51))+ CONSTANTS(:,274).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,314) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,181).*STATES(:,54))+ CONSTANTS(:,279).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,315) =  CONSTANTS(:,56).*(exp(ALGEBRAIC(:,280)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,314)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,292) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,178).*STATES(:,51))+ CONSTANTS(:,277).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,338) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,179).*STATES(:,52))+ CONSTANTS(:,282).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,339) =  CONSTANTS(:,69).*(exp(ALGEBRAIC(:,292)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,338)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,353) = (( - ALGEBRAIC(:,315)+ALGEBRAIC(:,323)) - ALGEBRAIC(:,351)) - ALGEBRAIC(:,339);
    RATES(:,51) = ALGEBRAIC(:,353);
    ALGEBRAIC(:,281) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,184).*STATES(:,57))+ CONSTANTS(:,274).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,316) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,187).*STATES(:,60))+ CONSTANTS(:,279).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,317) =  CONSTANTS(:,59).*(exp(ALGEBRAIC(:,281)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,316)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,293) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,184).*STATES(:,57))+ CONSTANTS(:,277).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,340) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,185).*STATES(:,58))+ CONSTANTS(:,282).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,341) =  CONSTANTS(:,71).*(exp(ALGEBRAIC(:,293)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,340)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,354) = (( - ALGEBRAIC(:,317)+ALGEBRAIC(:,325)) -  - ALGEBRAIC(:,351)) - ALGEBRAIC(:,341);
    RATES(:,57) = ALGEBRAIC(:,354);
    ALGEBRAIC(:,268) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,179).*STATES(:,52));
    ALGEBRAIC(:,298) = ALGEBRAIC(:,268);
    ALGEBRAIC(:,352) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,185).*STATES(:,58))+ CONSTANTS(:,278).*ALGEBRAIC(:,263);
    ALGEBRAIC(:,355) =  CONSTANTS(:,77).*(exp(ALGEBRAIC(:,298)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,352)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,282) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,179).*STATES(:,52))+ CONSTANTS(:,274).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,318) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,182).*STATES(:,55))+ CONSTANTS(:,279).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,319) =  CONSTANTS(:,57).*(exp(ALGEBRAIC(:,282)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,318)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,357) = (( - ALGEBRAIC(:,319)+ALGEBRAIC(:,331)) - ALGEBRAIC(:,355))+ALGEBRAIC(:,339);
    RATES(:,52) = ALGEBRAIC(:,357);
    ALGEBRAIC(:,283) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,185).*STATES(:,58))+ CONSTANTS(:,274).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,320) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,188).*STATES(:,61))+ CONSTANTS(:,279).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,321) =  CONSTANTS(:,60).*(exp(ALGEBRAIC(:,283)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,320)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,358) = (( - ALGEBRAIC(:,321)+ALGEBRAIC(:,333)) -  - ALGEBRAIC(:,355))+ALGEBRAIC(:,341);
    RATES(:,58) = ALGEBRAIC(:,358);
    ALGEBRAIC(:,269) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,180).*STATES(:,53));
    ALGEBRAIC(:,299) = ALGEBRAIC(:,269);
    ALGEBRAIC(:,356) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,186).*STATES(:,59))+ CONSTANTS(:,278).*ALGEBRAIC(:,263);
    ALGEBRAIC(:,359) =  CONSTANTS(:,74).*(exp(ALGEBRAIC(:,299)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,356)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,286) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,180).*STATES(:,53))+ CONSTANTS(:,275).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,326) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,181).*STATES(:,54))+ CONSTANTS(:,280).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,327) =  CONSTANTS(:,62).*(exp(ALGEBRAIC(:,286)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,326)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,290) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,180).*STATES(:,53))+ CONSTANTS(:,276).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,334) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,182).*STATES(:,55))+ CONSTANTS(:,281).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,335) =  CONSTANTS(:,66).*(exp(ALGEBRAIC(:,290)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,334)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,361) = (( - ALGEBRAIC(:,335)+ALGEBRAIC(:,311)) - ALGEBRAIC(:,327)) - ALGEBRAIC(:,359);
    RATES(:,53) = ALGEBRAIC(:,361);
    ALGEBRAIC(:,287) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,186).*STATES(:,59))+ CONSTANTS(:,275).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,328) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,187).*STATES(:,60))+ CONSTANTS(:,280).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,329) =  CONSTANTS(:,64).*(exp(ALGEBRAIC(:,287)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,328)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,291) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,186).*STATES(:,59))+ CONSTANTS(:,276).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,336) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,188).*STATES(:,61))+ CONSTANTS(:,281).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,337) =  CONSTANTS(:,68).*(exp(ALGEBRAIC(:,291)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,336)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,362) = (( - ALGEBRAIC(:,337)+ALGEBRAIC(:,313)) - ALGEBRAIC(:,329)) -  - ALGEBRAIC(:,359);
    RATES(:,59) = ALGEBRAIC(:,362);
    ALGEBRAIC(:,270) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,181).*STATES(:,54));
    ALGEBRAIC(:,300) = ALGEBRAIC(:,270);
    ALGEBRAIC(:,360) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,187).*STATES(:,60))+ CONSTANTS(:,278).*ALGEBRAIC(:,263);
    ALGEBRAIC(:,363) =  CONSTANTS(:,76).*(exp(ALGEBRAIC(:,300)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,360)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,294) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,181).*STATES(:,54))+ CONSTANTS(:,277).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,342) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,182).*STATES(:,55))+ CONSTANTS(:,282).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,343) =  CONSTANTS(:,70).*(exp(ALGEBRAIC(:,294)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,342)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,365) = ((ALGEBRAIC(:,327)+ALGEBRAIC(:,315)) - ALGEBRAIC(:,363)) - ALGEBRAIC(:,343);
    RATES(:,54) = ALGEBRAIC(:,365);
    ALGEBRAIC(:,272) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,182).*STATES(:,55));
    ALGEBRAIC(:,301) = ALGEBRAIC(:,272);
    ALGEBRAIC(:,364) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,188).*STATES(:,61))+ CONSTANTS(:,278).*ALGEBRAIC(:,263);
    ALGEBRAIC(:,366) =  CONSTANTS(:,78).*(exp(ALGEBRAIC(:,301)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,364)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,368) = ((ALGEBRAIC(:,335)+ALGEBRAIC(:,319)) - ALGEBRAIC(:,366))+ALGEBRAIC(:,343);
    RATES(:,55) = ALGEBRAIC(:,368);
    ALGEBRAIC(:,271) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,187).*STATES(:,60));
    ALGEBRAIC(:,274) = ALGEBRAIC(:,263)+ CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,261)+ALGEBRAIC(:,271);
    ALGEBRAIC(:,262) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,138).*STATES(:,2));
    ALGEBRAIC(:,306) = ALGEBRAIC(:,262)+ALGEBRAIC(:,271);
    ALGEBRAIC(:,302) =  CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,367) = piecewise({ALGEBRAIC(:,302)==0.000000,  CONSTANTS(:,51).*(exp(ALGEBRAIC(:,274)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,306)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,51).*ALGEBRAIC(:,302))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,302)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,274)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,306)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,265) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,276) = ALGEBRAIC(:,265)+ CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,261)+ALGEBRAIC(:,271);
    ALGEBRAIC(:,264) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,308) = ALGEBRAIC(:,264)+ALGEBRAIC(:,271);
    ALGEBRAIC(:,304) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,372) = piecewise({ALGEBRAIC(:,304)==0.000000,  CONSTANTS(:,53).*(exp(ALGEBRAIC(:,276)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,308)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,53).*ALGEBRAIC(:,304))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,304)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,276)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,308)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,295) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,187).*STATES(:,60))+ CONSTANTS(:,277).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,344) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,188).*STATES(:,61))+ CONSTANTS(:,282).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,345) =  CONSTANTS(:,72).*(exp(ALGEBRAIC(:,295)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,344)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,373) = ((ALGEBRAIC(:,329)+ALGEBRAIC(:,317)) - (((( - ALGEBRAIC(:,363)+ALGEBRAIC(:,367)) - ALGEBRAIC(:,367))+ALGEBRAIC(:,372)) - ALGEBRAIC(:,372))) - ALGEBRAIC(:,345);
    RATES(:,60) = ALGEBRAIC(:,373);
    ALGEBRAIC(:,273) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,188).*STATES(:,61));
    ALGEBRAIC(:,275) = ALGEBRAIC(:,263)+ CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,261)+ALGEBRAIC(:,273);
    ALGEBRAIC(:,307) = ALGEBRAIC(:,262)+ALGEBRAIC(:,273);
    ALGEBRAIC(:,303) =  CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,369) = piecewise({ALGEBRAIC(:,303)==0.000000,  CONSTANTS(:,52).*(exp(ALGEBRAIC(:,275)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,307)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,52).*ALGEBRAIC(:,303))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,303)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,275)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,307)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,277) = ALGEBRAIC(:,265)+ CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,261)+ALGEBRAIC(:,273);
    ALGEBRAIC(:,309) = ALGEBRAIC(:,264)+ALGEBRAIC(:,273);
    ALGEBRAIC(:,305) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,374) = piecewise({ALGEBRAIC(:,305)==0.000000,  CONSTANTS(:,54).*(exp(ALGEBRAIC(:,277)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,309)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,54).*ALGEBRAIC(:,305))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,305)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,277)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,309)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,375) = ((ALGEBRAIC(:,337)+ALGEBRAIC(:,321)) - (((( - ALGEBRAIC(:,366)+ALGEBRAIC(:,369)) - ALGEBRAIC(:,369))+ALGEBRAIC(:,374)) - ALGEBRAIC(:,374)))+ALGEBRAIC(:,345);
    RATES(:,61) = ALGEBRAIC(:,375);
    ALGEBRAIC(:,388) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,198).*STATES(:,71));
    ALGEBRAIC(:,404) = ALGEBRAIC(:,388);
    ALGEBRAIC(:,385) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,143).*STATES(:,7));
    ALGEBRAIC(:,389) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,199).*STATES(:,72));
    ALGEBRAIC(:,420) = ALGEBRAIC(:,385)+ALGEBRAIC(:,389);
    ALGEBRAIC(:,421) =  CONSTANTS(:,88).*(exp(ALGEBRAIC(:,404)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,420)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,381) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,405) = ALGEBRAIC(:,389)+ALGEBRAIC(:,381);
    ALGEBRAIC(:,390) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,200).*STATES(:,73));
    ALGEBRAIC(:,422) = ALGEBRAIC(:,390);
    ALGEBRAIC(:,423) =  CONSTANTS(:,89).*(exp(ALGEBRAIC(:,405)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,422)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,424) = ALGEBRAIC(:,421) - ALGEBRAIC(:,423);
    RATES(:,72) = ALGEBRAIC(:,424);
    ALGEBRAIC(:,406) = ALGEBRAIC(:,390)+ALGEBRAIC(:,381);
    ALGEBRAIC(:,391) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,201).*STATES(:,74));
    ALGEBRAIC(:,425) = ALGEBRAIC(:,391);
    ALGEBRAIC(:,426) =  CONSTANTS(:,90).*(exp(ALGEBRAIC(:,406)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,425)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,427) =  - ALGEBRAIC(:,426)+ALGEBRAIC(:,423);
    RATES(:,73) = ALGEBRAIC(:,427);
    ALGEBRAIC(:,407) = ALGEBRAIC(:,391);
    ALGEBRAIC(:,380) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,207).*STATES(:,13));
    ALGEBRAIC(:,402) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,206).*STATES(:,12));
    ALGEBRAIC(:,392) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,202).*STATES(:,63));
    ALGEBRAIC(:,428) = ALGEBRAIC(:,380)+ALGEBRAIC(:,402)+ALGEBRAIC(:,392);
    ALGEBRAIC(:,429) =  CONSTANTS(:,91).*(exp(ALGEBRAIC(:,407)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,428)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,430) = ALGEBRAIC(:,426) - ALGEBRAIC(:,429);
    RATES(:,74) = ALGEBRAIC(:,430);
    ALGEBRAIC(:,384) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,204).*STATES(:,10));
    ALGEBRAIC(:,408) = ALGEBRAIC(:,392)+ALGEBRAIC(:,384);
    ALGEBRAIC(:,393) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,203).*STATES(:,64));
    ALGEBRAIC(:,431) = ALGEBRAIC(:,393);
    ALGEBRAIC(:,432) =  CONSTANTS(:,92).*(exp(ALGEBRAIC(:,408)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,431)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,433) =  - ALGEBRAIC(:,432)+ALGEBRAIC(:,429);
    RATES(:,63) = ALGEBRAIC(:,433);
    ALGEBRAIC(:,409) = ALGEBRAIC(:,393);
    ALGEBRAIC(:,387) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,189).*STATES(:,65));
    ALGEBRAIC(:,434) = ALGEBRAIC(:,387);
    ALGEBRAIC(:,436) =  CONSTANTS(:,93).*(exp(ALGEBRAIC(:,409)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,434)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,438) = ALGEBRAIC(:,432) - ALGEBRAIC(:,436);
    RATES(:,64) = ALGEBRAIC(:,438);
    ALGEBRAIC(:,403) = ALGEBRAIC(:,387);
    ALGEBRAIC(:,382) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,394) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,190).*STATES(:,66));
    ALGEBRAIC(:,418) = ALGEBRAIC(:,382)+ALGEBRAIC(:,394);
    ALGEBRAIC(:,419) =  CONSTANTS(:,79).*(exp(ALGEBRAIC(:,403)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,418)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,439) =  - ALGEBRAIC(:,419)+ALGEBRAIC(:,436);
    RATES(:,65) = ALGEBRAIC(:,439);
    ALGEBRAIC(:,410) = ALGEBRAIC(:,394);
    ALGEBRAIC(:,395) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,191).*STATES(:,67));
    ALGEBRAIC(:,435) = ALGEBRAIC(:,395)+ALGEBRAIC(:,382);
    ALGEBRAIC(:,437) =  CONSTANTS(:,80).*(exp(ALGEBRAIC(:,410)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,435)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,440) =  - ALGEBRAIC(:,437)+ALGEBRAIC(:,419);
    RATES(:,66) = ALGEBRAIC(:,440);
    ALGEBRAIC(:,386) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,142).*STATES(:,6));
    ALGEBRAIC(:,411) = ALGEBRAIC(:,395)+ALGEBRAIC(:,386);
    ALGEBRAIC(:,396) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,192).*STATES(:,68));
    ALGEBRAIC(:,441) = ALGEBRAIC(:,396);
    ALGEBRAIC(:,442) =  CONSTANTS(:,81).*(exp(ALGEBRAIC(:,411)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,441)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,443) = ALGEBRAIC(:,437) - ALGEBRAIC(:,442);
    RATES(:,67) = ALGEBRAIC(:,443);
    ALGEBRAIC(:,412) = ALGEBRAIC(:,396)+ALGEBRAIC(:,386);
    ALGEBRAIC(:,397) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,193).*STATES(:,69));
    ALGEBRAIC(:,444) = ALGEBRAIC(:,397);
    ALGEBRAIC(:,445) =  CONSTANTS(:,82).*(exp(ALGEBRAIC(:,412)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,444)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,446) = ALGEBRAIC(:,442) - ALGEBRAIC(:,445);
    RATES(:,68) = ALGEBRAIC(:,446);
    ALGEBRAIC(:,413) = ALGEBRAIC(:,397)+ALGEBRAIC(:,386);
    ALGEBRAIC(:,379) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,447) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,194).*STATES(:,70))+ CONSTANTS(:,283).*ALGEBRAIC(:,379);
    ALGEBRAIC(:,448) =  CONSTANTS(:,83).*(exp(ALGEBRAIC(:,413)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,447)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,449) = ALGEBRAIC(:,445) - ALGEBRAIC(:,448);
    RATES(:,69) = ALGEBRAIC(:,449);
    ALGEBRAIC(:,398) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,194).*STATES(:,70));
    ALGEBRAIC(:,414) = ALGEBRAIC(:,398);
    ALGEBRAIC(:,383) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,205).*STATES(:,11));
    ALGEBRAIC(:,399) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,195).*STATES(:,62));
    ALGEBRAIC(:,450) = ALGEBRAIC(:,399)+ALGEBRAIC(:,383);
    ALGEBRAIC(:,451) =  CONSTANTS(:,84).*(exp(ALGEBRAIC(:,414)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,450)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,452) = ALGEBRAIC(:,448) - ALGEBRAIC(:,451);
    RATES(:,70) = ALGEBRAIC(:,452);
    ALGEBRAIC(:,415) = ALGEBRAIC(:,399);
    ALGEBRAIC(:,400) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,196).*STATES(:,75));
    ALGEBRAIC(:,453) = ALGEBRAIC(:,400);
    ALGEBRAIC(:,454) =  CONSTANTS(:,85).*(exp(ALGEBRAIC(:,415)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,453)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,455) = ALGEBRAIC(:,451) - ALGEBRAIC(:,454);
    RATES(:,62) = ALGEBRAIC(:,455);
    ALGEBRAIC(:,416) = ALGEBRAIC(:,400);
    ALGEBRAIC(:,456) =  CONSTANTS(:,284).*ALGEBRAIC(:,379)+ CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,143).*STATES(:,7))+ CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,197).*STATES(:,76));
    ALGEBRAIC(:,457) =  CONSTANTS(:,86).*(exp(ALGEBRAIC(:,416)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,456)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,458) =  - ALGEBRAIC(:,457)+ALGEBRAIC(:,454);
    RATES(:,75) = ALGEBRAIC(:,458);
    ALGEBRAIC(:,401) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,197).*STATES(:,76));
    ALGEBRAIC(:,417) = ALGEBRAIC(:,401);
    ALGEBRAIC(:,460) = ALGEBRAIC(:,388)+ALGEBRAIC(:,385);
    ALGEBRAIC(:,461) =  CONSTANTS(:,87).*(exp(ALGEBRAIC(:,417)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,460)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,462) = ALGEBRAIC(:,461) - ALGEBRAIC(:,421);
    RATES(:,71) = ALGEBRAIC(:,462);
    ALGEBRAIC(:,463) = ALGEBRAIC(:,457) - ALGEBRAIC(:,461);
    RATES(:,76) = ALGEBRAIC(:,463);
    ALGEBRAIC(:,159) =  CONSTANTS(:,246).*CONSTANTS(:,303).*ALGEBRAIC(:,157);
    ALGEBRAIC(:,155) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,142).*STATES(:,6));
    ALGEBRAIC(:,164) = ALGEBRAIC(:,161)+ALGEBRAIC(:,155)+ALGEBRAIC(:,159);
    ALGEBRAIC(:,156) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,143).*STATES(:,7));
    ALGEBRAIC(:,165) = ALGEBRAIC(:,161)+ALGEBRAIC(:,156);
    ALGEBRAIC(:,167) = piecewise({ALGEBRAIC(:,159)==0.000000,  1.00000.*CONSTANTS(:,33).*(exp(ALGEBRAIC(:,164)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,165)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( 1.00000.*CONSTANTS(:,33).*ALGEBRAIC(:,159))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,159)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,164)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,165)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,470) =  - ALGEBRAIC(:,442) - (ALGEBRAIC(:,445)+ALGEBRAIC(:,448));
    ALGEBRAIC(:,472) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,142).*STATES(:,6));
    ALGEBRAIC(:,473) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,143).*STATES(:,7));
    ALGEBRAIC(:,16) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,474) =  CONSTANTS(:,246).*CONSTANTS(:,303).*ALGEBRAIC(:,16);
    ALGEBRAIC(:,475) = piecewise({ALGEBRAIC(:,474)==0.000000,  CONSTANTS(:,94).*(exp(ALGEBRAIC(:,472)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,473)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,94).*ALGEBRAIC(:,474))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,474)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,472)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,473)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,482) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,208).*STATES(:,77));
    ALGEBRAIC(:,488) = ALGEBRAIC(:,482);
    ALGEBRAIC(:,481) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,142).*STATES(:,6));
    ALGEBRAIC(:,483) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,209).*STATES(:,78));
    ALGEBRAIC(:,494) =  CONSTANTS(:,288).*ALGEBRAIC(:,481)+ALGEBRAIC(:,483);
    ALGEBRAIC(:,495) =  CONSTANTS(:,95).*(exp(ALGEBRAIC(:,488)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,494)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,497) =  CONSTANTS(:,288).*ALGEBRAIC(:,495);
    RATES(:,6) = ((( - ALGEBRAIC(:,150) - ALGEBRAIC(:,167))+ALGEBRAIC(:,470)) - ALGEBRAIC(:,475))+ALGEBRAIC(:,497);
    ALGEBRAIC(:,479) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,489) = ALGEBRAIC(:,483)+ALGEBRAIC(:,479);
    ALGEBRAIC(:,484) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,210).*STATES(:,79));
    ALGEBRAIC(:,496) = ALGEBRAIC(:,484);
    ALGEBRAIC(:,498) =  CONSTANTS(:,96).*(exp(ALGEBRAIC(:,489)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,496)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,500) = ALGEBRAIC(:,495) - ALGEBRAIC(:,498);
    RATES(:,78) = ALGEBRAIC(:,500);
    ALGEBRAIC(:,490) = ALGEBRAIC(:,484);
    ALGEBRAIC(:,485) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,211).*STATES(:,80));
    ALGEBRAIC(:,499) = ALGEBRAIC(:,485);
    ALGEBRAIC(:,501) =  CONSTANTS(:,97).*(exp(ALGEBRAIC(:,490)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,499)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,503) = ALGEBRAIC(:,498) - ALGEBRAIC(:,501);
    RATES(:,79) = ALGEBRAIC(:,503);
    ALGEBRAIC(:,491) = ALGEBRAIC(:,485);
    ALGEBRAIC(:,478) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,138).*STATES(:,2));
    ALGEBRAIC(:,486) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,212).*STATES(:,81));
    ALGEBRAIC(:,502) = ALGEBRAIC(:,486)+ALGEBRAIC(:,478);
    ALGEBRAIC(:,504) =  CONSTANTS(:,98).*(exp(ALGEBRAIC(:,491)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,502)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,506) =  - ALGEBRAIC(:,504)+ALGEBRAIC(:,501);
    RATES(:,80) = ALGEBRAIC(:,506);
    ALGEBRAIC(:,469) = ALGEBRAIC(:,457)+ALGEBRAIC(:,461)+ALGEBRAIC(:,421);
    ALGEBRAIC(:,480) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,143).*STATES(:,7));
    ALGEBRAIC(:,492) = ALGEBRAIC(:,486)+ CONSTANTS(:,287).*ALGEBRAIC(:,480);
    ALGEBRAIC(:,487) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,213).*STATES(:,82));
    ALGEBRAIC(:,505) = ALGEBRAIC(:,487);
    ALGEBRAIC(:,507) =  CONSTANTS(:,99).*(exp(ALGEBRAIC(:,492)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,505)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,508) =   - CONSTANTS(:,287).*ALGEBRAIC(:,507);
    RATES(:,7) = ALGEBRAIC(:,150)+ALGEBRAIC(:,167)+ALGEBRAIC(:,469)+ALGEBRAIC(:,475)+ALGEBRAIC(:,508);
    ALGEBRAIC(:,509) =  - ALGEBRAIC(:,507)+ALGEBRAIC(:,504);
    RATES(:,81) = ALGEBRAIC(:,509);
    ALGEBRAIC(:,477) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,493) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,213).*STATES(:,82))+ CONSTANTS(:,285).*CONSTANTS(:,303).*ALGEBRAIC(:,477);
    ALGEBRAIC(:,510) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,208).*STATES(:,77))+ CONSTANTS(:,286).*CONSTANTS(:,303).*ALGEBRAIC(:,477);
    ALGEBRAIC(:,511) =  CONSTANTS(:,100).*(exp(ALGEBRAIC(:,493)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,510)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,512) = ALGEBRAIC(:,511) - ALGEBRAIC(:,495);
    RATES(:,77) = ALGEBRAIC(:,512);
    ALGEBRAIC(:,513) =  - ALGEBRAIC(:,511)+ALGEBRAIC(:,507);
    RATES(:,82) = ALGEBRAIC(:,513);
    ALGEBRAIC(:,517) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,519) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,214).*STATES(:,14));
    ALGEBRAIC(:,520) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,215).*STATES(:,15));
    ALGEBRAIC(:,521) =  CONSTANTS(:,101).*(exp((ALGEBRAIC(:,517)+ALGEBRAIC(:,519))./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,520)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,518) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,138).*STATES(:,2));
    ALGEBRAIC(:,522) =  CONSTANTS(:,102).*(exp(ALGEBRAIC(:,520)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp((ALGEBRAIC(:,518)+ALGEBRAIC(:,519))./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    RATES(:,14) =  - ALGEBRAIC(:,521)+ALGEBRAIC(:,522);
    RATES(:,15) = ALGEBRAIC(:,521) - ALGEBRAIC(:,522);
    ALGEBRAIC(:,525) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,526) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,216).*STATES(:,83));
    ALGEBRAIC(:,529) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,219).*STATES(:,86));
    ALGEBRAIC(:,531) =  CONSTANTS(:,104).*(exp(ALGEBRAIC(:,529)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp((ALGEBRAIC(:,526)+ CONSTANTS(:,305).*ALGEBRAIC(:,525))./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,527) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,217).*STATES(:,84));
    ALGEBRAIC(:,532) =  CONSTANTS(:,105).*(exp((ALGEBRAIC(:,526)+ CONSTANTS(:,304).*ALGEBRAIC(:,525))./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,527)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    RATES(:,83) = ALGEBRAIC(:,531) - ALGEBRAIC(:,532);
    ALGEBRAIC(:,528) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,218).*STATES(:,85));
    ALGEBRAIC(:,533) =  CONSTANTS(:,106).*(exp((ALGEBRAIC(:,527)+ CONSTANTS(:,305).*ALGEBRAIC(:,525))./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,528)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    RATES(:,84) = ALGEBRAIC(:,532) - ALGEBRAIC(:,533);
    ALGEBRAIC(:,534) =  CONSTANTS(:,107).*(exp(ALGEBRAIC(:,528)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp((ALGEBRAIC(:,529)+ CONSTANTS(:,304).*ALGEBRAIC(:,525))./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    RATES(:,86) = ALGEBRAIC(:,534) - ALGEBRAIC(:,531);
    RATES(:,85) = ALGEBRAIC(:,533) - ALGEBRAIC(:,534);
    ALGEBRAIC(:,471) = ALGEBRAIC(:,429);
    ALGEBRAIC(:,541) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,206).*STATES(:,12));
    ALGEBRAIC(:,542) = CONSTANTS(:,321)+ALGEBRAIC(:,541);
    ALGEBRAIC(:,551) =  CONSTANTS(:,116).*(exp(CONSTANTS(:,333)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,542)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,552) = ALGEBRAIC(:,551);
    RATES(:,12) = ALGEBRAIC(:,471)+ALGEBRAIC(:,552);
    ALGEBRAIC(:,468) =  - ALGEBRAIC(:,432);
    ALGEBRAIC(:,540) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,204).*STATES(:,10));
    ALGEBRAIC(:,543) = CONSTANTS(:,321)+ALGEBRAIC(:,540);
    ALGEBRAIC(:,553) =  CONSTANTS(:,108).*(exp(ALGEBRAIC(:,543)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(CONSTANTS(:,334)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,554) =  - ALGEBRAIC(:,553);
    RATES(:,10) = ALGEBRAIC(:,468)+ALGEBRAIC(:,554);
    ALGEBRAIC(:,467) = ALGEBRAIC(:,451);
    ALGEBRAIC(:,539) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,205).*STATES(:,11));
    ALGEBRAIC(:,544) = ALGEBRAIC(:,539)+CONSTANTS(:,330);
    ALGEBRAIC(:,556) =  CONSTANTS(:,112).*(exp(CONSTANTS(:,335)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,544)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,557) = ALGEBRAIC(:,556);
    RATES(:,11) = ALGEBRAIC(:,467)+ALGEBRAIC(:,557);
    ALGEBRAIC(:,35) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,139).*STATES(:,3));
    ALGEBRAIC(:,36) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,37) =  CONSTANTS(:,2).*(exp(ALGEBRAIC(:,35)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,36)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,524) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,139).*STATES(:,3));
    ALGEBRAIC(:,530) =  CONSTANTS(:,103).*exp(ALGEBRAIC(:,529)./( CONSTANTS(:,301).*CONSTANTS(:,302))).*(exp(ALGEBRAIC(:,524)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,525)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,537) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,139).*STATES(:,3));
    ALGEBRAIC(:,548) = CONSTANTS(:,331)+ CONSTANTS(:,307).*ALGEBRAIC(:,537);
    ALGEBRAIC(:,564) =  CONSTANTS(:,113).*(exp(CONSTANTS(:,339)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,548)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,568) =  CONSTANTS(:,307).*ALGEBRAIC(:,564);
    RATES(:,3) =  - ALGEBRAIC(:,37)+ALGEBRAIC(:,530)+ALGEBRAIC(:,568);
    ALGEBRAIC(:,464) = ALGEBRAIC(:,429);
    ALGEBRAIC(:,538) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,207).*STATES(:,13));
    ALGEBRAIC(:,545) = CONSTANTS(:,324)+ALGEBRAIC(:,538);
    ALGEBRAIC(:,558) =  CONSTANTS(:,110).*(exp(ALGEBRAIC(:,545)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(CONSTANTS(:,336)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,547) = CONSTANTS(:,328)+ CONSTANTS(:,308).*ALGEBRAIC(:,538);
    ALGEBRAIC(:,561) =  CONSTANTS(:,111).*(exp(CONSTANTS(:,338)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,547)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,549) = CONSTANTS(:,331)+ CONSTANTS(:,308).*ALGEBRAIC(:,538);
    ALGEBRAIC(:,569) =  CONSTANTS(:,114).*(exp(ALGEBRAIC(:,549)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(CONSTANTS(:,340)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,550) = ALGEBRAIC(:,538)+CONSTANTS(:,329);
    ALGEBRAIC(:,572) =  CONSTANTS(:,115).*(exp(CONSTANTS(:,341)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,550)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,575) = (( CONSTANTS(:,308).*ALGEBRAIC(:,561) - ALGEBRAIC(:,558)) -  CONSTANTS(:,308).*ALGEBRAIC(:,569))+ALGEBRAIC(:,572);
    RATES(:,13) = ALGEBRAIC(:,464)+ALGEBRAIC(:,575);
    ALGEBRAIC(:,574) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,579) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,229).*STATES(:,87));
    ALGEBRAIC(:,580) = ALGEBRAIC(:,579)+ CONSTANTS(:,289).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,582) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,230).*STATES(:,88));
    ALGEBRAIC(:,583) = ALGEBRAIC(:,582)+ CONSTANTS(:,291).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,586) =  CONSTANTS(:,118).*(exp(ALGEBRAIC(:,580)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,583)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,581) = ALGEBRAIC(:,579)+ CONSTANTS(:,290).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,591) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,232).*STATES(:,90));
    ALGEBRAIC(:,593) = ALGEBRAIC(:,591)+ CONSTANTS(:,292).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,594) =  CONSTANTS(:,122).*(exp(ALGEBRAIC(:,581)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,593)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,595) =  - ALGEBRAIC(:,586) - ALGEBRAIC(:,594);
    RATES(:,87) = ALGEBRAIC(:,595);
    ALGEBRAIC(:,592) = ALGEBRAIC(:,591)+ CONSTANTS(:,289).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,596) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,233).*STATES(:,91));
    ALGEBRAIC(:,597) = ALGEBRAIC(:,596)+ CONSTANTS(:,291).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,600) =  CONSTANTS(:,119).*(exp(ALGEBRAIC(:,592)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,597)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,601) = ALGEBRAIC(:,594) - ALGEBRAIC(:,600);
    RATES(:,90) = ALGEBRAIC(:,601);
    ALGEBRAIC(:,584) = ALGEBRAIC(:,582)+ CONSTANTS(:,289).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,587) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,231).*STATES(:,89));
    ALGEBRAIC(:,588) = ALGEBRAIC(:,587)+ CONSTANTS(:,291).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,590) =  CONSTANTS(:,120).*(exp(ALGEBRAIC(:,584)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,588)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,585) = ALGEBRAIC(:,582)+ CONSTANTS(:,290).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,599) = ALGEBRAIC(:,596)+ CONSTANTS(:,292).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,602) =  CONSTANTS(:,123).*(exp(ALGEBRAIC(:,585)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,599)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,603) = (ALGEBRAIC(:,586) - ALGEBRAIC(:,590)) - ALGEBRAIC(:,602);
    RATES(:,88) = ALGEBRAIC(:,603);
    ALGEBRAIC(:,30) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,31) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,138).*STATES(:,2));
    ALGEBRAIC(:,32) =  CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,16);
    ALGEBRAIC(:,33) = piecewise({ALGEBRAIC(:,32)==0.000000,  CONSTANTS(:,1).*(exp(ALGEBRAIC(:,30)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,31)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,1).*ALGEBRAIC(:,32))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,32)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,30)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,31)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,370) = ALGEBRAIC(:,369)+ALGEBRAIC(:,367);
    ALGEBRAIC(:,515) = ALGEBRAIC(:,504);
    ALGEBRAIC(:,578) =  CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,567) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,604) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,234).*STATES(:,92));
    ALGEBRAIC(:,605) = ALGEBRAIC(:,604)+ALGEBRAIC(:,567)+ALGEBRAIC(:,578);
    ALGEBRAIC(:,571) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,138).*STATES(:,2));
    ALGEBRAIC(:,606) = ALGEBRAIC(:,604)+ALGEBRAIC(:,571);
    ALGEBRAIC(:,607) = piecewise({ALGEBRAIC(:,578)==0.000000,  CONSTANTS(:,117).*(exp(ALGEBRAIC(:,605)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,606)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,117).*ALGEBRAIC(:,578))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,578)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,605)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,606)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    RATES(:,2) = ALGEBRAIC(:,33)+ALGEBRAIC(:,370)+ALGEBRAIC(:,515)+ALGEBRAIC(:,522)+ALGEBRAIC(:,607);
    ALGEBRAIC(:,598) = ALGEBRAIC(:,596)+ CONSTANTS(:,289).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,609) = ALGEBRAIC(:,604)+ CONSTANTS(:,291).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,613) =  CONSTANTS(:,121).*(exp(ALGEBRAIC(:,598)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,609)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,615) = (ALGEBRAIC(:,600) - ALGEBRAIC(:,613))+ALGEBRAIC(:,602);
    RATES(:,91) = ALGEBRAIC(:,615);
    ALGEBRAIC(:,589) = ALGEBRAIC(:,587)+ CONSTANTS(:,290).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,611) = ALGEBRAIC(:,604)+ CONSTANTS(:,292).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,616) =  CONSTANTS(:,124).*(exp(ALGEBRAIC(:,589)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,611)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,618) = ALGEBRAIC(:,590) - ALGEBRAIC(:,616);
    RATES(:,89) = ALGEBRAIC(:,618);
    ALGEBRAIC(:,619) = ALGEBRAIC(:,613)+ALGEBRAIC(:,616);
    RATES(:,92) = ALGEBRAIC(:,619);
    ALGEBRAIC(:,371) = (( (CONSTANTS(:,278)).*ALGEBRAIC(:,359)+ CONSTANTS(:,278).*ALGEBRAIC(:,363)+ CONSTANTS(:,278).*ALGEBRAIC(:,355)+ CONSTANTS(:,278).*ALGEBRAIC(:,351)+ CONSTANTS(:,278).*ALGEBRAIC(:,347)+ CONSTANTS(:,278).*ALGEBRAIC(:,366)) - ALGEBRAIC(:,367)) - ALGEBRAIC(:,369);
    ALGEBRAIC(:,516) =  - ALGEBRAIC(:,498);
    ALGEBRAIC(:,535) = (( CONSTANTS(:,305).*ALGEBRAIC(:,531) -  CONSTANTS(:,304).*ALGEBRAIC(:,532)) -  CONSTANTS(:,305).*ALGEBRAIC(:,533))+ CONSTANTS(:,304).*ALGEBRAIC(:,534);
    ALGEBRAIC(:,536) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,546) = CONSTANTS(:,324)+ CONSTANTS(:,306).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,560) =  CONSTANTS(:,109).*(exp(ALGEBRAIC(:,546)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(CONSTANTS(:,337)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,563) =   - CONSTANTS(:,306).*ALGEBRAIC(:,560);
    ALGEBRAIC(:,608) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,243).*STATES(:,16));
    ALGEBRAIC(:,612) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,614) = ALGEBRAIC(:,612)+ALGEBRAIC(:,608);
    ALGEBRAIC(:,610) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,244).*STATES(:,17));
    ALGEBRAIC(:,617) = ALGEBRAIC(:,610);
    ALGEBRAIC(:,621) =  CONSTANTS(:,136).*(exp(ALGEBRAIC(:,614)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,617)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    RATES(:,1) = (((((( - ALGEBRAIC(:,33)+ALGEBRAIC(:,37)) - ALGEBRAIC(:,43))+ALGEBRAIC(:,371)+ALGEBRAIC(:,516)) - ALGEBRAIC(:,521))+ALGEBRAIC(:,530)+ALGEBRAIC(:,535)+ALGEBRAIC(:,563)) - ALGEBRAIC(:,607)) - ALGEBRAIC(:,621);
    RATES(:,16) =  - ALGEBRAIC(:,621);
    RATES(:,17) = ALGEBRAIC(:,621);
    ALGEBRAIC(:,624) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,628) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,235).*STATES(:,93));
    ALGEBRAIC(:,629) = ALGEBRAIC(:,628)+ CONSTANTS(:,293).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,631) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,236).*STATES(:,94));
    ALGEBRAIC(:,632) = ALGEBRAIC(:,631)+ CONSTANTS(:,295).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,635) =  CONSTANTS(:,126).*(exp(ALGEBRAIC(:,629)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,632)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,630) = ALGEBRAIC(:,628)+ CONSTANTS(:,294).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,645) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,239).*STATES(:,97));
    ALGEBRAIC(:,647) = ALGEBRAIC(:,645)+ CONSTANTS(:,296).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,648) =  CONSTANTS(:,132).*(exp(ALGEBRAIC(:,630)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,647)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,649) =  - ALGEBRAIC(:,635) - ALGEBRAIC(:,648);
    RATES(:,93) = ALGEBRAIC(:,649);
    ALGEBRAIC(:,646) = ALGEBRAIC(:,645)+ CONSTANTS(:,293).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,650) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,240).*STATES(:,98));
    ALGEBRAIC(:,651) = ALGEBRAIC(:,650)+ CONSTANTS(:,295).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,654) =  CONSTANTS(:,127).*(exp(ALGEBRAIC(:,646)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,651)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,655) = ALGEBRAIC(:,648) - ALGEBRAIC(:,654);
    RATES(:,97) = ALGEBRAIC(:,655);
    ALGEBRAIC(:,633) = ALGEBRAIC(:,631)+ CONSTANTS(:,293).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,636) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,237).*STATES(:,95));
    ALGEBRAIC(:,637) = ALGEBRAIC(:,636)+ CONSTANTS(:,295).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,640) =  CONSTANTS(:,128).*(exp(ALGEBRAIC(:,633)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,637)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,634) = ALGEBRAIC(:,631)+ CONSTANTS(:,294).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,653) = ALGEBRAIC(:,650)+ CONSTANTS(:,296).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,656) =  CONSTANTS(:,133).*(exp(ALGEBRAIC(:,634)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,653)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,657) = (ALGEBRAIC(:,635) - ALGEBRAIC(:,640)) - ALGEBRAIC(:,656);
    RATES(:,94) = ALGEBRAIC(:,657);
    ALGEBRAIC(:,652) = ALGEBRAIC(:,650)+ CONSTANTS(:,293).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,658) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,241).*STATES(:,99));
    ALGEBRAIC(:,659) = ALGEBRAIC(:,658)+ CONSTANTS(:,295).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,662) =  CONSTANTS(:,129).*(exp(ALGEBRAIC(:,652)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,659)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,663) = (ALGEBRAIC(:,654) - ALGEBRAIC(:,662))+ALGEBRAIC(:,656);
    RATES(:,98) = ALGEBRAIC(:,663);
    ALGEBRAIC(:,638) = ALGEBRAIC(:,636)+ CONSTANTS(:,293).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,641) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,238).*STATES(:,96));
    ALGEBRAIC(:,642) = ALGEBRAIC(:,641)+ CONSTANTS(:,295).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,644) =  CONSTANTS(:,130).*(exp(ALGEBRAIC(:,638)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,642)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,639) = ALGEBRAIC(:,636)+ CONSTANTS(:,294).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,661) = ALGEBRAIC(:,658)+ CONSTANTS(:,296).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,664) =  CONSTANTS(:,134).*(exp(ALGEBRAIC(:,639)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,661)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,665) = (ALGEBRAIC(:,640) - ALGEBRAIC(:,644)) - ALGEBRAIC(:,664);
    RATES(:,95) = ALGEBRAIC(:,665);
    ALGEBRAIC(:,158) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,157);
    ALGEBRAIC(:,153) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,162) = ALGEBRAIC(:,161)+ALGEBRAIC(:,153)+ALGEBRAIC(:,158);
    ALGEBRAIC(:,154) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,163) = ALGEBRAIC(:,161)+ALGEBRAIC(:,154);
    ALGEBRAIC(:,166) = piecewise({ALGEBRAIC(:,158)==0.000000,  1.00000.*CONSTANTS(:,34).*(exp(ALGEBRAIC(:,162)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,163)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( 1.00000.*CONSTANTS(:,34).*ALGEBRAIC(:,158))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,158)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,162)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,163)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,203) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,200) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,218) = ALGEBRAIC(:,217)+ALGEBRAIC(:,200)+ALGEBRAIC(:,203);
    ALGEBRAIC(:,201) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,219) = ALGEBRAIC(:,217)+ALGEBRAIC(:,201);
    ALGEBRAIC(:,220) = piecewise({ALGEBRAIC(:,203)==0.000000,  1.00000.*CONSTANTS(:,40).*(exp(ALGEBRAIC(:,218)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,219)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( 1.00000.*CONSTANTS(:,40).*ALGEBRAIC(:,203))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,203)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,218)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,219)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,236) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,233) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,250) = ALGEBRAIC(:,249)+ALGEBRAIC(:,233)+ALGEBRAIC(:,236);
    ALGEBRAIC(:,234) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,251) = ALGEBRAIC(:,249)+ALGEBRAIC(:,234);
    ALGEBRAIC(:,252) = piecewise({ALGEBRAIC(:,236)==0.000000,  1.00000.*CONSTANTS(:,46).*(exp(ALGEBRAIC(:,250)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,251)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( 1.00000.*CONSTANTS(:,46).*ALGEBRAIC(:,236))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,236)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,250)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,251)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,378) =  - ALGEBRAIC(:,372) - ALGEBRAIC(:,374);
    ALGEBRAIC(:,466) = ALGEBRAIC(:,419)+ALGEBRAIC(:,437);
    ALGEBRAIC(:,625) =  CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,622) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,626) =  1.00000.*exp(ALGEBRAIC(:,624)./CONSTANTS(:,319));
    ALGEBRAIC(:,627) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,320).*ALGEBRAIC(:,626));
    ALGEBRAIC(:,666) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,242).*STATES(:,100));
    ALGEBRAIC(:,667) = ALGEBRAIC(:,666)+ALGEBRAIC(:,622)+ALGEBRAIC(:,625)+ALGEBRAIC(:,627);
    ALGEBRAIC(:,623) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,669) = ALGEBRAIC(:,666)+ALGEBRAIC(:,623)+ALGEBRAIC(:,627);
    ALGEBRAIC(:,671) = piecewise({ALGEBRAIC(:,625)==0.000000,  1.00000.*CONSTANTS(:,125).*(exp(ALGEBRAIC(:,667)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,669)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( 1.00000.*CONSTANTS(:,125).*ALGEBRAIC(:,625))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,625)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,667)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,669)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    RATES(:,8) = ((((((ALGEBRAIC(:,378) - ALGEBRAIC(:,166)) - ALGEBRAIC(:,183)) - ALGEBRAIC(:,197)) - ALGEBRAIC(:,220)) - ALGEBRAIC(:,252))+ALGEBRAIC(:,378)+ALGEBRAIC(:,466)) - ALGEBRAIC(:,671);
    ALGEBRAIC(:,377) = ALGEBRAIC(:,374)+ALGEBRAIC(:,372);
    ALGEBRAIC(:,465) =  - ALGEBRAIC(:,423) - ALGEBRAIC(:,426);
    RATES(:,9) = ALGEBRAIC(:,377)+ALGEBRAIC(:,166)+ALGEBRAIC(:,183)+ALGEBRAIC(:,197)+ALGEBRAIC(:,220)+ALGEBRAIC(:,252)+ALGEBRAIC(:,377)+ALGEBRAIC(:,465)+ALGEBRAIC(:,671);
    ALGEBRAIC(:,34) =   - CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,33);
    ALGEBRAIC(:,152) =  CONSTANTS(:,303).*(((((((((((((((((((((((((((((  - CONSTANTS(:,246).*ALGEBRAIC(:,150)+ CONSTANTS(:,253).*ALGEBRAIC(:,112)) -  CONSTANTS(:,250).*ALGEBRAIC(:,112)+ CONSTANTS(:,253).*ALGEBRAIC(:,124)) -  CONSTANTS(:,250).*ALGEBRAIC(:,124)+ CONSTANTS(:,253).*ALGEBRAIC(:,118)) -  CONSTANTS(:,250).*ALGEBRAIC(:,118)+ CONSTANTS(:,253).*ALGEBRAIC(:,130)) -  CONSTANTS(:,250).*ALGEBRAIC(:,130)+ CONSTANTS(:,253).*ALGEBRAIC(:,144)) -  CONSTANTS(:,250).*ALGEBRAIC(:,144)+ CONSTANTS(:,251).*ALGEBRAIC(:,80)) -  CONSTANTS(:,248).*ALGEBRAIC(:,80)+ CONSTANTS(:,251).*ALGEBRAIC(:,88)) -  CONSTANTS(:,248).*ALGEBRAIC(:,88)+ CONSTANTS(:,252).*ALGEBRAIC(:,100)) -  CONSTANTS(:,249).*ALGEBRAIC(:,100)+ CONSTANTS(:,252).*ALGEBRAIC(:,104)) -  CONSTANTS(:,249).*ALGEBRAIC(:,104)+ CONSTANTS(:,252).*ALGEBRAIC(:,108)) -  CONSTANTS(:,249).*ALGEBRAIC(:,108)+ CONSTANTS(:,253).*ALGEBRAIC(:,136)) -  CONSTANTS(:,250).*ALGEBRAIC(:,136)+ CONSTANTS(:,251).*ALGEBRAIC(:,84)) -  CONSTANTS(:,248).*ALGEBRAIC(:,84)+ CONSTANTS(:,251).*ALGEBRAIC(:,92)) -  CONSTANTS(:,248).*ALGEBRAIC(:,92)+ CONSTANTS(:,252).*ALGEBRAIC(:,96)) -  CONSTANTS(:,249).*ALGEBRAIC(:,96)+ CONSTANTS(:,253).*ALGEBRAIC(:,115)) -  CONSTANTS(:,250).*ALGEBRAIC(:,115)+ CONSTANTS(:,253).*ALGEBRAIC(:,127)) -  CONSTANTS(:,250).*ALGEBRAIC(:,127)+ CONSTANTS(:,253).*ALGEBRAIC(:,121)) -  CONSTANTS(:,250).*ALGEBRAIC(:,121)+ CONSTANTS(:,253).*ALGEBRAIC(:,133)) -  CONSTANTS(:,250).*ALGEBRAIC(:,133)+ CONSTANTS(:,253).*ALGEBRAIC(:,148)) -  CONSTANTS(:,250).*ALGEBRAIC(:,148)+ CONSTANTS(:,251).*ALGEBRAIC(:,82)) -  CONSTANTS(:,248).*ALGEBRAIC(:,82)+ CONSTANTS(:,251).*ALGEBRAIC(:,90)) -  CONSTANTS(:,248).*ALGEBRAIC(:,90)+ CONSTANTS(:,252).*ALGEBRAIC(:,98)) -  CONSTANTS(:,249).*ALGEBRAIC(:,98)+ CONSTANTS(:,252).*ALGEBRAIC(:,102)) -  CONSTANTS(:,249).*ALGEBRAIC(:,102)+ CONSTANTS(:,252).*ALGEBRAIC(:,106)) -  CONSTANTS(:,249).*ALGEBRAIC(:,106)+ CONSTANTS(:,252).*ALGEBRAIC(:,110)) -  CONSTANTS(:,249).*ALGEBRAIC(:,110)+ CONSTANTS(:,253).*ALGEBRAIC(:,140)) -  CONSTANTS(:,250).*ALGEBRAIC(:,140)+ CONSTANTS(:,251).*ALGEBRAIC(:,86)) -  CONSTANTS(:,248).*ALGEBRAIC(:,86)+ CONSTANTS(:,251).*ALGEBRAIC(:,94)) -  CONSTANTS(:,248).*ALGEBRAIC(:,94));
    ALGEBRAIC(:,171) =  CONSTANTS(:,303).*((  - CONSTANTS(:,245).*ALGEBRAIC(:,166)+ CONSTANTS(:,246).*ALGEBRAIC(:,167)+ CONSTANTS(:,255).*ALGEBRAIC(:,170)) -  CONSTANTS(:,254).*ALGEBRAIC(:,170));
    ALGEBRAIC(:,185) =  CONSTANTS(:,303).*((  - CONSTANTS(:,245).*ALGEBRAIC(:,183)+ CONSTANTS(:,257).*ALGEBRAIC(:,181)) -  CONSTANTS(:,256).*ALGEBRAIC(:,181));
    ALGEBRAIC(:,199) =  CONSTANTS(:,303).*((  - CONSTANTS(:,245).*ALGEBRAIC(:,197)+ CONSTANTS(:,259).*ALGEBRAIC(:,195)) -  CONSTANTS(:,258).*ALGEBRAIC(:,195));
    ALGEBRAIC(:,232) =  CONSTANTS(:,303).*(  - CONSTANTS(:,245).*ALGEBRAIC(:,220)+ ALGEBRAIC(:,209).*(CONSTANTS(:,265) - CONSTANTS(:,260))+ ALGEBRAIC(:,215).*(CONSTANTS(:,266) - CONSTANTS(:,261))+ ALGEBRAIC(:,223).*(CONSTANTS(:,267) - CONSTANTS(:,262))+ ALGEBRAIC(:,227).*(CONSTANTS(:,268) - CONSTANTS(:,263))+ ALGEBRAIC(:,229).*(CONSTANTS(:,269) - CONSTANTS(:,264)));
    ALGEBRAIC(:,260) =  CONSTANTS(:,303).*(  - CONSTANTS(:,245).*ALGEBRAIC(:,252)+ ALGEBRAIC(:,243).*(CONSTANTS(:,271) - CONSTANTS(:,270))+ ALGEBRAIC(:,255).*(CONSTANTS(:,271) - CONSTANTS(:,271))+ ALGEBRAIC(:,247).*(CONSTANTS(:,273) - CONSTANTS(:,272))+ ALGEBRAIC(:,257).*(CONSTANTS(:,273) - CONSTANTS(:,272)));
    ALGEBRAIC(:,376) =  CONSTANTS(:,303).*((((((((((((((((((((( CONSTANTS(:,281).*ALGEBRAIC(:,333) -  CONSTANTS(:,276).*ALGEBRAIC(:,333))+ CONSTANTS(:,282).*ALGEBRAIC(:,341) -  CONSTANTS(:,277).*ALGEBRAIC(:,341))+ CONSTANTS(:,280).*ALGEBRAIC(:,329) -  CONSTANTS(:,275).*ALGEBRAIC(:,329))+ CONSTANTS(:,281).*ALGEBRAIC(:,337) -  CONSTANTS(:,276).*ALGEBRAIC(:,337))+ CONSTANTS(:,282).*ALGEBRAIC(:,345) -  CONSTANTS(:,277).*ALGEBRAIC(:,345))+ CONSTANTS(:,280).*ALGEBRAIC(:,325) -  CONSTANTS(:,275).*ALGEBRAIC(:,325))+ CONSTANTS(:,279).*ALGEBRAIC(:,321) -  CONSTANTS(:,274).*ALGEBRAIC(:,321))+ CONSTANTS(:,279).*ALGEBRAIC(:,317) -  CONSTANTS(:,274).*ALGEBRAIC(:,317))+ CONSTANTS(:,279).*ALGEBRAIC(:,313) -  CONSTANTS(:,274).*ALGEBRAIC(:,313))+ CONSTANTS(:,282).*ALGEBRAIC(:,343) -  CONSTANTS(:,277).*ALGEBRAIC(:,343))+ CONSTANTS(:,281).*ALGEBRAIC(:,335) -  CONSTANTS(:,276).*ALGEBRAIC(:,335))+ CONSTANTS(:,280).*ALGEBRAIC(:,327) -  CONSTANTS(:,275).*ALGEBRAIC(:,327))+ CONSTANTS(:,282).*ALGEBRAIC(:,339) -  CONSTANTS(:,277).*ALGEBRAIC(:,339))+ CONSTANTS(:,281).*ALGEBRAIC(:,331) -  CONSTANTS(:,276).*ALGEBRAIC(:,331))+ CONSTANTS(:,280).*ALGEBRAIC(:,323) -  CONSTANTS(:,275).*ALGEBRAIC(:,323))+ CONSTANTS(:,279).*ALGEBRAIC(:,319) -  CONSTANTS(:,274).*ALGEBRAIC(:,319))+ CONSTANTS(:,279).*ALGEBRAIC(:,315) -  CONSTANTS(:,274).*ALGEBRAIC(:,315))+ CONSTANTS(:,279).*ALGEBRAIC(:,311)) -  CONSTANTS(:,274).*ALGEBRAIC(:,311)) - ( CONSTANTS(:,247).*ALGEBRAIC(:,367)+ CONSTANTS(:,247).*ALGEBRAIC(:,369))) - ( CONSTANTS(:,245).*ALGEBRAIC(:,372)+ CONSTANTS(:,245).*ALGEBRAIC(:,374)));
    ALGEBRAIC(:,459) =  CONSTANTS(:,284).*ALGEBRAIC(:,457)+ CONSTANTS(:,283).*ALGEBRAIC(:,448);
    ALGEBRAIC(:,476) =   - CONSTANTS(:,246).*CONSTANTS(:,303).*ALGEBRAIC(:,475);
    ALGEBRAIC(:,514) =  CONSTANTS(:,303).*(  - CONSTANTS(:,285).*ALGEBRAIC(:,511)+ CONSTANTS(:,286).*ALGEBRAIC(:,511));
    ALGEBRAIC(:,523) =   - CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,522);
    ALGEBRAIC(:,620) =  CONSTANTS(:,303).*(  - CONSTANTS(:,247).*ALGEBRAIC(:,607)+ ALGEBRAIC(:,586).*(CONSTANTS(:,291) - CONSTANTS(:,289))+ ALGEBRAIC(:,590).*(CONSTANTS(:,291) - CONSTANTS(:,289))+ ALGEBRAIC(:,600).*(CONSTANTS(:,291) - CONSTANTS(:,289))+ ALGEBRAIC(:,613).*(CONSTANTS(:,291) - CONSTANTS(:,289))+ ALGEBRAIC(:,594).*(CONSTANTS(:,292) - CONSTANTS(:,290))+ ALGEBRAIC(:,602).*(CONSTANTS(:,292) - CONSTANTS(:,290))+ ALGEBRAIC(:,616).*(CONSTANTS(:,292) - CONSTANTS(:,290)));
    ALGEBRAIC(:,673) =  CONSTANTS(:,303).*(  - CONSTANTS(:,245).*ALGEBRAIC(:,671)+ ALGEBRAIC(:,635).*(CONSTANTS(:,295) - CONSTANTS(:,293))+ ALGEBRAIC(:,640).*(CONSTANTS(:,295) - CONSTANTS(:,293))+ ALGEBRAIC(:,654).*(CONSTANTS(:,295) - CONSTANTS(:,293))+ ALGEBRAIC(:,662).*(CONSTANTS(:,295) - CONSTANTS(:,293))+ ALGEBRAIC(:,648).*(CONSTANTS(:,296) - CONSTANTS(:,294))+ ALGEBRAIC(:,656).*(CONSTANTS(:,296) - CONSTANTS(:,294))+ ALGEBRAIC(:,664).*(CONSTANTS(:,296) - CONSTANTS(:,294)));
    RATES(:,18) = ALGEBRAIC(:,34)+ALGEBRAIC(:,152)+ALGEBRAIC(:,171)+ALGEBRAIC(:,185)+ALGEBRAIC(:,199)+ALGEBRAIC(:,232)+ALGEBRAIC(:,260)+ALGEBRAIC(:,376)+ALGEBRAIC(:,476)+ALGEBRAIC(:,459)+ALGEBRAIC(:,514)+ALGEBRAIC(:,523)+ALGEBRAIC(:,620)+ALGEBRAIC(:,673);
    ALGEBRAIC(:,660) = ALGEBRAIC(:,658)+ CONSTANTS(:,293).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,668) = ALGEBRAIC(:,666)+ CONSTANTS(:,295).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,672) =  CONSTANTS(:,131).*(exp(ALGEBRAIC(:,660)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,668)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,674) = (ALGEBRAIC(:,662) - ALGEBRAIC(:,672))+ALGEBRAIC(:,664);
    RATES(:,99) = ALGEBRAIC(:,674);
    ALGEBRAIC(:,643) = ALGEBRAIC(:,641)+ CONSTANTS(:,294).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,670) = ALGEBRAIC(:,666)+ CONSTANTS(:,296).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,675) =  CONSTANTS(:,135).*(exp(ALGEBRAIC(:,643)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,670)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,676) = ALGEBRAIC(:,644) - ALGEBRAIC(:,675);
    RATES(:,96) = ALGEBRAIC(:,676);
    ALGEBRAIC(:,677) = ALGEBRAIC(:,672)+ALGEBRAIC(:,675);
    RATES(:,100) = ALGEBRAIC(:,677);
   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(:,38) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,140).*STATES(:,4));
    ALGEBRAIC(:,41) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,42) = ALGEBRAIC(:,41)+ALGEBRAIC(:,38);
    ALGEBRAIC(:,39) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,141).*STATES(:,5));
    ALGEBRAIC(:,40) = ALGEBRAIC(:,39);
    ALGEBRAIC(:,43) =  CONSTANTS(:,3).*(exp(ALGEBRAIC(:,42)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,40)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,44) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,49) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,144).*STATES(:,19))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,79) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,148).*STATES(:,20))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,80) =  CONSTANTS(:,17).*(exp(ALGEBRAIC(:,49)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,79)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,57) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,144).*STATES(:,19))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,95) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,152).*STATES(:,27))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,96) =  CONSTANTS(:,25).*(exp(ALGEBRAIC(:,57)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,95)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,65) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,144).*STATES(:,19))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,111) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,145).*STATES(:,21))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,112) =  CONSTANTS(:,5).*(exp(ALGEBRAIC(:,65)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,111)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,113) = ( - ALGEBRAIC(:,112) - ALGEBRAIC(:,80)) - ALGEBRAIC(:,96);
    ALGEBRAIC(:,50) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,152).*STATES(:,27))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,81) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,156).*STATES(:,28))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,82) =  CONSTANTS(:,18).*(exp(ALGEBRAIC(:,50)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,81)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,66) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,152).*STATES(:,27))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,114) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,153).*STATES(:,29))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,115) =  CONSTANTS(:,6).*(exp(ALGEBRAIC(:,66)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,114)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,116) = ( - ALGEBRAIC(:,115) - ALGEBRAIC(:,82)) -  - ALGEBRAIC(:,96);
    ALGEBRAIC(:,58) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,148).*STATES(:,20))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,97) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,156).*STATES(:,28))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,98) =  CONSTANTS(:,26).*(exp(ALGEBRAIC(:,58)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,97)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,67) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,148).*STATES(:,20))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,117) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,149).*STATES(:,22))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,118) =  CONSTANTS(:,7).*(exp(ALGEBRAIC(:,67)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,117)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,119) = ( - ALGEBRAIC(:,118)+ALGEBRAIC(:,80)) - ALGEBRAIC(:,98);
    ALGEBRAIC(:,68) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,156).*STATES(:,28))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,120) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,157).*STATES(:,30))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,121) =  CONSTANTS(:,8).*(exp(ALGEBRAIC(:,68)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,120)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,122) = ( - ALGEBRAIC(:,121)+ALGEBRAIC(:,82)) -  - ALGEBRAIC(:,98);
    ALGEBRAIC(:,51) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,145).*STATES(:,21))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,83) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,149).*STATES(:,22))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,84) =  CONSTANTS(:,19).*(exp(ALGEBRAIC(:,51)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,83)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,59) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,145).*STATES(:,21))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,99) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,153).*STATES(:,29))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,100) =  CONSTANTS(:,27).*(exp(ALGEBRAIC(:,59)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,99)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,69) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,145).*STATES(:,21))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,123) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,146).*STATES(:,23))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,124) =  CONSTANTS(:,9).*(exp(ALGEBRAIC(:,69)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,123)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,125) = ((ALGEBRAIC(:,112) - ALGEBRAIC(:,124)) - ALGEBRAIC(:,84)) - ALGEBRAIC(:,100);
    ALGEBRAIC(:,52) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,153).*STATES(:,29))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,85) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,157).*STATES(:,30))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,86) =  CONSTANTS(:,20).*(exp(ALGEBRAIC(:,52)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,85)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,70) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,153).*STATES(:,29))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,126) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,154).*STATES(:,31))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,127) =  CONSTANTS(:,10).*(exp(ALGEBRAIC(:,70)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,126)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,128) = ((ALGEBRAIC(:,115) - ALGEBRAIC(:,127)) - ALGEBRAIC(:,86)) -  - ALGEBRAIC(:,100);
    ALGEBRAIC(:,60) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,149).*STATES(:,22))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,101) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,157).*STATES(:,30))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,102) =  CONSTANTS(:,28).*(exp(ALGEBRAIC(:,60)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,101)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,71) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,149).*STATES(:,22))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,129) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,150).*STATES(:,24))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,130) =  CONSTANTS(:,11).*(exp(ALGEBRAIC(:,71)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,129)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,131) = ((ALGEBRAIC(:,118) - ALGEBRAIC(:,130))+ALGEBRAIC(:,84)) - ALGEBRAIC(:,102);
    ALGEBRAIC(:,72) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,157).*STATES(:,30))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,132) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,158).*STATES(:,32))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,133) =  CONSTANTS(:,12).*(exp(ALGEBRAIC(:,72)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,132)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,134) = ((ALGEBRAIC(:,121) - ALGEBRAIC(:,133))+ALGEBRAIC(:,86)) -  - ALGEBRAIC(:,102);
    ALGEBRAIC(:,53) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,146).*STATES(:,23))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,87) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,150).*STATES(:,24))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,88) =  CONSTANTS(:,21).*(exp(ALGEBRAIC(:,53)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,87)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,61) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,146).*STATES(:,23))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,103) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,154).*STATES(:,31))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,104) =  CONSTANTS(:,29).*(exp(ALGEBRAIC(:,61)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,103)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,73) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,146).*STATES(:,23))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,135) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,147).*STATES(:,25))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,136) =  CONSTANTS(:,13).*(exp(ALGEBRAIC(:,73)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,135)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,137) = ((ALGEBRAIC(:,124) - ALGEBRAIC(:,136)) - ALGEBRAIC(:,88)) - ALGEBRAIC(:,104);
    ALGEBRAIC(:,55) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,147).*STATES(:,25))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,91) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,151).*STATES(:,26))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,92) =  CONSTANTS(:,23).*(exp(ALGEBRAIC(:,55)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,91)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,63) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,147).*STATES(:,25))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,107) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,155).*STATES(:,33))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,108) =  CONSTANTS(:,31).*(exp(ALGEBRAIC(:,63)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,107)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,138) = (ALGEBRAIC(:,136) - ALGEBRAIC(:,92)) - ALGEBRAIC(:,108);
    ALGEBRAIC(:,54) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,154).*STATES(:,31))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,89) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,158).*STATES(:,32))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,90) =  CONSTANTS(:,22).*(exp(ALGEBRAIC(:,54)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,89)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,74) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,154).*STATES(:,31))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,139) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,155).*STATES(:,33))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,140) =  CONSTANTS(:,14).*(exp(ALGEBRAIC(:,74)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,139)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,141) = ((ALGEBRAIC(:,127) - ALGEBRAIC(:,140)) - ALGEBRAIC(:,90)) -  - ALGEBRAIC(:,104);
    ALGEBRAIC(:,56) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,155).*STATES(:,33))+ CONSTANTS(:,248).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,93) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,159).*STATES(:,34))+ CONSTANTS(:,251).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,94) =  CONSTANTS(:,24).*(exp(ALGEBRAIC(:,56)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,93)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,142) = (ALGEBRAIC(:,140) - ALGEBRAIC(:,94)) -  - ALGEBRAIC(:,108);
    ALGEBRAIC(:,62) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,150).*STATES(:,24))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,105) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,158).*STATES(:,32))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,106) =  CONSTANTS(:,30).*(exp(ALGEBRAIC(:,62)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,105)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,75) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,150).*STATES(:,24))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,143) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,151).*STATES(:,26))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,144) =  CONSTANTS(:,15).*(exp(ALGEBRAIC(:,75)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,143)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,145) = ((ALGEBRAIC(:,130) - ALGEBRAIC(:,144))+ALGEBRAIC(:,88)) - ALGEBRAIC(:,106);
    ALGEBRAIC(:,64) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,151).*STATES(:,26))+ CONSTANTS(:,249).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,109) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,159).*STATES(:,34))+ CONSTANTS(:,252).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,110) =  CONSTANTS(:,32).*(exp(ALGEBRAIC(:,64)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,109)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,146) = (ALGEBRAIC(:,144)+ALGEBRAIC(:,92)) - ALGEBRAIC(:,110);
    ALGEBRAIC(:,76) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,158).*STATES(:,32))+ CONSTANTS(:,250).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,147) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,159).*STATES(:,34))+ CONSTANTS(:,253).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,148) =  CONSTANTS(:,16).*(exp(ALGEBRAIC(:,76)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,147)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,149) = ((ALGEBRAIC(:,133) - ALGEBRAIC(:,148))+ALGEBRAIC(:,90)) -  - ALGEBRAIC(:,106);
    ALGEBRAIC(:,77) =  CONSTANTS(:,246).*CONSTANTS(:,303).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,46) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,142).*STATES(:,6));
    ALGEBRAIC(:,47) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,159).*STATES(:,34));
    ALGEBRAIC(:,48) = ALGEBRAIC(:,46)+ CONSTANTS(:,246).*CONSTANTS(:,303).*ALGEBRAIC(:,44)+ALGEBRAIC(:,47);
    ALGEBRAIC(:,45) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,143).*STATES(:,7));
    ALGEBRAIC(:,78) = ALGEBRAIC(:,45)+ALGEBRAIC(:,47);
    ALGEBRAIC(:,150) = piecewise({ALGEBRAIC(:,77)==0.000000,  CONSTANTS(:,4).*(exp(ALGEBRAIC(:,48)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,78)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,4).*ALGEBRAIC(:,77))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,77)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,48)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,78)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,151) = (ALGEBRAIC(:,148)+ALGEBRAIC(:,94)) - (( - ALGEBRAIC(:,110)+ALGEBRAIC(:,150)) - ALGEBRAIC(:,150));
    ALGEBRAIC(:,157) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,160) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,162).*STATES(:,35));
    ALGEBRAIC(:,168) = ALGEBRAIC(:,160)+ CONSTANTS(:,254).*CONSTANTS(:,303).*ALGEBRAIC(:,157);
    ALGEBRAIC(:,161) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,163).*STATES(:,36));
    ALGEBRAIC(:,169) = ALGEBRAIC(:,161)+ CONSTANTS(:,255).*CONSTANTS(:,303).*ALGEBRAIC(:,157);
    ALGEBRAIC(:,170) =  CONSTANTS(:,35).*(exp(ALGEBRAIC(:,168)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,169)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,172) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,177) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,164).*STATES(:,37))+ CONSTANTS(:,256).*CONSTANTS(:,303).*ALGEBRAIC(:,172);
    ALGEBRAIC(:,180) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,165).*STATES(:,38))+ CONSTANTS(:,257).*CONSTANTS(:,303).*ALGEBRAIC(:,172);
    ALGEBRAIC(:,181) =  CONSTANTS(:,37).*(exp(ALGEBRAIC(:,177)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,180)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,182) =  - ALGEBRAIC(:,181);
    ALGEBRAIC(:,178) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,172);
    ALGEBRAIC(:,173) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,174) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,175) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,165).*STATES(:,38));
    ALGEBRAIC(:,176) = ALGEBRAIC(:,174)+ CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,172)+ALGEBRAIC(:,175)+ CONSTANTS(:,297).*ALGEBRAIC(:,173);
    ALGEBRAIC(:,179) = ALGEBRAIC(:,173)+ALGEBRAIC(:,175)+ CONSTANTS(:,297).*ALGEBRAIC(:,173);
    ALGEBRAIC(:,183) = piecewise({ALGEBRAIC(:,178)==0.000000,  CONSTANTS(:,36).*(exp(ALGEBRAIC(:,176)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,179)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,36).*ALGEBRAIC(:,178))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,178)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,176)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,179)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,184) = ALGEBRAIC(:,181) - (ALGEBRAIC(:,183) - ALGEBRAIC(:,183));
    ALGEBRAIC(:,186) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,191) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,166).*STATES(:,39))+ CONSTANTS(:,258).*CONSTANTS(:,303).*ALGEBRAIC(:,186);
    ALGEBRAIC(:,194) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,167).*STATES(:,40))+ CONSTANTS(:,259).*CONSTANTS(:,303).*ALGEBRAIC(:,186);
    ALGEBRAIC(:,195) =  CONSTANTS(:,39).*(exp(ALGEBRAIC(:,191)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,194)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,196) =  - ALGEBRAIC(:,195);
    ALGEBRAIC(:,192) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,186);
    ALGEBRAIC(:,188) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,189) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,167).*STATES(:,40));
    ALGEBRAIC(:,190) = ALGEBRAIC(:,188)+ CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,186)+ALGEBRAIC(:,189);
    ALGEBRAIC(:,187) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,193) = ALGEBRAIC(:,187)+ALGEBRAIC(:,189);
    ALGEBRAIC(:,197) = piecewise({ALGEBRAIC(:,192)==0.000000,  CONSTANTS(:,38).*(exp(ALGEBRAIC(:,190)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,193)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,38).*ALGEBRAIC(:,192))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,192)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,190)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,193)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,198) = ALGEBRAIC(:,195) - (ALGEBRAIC(:,197) - ALGEBRAIC(:,197));
    ALGEBRAIC(:,202) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,204) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,168).*STATES(:,41));
    ALGEBRAIC(:,205) = ALGEBRAIC(:,204)+ CONSTANTS(:,260).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,206) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,169).*STATES(:,42));
    ALGEBRAIC(:,207) = ALGEBRAIC(:,206)+ CONSTANTS(:,265).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,209) =  CONSTANTS(:,41).*(exp(ALGEBRAIC(:,205)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,207)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,210) =  - ALGEBRAIC(:,209);
    ALGEBRAIC(:,208) = ALGEBRAIC(:,206)+ CONSTANTS(:,261).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,211) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,170).*STATES(:,43));
    ALGEBRAIC(:,212) = ALGEBRAIC(:,211)+ CONSTANTS(:,266).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,215) =  CONSTANTS(:,42).*(exp(ALGEBRAIC(:,208)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,212)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,216) = ALGEBRAIC(:,209) - ALGEBRAIC(:,215);
    ALGEBRAIC(:,213) = ALGEBRAIC(:,211)+ CONSTANTS(:,262).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,217) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,171).*STATES(:,44));
    ALGEBRAIC(:,221) = ALGEBRAIC(:,217)+ CONSTANTS(:,267).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,223) =  CONSTANTS(:,43).*(exp(ALGEBRAIC(:,213)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,221)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,214) = ALGEBRAIC(:,211)+ CONSTANTS(:,263).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,224) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,172).*STATES(:,45));
    ALGEBRAIC(:,225) = ALGEBRAIC(:,224)+ CONSTANTS(:,268).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,227) =  CONSTANTS(:,44).*(exp(ALGEBRAIC(:,214)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,225)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,228) = (ALGEBRAIC(:,215) - ALGEBRAIC(:,223)) - ALGEBRAIC(:,227);
    ALGEBRAIC(:,222) = ALGEBRAIC(:,217)+ CONSTANTS(:,264).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,226) = ALGEBRAIC(:,224)+ CONSTANTS(:,269).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,229) =  CONSTANTS(:,45).*(exp(ALGEBRAIC(:,222)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,226)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,230) = ALGEBRAIC(:,223) - ALGEBRAIC(:,229);
    ALGEBRAIC(:,231) = ALGEBRAIC(:,227)+ALGEBRAIC(:,229);
    ALGEBRAIC(:,235) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,237) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,173).*STATES(:,46));
    ALGEBRAIC(:,238) = ALGEBRAIC(:,237)+ CONSTANTS(:,270).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,240) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,174).*STATES(:,47));
    ALGEBRAIC(:,241) = ALGEBRAIC(:,240)+ CONSTANTS(:,271).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,243) =  CONSTANTS(:,47).*(exp(ALGEBRAIC(:,238)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,241)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,239) = ALGEBRAIC(:,237)+ CONSTANTS(:,272).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,244) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,175).*STATES(:,48));
    ALGEBRAIC(:,246) = ALGEBRAIC(:,244)+ CONSTANTS(:,273).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,247) =  CONSTANTS(:,49).*(exp(ALGEBRAIC(:,239)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,246)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,248) =  - ALGEBRAIC(:,243) - ALGEBRAIC(:,247);
    ALGEBRAIC(:,245) = ALGEBRAIC(:,244)+ CONSTANTS(:,270).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,249) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,176).*STATES(:,49));
    ALGEBRAIC(:,253) = ALGEBRAIC(:,249)+ CONSTANTS(:,271).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,255) =  CONSTANTS(:,48).*(exp(ALGEBRAIC(:,245)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,253)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,256) = ALGEBRAIC(:,247) - ALGEBRAIC(:,255);
    ALGEBRAIC(:,242) = ALGEBRAIC(:,240)+ CONSTANTS(:,272).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,254) = ALGEBRAIC(:,249)+ CONSTANTS(:,273).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,257) =  CONSTANTS(:,50).*(exp(ALGEBRAIC(:,242)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,254)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,258) = ALGEBRAIC(:,243) - ALGEBRAIC(:,257);
    ALGEBRAIC(:,259) = ALGEBRAIC(:,255)+ALGEBRAIC(:,257);
    ALGEBRAIC(:,266) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,177).*STATES(:,50));
    ALGEBRAIC(:,296) = ALGEBRAIC(:,266);
    ALGEBRAIC(:,263) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,346) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,183).*STATES(:,56))+ CONSTANTS(:,278).*ALGEBRAIC(:,263);
    ALGEBRAIC(:,347) =  CONSTANTS(:,73).*(exp(ALGEBRAIC(:,296)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,346)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,261) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,278) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,177).*STATES(:,50))+ CONSTANTS(:,274).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,310) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,180).*STATES(:,53))+ CONSTANTS(:,279).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,311) =  CONSTANTS(:,55).*(exp(ALGEBRAIC(:,278)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,310)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,284) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,177).*STATES(:,50))+ CONSTANTS(:,275).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,322) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,178).*STATES(:,51))+ CONSTANTS(:,280).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,323) =  CONSTANTS(:,61).*(exp(ALGEBRAIC(:,284)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,322)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,288) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,177).*STATES(:,50))+ CONSTANTS(:,276).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,330) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,179).*STATES(:,52))+ CONSTANTS(:,281).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,331) =  CONSTANTS(:,65).*(exp(ALGEBRAIC(:,288)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,330)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,349) = (( - ALGEBRAIC(:,311) - ALGEBRAIC(:,323)) - ALGEBRAIC(:,331)) - ALGEBRAIC(:,347);
    ALGEBRAIC(:,279) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,183).*STATES(:,56))+ CONSTANTS(:,274).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,312) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,186).*STATES(:,59))+ CONSTANTS(:,279).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,313) =  CONSTANTS(:,58).*(exp(ALGEBRAIC(:,279)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,312)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,285) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,183).*STATES(:,56))+ CONSTANTS(:,275).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,324) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,184).*STATES(:,57))+ CONSTANTS(:,280).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,325) =  CONSTANTS(:,63).*(exp(ALGEBRAIC(:,285)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,324)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,289) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,183).*STATES(:,56))+ CONSTANTS(:,276).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,332) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,185).*STATES(:,58))+ CONSTANTS(:,281).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,333) =  CONSTANTS(:,67).*(exp(ALGEBRAIC(:,289)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,332)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,350) = (( - ALGEBRAIC(:,313) - ALGEBRAIC(:,325)) - ALGEBRAIC(:,333)) -  - ALGEBRAIC(:,347);
    ALGEBRAIC(:,267) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,178).*STATES(:,51));
    ALGEBRAIC(:,297) = ALGEBRAIC(:,267);
    ALGEBRAIC(:,348) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,184).*STATES(:,57))+ CONSTANTS(:,278).*ALGEBRAIC(:,263);
    ALGEBRAIC(:,351) =  CONSTANTS(:,75).*(exp(ALGEBRAIC(:,297)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,348)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,280) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,178).*STATES(:,51))+ CONSTANTS(:,274).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,314) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,181).*STATES(:,54))+ CONSTANTS(:,279).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,315) =  CONSTANTS(:,56).*(exp(ALGEBRAIC(:,280)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,314)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,292) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,178).*STATES(:,51))+ CONSTANTS(:,277).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,338) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,179).*STATES(:,52))+ CONSTANTS(:,282).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,339) =  CONSTANTS(:,69).*(exp(ALGEBRAIC(:,292)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,338)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,353) = (( - ALGEBRAIC(:,315)+ALGEBRAIC(:,323)) - ALGEBRAIC(:,351)) - ALGEBRAIC(:,339);
    ALGEBRAIC(:,281) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,184).*STATES(:,57))+ CONSTANTS(:,274).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,316) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,187).*STATES(:,60))+ CONSTANTS(:,279).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,317) =  CONSTANTS(:,59).*(exp(ALGEBRAIC(:,281)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,316)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,293) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,184).*STATES(:,57))+ CONSTANTS(:,277).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,340) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,185).*STATES(:,58))+ CONSTANTS(:,282).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,341) =  CONSTANTS(:,71).*(exp(ALGEBRAIC(:,293)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,340)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,354) = (( - ALGEBRAIC(:,317)+ALGEBRAIC(:,325)) -  - ALGEBRAIC(:,351)) - ALGEBRAIC(:,341);
    ALGEBRAIC(:,268) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,179).*STATES(:,52));
    ALGEBRAIC(:,298) = ALGEBRAIC(:,268);
    ALGEBRAIC(:,352) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,185).*STATES(:,58))+ CONSTANTS(:,278).*ALGEBRAIC(:,263);
    ALGEBRAIC(:,355) =  CONSTANTS(:,77).*(exp(ALGEBRAIC(:,298)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,352)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,282) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,179).*STATES(:,52))+ CONSTANTS(:,274).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,318) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,182).*STATES(:,55))+ CONSTANTS(:,279).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,319) =  CONSTANTS(:,57).*(exp(ALGEBRAIC(:,282)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,318)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,357) = (( - ALGEBRAIC(:,319)+ALGEBRAIC(:,331)) - ALGEBRAIC(:,355))+ALGEBRAIC(:,339);
    ALGEBRAIC(:,283) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,185).*STATES(:,58))+ CONSTANTS(:,274).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,320) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,188).*STATES(:,61))+ CONSTANTS(:,279).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,321) =  CONSTANTS(:,60).*(exp(ALGEBRAIC(:,283)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,320)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,358) = (( - ALGEBRAIC(:,321)+ALGEBRAIC(:,333)) -  - ALGEBRAIC(:,355))+ALGEBRAIC(:,341);
    ALGEBRAIC(:,269) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,180).*STATES(:,53));
    ALGEBRAIC(:,299) = ALGEBRAIC(:,269);
    ALGEBRAIC(:,356) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,186).*STATES(:,59))+ CONSTANTS(:,278).*ALGEBRAIC(:,263);
    ALGEBRAIC(:,359) =  CONSTANTS(:,74).*(exp(ALGEBRAIC(:,299)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,356)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,286) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,180).*STATES(:,53))+ CONSTANTS(:,275).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,326) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,181).*STATES(:,54))+ CONSTANTS(:,280).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,327) =  CONSTANTS(:,62).*(exp(ALGEBRAIC(:,286)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,326)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,290) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,180).*STATES(:,53))+ CONSTANTS(:,276).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,334) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,182).*STATES(:,55))+ CONSTANTS(:,281).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,335) =  CONSTANTS(:,66).*(exp(ALGEBRAIC(:,290)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,334)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,361) = (( - ALGEBRAIC(:,335)+ALGEBRAIC(:,311)) - ALGEBRAIC(:,327)) - ALGEBRAIC(:,359);
    ALGEBRAIC(:,287) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,186).*STATES(:,59))+ CONSTANTS(:,275).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,328) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,187).*STATES(:,60))+ CONSTANTS(:,280).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,329) =  CONSTANTS(:,64).*(exp(ALGEBRAIC(:,287)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,328)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,291) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,186).*STATES(:,59))+ CONSTANTS(:,276).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,336) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,188).*STATES(:,61))+ CONSTANTS(:,281).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,337) =  CONSTANTS(:,68).*(exp(ALGEBRAIC(:,291)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,336)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,362) = (( - ALGEBRAIC(:,337)+ALGEBRAIC(:,313)) - ALGEBRAIC(:,329)) -  - ALGEBRAIC(:,359);
    ALGEBRAIC(:,270) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,181).*STATES(:,54));
    ALGEBRAIC(:,300) = ALGEBRAIC(:,270);
    ALGEBRAIC(:,360) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,187).*STATES(:,60))+ CONSTANTS(:,278).*ALGEBRAIC(:,263);
    ALGEBRAIC(:,363) =  CONSTANTS(:,76).*(exp(ALGEBRAIC(:,300)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,360)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,294) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,181).*STATES(:,54))+ CONSTANTS(:,277).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,342) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,182).*STATES(:,55))+ CONSTANTS(:,282).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,343) =  CONSTANTS(:,70).*(exp(ALGEBRAIC(:,294)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,342)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,365) = ((ALGEBRAIC(:,327)+ALGEBRAIC(:,315)) - ALGEBRAIC(:,363)) - ALGEBRAIC(:,343);
    ALGEBRAIC(:,272) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,182).*STATES(:,55));
    ALGEBRAIC(:,301) = ALGEBRAIC(:,272);
    ALGEBRAIC(:,364) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,188).*STATES(:,61))+ CONSTANTS(:,278).*ALGEBRAIC(:,263);
    ALGEBRAIC(:,366) =  CONSTANTS(:,78).*(exp(ALGEBRAIC(:,301)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,364)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,368) = ((ALGEBRAIC(:,335)+ALGEBRAIC(:,319)) - ALGEBRAIC(:,366))+ALGEBRAIC(:,343);
    ALGEBRAIC(:,271) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,187).*STATES(:,60));
    ALGEBRAIC(:,274) = ALGEBRAIC(:,263)+ CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,261)+ALGEBRAIC(:,271);
    ALGEBRAIC(:,262) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,138).*STATES(:,2));
    ALGEBRAIC(:,306) = ALGEBRAIC(:,262)+ALGEBRAIC(:,271);
    ALGEBRAIC(:,302) =  CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,367) = piecewise({ALGEBRAIC(:,302)==0.000000,  CONSTANTS(:,51).*(exp(ALGEBRAIC(:,274)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,306)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,51).*ALGEBRAIC(:,302))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,302)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,274)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,306)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,265) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,276) = ALGEBRAIC(:,265)+ CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,261)+ALGEBRAIC(:,271);
    ALGEBRAIC(:,264) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,308) = ALGEBRAIC(:,264)+ALGEBRAIC(:,271);
    ALGEBRAIC(:,304) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,372) = piecewise({ALGEBRAIC(:,304)==0.000000,  CONSTANTS(:,53).*(exp(ALGEBRAIC(:,276)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,308)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,53).*ALGEBRAIC(:,304))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,304)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,276)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,308)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,295) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,187).*STATES(:,60))+ CONSTANTS(:,277).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,344) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,188).*STATES(:,61))+ CONSTANTS(:,282).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,345) =  CONSTANTS(:,72).*(exp(ALGEBRAIC(:,295)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,344)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,373) = ((ALGEBRAIC(:,329)+ALGEBRAIC(:,317)) - (((( - ALGEBRAIC(:,363)+ALGEBRAIC(:,367)) - ALGEBRAIC(:,367))+ALGEBRAIC(:,372)) - ALGEBRAIC(:,372))) - ALGEBRAIC(:,345);
    ALGEBRAIC(:,273) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,188).*STATES(:,61));
    ALGEBRAIC(:,275) = ALGEBRAIC(:,263)+ CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,261)+ALGEBRAIC(:,273);
    ALGEBRAIC(:,307) = ALGEBRAIC(:,262)+ALGEBRAIC(:,273);
    ALGEBRAIC(:,303) =  CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,369) = piecewise({ALGEBRAIC(:,303)==0.000000,  CONSTANTS(:,52).*(exp(ALGEBRAIC(:,275)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,307)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,52).*ALGEBRAIC(:,303))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,303)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,275)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,307)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,277) = ALGEBRAIC(:,265)+ CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,261)+ALGEBRAIC(:,273);
    ALGEBRAIC(:,309) = ALGEBRAIC(:,264)+ALGEBRAIC(:,273);
    ALGEBRAIC(:,305) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,374) = piecewise({ALGEBRAIC(:,305)==0.000000,  CONSTANTS(:,54).*(exp(ALGEBRAIC(:,277)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,309)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,54).*ALGEBRAIC(:,305))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,305)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,277)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,309)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,375) = ((ALGEBRAIC(:,337)+ALGEBRAIC(:,321)) - (((( - ALGEBRAIC(:,366)+ALGEBRAIC(:,369)) - ALGEBRAIC(:,369))+ALGEBRAIC(:,374)) - ALGEBRAIC(:,374)))+ALGEBRAIC(:,345);
    ALGEBRAIC(:,388) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,198).*STATES(:,71));
    ALGEBRAIC(:,404) = ALGEBRAIC(:,388);
    ALGEBRAIC(:,385) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,143).*STATES(:,7));
    ALGEBRAIC(:,389) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,199).*STATES(:,72));
    ALGEBRAIC(:,420) = ALGEBRAIC(:,385)+ALGEBRAIC(:,389);
    ALGEBRAIC(:,421) =  CONSTANTS(:,88).*(exp(ALGEBRAIC(:,404)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,420)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,381) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,405) = ALGEBRAIC(:,389)+ALGEBRAIC(:,381);
    ALGEBRAIC(:,390) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,200).*STATES(:,73));
    ALGEBRAIC(:,422) = ALGEBRAIC(:,390);
    ALGEBRAIC(:,423) =  CONSTANTS(:,89).*(exp(ALGEBRAIC(:,405)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,422)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,424) = ALGEBRAIC(:,421) - ALGEBRAIC(:,423);
    ALGEBRAIC(:,406) = ALGEBRAIC(:,390)+ALGEBRAIC(:,381);
    ALGEBRAIC(:,391) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,201).*STATES(:,74));
    ALGEBRAIC(:,425) = ALGEBRAIC(:,391);
    ALGEBRAIC(:,426) =  CONSTANTS(:,90).*(exp(ALGEBRAIC(:,406)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,425)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,427) =  - ALGEBRAIC(:,426)+ALGEBRAIC(:,423);
    ALGEBRAIC(:,407) = ALGEBRAIC(:,391);
    ALGEBRAIC(:,380) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,207).*STATES(:,13));
    ALGEBRAIC(:,402) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,206).*STATES(:,12));
    ALGEBRAIC(:,392) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,202).*STATES(:,63));
    ALGEBRAIC(:,428) = ALGEBRAIC(:,380)+ALGEBRAIC(:,402)+ALGEBRAIC(:,392);
    ALGEBRAIC(:,429) =  CONSTANTS(:,91).*(exp(ALGEBRAIC(:,407)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,428)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,430) = ALGEBRAIC(:,426) - ALGEBRAIC(:,429);
    ALGEBRAIC(:,384) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,204).*STATES(:,10));
    ALGEBRAIC(:,408) = ALGEBRAIC(:,392)+ALGEBRAIC(:,384);
    ALGEBRAIC(:,393) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,203).*STATES(:,64));
    ALGEBRAIC(:,431) = ALGEBRAIC(:,393);
    ALGEBRAIC(:,432) =  CONSTANTS(:,92).*(exp(ALGEBRAIC(:,408)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,431)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,433) =  - ALGEBRAIC(:,432)+ALGEBRAIC(:,429);
    ALGEBRAIC(:,409) = ALGEBRAIC(:,393);
    ALGEBRAIC(:,387) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,189).*STATES(:,65));
    ALGEBRAIC(:,434) = ALGEBRAIC(:,387);
    ALGEBRAIC(:,436) =  CONSTANTS(:,93).*(exp(ALGEBRAIC(:,409)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,434)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,438) = ALGEBRAIC(:,432) - ALGEBRAIC(:,436);
    ALGEBRAIC(:,403) = ALGEBRAIC(:,387);
    ALGEBRAIC(:,382) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,394) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,190).*STATES(:,66));
    ALGEBRAIC(:,418) = ALGEBRAIC(:,382)+ALGEBRAIC(:,394);
    ALGEBRAIC(:,419) =  CONSTANTS(:,79).*(exp(ALGEBRAIC(:,403)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,418)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,439) =  - ALGEBRAIC(:,419)+ALGEBRAIC(:,436);
    ALGEBRAIC(:,410) = ALGEBRAIC(:,394);
    ALGEBRAIC(:,395) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,191).*STATES(:,67));
    ALGEBRAIC(:,435) = ALGEBRAIC(:,395)+ALGEBRAIC(:,382);
    ALGEBRAIC(:,437) =  CONSTANTS(:,80).*(exp(ALGEBRAIC(:,410)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,435)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,440) =  - ALGEBRAIC(:,437)+ALGEBRAIC(:,419);
    ALGEBRAIC(:,386) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,142).*STATES(:,6));
    ALGEBRAIC(:,411) = ALGEBRAIC(:,395)+ALGEBRAIC(:,386);
    ALGEBRAIC(:,396) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,192).*STATES(:,68));
    ALGEBRAIC(:,441) = ALGEBRAIC(:,396);
    ALGEBRAIC(:,442) =  CONSTANTS(:,81).*(exp(ALGEBRAIC(:,411)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,441)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,443) = ALGEBRAIC(:,437) - ALGEBRAIC(:,442);
    ALGEBRAIC(:,412) = ALGEBRAIC(:,396)+ALGEBRAIC(:,386);
    ALGEBRAIC(:,397) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,193).*STATES(:,69));
    ALGEBRAIC(:,444) = ALGEBRAIC(:,397);
    ALGEBRAIC(:,445) =  CONSTANTS(:,82).*(exp(ALGEBRAIC(:,412)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,444)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,446) = ALGEBRAIC(:,442) - ALGEBRAIC(:,445);
    ALGEBRAIC(:,413) = ALGEBRAIC(:,397)+ALGEBRAIC(:,386);
    ALGEBRAIC(:,379) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,447) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,194).*STATES(:,70))+ CONSTANTS(:,283).*ALGEBRAIC(:,379);
    ALGEBRAIC(:,448) =  CONSTANTS(:,83).*(exp(ALGEBRAIC(:,413)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,447)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,449) = ALGEBRAIC(:,445) - ALGEBRAIC(:,448);
    ALGEBRAIC(:,398) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,194).*STATES(:,70));
    ALGEBRAIC(:,414) = ALGEBRAIC(:,398);
    ALGEBRAIC(:,383) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,205).*STATES(:,11));
    ALGEBRAIC(:,399) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,195).*STATES(:,62));
    ALGEBRAIC(:,450) = ALGEBRAIC(:,399)+ALGEBRAIC(:,383);
    ALGEBRAIC(:,451) =  CONSTANTS(:,84).*(exp(ALGEBRAIC(:,414)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,450)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,452) = ALGEBRAIC(:,448) - ALGEBRAIC(:,451);
    ALGEBRAIC(:,415) = ALGEBRAIC(:,399);
    ALGEBRAIC(:,400) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,196).*STATES(:,75));
    ALGEBRAIC(:,453) = ALGEBRAIC(:,400);
    ALGEBRAIC(:,454) =  CONSTANTS(:,85).*(exp(ALGEBRAIC(:,415)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,453)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,455) = ALGEBRAIC(:,451) - ALGEBRAIC(:,454);
    ALGEBRAIC(:,416) = ALGEBRAIC(:,400);
    ALGEBRAIC(:,456) =  CONSTANTS(:,284).*ALGEBRAIC(:,379)+ CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,143).*STATES(:,7))+ CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,197).*STATES(:,76));
    ALGEBRAIC(:,457) =  CONSTANTS(:,86).*(exp(ALGEBRAIC(:,416)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,456)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,458) =  - ALGEBRAIC(:,457)+ALGEBRAIC(:,454);
    ALGEBRAIC(:,401) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,197).*STATES(:,76));
    ALGEBRAIC(:,417) = ALGEBRAIC(:,401);
    ALGEBRAIC(:,460) = ALGEBRAIC(:,388)+ALGEBRAIC(:,385);
    ALGEBRAIC(:,461) =  CONSTANTS(:,87).*(exp(ALGEBRAIC(:,417)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,460)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,462) = ALGEBRAIC(:,461) - ALGEBRAIC(:,421);
    ALGEBRAIC(:,463) = ALGEBRAIC(:,457) - ALGEBRAIC(:,461);
    ALGEBRAIC(:,159) =  CONSTANTS(:,246).*CONSTANTS(:,303).*ALGEBRAIC(:,157);
    ALGEBRAIC(:,155) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,142).*STATES(:,6));
    ALGEBRAIC(:,164) = ALGEBRAIC(:,161)+ALGEBRAIC(:,155)+ALGEBRAIC(:,159);
    ALGEBRAIC(:,156) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,143).*STATES(:,7));
    ALGEBRAIC(:,165) = ALGEBRAIC(:,161)+ALGEBRAIC(:,156);
    ALGEBRAIC(:,167) = piecewise({ALGEBRAIC(:,159)==0.000000,  1.00000.*CONSTANTS(:,33).*(exp(ALGEBRAIC(:,164)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,165)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( 1.00000.*CONSTANTS(:,33).*ALGEBRAIC(:,159))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,159)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,164)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,165)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,470) =  - ALGEBRAIC(:,442) - (ALGEBRAIC(:,445)+ALGEBRAIC(:,448));
    ALGEBRAIC(:,472) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,142).*STATES(:,6));
    ALGEBRAIC(:,473) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,143).*STATES(:,7));
    ALGEBRAIC(:,16) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,474) =  CONSTANTS(:,246).*CONSTANTS(:,303).*ALGEBRAIC(:,16);
    ALGEBRAIC(:,475) = piecewise({ALGEBRAIC(:,474)==0.000000,  CONSTANTS(:,94).*(exp(ALGEBRAIC(:,472)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,473)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,94).*ALGEBRAIC(:,474))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,474)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,472)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,473)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,482) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,208).*STATES(:,77));
    ALGEBRAIC(:,488) = ALGEBRAIC(:,482);
    ALGEBRAIC(:,481) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,142).*STATES(:,6));
    ALGEBRAIC(:,483) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,209).*STATES(:,78));
    ALGEBRAIC(:,494) =  CONSTANTS(:,288).*ALGEBRAIC(:,481)+ALGEBRAIC(:,483);
    ALGEBRAIC(:,495) =  CONSTANTS(:,95).*(exp(ALGEBRAIC(:,488)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,494)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,497) =  CONSTANTS(:,288).*ALGEBRAIC(:,495);
    ALGEBRAIC(:,479) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,489) = ALGEBRAIC(:,483)+ALGEBRAIC(:,479);
    ALGEBRAIC(:,484) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,210).*STATES(:,79));
    ALGEBRAIC(:,496) = ALGEBRAIC(:,484);
    ALGEBRAIC(:,498) =  CONSTANTS(:,96).*(exp(ALGEBRAIC(:,489)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,496)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,500) = ALGEBRAIC(:,495) - ALGEBRAIC(:,498);
    ALGEBRAIC(:,490) = ALGEBRAIC(:,484);
    ALGEBRAIC(:,485) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,211).*STATES(:,80));
    ALGEBRAIC(:,499) = ALGEBRAIC(:,485);
    ALGEBRAIC(:,501) =  CONSTANTS(:,97).*(exp(ALGEBRAIC(:,490)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,499)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,503) = ALGEBRAIC(:,498) - ALGEBRAIC(:,501);
    ALGEBRAIC(:,491) = ALGEBRAIC(:,485);
    ALGEBRAIC(:,478) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,138).*STATES(:,2));
    ALGEBRAIC(:,486) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,212).*STATES(:,81));
    ALGEBRAIC(:,502) = ALGEBRAIC(:,486)+ALGEBRAIC(:,478);
    ALGEBRAIC(:,504) =  CONSTANTS(:,98).*(exp(ALGEBRAIC(:,491)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,502)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,506) =  - ALGEBRAIC(:,504)+ALGEBRAIC(:,501);
    ALGEBRAIC(:,469) = ALGEBRAIC(:,457)+ALGEBRAIC(:,461)+ALGEBRAIC(:,421);
    ALGEBRAIC(:,480) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,143).*STATES(:,7));
    ALGEBRAIC(:,492) = ALGEBRAIC(:,486)+ CONSTANTS(:,287).*ALGEBRAIC(:,480);
    ALGEBRAIC(:,487) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,213).*STATES(:,82));
    ALGEBRAIC(:,505) = ALGEBRAIC(:,487);
    ALGEBRAIC(:,507) =  CONSTANTS(:,99).*(exp(ALGEBRAIC(:,492)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,505)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,508) =   - CONSTANTS(:,287).*ALGEBRAIC(:,507);
    ALGEBRAIC(:,509) =  - ALGEBRAIC(:,507)+ALGEBRAIC(:,504);
    ALGEBRAIC(:,477) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,493) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,213).*STATES(:,82))+ CONSTANTS(:,285).*CONSTANTS(:,303).*ALGEBRAIC(:,477);
    ALGEBRAIC(:,510) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,208).*STATES(:,77))+ CONSTANTS(:,286).*CONSTANTS(:,303).*ALGEBRAIC(:,477);
    ALGEBRAIC(:,511) =  CONSTANTS(:,100).*(exp(ALGEBRAIC(:,493)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,510)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,512) = ALGEBRAIC(:,511) - ALGEBRAIC(:,495);
    ALGEBRAIC(:,513) =  - ALGEBRAIC(:,511)+ALGEBRAIC(:,507);
    ALGEBRAIC(:,517) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,519) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,214).*STATES(:,14));
    ALGEBRAIC(:,520) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,215).*STATES(:,15));
    ALGEBRAIC(:,521) =  CONSTANTS(:,101).*(exp((ALGEBRAIC(:,517)+ALGEBRAIC(:,519))./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,520)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,518) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,138).*STATES(:,2));
    ALGEBRAIC(:,522) =  CONSTANTS(:,102).*(exp(ALGEBRAIC(:,520)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp((ALGEBRAIC(:,518)+ALGEBRAIC(:,519))./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,525) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,526) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,216).*STATES(:,83));
    ALGEBRAIC(:,529) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,219).*STATES(:,86));
    ALGEBRAIC(:,531) =  CONSTANTS(:,104).*(exp(ALGEBRAIC(:,529)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp((ALGEBRAIC(:,526)+ CONSTANTS(:,305).*ALGEBRAIC(:,525))./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,527) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,217).*STATES(:,84));
    ALGEBRAIC(:,532) =  CONSTANTS(:,105).*(exp((ALGEBRAIC(:,526)+ CONSTANTS(:,304).*ALGEBRAIC(:,525))./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,527)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,528) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,218).*STATES(:,85));
    ALGEBRAIC(:,533) =  CONSTANTS(:,106).*(exp((ALGEBRAIC(:,527)+ CONSTANTS(:,305).*ALGEBRAIC(:,525))./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,528)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,534) =  CONSTANTS(:,107).*(exp(ALGEBRAIC(:,528)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp((ALGEBRAIC(:,529)+ CONSTANTS(:,304).*ALGEBRAIC(:,525))./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,471) = ALGEBRAIC(:,429);
    ALGEBRAIC(:,541) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,206).*STATES(:,12));
    ALGEBRAIC(:,542) = CONSTANTS(:,321)+ALGEBRAIC(:,541);
    ALGEBRAIC(:,551) =  CONSTANTS(:,116).*(exp(CONSTANTS(:,333)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,542)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,552) = ALGEBRAIC(:,551);
    ALGEBRAIC(:,468) =  - ALGEBRAIC(:,432);
    ALGEBRAIC(:,540) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,204).*STATES(:,10));
    ALGEBRAIC(:,543) = CONSTANTS(:,321)+ALGEBRAIC(:,540);
    ALGEBRAIC(:,553) =  CONSTANTS(:,108).*(exp(ALGEBRAIC(:,543)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(CONSTANTS(:,334)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,554) =  - ALGEBRAIC(:,553);
    ALGEBRAIC(:,467) = ALGEBRAIC(:,451);
    ALGEBRAIC(:,539) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,205).*STATES(:,11));
    ALGEBRAIC(:,544) = ALGEBRAIC(:,539)+CONSTANTS(:,330);
    ALGEBRAIC(:,556) =  CONSTANTS(:,112).*(exp(CONSTANTS(:,335)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,544)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,557) = ALGEBRAIC(:,556);
    ALGEBRAIC(:,35) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,139).*STATES(:,3));
    ALGEBRAIC(:,36) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,37) =  CONSTANTS(:,2).*(exp(ALGEBRAIC(:,35)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,36)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,524) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,139).*STATES(:,3));
    ALGEBRAIC(:,530) =  CONSTANTS(:,103).*exp(ALGEBRAIC(:,529)./( CONSTANTS(:,301).*CONSTANTS(:,302))).*(exp(ALGEBRAIC(:,524)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,525)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,537) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,139).*STATES(:,3));
    ALGEBRAIC(:,548) = CONSTANTS(:,331)+ CONSTANTS(:,307).*ALGEBRAIC(:,537);
    ALGEBRAIC(:,564) =  CONSTANTS(:,113).*(exp(CONSTANTS(:,339)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,548)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,568) =  CONSTANTS(:,307).*ALGEBRAIC(:,564);
    ALGEBRAIC(:,464) = ALGEBRAIC(:,429);
    ALGEBRAIC(:,538) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,207).*STATES(:,13));
    ALGEBRAIC(:,545) = CONSTANTS(:,324)+ALGEBRAIC(:,538);
    ALGEBRAIC(:,558) =  CONSTANTS(:,110).*(exp(ALGEBRAIC(:,545)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(CONSTANTS(:,336)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,547) = CONSTANTS(:,328)+ CONSTANTS(:,308).*ALGEBRAIC(:,538);
    ALGEBRAIC(:,561) =  CONSTANTS(:,111).*(exp(CONSTANTS(:,338)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,547)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,549) = CONSTANTS(:,331)+ CONSTANTS(:,308).*ALGEBRAIC(:,538);
    ALGEBRAIC(:,569) =  CONSTANTS(:,114).*(exp(ALGEBRAIC(:,549)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(CONSTANTS(:,340)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,550) = ALGEBRAIC(:,538)+CONSTANTS(:,329);
    ALGEBRAIC(:,572) =  CONSTANTS(:,115).*(exp(CONSTANTS(:,341)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,550)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,575) = (( CONSTANTS(:,308).*ALGEBRAIC(:,561) - ALGEBRAIC(:,558)) -  CONSTANTS(:,308).*ALGEBRAIC(:,569))+ALGEBRAIC(:,572);
    ALGEBRAIC(:,574) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,579) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,229).*STATES(:,87));
    ALGEBRAIC(:,580) = ALGEBRAIC(:,579)+ CONSTANTS(:,289).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,582) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,230).*STATES(:,88));
    ALGEBRAIC(:,583) = ALGEBRAIC(:,582)+ CONSTANTS(:,291).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,586) =  CONSTANTS(:,118).*(exp(ALGEBRAIC(:,580)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,583)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,581) = ALGEBRAIC(:,579)+ CONSTANTS(:,290).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,591) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,232).*STATES(:,90));
    ALGEBRAIC(:,593) = ALGEBRAIC(:,591)+ CONSTANTS(:,292).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,594) =  CONSTANTS(:,122).*(exp(ALGEBRAIC(:,581)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,593)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,595) =  - ALGEBRAIC(:,586) - ALGEBRAIC(:,594);
    ALGEBRAIC(:,592) = ALGEBRAIC(:,591)+ CONSTANTS(:,289).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,596) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,233).*STATES(:,91));
    ALGEBRAIC(:,597) = ALGEBRAIC(:,596)+ CONSTANTS(:,291).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,600) =  CONSTANTS(:,119).*(exp(ALGEBRAIC(:,592)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,597)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,601) = ALGEBRAIC(:,594) - ALGEBRAIC(:,600);
    ALGEBRAIC(:,584) = ALGEBRAIC(:,582)+ CONSTANTS(:,289).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,587) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,231).*STATES(:,89));
    ALGEBRAIC(:,588) = ALGEBRAIC(:,587)+ CONSTANTS(:,291).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,590) =  CONSTANTS(:,120).*(exp(ALGEBRAIC(:,584)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,588)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,585) = ALGEBRAIC(:,582)+ CONSTANTS(:,290).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,599) = ALGEBRAIC(:,596)+ CONSTANTS(:,292).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,602) =  CONSTANTS(:,123).*(exp(ALGEBRAIC(:,585)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,599)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,603) = (ALGEBRAIC(:,586) - ALGEBRAIC(:,590)) - ALGEBRAIC(:,602);
    ALGEBRAIC(:,30) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,31) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,138).*STATES(:,2));
    ALGEBRAIC(:,32) =  CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,16);
    ALGEBRAIC(:,33) = piecewise({ALGEBRAIC(:,32)==0.000000,  CONSTANTS(:,1).*(exp(ALGEBRAIC(:,30)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,31)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,1).*ALGEBRAIC(:,32))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,32)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,30)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,31)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,370) = ALGEBRAIC(:,369)+ALGEBRAIC(:,367);
    ALGEBRAIC(:,515) = ALGEBRAIC(:,504);
    ALGEBRAIC(:,578) =  CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,567) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,604) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,234).*STATES(:,92));
    ALGEBRAIC(:,605) = ALGEBRAIC(:,604)+ALGEBRAIC(:,567)+ALGEBRAIC(:,578);
    ALGEBRAIC(:,571) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,138).*STATES(:,2));
    ALGEBRAIC(:,606) = ALGEBRAIC(:,604)+ALGEBRAIC(:,571);
    ALGEBRAIC(:,607) = piecewise({ALGEBRAIC(:,578)==0.000000,  CONSTANTS(:,117).*(exp(ALGEBRAIC(:,605)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,606)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( CONSTANTS(:,117).*ALGEBRAIC(:,578))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,578)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,605)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,606)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,598) = ALGEBRAIC(:,596)+ CONSTANTS(:,289).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,609) = ALGEBRAIC(:,604)+ CONSTANTS(:,291).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,613) =  CONSTANTS(:,121).*(exp(ALGEBRAIC(:,598)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,609)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,615) = (ALGEBRAIC(:,600) - ALGEBRAIC(:,613))+ALGEBRAIC(:,602);
    ALGEBRAIC(:,589) = ALGEBRAIC(:,587)+ CONSTANTS(:,290).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,611) = ALGEBRAIC(:,604)+ CONSTANTS(:,292).*CONSTANTS(:,303).*ALGEBRAIC(:,574);
    ALGEBRAIC(:,616) =  CONSTANTS(:,124).*(exp(ALGEBRAIC(:,589)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,611)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,618) = ALGEBRAIC(:,590) - ALGEBRAIC(:,616);
    ALGEBRAIC(:,619) = ALGEBRAIC(:,613)+ALGEBRAIC(:,616);
    ALGEBRAIC(:,371) = (( (CONSTANTS(:,278)).*ALGEBRAIC(:,359)+ CONSTANTS(:,278).*ALGEBRAIC(:,363)+ CONSTANTS(:,278).*ALGEBRAIC(:,355)+ CONSTANTS(:,278).*ALGEBRAIC(:,351)+ CONSTANTS(:,278).*ALGEBRAIC(:,347)+ CONSTANTS(:,278).*ALGEBRAIC(:,366)) - ALGEBRAIC(:,367)) - ALGEBRAIC(:,369);
    ALGEBRAIC(:,516) =  - ALGEBRAIC(:,498);
    ALGEBRAIC(:,535) = (( CONSTANTS(:,305).*ALGEBRAIC(:,531) -  CONSTANTS(:,304).*ALGEBRAIC(:,532)) -  CONSTANTS(:,305).*ALGEBRAIC(:,533))+ CONSTANTS(:,304).*ALGEBRAIC(:,534);
    ALGEBRAIC(:,536) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,546) = CONSTANTS(:,324)+ CONSTANTS(:,306).*ALGEBRAIC(:,536);
    ALGEBRAIC(:,560) =  CONSTANTS(:,109).*(exp(ALGEBRAIC(:,546)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(CONSTANTS(:,337)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,563) =   - CONSTANTS(:,306).*ALGEBRAIC(:,560);
    ALGEBRAIC(:,608) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,243).*STATES(:,16));
    ALGEBRAIC(:,612) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,137).*STATES(:,1));
    ALGEBRAIC(:,614) = ALGEBRAIC(:,612)+ALGEBRAIC(:,608);
    ALGEBRAIC(:,610) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,244).*STATES(:,17));
    ALGEBRAIC(:,617) = ALGEBRAIC(:,610);
    ALGEBRAIC(:,621) =  CONSTANTS(:,136).*(exp(ALGEBRAIC(:,614)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,617)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,624) = STATES(:,18)./CONSTANTS(:,299);
    ALGEBRAIC(:,628) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,235).*STATES(:,93));
    ALGEBRAIC(:,629) = ALGEBRAIC(:,628)+ CONSTANTS(:,293).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,631) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,236).*STATES(:,94));
    ALGEBRAIC(:,632) = ALGEBRAIC(:,631)+ CONSTANTS(:,295).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,635) =  CONSTANTS(:,126).*(exp(ALGEBRAIC(:,629)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,632)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,630) = ALGEBRAIC(:,628)+ CONSTANTS(:,294).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,645) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,239).*STATES(:,97));
    ALGEBRAIC(:,647) = ALGEBRAIC(:,645)+ CONSTANTS(:,296).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,648) =  CONSTANTS(:,132).*(exp(ALGEBRAIC(:,630)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,647)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,649) =  - ALGEBRAIC(:,635) - ALGEBRAIC(:,648);
    ALGEBRAIC(:,646) = ALGEBRAIC(:,645)+ CONSTANTS(:,293).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,650) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,240).*STATES(:,98));
    ALGEBRAIC(:,651) = ALGEBRAIC(:,650)+ CONSTANTS(:,295).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,654) =  CONSTANTS(:,127).*(exp(ALGEBRAIC(:,646)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,651)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,655) = ALGEBRAIC(:,648) - ALGEBRAIC(:,654);
    ALGEBRAIC(:,633) = ALGEBRAIC(:,631)+ CONSTANTS(:,293).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,636) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,237).*STATES(:,95));
    ALGEBRAIC(:,637) = ALGEBRAIC(:,636)+ CONSTANTS(:,295).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,640) =  CONSTANTS(:,128).*(exp(ALGEBRAIC(:,633)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,637)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,634) = ALGEBRAIC(:,631)+ CONSTANTS(:,294).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,653) = ALGEBRAIC(:,650)+ CONSTANTS(:,296).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,656) =  CONSTANTS(:,133).*(exp(ALGEBRAIC(:,634)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,653)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,657) = (ALGEBRAIC(:,635) - ALGEBRAIC(:,640)) - ALGEBRAIC(:,656);
    ALGEBRAIC(:,652) = ALGEBRAIC(:,650)+ CONSTANTS(:,293).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,658) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,241).*STATES(:,99));
    ALGEBRAIC(:,659) = ALGEBRAIC(:,658)+ CONSTANTS(:,295).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,662) =  CONSTANTS(:,129).*(exp(ALGEBRAIC(:,652)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,659)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,663) = (ALGEBRAIC(:,654) - ALGEBRAIC(:,662))+ALGEBRAIC(:,656);
    ALGEBRAIC(:,638) = ALGEBRAIC(:,636)+ CONSTANTS(:,293).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,641) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,238).*STATES(:,96));
    ALGEBRAIC(:,642) = ALGEBRAIC(:,641)+ CONSTANTS(:,295).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,644) =  CONSTANTS(:,130).*(exp(ALGEBRAIC(:,638)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,642)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,639) = ALGEBRAIC(:,636)+ CONSTANTS(:,294).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,661) = ALGEBRAIC(:,658)+ CONSTANTS(:,296).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,664) =  CONSTANTS(:,134).*(exp(ALGEBRAIC(:,639)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,661)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,665) = (ALGEBRAIC(:,640) - ALGEBRAIC(:,644)) - ALGEBRAIC(:,664);
    ALGEBRAIC(:,158) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,157);
    ALGEBRAIC(:,153) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,162) = ALGEBRAIC(:,161)+ALGEBRAIC(:,153)+ALGEBRAIC(:,158);
    ALGEBRAIC(:,154) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,163) = ALGEBRAIC(:,161)+ALGEBRAIC(:,154);
    ALGEBRAIC(:,166) = piecewise({ALGEBRAIC(:,158)==0.000000,  1.00000.*CONSTANTS(:,34).*(exp(ALGEBRAIC(:,162)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,163)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( 1.00000.*CONSTANTS(:,34).*ALGEBRAIC(:,158))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,158)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,162)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,163)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,203) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,200) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,218) = ALGEBRAIC(:,217)+ALGEBRAIC(:,200)+ALGEBRAIC(:,203);
    ALGEBRAIC(:,201) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,219) = ALGEBRAIC(:,217)+ALGEBRAIC(:,201);
    ALGEBRAIC(:,220) = piecewise({ALGEBRAIC(:,203)==0.000000,  1.00000.*CONSTANTS(:,40).*(exp(ALGEBRAIC(:,218)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,219)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( 1.00000.*CONSTANTS(:,40).*ALGEBRAIC(:,203))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,203)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,218)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,219)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,236) =  CONSTANTS(:,245).*CONSTANTS(:,303).*ALGEBRAIC(:,235);
    ALGEBRAIC(:,233) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,250) = ALGEBRAIC(:,249)+ALGEBRAIC(:,233)+ALGEBRAIC(:,236);
    ALGEBRAIC(:,234) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,251) = ALGEBRAIC(:,249)+ALGEBRAIC(:,234);
    ALGEBRAIC(:,252) = piecewise({ALGEBRAIC(:,236)==0.000000,  1.00000.*CONSTANTS(:,46).*(exp(ALGEBRAIC(:,250)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,251)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( 1.00000.*CONSTANTS(:,46).*ALGEBRAIC(:,236))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,236)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,250)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,251)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,378) =  - ALGEBRAIC(:,372) - ALGEBRAIC(:,374);
    ALGEBRAIC(:,466) = ALGEBRAIC(:,419)+ALGEBRAIC(:,437);
    ALGEBRAIC(:,625) =  CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,622) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,160).*STATES(:,8));
    ALGEBRAIC(:,626) =  1.00000.*exp(ALGEBRAIC(:,624)./CONSTANTS(:,319));
    ALGEBRAIC(:,627) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,320).*ALGEBRAIC(:,626));
    ALGEBRAIC(:,666) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,242).*STATES(:,100));
    ALGEBRAIC(:,667) = ALGEBRAIC(:,666)+ALGEBRAIC(:,622)+ALGEBRAIC(:,625)+ALGEBRAIC(:,627);
    ALGEBRAIC(:,623) =  ( CONSTANTS(:,301).*CONSTANTS(:,302)).*log( CONSTANTS(:,161).*STATES(:,9));
    ALGEBRAIC(:,669) = ALGEBRAIC(:,666)+ALGEBRAIC(:,623)+ALGEBRAIC(:,627);
    ALGEBRAIC(:,671) = piecewise({ALGEBRAIC(:,625)==0.000000,  1.00000.*CONSTANTS(:,125).*(exp(ALGEBRAIC(:,667)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,669)./( CONSTANTS(:,301).*CONSTANTS(:,302)))) },  ((( 1.00000.*CONSTANTS(:,125).*ALGEBRAIC(:,625))./( CONSTANTS(:,301).*CONSTANTS(:,302)))./(exp(ALGEBRAIC(:,625)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - 1.00000)).*(exp(ALGEBRAIC(:,667)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,669)./( CONSTANTS(:,301).*CONSTANTS(:,302)))));
    ALGEBRAIC(:,377) = ALGEBRAIC(:,374)+ALGEBRAIC(:,372);
    ALGEBRAIC(:,465) =  - ALGEBRAIC(:,423) - ALGEBRAIC(:,426);
    ALGEBRAIC(:,34) =   - CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,33);
    ALGEBRAIC(:,152) =  CONSTANTS(:,303).*(((((((((((((((((((((((((((((  - CONSTANTS(:,246).*ALGEBRAIC(:,150)+ CONSTANTS(:,253).*ALGEBRAIC(:,112)) -  CONSTANTS(:,250).*ALGEBRAIC(:,112)+ CONSTANTS(:,253).*ALGEBRAIC(:,124)) -  CONSTANTS(:,250).*ALGEBRAIC(:,124)+ CONSTANTS(:,253).*ALGEBRAIC(:,118)) -  CONSTANTS(:,250).*ALGEBRAIC(:,118)+ CONSTANTS(:,253).*ALGEBRAIC(:,130)) -  CONSTANTS(:,250).*ALGEBRAIC(:,130)+ CONSTANTS(:,253).*ALGEBRAIC(:,144)) -  CONSTANTS(:,250).*ALGEBRAIC(:,144)+ CONSTANTS(:,251).*ALGEBRAIC(:,80)) -  CONSTANTS(:,248).*ALGEBRAIC(:,80)+ CONSTANTS(:,251).*ALGEBRAIC(:,88)) -  CONSTANTS(:,248).*ALGEBRAIC(:,88)+ CONSTANTS(:,252).*ALGEBRAIC(:,100)) -  CONSTANTS(:,249).*ALGEBRAIC(:,100)+ CONSTANTS(:,252).*ALGEBRAIC(:,104)) -  CONSTANTS(:,249).*ALGEBRAIC(:,104)+ CONSTANTS(:,252).*ALGEBRAIC(:,108)) -  CONSTANTS(:,249).*ALGEBRAIC(:,108)+ CONSTANTS(:,253).*ALGEBRAIC(:,136)) -  CONSTANTS(:,250).*ALGEBRAIC(:,136)+ CONSTANTS(:,251).*ALGEBRAIC(:,84)) -  CONSTANTS(:,248).*ALGEBRAIC(:,84)+ CONSTANTS(:,251).*ALGEBRAIC(:,92)) -  CONSTANTS(:,248).*ALGEBRAIC(:,92)+ CONSTANTS(:,252).*ALGEBRAIC(:,96)) -  CONSTANTS(:,249).*ALGEBRAIC(:,96)+ CONSTANTS(:,253).*ALGEBRAIC(:,115)) -  CONSTANTS(:,250).*ALGEBRAIC(:,115)+ CONSTANTS(:,253).*ALGEBRAIC(:,127)) -  CONSTANTS(:,250).*ALGEBRAIC(:,127)+ CONSTANTS(:,253).*ALGEBRAIC(:,121)) -  CONSTANTS(:,250).*ALGEBRAIC(:,121)+ CONSTANTS(:,253).*ALGEBRAIC(:,133)) -  CONSTANTS(:,250).*ALGEBRAIC(:,133)+ CONSTANTS(:,253).*ALGEBRAIC(:,148)) -  CONSTANTS(:,250).*ALGEBRAIC(:,148)+ CONSTANTS(:,251).*ALGEBRAIC(:,82)) -  CONSTANTS(:,248).*ALGEBRAIC(:,82)+ CONSTANTS(:,251).*ALGEBRAIC(:,90)) -  CONSTANTS(:,248).*ALGEBRAIC(:,90)+ CONSTANTS(:,252).*ALGEBRAIC(:,98)) -  CONSTANTS(:,249).*ALGEBRAIC(:,98)+ CONSTANTS(:,252).*ALGEBRAIC(:,102)) -  CONSTANTS(:,249).*ALGEBRAIC(:,102)+ CONSTANTS(:,252).*ALGEBRAIC(:,106)) -  CONSTANTS(:,249).*ALGEBRAIC(:,106)+ CONSTANTS(:,252).*ALGEBRAIC(:,110)) -  CONSTANTS(:,249).*ALGEBRAIC(:,110)+ CONSTANTS(:,253).*ALGEBRAIC(:,140)) -  CONSTANTS(:,250).*ALGEBRAIC(:,140)+ CONSTANTS(:,251).*ALGEBRAIC(:,86)) -  CONSTANTS(:,248).*ALGEBRAIC(:,86)+ CONSTANTS(:,251).*ALGEBRAIC(:,94)) -  CONSTANTS(:,248).*ALGEBRAIC(:,94));
    ALGEBRAIC(:,171) =  CONSTANTS(:,303).*((  - CONSTANTS(:,245).*ALGEBRAIC(:,166)+ CONSTANTS(:,246).*ALGEBRAIC(:,167)+ CONSTANTS(:,255).*ALGEBRAIC(:,170)) -  CONSTANTS(:,254).*ALGEBRAIC(:,170));
    ALGEBRAIC(:,185) =  CONSTANTS(:,303).*((  - CONSTANTS(:,245).*ALGEBRAIC(:,183)+ CONSTANTS(:,257).*ALGEBRAIC(:,181)) -  CONSTANTS(:,256).*ALGEBRAIC(:,181));
    ALGEBRAIC(:,199) =  CONSTANTS(:,303).*((  - CONSTANTS(:,245).*ALGEBRAIC(:,197)+ CONSTANTS(:,259).*ALGEBRAIC(:,195)) -  CONSTANTS(:,258).*ALGEBRAIC(:,195));
    ALGEBRAIC(:,232) =  CONSTANTS(:,303).*(  - CONSTANTS(:,245).*ALGEBRAIC(:,220)+ ALGEBRAIC(:,209).*(CONSTANTS(:,265) - CONSTANTS(:,260))+ ALGEBRAIC(:,215).*(CONSTANTS(:,266) - CONSTANTS(:,261))+ ALGEBRAIC(:,223).*(CONSTANTS(:,267) - CONSTANTS(:,262))+ ALGEBRAIC(:,227).*(CONSTANTS(:,268) - CONSTANTS(:,263))+ ALGEBRAIC(:,229).*(CONSTANTS(:,269) - CONSTANTS(:,264)));
    ALGEBRAIC(:,260) =  CONSTANTS(:,303).*(  - CONSTANTS(:,245).*ALGEBRAIC(:,252)+ ALGEBRAIC(:,243).*(CONSTANTS(:,271) - CONSTANTS(:,270))+ ALGEBRAIC(:,255).*(CONSTANTS(:,271) - CONSTANTS(:,271))+ ALGEBRAIC(:,247).*(CONSTANTS(:,273) - CONSTANTS(:,272))+ ALGEBRAIC(:,257).*(CONSTANTS(:,273) - CONSTANTS(:,272)));
    ALGEBRAIC(:,376) =  CONSTANTS(:,303).*((((((((((((((((((((( CONSTANTS(:,281).*ALGEBRAIC(:,333) -  CONSTANTS(:,276).*ALGEBRAIC(:,333))+ CONSTANTS(:,282).*ALGEBRAIC(:,341) -  CONSTANTS(:,277).*ALGEBRAIC(:,341))+ CONSTANTS(:,280).*ALGEBRAIC(:,329) -  CONSTANTS(:,275).*ALGEBRAIC(:,329))+ CONSTANTS(:,281).*ALGEBRAIC(:,337) -  CONSTANTS(:,276).*ALGEBRAIC(:,337))+ CONSTANTS(:,282).*ALGEBRAIC(:,345) -  CONSTANTS(:,277).*ALGEBRAIC(:,345))+ CONSTANTS(:,280).*ALGEBRAIC(:,325) -  CONSTANTS(:,275).*ALGEBRAIC(:,325))+ CONSTANTS(:,279).*ALGEBRAIC(:,321) -  CONSTANTS(:,274).*ALGEBRAIC(:,321))+ CONSTANTS(:,279).*ALGEBRAIC(:,317) -  CONSTANTS(:,274).*ALGEBRAIC(:,317))+ CONSTANTS(:,279).*ALGEBRAIC(:,313) -  CONSTANTS(:,274).*ALGEBRAIC(:,313))+ CONSTANTS(:,282).*ALGEBRAIC(:,343) -  CONSTANTS(:,277).*ALGEBRAIC(:,343))+ CONSTANTS(:,281).*ALGEBRAIC(:,335) -  CONSTANTS(:,276).*ALGEBRAIC(:,335))+ CONSTANTS(:,280).*ALGEBRAIC(:,327) -  CONSTANTS(:,275).*ALGEBRAIC(:,327))+ CONSTANTS(:,282).*ALGEBRAIC(:,339) -  CONSTANTS(:,277).*ALGEBRAIC(:,339))+ CONSTANTS(:,281).*ALGEBRAIC(:,331) -  CONSTANTS(:,276).*ALGEBRAIC(:,331))+ CONSTANTS(:,280).*ALGEBRAIC(:,323) -  CONSTANTS(:,275).*ALGEBRAIC(:,323))+ CONSTANTS(:,279).*ALGEBRAIC(:,319) -  CONSTANTS(:,274).*ALGEBRAIC(:,319))+ CONSTANTS(:,279).*ALGEBRAIC(:,315) -  CONSTANTS(:,274).*ALGEBRAIC(:,315))+ CONSTANTS(:,279).*ALGEBRAIC(:,311)) -  CONSTANTS(:,274).*ALGEBRAIC(:,311)) - ( CONSTANTS(:,247).*ALGEBRAIC(:,367)+ CONSTANTS(:,247).*ALGEBRAIC(:,369))) - ( CONSTANTS(:,245).*ALGEBRAIC(:,372)+ CONSTANTS(:,245).*ALGEBRAIC(:,374)));
    ALGEBRAIC(:,459) =  CONSTANTS(:,284).*ALGEBRAIC(:,457)+ CONSTANTS(:,283).*ALGEBRAIC(:,448);
    ALGEBRAIC(:,476) =   - CONSTANTS(:,246).*CONSTANTS(:,303).*ALGEBRAIC(:,475);
    ALGEBRAIC(:,514) =  CONSTANTS(:,303).*(  - CONSTANTS(:,285).*ALGEBRAIC(:,511)+ CONSTANTS(:,286).*ALGEBRAIC(:,511));
    ALGEBRAIC(:,523) =   - CONSTANTS(:,247).*CONSTANTS(:,303).*ALGEBRAIC(:,522);
    ALGEBRAIC(:,620) =  CONSTANTS(:,303).*(  - CONSTANTS(:,247).*ALGEBRAIC(:,607)+ ALGEBRAIC(:,586).*(CONSTANTS(:,291) - CONSTANTS(:,289))+ ALGEBRAIC(:,590).*(CONSTANTS(:,291) - CONSTANTS(:,289))+ ALGEBRAIC(:,600).*(CONSTANTS(:,291) - CONSTANTS(:,289))+ ALGEBRAIC(:,613).*(CONSTANTS(:,291) - CONSTANTS(:,289))+ ALGEBRAIC(:,594).*(CONSTANTS(:,292) - CONSTANTS(:,290))+ ALGEBRAIC(:,602).*(CONSTANTS(:,292) - CONSTANTS(:,290))+ ALGEBRAIC(:,616).*(CONSTANTS(:,292) - CONSTANTS(:,290)));
    ALGEBRAIC(:,673) =  CONSTANTS(:,303).*(  - CONSTANTS(:,245).*ALGEBRAIC(:,671)+ ALGEBRAIC(:,635).*(CONSTANTS(:,295) - CONSTANTS(:,293))+ ALGEBRAIC(:,640).*(CONSTANTS(:,295) - CONSTANTS(:,293))+ ALGEBRAIC(:,654).*(CONSTANTS(:,295) - CONSTANTS(:,293))+ ALGEBRAIC(:,662).*(CONSTANTS(:,295) - CONSTANTS(:,293))+ ALGEBRAIC(:,648).*(CONSTANTS(:,296) - CONSTANTS(:,294))+ ALGEBRAIC(:,656).*(CONSTANTS(:,296) - CONSTANTS(:,294))+ ALGEBRAIC(:,664).*(CONSTANTS(:,296) - CONSTANTS(:,294)));
    ALGEBRAIC(:,660) = ALGEBRAIC(:,658)+ CONSTANTS(:,293).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,668) = ALGEBRAIC(:,666)+ CONSTANTS(:,295).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,672) =  CONSTANTS(:,131).*(exp(ALGEBRAIC(:,660)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,668)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,674) = (ALGEBRAIC(:,662) - ALGEBRAIC(:,672))+ALGEBRAIC(:,664);
    ALGEBRAIC(:,643) = ALGEBRAIC(:,641)+ CONSTANTS(:,294).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,670) = ALGEBRAIC(:,666)+ CONSTANTS(:,296).*CONSTANTS(:,303).*ALGEBRAIC(:,624);
    ALGEBRAIC(:,675) =  CONSTANTS(:,135).*(exp(ALGEBRAIC(:,643)./( CONSTANTS(:,301).*CONSTANTS(:,302))) - exp(ALGEBRAIC(:,670)./( CONSTANTS(:,301).*CONSTANTS(:,302))));
    ALGEBRAIC(:,676) = ALGEBRAIC(:,644) - ALGEBRAIC(:,675);
    ALGEBRAIC(:,677) = ALGEBRAIC(:,672)+ALGEBRAIC(:,675);
    ALGEBRAIC(:,1) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,144).*STATES(:,19));
    ALGEBRAIC(:,2) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,148).*STATES(:,20));
    ALGEBRAIC(:,3) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,145).*STATES(:,21));
    ALGEBRAIC(:,4) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,149).*STATES(:,22));
    ALGEBRAIC(:,5) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,146).*STATES(:,23));
    ALGEBRAIC(:,6) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,150).*STATES(:,24));
    ALGEBRAIC(:,7) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,147).*STATES(:,25));
    ALGEBRAIC(:,8) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,151).*STATES(:,26));
    ALGEBRAIC(:,9) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,152).*STATES(:,27));
    ALGEBRAIC(:,10) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,156).*STATES(:,28));
    ALGEBRAIC(:,11) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,153).*STATES(:,29));
    ALGEBRAIC(:,12) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,157).*STATES(:,30));
    ALGEBRAIC(:,13) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,154).*STATES(:,31));
    ALGEBRAIC(:,14) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,158).*STATES(:,32));
    ALGEBRAIC(:,15) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,155).*STATES(:,33));
    ALGEBRAIC(:,17) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,164).*STATES(:,37));
    ALGEBRAIC(:,18) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,166).*STATES(:,39));
    ALGEBRAIC(:,19) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,183).*STATES(:,56));
    ALGEBRAIC(:,20) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,184).*STATES(:,57));
    ALGEBRAIC(:,21) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,185).*STATES(:,58));
    ALGEBRAIC(:,22) =  CONSTANTS(:,301).*CONSTANTS(:,302).*log( CONSTANTS(:,186).*STATES(:,59));
    ALGEBRAIC(:,23) =  CONSTANTS(:,305).*STATES(:,86)+ CONSTANTS(:,304).*STATES(:,84)+ (CONSTANTS(:,304)+CONSTANTS(:,305)).*STATES(:,85);
    ALGEBRAIC(:,24) = STATES(:,1)./CONSTANTS(:,318);
    ALGEBRAIC(:,25) = STATES(:,3)./CONSTANTS(:,323);
    ALGEBRAIC(:,26) = STATES(:,13)./CONSTANTS(:,325);
    ALGEBRAIC(:,27) = STATES(:,11)./CONSTANTS(:,318);
    ALGEBRAIC(:,28) = STATES(:,10)./CONSTANTS(:,318);
    ALGEBRAIC(:,29) = STATES(:,12)./CONSTANTS(:,318);
    ALGEBRAIC(:,555) = ALGEBRAIC(:,551) - ALGEBRAIC(:,553);
    ALGEBRAIC(:,559) = ALGEBRAIC(:,558);
    ALGEBRAIC(:,562) = ALGEBRAIC(:,553) - ALGEBRAIC(:,560);
    ALGEBRAIC(:,565) = ALGEBRAIC(:,560) - ALGEBRAIC(:,561);
    ALGEBRAIC(:,566) = ALGEBRAIC(:,561) - ALGEBRAIC(:,556);
    ALGEBRAIC(:,570) = ALGEBRAIC(:,556) - ALGEBRAIC(:,564);
    ALGEBRAIC(:,573) = ALGEBRAIC(:,564) - ALGEBRAIC(:,569);
    ALGEBRAIC(:,576) = ALGEBRAIC(:,569) - ALGEBRAIC(:,572);
    ALGEBRAIC(:,577) = ALGEBRAIC(:,572) - ALGEBRAIC(:,551);
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

