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 =683;
end
% There are a total of 94 entries in each of the rate and state variable arrays.
% There are a total of 327 entries in the constant variable array.
%

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

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

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

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

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

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

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

end            


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


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

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

function [STATES, CONSTANTS] = initConsts()
    VOI = 0; CONSTANTS = []; STATES = []; ALGEBRAIC = [];
    CONSTANTS(:,1) = 1378.18;
    CONSTANTS(:,2) = 0.0183281;
    CONSTANTS(:,3) = 14.666;
    CONSTANTS(:,4) = 1013.54;
    CONSTANTS(:,5) = 334039;
    CONSTANTS(:,6) = 2.51352;
    CONSTANTS(:,7) = 0.0672974;
    CONSTANTS(:,8) = 8.45146;
    CONSTANTS(:,9) = 68.9799;
    CONSTANTS(:,10) = 17067.3;
    CONSTANTS(:,11) = 0.523159;
    CONSTANTS(:,12) = 1.86539;
    CONSTANTS(:,13) = 15.7563;
    CONSTANTS(:,14) = 20.7455;
    CONSTANTS(:,15) = 0.0260278;
    CONSTANTS(:,16) = 0.0342693;
    CONSTANTS(:,17) = 204.525;
    CONSTANTS(:,18) = 10.3285;
    CONSTANTS(:,19) = 13.5989;
    CONSTANTS(:,20) = 0.148452;
    CONSTANTS(:,21) = 0.0074968;
    CONSTANTS(:,22) = 0.0098706;
    CONSTANTS(:,23) = 19.7008;
    CONSTANTS(:,24) = 97.8293;
    CONSTANTS(:,25) = 0.0142996;
    CONSTANTS(:,26) = 0.071008;
    CONSTANTS(:,27) = 1.28048;
    CONSTANTS(:,28) = 6.35855;
    CONSTANTS(:,29) = 0.00092942;
    CONSTANTS(:,30) = 0.00461527;
    CONSTANTS(:,31) = 2793.76;
    CONSTANTS(:,32) = 13873.1;
    CONSTANTS(:,33) = 2.02781;
    CONSTANTS(:,34) = 10.0696;
    CONSTANTS(:,35) = 50829.8;
    CONSTANTS(:,36) = 252408;
    CONSTANTS(:,37) = 2566.9;
    CONSTANTS(:,38) = 12746.6;
    CONSTANTS(:,39) = 3379.68;
    CONSTANTS(:,40) = 16782.7;
    CONSTANTS(:,41) = 271903;
    CONSTANTS(:,42) = 2.57553e+07;
    CONSTANTS(:,43) = 11359.8;
    CONSTANTS(:,44) = 3.65342e+07;
    CONSTANTS(:,45) = 191683;
    CONSTANTS(:,46) = 4.30573;
    CONSTANTS(:,47) = 0.00105236;
    CONSTANTS(:,48) = 136.681;
    CONSTANTS(:,49) = 226141;
    CONSTANTS(:,50) = 640981;
    CONSTANTS(:,51) = 3.26998e+06;
    CONSTANTS(:,52) = 7193.8;
    CONSTANTS(:,53) = 10.2382;
    CONSTANTS(:,54) = 1.90007;
    CONSTANTS(:,55) = 1.82292;
    CONSTANTS(:,56) = 2259.11;
    CONSTANTS(:,57) = 699917;
    CONSTANTS(:,58) = 207331;
    CONSTANTS(:,59) = 1.94572e+06;
    CONSTANTS(:,60) = 174.89;
    CONSTANTS(:,61) = 29.3512;
    CONSTANTS(:,62) = 0.00640463;
    CONSTANTS(:,63) = 82302;
    CONSTANTS(:,64) = 1266.14;
    CONSTANTS(:,65) = 4.33488;
    CONSTANTS(:,66) = 1.34962;
    CONSTANTS(:,67) = 7.44777;
    CONSTANTS(:,68) = 819.29;
    CONSTANTS(:,69) = 23.803;
    CONSTANTS(:,70) = 5.15505e+06;
    CONSTANTS(:,71) = 1.5948;
    CONSTANTS(:,72) = 2.16147;
    CONSTANTS(:,73) = 6.68688e-07;
    CONSTANTS(:,74) = 1.61308e+09;
    CONSTANTS(:,75) = 499.033;
    CONSTANTS(:,76) = 676.351;
    CONSTANTS(:,77) = 0.000209241;
    CONSTANTS(:,78) = 1.26188e+11;
    CONSTANTS(:,79) = 39038.3;
    CONSTANTS(:,80) = 52909.6;
    CONSTANTS(:,81) = 0.0163685;
    CONSTANTS(:,82) = 0.0460452;
    CONSTANTS(:,83) = 1.42449e-08;
    CONSTANTS(:,84) = 21.6122;
    CONSTANTS(:,85) = 6.68609e-06;
    CONSTANTS(:,86) = 3381.36;
    CONSTANTS(:,87) = 0.00104608;
    CONSTANTS(:,88) = 176345;
    CONSTANTS(:,89) = 0.0545552;
    CONSTANTS(:,90) = 0.0179554;
    CONSTANTS(:,91) = 7.52858e-09;
    CONSTANTS(:,92) = 8.42771;
    CONSTANTS(:,93) = 3.53368e-06;
    CONSTANTS(:,94) = 1318.57;
    CONSTANTS(:,95) = 0.000552865;
    CONSTANTS(:,96) = 68766;
    CONSTANTS(:,97) = 0.0288331;
    CONSTANTS(:,98) = 0.0938275;
    CONSTANTS(:,99) = 0.000878706;
    CONSTANTS(:,100) = 0.188833;
    CONSTANTS(:,101) = 25090.5;
    CONSTANTS(:,102) = 3.48165e-05;
    CONSTANTS(:,103) = 0;
    CONSTANTS(:,104) = 0;
    CONSTANTS(:,105) = 0;
    CONSTANTS(:,106) = 0;
    CONSTANTS(:,107) = 0;
    CONSTANTS(:,108) = 0;
    CONSTANTS(:,109) = 0;
    CONSTANTS(:,110) = 0;
    CONSTANTS(:,111) = 0;
    CONSTANTS(:,112) = 0;
    CONSTANTS(:,113) = 0;
    CONSTANTS(:,114) = 0;
    CONSTANTS(:,115) = 0;
    CONSTANTS(:,116) = 0;
    CONSTANTS(:,117) = 0;
    CONSTANTS(:,118) = 0;
    CONSTANTS(:,119) = 0;
    CONSTANTS(:,120) = 0;
    CONSTANTS(:,121) = 0;
    CONSTANTS(:,122) = 0;
    CONSTANTS(:,123) = 0;
    CONSTANTS(:,124) = 0;
    CONSTANTS(:,125) = 0;
    CONSTANTS(:,126) = 0;
    CONSTANTS(:,127) = 0;
    CONSTANTS(:,128) = 0;
    CONSTANTS(:,129) = 0;
    CONSTANTS(:,130) = 0;
    CONSTANTS(:,131) = 0;
    CONSTANTS(:,132) = 0;
    CONSTANTS(:,133) = 0;
    CONSTANTS(:,134) = 0;
    CONSTANTS(:,135) = 0;
    CONSTANTS(:,136) = 0.245066;
    CONSTANTS(:,137) = 215.111;
    CONSTANTS(:,138) = 0.465475;
    CONSTANTS(:,139) = 0.372683;
    CONSTANTS(:,140) = 0.0531066;
    CONSTANTS(:,141) = 0.389448;
    CONSTANTS(:,142) = 1.11228;
    CONSTANTS(:,143) = 13363.9;
    CONSTANTS(:,144) = 1.47312;
    CONSTANTS(:,145) = 0.180487;
    CONSTANTS(:,146) = 55.02;
    CONSTANTS(:,147) = 6.74109;
    CONSTANTS(:,148) = 4.456;
    CONSTANTS(:,149) = 0.624857;
    CONSTANTS(:,150) = 0.350491;
    CONSTANTS(:,151) = 2.37996;
    CONSTANTS(:,152) = 47.128;
    CONSTANTS(:,153) = 35.7941;
    CONSTANTS(:,154) = 0.479275;
    CONSTANTS(:,155) = 9.49062;
    CONSTANTS(:,156) = 7.2082;
    CONSTANTS(:,157) = 3278.92;
    CONSTANTS(:,158) = 64929.3;
    CONSTANTS(:,159) = 49314.3;
    CONSTANTS(:,160) = 660.307;
    CONSTANTS(:,161) = 13075.4;
    CONSTANTS(:,162) = 9930.89;
    CONSTANTS(:,163) = 2.91306e+08;
    CONSTANTS(:,164) = 295.736;
    CONSTANTS(:,165) = 45889.7;
    CONSTANTS(:,166) = 70380.8;
    CONSTANTS(:,167) = 9.6036e+07;
    CONSTANTS(:,168) = 89.7689;
    CONSTANTS(:,169) = 0.0187362;
    CONSTANTS(:,170) = 0.115363;
    CONSTANTS(:,171) = 2.45754e+08;
    CONSTANTS(:,172) = 37133.9;
    CONSTANTS(:,173) = 22.4439;
    CONSTANTS(:,174) = 4.39946;
    CONSTANTS(:,175) = 3.44953;
    CONSTANTS(:,176) = 139.009;
    CONSTANTS(:,177) = 6086.52;
    CONSTANTS(:,178) = 19133.7;
    CONSTANTS(:,179) = 9.39922e+06;
    CONSTANTS(:,180) = 7584.42;
    CONSTANTS(:,181) = 24.4801;
    CONSTANTS(:,182) = 2.60855;
    CONSTANTS(:,183) = 1.11184;
    CONSTANTS(:,184) = 284.544;
    CONSTANTS(:,185) = 4.78246e+06;
    CONSTANTS(:,186) = 32.2739;
    CONSTANTS(:,187) = 0.000977143;
    CONSTANTS(:,188) = 0.640547;
    CONSTANTS(:,189) = 0.640547;
    CONSTANTS(:,190) = 2.10659;
    CONSTANTS(:,191) = 0.381738;
    CONSTANTS(:,192) = 615.294;
    CONSTANTS(:,193) = 111.498;
    CONSTANTS(:,194) = 361.853;
    CONSTANTS(:,195) = 0.164497;
    CONSTANTS(:,196) = 0.00728399;
    CONSTANTS(:,197) = 1.55187e-05;
    CONSTANTS(:,198) = 9.9189e-08;
    CONSTANTS(:,199) = 1.90192e-09;
    CONSTANTS(:,200) = 17372.1;
    CONSTANTS(:,201) = 37.0117;
    CONSTANTS(:,202) = 0.236563;
    CONSTANTS(:,203) = 0.00453602;
    CONSTANTS(:,204) = 23544.9;
    CONSTANTS(:,205) = 50.1629;
    CONSTANTS(:,206) = 0.320619;
    CONSTANTS(:,207) = 0.00614778;
    CONSTANTS(:,208) = 5.61538e+10;
    CONSTANTS(:,209) = 1.19637e+08;
    CONSTANTS(:,210) = 764668;
    CONSTANTS(:,211) = 14662.3;
    CONSTANTS(:,212) = 0.00306604;
    CONSTANTS(:,213) = 61.5887;
    CONSTANTS(:,214) = 0.465601;
    CONSTANTS(:,215) = 0.136312;
    CONSTANTS(:,216) = 1e-6;
    CONSTANTS(:,217) = 1e-6;
    CONSTANTS(:,218) = 1e-6;
    CONSTANTS(:,219) = 1e-6;
    CONSTANTS(:,220) = 1e-6;
    CONSTANTS(:,221) = 1e-6;
    CONSTANTS(:,222) = 1e-6;
    CONSTANTS(:,223) = 1e-6;
    CONSTANTS(:,224) = 1e-6;
    CONSTANTS(:,225) = 1e-6;
    CONSTANTS(:,226) = 1e-6;
    CONSTANTS(:,227) = 1e-6;
    CONSTANTS(:,228) = 1e-6;
    CONSTANTS(:,229) = 1e-6;
    CONSTANTS(:,230) = 1e-6;
    CONSTANTS(:,231) = 1e-6;
    CONSTANTS(:,232) = 1e-6;
    CONSTANTS(:,233) = 1e-6;
    CONSTANTS(:,234) = 1e-6;
    CONSTANTS(:,235) = 1e-6;
    CONSTANTS(:,236) = 1e-6;
    CONSTANTS(:,237) = 1e-6;
    CONSTANTS(:,238) = 2;
    CONSTANTS(:,239) = 1;
    CONSTANTS(:,240) = 0.033569;
    CONSTANTS(:,241) = 3.1153;
    CONSTANTS(:,242) = 0;
    CONSTANTS(:,243) = -4.4669;
    CONSTANTS(:,244) = 1.6149028778859738;
    CONSTANTS(:,245) = -1.3218634652232777;
    CONSTANTS(:,246) = -1.0273976425216251;
    CONSTANTS(:,247) = -0.18153135376657775;
    CONSTANTS(:,248) = 0.000400323747581994;
    CONSTANTS(:,249) = -1.41544821457997;
    CONSTANTS(:,250) = -0.55679;
    CONSTANTS(:,251) = 0.44321;
    CONSTANTS(:,252) = 3;
    CONSTANTS(:,253) = 3;
    CONSTANTS(:,254) = 1;
    CONSTANTS(:,255) = -5301.979;
    CONSTANTS(:,256) = -91183.021;
    CONSTANTS(:,257) = 0.876568910405296;
    CONSTANTS(:,258) = -0.576510778245838;
    CONSTANTS(:,259) = -0.872117216889333;
    CONSTANTS(:,260) = 1.73582739545622;
    CONSTANTS(:,261) = 2.28623234372134;
    CONSTANTS(:,262) = -1.51477720975217;
    CONSTANTS(:,263) = -0.131848324558065;
    CONSTANTS(:,264) = 1.75042355789096;
    CONSTANTS(:,265) = -4.1892;
    CONSTANTS(:,266) = -4.0381;
    CONSTANTS(:,267) = 0.49541;
    CONSTANTS(:,268) = 1.2995;
    CONSTANTS(:,269) = 1.4281;
    CONSTANTS(:,270) = -2.4284;
    CONSTANTS(:,271) = -2.29569;
    CONSTANTS(:,272) = 0.707659;
    CONSTANTS(:,273) = 2.1404;
    CONSTANTS(:,274) = -1.1495;
    CONSTANTS(:,275) = 0.72162;
    CONSTANTS(:,276) = 4.2933;
    CONSTANTS(:,277) = 2;
    CONSTANTS(:,278) = -2.1404;
    CONSTANTS(:,279) = 1.8993;
    CONSTANTS(:,280) = -0.52288;
    CONSTANTS(:,281) = 0;
    CONSTANTS(:,282) = 0.5;
    CONSTANTS(:,283) = 0.51923;
    CONSTANTS(:,284) = 0;
    CONSTANTS(:,285) = -0.73169;
    CONSTANTS(:,286) = 0.83216;
    CONSTANTS(:,287) = 3.71;
    CONSTANTS(:,288) = 60e3;
    STATES(:,1) = 0.000813639;
    STATES(:,2) = 0.911127273;
    STATES(:,3) = 0.074590321;
    STATES(:,4) = 88.298;
    STATES(:,5) = 0.008904;
    STATES(:,6) = 26.61236736;
    STATES(:,7) = 70.86545455;
    STATES(:,8) = 388.8276362;
    STATES(:,9) = 2.733381818;
    STATES(:,10) = 25.7845;
    STATES(:,11) = 0.12985;
    STATES(:,12) = 1.473241;
    STATES(:,13) = 0.000298108;
    STATES(:,14) = 1.82664e-7;
    STATES(:,15) = 1.82664e-7;
    STATES(:,16) = 104.7196316;
    STATES(:,17) = 0.050264642;
    STATES(:,18) = -4535.796;
    STATES(:,19) = 2.13107e-07;
    STATES(:,20) = 2.13107e-07;
    STATES(:,21) = 2.13107e-07;
    STATES(:,22) = 2.13107e-07;
    STATES(:,23) = 2.13107e-07;
    STATES(:,24) = 2.13107e-07;
    STATES(:,25) = 1.01378e-06;
    STATES(:,26) = 1.01378e-06;
    STATES(:,27) = 8.67652e-08;
    STATES(:,28) = 8.67652e-08;
    STATES(:,29) = 3.19661e-07;
    STATES(:,30) = 3.19661e-07;
    STATES(:,31) = 3.19661e-07;
    STATES(:,32) = 3.19661e-07;
    STATES(:,33) = 4.26215e-07;
    STATES(:,34) = 4.26215e-07;
    STATES(:,35) = 4.26215e-07;
    STATES(:,36) = 1.97886e-06;
    STATES(:,37) = 1.97886e-06;
    STATES(:,38) = 1.97886e-06;
    STATES(:,39) = 1.97886e-06;
    STATES(:,40) = 1.97886e-06;
    STATES(:,41) = 1.97886e-06;
    STATES(:,42) = 1.97886e-06;
    STATES(:,43) = 1.97886e-06;
    STATES(:,44) = 1.97886e-06;
    STATES(:,45) = 1.97886e-06;
    STATES(:,46) = 1.97886e-06;
    STATES(:,47) = 1.97886e-06;
    STATES(:,48) = 1.36998e-05;
    STATES(:,49) = 1.36998e-05;
    STATES(:,50) = 1.36998e-05;
    STATES(:,51) = 1.36998e-05;
    STATES(:,52) = 9.13318e-08;
    STATES(:,53) = 9.13318e-08;
    STATES(:,54) = 9.13318e-08;
    STATES(:,55) = 9.13318e-08;
    STATES(:,56) = 3.65327e-06;
    STATES(:,57) = 3.65327e-06;
    STATES(:,58) = 3.65327e-06;
    STATES(:,59) = 3.65327e-06;
    STATES(:,60) = 3.65327e-06;
    STATES(:,61) = 3.65327e-06;
    STATES(:,62) = 3.65327e-06;
    STATES(:,63) = 3.65327e-06;
    STATES(:,64) = 3.65327e-06;
    STATES(:,65) = 3.65327e-06;
    STATES(:,66) = 3.65327e-06;
    STATES(:,67) = 3.65327e-06;
    STATES(:,68) = 3.65327e-06;
    STATES(:,69) = 3.65327e-06;
    STATES(:,70) = 3.65327e-06;
    STATES(:,71) = 3.65327e-06;
    STATES(:,72) = 1.82664e-07;
    STATES(:,73) = 1.82664e-07;
    STATES(:,74) = 7.6683E-04;
    STATES(:,75) = 7.6683E-04;
    STATES(:,76) = 7.6683E-04;
    STATES(:,77) = 7.6683E-04;
    STATES(:,78) = 7.6683E-04;
    STATES(:,79) = 7.6683E-04;
    STATES(:,80) = 7.6683E-04;
    STATES(:,81) = 7.6683E-04;
    STATES(:,82) = 7.6683E-04;
    STATES(:,83) = 7.6683E-04;
    STATES(:,84) = 7.6683E-04;
    STATES(:,85) = 7.6683E-04;
    STATES(:,86) = 7.6683E-04;
    STATES(:,87) = 7.6683E-04;
    STATES(:,88) = 7.6683E-04;
    STATES(:,89) = 7.04646E-05;
    STATES(:,90) = 7.04646E-05;
    STATES(:,91) = 7.04646E-05;
    STATES(:,92) = 7.04646E-05;
    STATES(:,93) = 7.04646E-05;
    STATES(:,94) = 7.04646E-05;
    CONSTANTS(:,289) = 4.05919e-15;
    CONSTANTS(:,290) = 4.05919e-15;
    CONSTANTS(:,291) = 4.05919e-15;
    CONSTANTS(:,292) = 4.05919e-15;
    CONSTANTS(:,293) = 4.05919e-15;
    CONSTANTS(:,294) = 4.05919e-15;
    CONSTANTS(:,295) = 4.05919e-15;
    CONSTANTS(:,296) = 4.05919e-15;
    CONSTANTS(:,297) = 4.05919e-15;
    CONSTANTS(:,298) = 1;
    CONSTANTS(:,299) = 0.0001;
    CONSTANTS(:,300) = 8.31;
    CONSTANTS(:,301) = 310;
    CONSTANTS(:,302) = 96485;
    CONSTANTS(:,303) = 2;
    CONSTANTS(:,304) = 2;
    CONSTANTS(:,305) = 2;
    CONSTANTS(:,306) = 34.0;
    CONSTANTS(:,307) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,225).*CONSTANTS(:,289));
    CONSTANTS(:,308) =  CONSTANTS(:,303).*CONSTANTS(:,292)+ CONSTANTS(:,303).*CONSTANTS(:,293)+ CONSTANTS(:,304).*CONSTANTS(:,294);
    CONSTANTS(:,309) =  CONSTANTS(:,306).*0.0350000;
    CONSTANTS(:,310) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,226).*CONSTANTS(:,290));
    CONSTANTS(:,311) = CONSTANTS(:,306)+CONSTANTS(:,309);
    CONSTANTS(:,312) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,227).*CONSTANTS(:,291));
    CONSTANTS(:,313) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,228).*CONSTANTS(:,292));
    CONSTANTS(:,314) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,229).*CONSTANTS(:,293));
    CONSTANTS(:,315) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,233).*CONSTANTS(:,297));
    CONSTANTS(:,316) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,230).*CONSTANTS(:,294));
    CONSTANTS(:,317) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,231).*CONSTANTS(:,295));
    CONSTANTS(:,318) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,232).*CONSTANTS(:,296));
    CONSTANTS(:,319) = CONSTANTS(:,315);
    CONSTANTS(:,320) = CONSTANTS(:,310);
    CONSTANTS(:,321) = CONSTANTS(:,314);
    CONSTANTS(:,322) = CONSTANTS(:,312);
    CONSTANTS(:,323) = CONSTANTS(:,313);
    CONSTANTS(:,324) = CONSTANTS(:,313);
    CONSTANTS(:,325) = CONSTANTS(:,316);
    CONSTANTS(:,326) = CONSTANTS(:,318);
    CONSTANTS(:,327) = CONSTANTS(:,318);
    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(:,44) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,137).*STATES(:,4));
    ALGEBRAIC(:,47) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,48) = ALGEBRAIC(:,47)+ALGEBRAIC(:,44);
    ALGEBRAIC(:,45) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,138).*STATES(:,5));
    ALGEBRAIC(:,46) = ALGEBRAIC(:,45);
    ALGEBRAIC(:,49) =  CONSTANTS(:,1).*(exp(ALGEBRAIC(:,48)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,46)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    RATES(:,4) =  - ALGEBRAIC(:,49);
    RATES(:,5) = ALGEBRAIC(:,49);
    ALGEBRAIC(:,50) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,55) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,196).*STATES(:,56))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,85) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,200).*STATES(:,60))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,86) =  CONSTANTS(:,82).*(exp(ALGEBRAIC(:,55)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,85)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,63) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,196).*STATES(:,56))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,101) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,204).*STATES(:,64))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,102) =  CONSTANTS(:,90).*(exp(ALGEBRAIC(:,63)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,101)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,71) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,196).*STATES(:,56))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,117) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,197).*STATES(:,57))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,118) =  CONSTANTS(:,70).*(exp(ALGEBRAIC(:,71)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,117)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,119) = ( - ALGEBRAIC(:,118) - ALGEBRAIC(:,86)) - ALGEBRAIC(:,102);
    RATES(:,56) = ALGEBRAIC(:,119);
    ALGEBRAIC(:,56) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,204).*STATES(:,64))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,87) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,208).*STATES(:,68))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,88) =  CONSTANTS(:,83).*(exp(ALGEBRAIC(:,56)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,87)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,72) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,204).*STATES(:,64))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,120) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,205).*STATES(:,65))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,121) =  CONSTANTS(:,71).*(exp(ALGEBRAIC(:,72)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,120)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,122) = ( - ALGEBRAIC(:,121) - ALGEBRAIC(:,88)) -  - ALGEBRAIC(:,102);
    RATES(:,64) = ALGEBRAIC(:,122);
    ALGEBRAIC(:,64) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,200).*STATES(:,60))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,103) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,208).*STATES(:,68))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,104) =  CONSTANTS(:,91).*(exp(ALGEBRAIC(:,64)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,103)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,73) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,200).*STATES(:,60))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,123) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,201).*STATES(:,61))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,124) =  CONSTANTS(:,72).*(exp(ALGEBRAIC(:,73)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,123)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,125) = ( - ALGEBRAIC(:,124)+ALGEBRAIC(:,86)) - ALGEBRAIC(:,104);
    RATES(:,60) = ALGEBRAIC(:,125);
    ALGEBRAIC(:,74) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,208).*STATES(:,68))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,126) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,209).*STATES(:,69))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,127) =  CONSTANTS(:,73).*(exp(ALGEBRAIC(:,74)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,126)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,128) = ( - ALGEBRAIC(:,127)+ALGEBRAIC(:,88)) -  - ALGEBRAIC(:,104);
    RATES(:,68) = ALGEBRAIC(:,128);
    ALGEBRAIC(:,57) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,197).*STATES(:,57))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,89) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,201).*STATES(:,61))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,90) =  CONSTANTS(:,84).*(exp(ALGEBRAIC(:,57)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,89)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,65) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,197).*STATES(:,57))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,105) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,205).*STATES(:,65))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,106) =  CONSTANTS(:,92).*(exp(ALGEBRAIC(:,65)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,105)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,75) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,197).*STATES(:,57))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,129) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,198).*STATES(:,58))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,130) =  CONSTANTS(:,74).*(exp(ALGEBRAIC(:,75)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,129)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,131) = ((ALGEBRAIC(:,118) - ALGEBRAIC(:,130)) - ALGEBRAIC(:,90)) - ALGEBRAIC(:,106);
    RATES(:,57) = ALGEBRAIC(:,131);
    ALGEBRAIC(:,58) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,205).*STATES(:,65))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,91) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,209).*STATES(:,69))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,92) =  CONSTANTS(:,85).*(exp(ALGEBRAIC(:,58)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,91)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,76) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,205).*STATES(:,65))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,132) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,206).*STATES(:,66))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,133) =  CONSTANTS(:,75).*(exp(ALGEBRAIC(:,76)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,132)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,134) = ((ALGEBRAIC(:,121) - ALGEBRAIC(:,133)) - ALGEBRAIC(:,92)) -  - ALGEBRAIC(:,106);
    RATES(:,65) = ALGEBRAIC(:,134);
    ALGEBRAIC(:,66) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,201).*STATES(:,61))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,107) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,209).*STATES(:,69))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,108) =  CONSTANTS(:,93).*(exp(ALGEBRAIC(:,66)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,107)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,77) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,201).*STATES(:,61))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,135) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,202).*STATES(:,62))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,136) =  CONSTANTS(:,76).*(exp(ALGEBRAIC(:,77)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,135)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,137) = ((ALGEBRAIC(:,124) - ALGEBRAIC(:,136))+ALGEBRAIC(:,90)) - ALGEBRAIC(:,108);
    RATES(:,61) = ALGEBRAIC(:,137);
    ALGEBRAIC(:,78) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,209).*STATES(:,69))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,138) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,210).*STATES(:,70))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,139) =  CONSTANTS(:,77).*(exp(ALGEBRAIC(:,78)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,138)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,140) = ((ALGEBRAIC(:,127) - ALGEBRAIC(:,139))+ALGEBRAIC(:,92)) -  - ALGEBRAIC(:,108);
    RATES(:,69) = ALGEBRAIC(:,140);
    ALGEBRAIC(:,59) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,198).*STATES(:,58))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,93) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,202).*STATES(:,62))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,94) =  CONSTANTS(:,86).*(exp(ALGEBRAIC(:,59)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,93)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,67) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,198).*STATES(:,58))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,109) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,206).*STATES(:,66))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,110) =  CONSTANTS(:,94).*(exp(ALGEBRAIC(:,67)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,109)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,79) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,198).*STATES(:,58))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,141) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,199).*STATES(:,59))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,142) =  CONSTANTS(:,78).*(exp(ALGEBRAIC(:,79)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,141)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,143) = ((ALGEBRAIC(:,130) - ALGEBRAIC(:,142)) - ALGEBRAIC(:,94)) - ALGEBRAIC(:,110);
    RATES(:,58) = ALGEBRAIC(:,143);
    ALGEBRAIC(:,61) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,199).*STATES(:,59))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,97) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,203).*STATES(:,63))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,98) =  CONSTANTS(:,88).*(exp(ALGEBRAIC(:,61)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,97)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,69) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,199).*STATES(:,59))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,113) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,207).*STATES(:,67))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,114) =  CONSTANTS(:,96).*(exp(ALGEBRAIC(:,69)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,113)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,144) = (ALGEBRAIC(:,142) - ALGEBRAIC(:,98)) - ALGEBRAIC(:,114);
    RATES(:,59) = ALGEBRAIC(:,144);
    ALGEBRAIC(:,60) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,206).*STATES(:,66))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,95) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,210).*STATES(:,70))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,96) =  CONSTANTS(:,87).*(exp(ALGEBRAIC(:,60)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,95)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,80) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,206).*STATES(:,66))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,145) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,207).*STATES(:,67))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,146) =  CONSTANTS(:,79).*(exp(ALGEBRAIC(:,80)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,145)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,147) = ((ALGEBRAIC(:,133) - ALGEBRAIC(:,146)) - ALGEBRAIC(:,96)) -  - ALGEBRAIC(:,110);
    RATES(:,66) = ALGEBRAIC(:,147);
    ALGEBRAIC(:,62) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,207).*STATES(:,67))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,99) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,211).*STATES(:,71))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,100) =  CONSTANTS(:,89).*(exp(ALGEBRAIC(:,62)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,99)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,148) = (ALGEBRAIC(:,146) - ALGEBRAIC(:,100)) -  - ALGEBRAIC(:,114);
    RATES(:,67) = ALGEBRAIC(:,148);
    ALGEBRAIC(:,68) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,202).*STATES(:,62))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,111) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,210).*STATES(:,70))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,112) =  CONSTANTS(:,95).*(exp(ALGEBRAIC(:,68)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,111)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,81) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,202).*STATES(:,62))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,149) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,203).*STATES(:,63))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,150) =  CONSTANTS(:,80).*(exp(ALGEBRAIC(:,81)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,149)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,151) = ((ALGEBRAIC(:,136) - ALGEBRAIC(:,150))+ALGEBRAIC(:,94)) - ALGEBRAIC(:,112);
    RATES(:,62) = ALGEBRAIC(:,151);
    ALGEBRAIC(:,70) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,203).*STATES(:,63))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,115) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,211).*STATES(:,71))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,116) =  CONSTANTS(:,97).*(exp(ALGEBRAIC(:,70)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,115)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,152) = (ALGEBRAIC(:,150)+ALGEBRAIC(:,98)) - ALGEBRAIC(:,116);
    RATES(:,63) = ALGEBRAIC(:,152);
    ALGEBRAIC(:,82) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,210).*STATES(:,70))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,153) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,211).*STATES(:,71))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,154) =  CONSTANTS(:,81).*(exp(ALGEBRAIC(:,82)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,153)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,155) = ((ALGEBRAIC(:,139) - ALGEBRAIC(:,154))+ALGEBRAIC(:,96)) -  - ALGEBRAIC(:,112);
    RATES(:,70) = ALGEBRAIC(:,155);
    ALGEBRAIC(:,83) =  CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,52) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,169).*STATES(:,6));
    ALGEBRAIC(:,53) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,211).*STATES(:,71));
    ALGEBRAIC(:,54) = ALGEBRAIC(:,52)+ CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,50)+ALGEBRAIC(:,53);
    ALGEBRAIC(:,51) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7));
    ALGEBRAIC(:,84) = ALGEBRAIC(:,51)+ALGEBRAIC(:,53);
    ALGEBRAIC(:,156) = piecewise({ALGEBRAIC(:,83)==0.00000,  CONSTANTS(:,69).*(exp(ALGEBRAIC(:,54)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,84)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,69).*ALGEBRAIC(:,83))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,83)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,54)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,84)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,157) = (ALGEBRAIC(:,154)+ALGEBRAIC(:,100)) - (( - ALGEBRAIC(:,116)+ALGEBRAIC(:,156)) - ALGEBRAIC(:,156));
    RATES(:,71) = ALGEBRAIC(:,157);
    ALGEBRAIC(:,167) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,172) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,142).*STATES(:,25))+ CONSTANTS(:,240).*CONSTANTS(:,302).*ALGEBRAIC(:,167);
    ALGEBRAIC(:,175) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,143).*STATES(:,26))+ CONSTANTS(:,241).*CONSTANTS(:,302).*ALGEBRAIC(:,167);
    ALGEBRAIC(:,176) =  CONSTANTS(:,4).*(exp(ALGEBRAIC(:,172)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,175)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,177) =  - ALGEBRAIC(:,176);
    RATES(:,25) = ALGEBRAIC(:,177);
    ALGEBRAIC(:,173) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,167);
    ALGEBRAIC(:,168) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,169) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,170) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,143).*STATES(:,26));
    ALGEBRAIC(:,171) = ALGEBRAIC(:,169)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,167)+ALGEBRAIC(:,170)+ CONSTANTS(:,282).*ALGEBRAIC(:,168);
    ALGEBRAIC(:,174) = ALGEBRAIC(:,168)+ALGEBRAIC(:,170)+ CONSTANTS(:,282).*ALGEBRAIC(:,168);
    ALGEBRAIC(:,178) = piecewise({ALGEBRAIC(:,173)==0.00000,  CONSTANTS(:,3).*(exp(ALGEBRAIC(:,171)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,174)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,3).*ALGEBRAIC(:,173))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,173)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,171)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,174)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,179) = ALGEBRAIC(:,176) - (ALGEBRAIC(:,178) - ALGEBRAIC(:,178));
    RATES(:,26) = ALGEBRAIC(:,179);
    ALGEBRAIC(:,181) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,186) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,217).*STATES(:,19))+ CONSTANTS(:,283).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,195) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,218).*STATES(:,20))+ CONSTANTS(:,285).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,196) =  CONSTANTS(:,105).*(exp(ALGEBRAIC(:,186)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,195)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,190) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,217).*STATES(:,19))+ CONSTANTS(:,284).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,203) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,220).*STATES(:,22))+ CONSTANTS(:,286).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,204) =  CONSTANTS(:,109).*(exp(ALGEBRAIC(:,190)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,203)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,205) =  - ALGEBRAIC(:,196) - ALGEBRAIC(:,204);
    RATES(:,19) = ALGEBRAIC(:,205);
    ALGEBRAIC(:,187) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,220).*STATES(:,22))+ CONSTANTS(:,283).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,197) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,221).*STATES(:,23))+ CONSTANTS(:,285).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,198) =  CONSTANTS(:,107).*(exp(ALGEBRAIC(:,187)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,197)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,206) =  - ALGEBRAIC(:,198)+ALGEBRAIC(:,204);
    RATES(:,22) = ALGEBRAIC(:,206);
    ALGEBRAIC(:,188) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,218).*STATES(:,20))+ CONSTANTS(:,283).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,199) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,219).*STATES(:,21))+ CONSTANTS(:,285).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,200) =  CONSTANTS(:,106).*(exp(ALGEBRAIC(:,188)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,199)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,191) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,218).*STATES(:,20))+ CONSTANTS(:,284).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,207) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,221).*STATES(:,23))+ CONSTANTS(:,286).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,208) =  CONSTANTS(:,110).*(exp(ALGEBRAIC(:,191)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,207)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,209) = (ALGEBRAIC(:,196) - ALGEBRAIC(:,200)) - ALGEBRAIC(:,208);
    RATES(:,20) = ALGEBRAIC(:,209);
    ALGEBRAIC(:,189) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,221).*STATES(:,23))+ CONSTANTS(:,283).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,201) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,222).*STATES(:,24))+ CONSTANTS(:,285).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,202) =  CONSTANTS(:,108).*(exp(ALGEBRAIC(:,189)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,201)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,210) = (ALGEBRAIC(:,198) - ALGEBRAIC(:,202))+ALGEBRAIC(:,208);
    RATES(:,23) = ALGEBRAIC(:,210);
    ALGEBRAIC(:,192) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,219).*STATES(:,21))+ CONSTANTS(:,284).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,211) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,222).*STATES(:,24))+ CONSTANTS(:,286).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,212) =  CONSTANTS(:,111).*(exp(ALGEBRAIC(:,192)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,211)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,213) = ALGEBRAIC(:,200) - ALGEBRAIC(:,212);
    RATES(:,21) = ALGEBRAIC(:,213);
    ALGEBRAIC(:,193) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,182) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,183) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,184) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,222).*STATES(:,24));
    ALGEBRAIC(:,185) = ALGEBRAIC(:,183)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,181)+ALGEBRAIC(:,184)+ CONSTANTS(:,282).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,194) = ALGEBRAIC(:,182)+ALGEBRAIC(:,184)+ CONSTANTS(:,282).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,214) = piecewise({ALGEBRAIC(:,193)==0.00000,  CONSTANTS(:,104).*(exp(ALGEBRAIC(:,185)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,194)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,104).*ALGEBRAIC(:,193))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,193)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,185)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,194)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,215) = (ALGEBRAIC(:,202)+ALGEBRAIC(:,212)) - (ALGEBRAIC(:,214) - ALGEBRAIC(:,214));
    RATES(:,24) = ALGEBRAIC(:,215);
    ALGEBRAIC(:,217) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,222) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,223).*STATES(:,27))+ CONSTANTS(:,242).*CONSTANTS(:,302).*ALGEBRAIC(:,217);
    ALGEBRAIC(:,225) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,224).*STATES(:,28))+ CONSTANTS(:,243).*CONSTANTS(:,302).*ALGEBRAIC(:,217);
    ALGEBRAIC(:,226) =  CONSTANTS(:,113).*(exp(ALGEBRAIC(:,222)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,225)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,227) =  - ALGEBRAIC(:,226);
    RATES(:,27) = ALGEBRAIC(:,227);
    ALGEBRAIC(:,223) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,217);
    ALGEBRAIC(:,219) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,220) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,224).*STATES(:,28));
    ALGEBRAIC(:,221) = ALGEBRAIC(:,219)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,217)+ALGEBRAIC(:,220);
    ALGEBRAIC(:,218) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,224) = ALGEBRAIC(:,218)+ALGEBRAIC(:,220);
    ALGEBRAIC(:,228) = piecewise({ALGEBRAIC(:,223)==0.00000,  CONSTANTS(:,112).*(exp(ALGEBRAIC(:,221)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,224)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,112).*ALGEBRAIC(:,223))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,223)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,221)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,224)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,229) = ALGEBRAIC(:,226) - (ALGEBRAIC(:,228) - ALGEBRAIC(:,228));
    RATES(:,28) = ALGEBRAIC(:,229);
    ALGEBRAIC(:,233) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,235) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,144).*STATES(:,29));
    ALGEBRAIC(:,236) = ALGEBRAIC(:,235)+ CONSTANTS(:,244).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,238) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,145).*STATES(:,30));
    ALGEBRAIC(:,239) = ALGEBRAIC(:,238)+ CONSTANTS(:,245).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,241) =  CONSTANTS(:,6).*(exp(ALGEBRAIC(:,236)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,239)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,237) = ALGEBRAIC(:,235)+ CONSTANTS(:,246).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,242) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,146).*STATES(:,31));
    ALGEBRAIC(:,244) = ALGEBRAIC(:,242)+ CONSTANTS(:,247).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,245) =  CONSTANTS(:,8).*(exp(ALGEBRAIC(:,237)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,244)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,246) =  - ALGEBRAIC(:,241) - ALGEBRAIC(:,245);
    RATES(:,29) = ALGEBRAIC(:,246);
    ALGEBRAIC(:,243) = ALGEBRAIC(:,242)+ CONSTANTS(:,244).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,247) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,147).*STATES(:,32));
    ALGEBRAIC(:,251) = ALGEBRAIC(:,247)+ CONSTANTS(:,245).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,253) =  CONSTANTS(:,7).*(exp(ALGEBRAIC(:,243)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,251)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,254) = ALGEBRAIC(:,245) - ALGEBRAIC(:,253);
    RATES(:,31) = ALGEBRAIC(:,254);
    ALGEBRAIC(:,240) = ALGEBRAIC(:,238)+ CONSTANTS(:,246).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,252) = ALGEBRAIC(:,247)+ CONSTANTS(:,247).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,255) =  CONSTANTS(:,9).*(exp(ALGEBRAIC(:,240)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,252)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,256) = ALGEBRAIC(:,241) - ALGEBRAIC(:,255);
    RATES(:,30) = ALGEBRAIC(:,256);
    ALGEBRAIC(:,257) = ALGEBRAIC(:,253)+ALGEBRAIC(:,255);
    RATES(:,32) = ALGEBRAIC(:,257);
    ALGEBRAIC(:,261) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,263) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,148).*STATES(:,33));
    ALGEBRAIC(:,264) = ALGEBRAIC(:,263)+ CONSTANTS(:,248).*CONSTANTS(:,302).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,265) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,149).*STATES(:,34));
    ALGEBRAIC(:,266) = ALGEBRAIC(:,265)+ CONSTANTS(:,249).*CONSTANTS(:,302).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,268) =  CONSTANTS(:,11).*(exp(ALGEBRAIC(:,264)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,266)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,269) =  - ALGEBRAIC(:,268);
    RATES(:,33) = ALGEBRAIC(:,269);
    ALGEBRAIC(:,267) = ALGEBRAIC(:,265)+ CONSTANTS(:,248).*CONSTANTS(:,302).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,270) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,150).*STATES(:,35));
    ALGEBRAIC(:,274) = ALGEBRAIC(:,270)+ CONSTANTS(:,249).*CONSTANTS(:,302).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,275) =  CONSTANTS(:,12).*(exp(ALGEBRAIC(:,267)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,274)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,276) = ALGEBRAIC(:,268) - ALGEBRAIC(:,275);
    RATES(:,34) = ALGEBRAIC(:,276);
    ALGEBRAIC(:,277) = ALGEBRAIC(:,275);
    RATES(:,35) = ALGEBRAIC(:,277);
    ALGEBRAIC(:,284) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,151).*STATES(:,36));
    ALGEBRAIC(:,314) = ALGEBRAIC(:,284);
    ALGEBRAIC(:,281) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,364) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,157).*STATES(:,42))+ CONSTANTS(:,277).*ALGEBRAIC(:,281);
    ALGEBRAIC(:,365) =  CONSTANTS(:,35).*(exp(ALGEBRAIC(:,314)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,364)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,279) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,296) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,151).*STATES(:,36))+ CONSTANTS(:,273).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,328) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,154).*STATES(:,39))+ CONSTANTS(:,278).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,329) =  CONSTANTS(:,17).*(exp(ALGEBRAIC(:,296)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,328)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,302) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,151).*STATES(:,36))+ CONSTANTS(:,274).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,340) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,152).*STATES(:,37))+ CONSTANTS(:,279).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,341) =  CONSTANTS(:,23).*(exp(ALGEBRAIC(:,302)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,340)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,306) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,151).*STATES(:,36))+ CONSTANTS(:,275).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,348) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,153).*STATES(:,38))+ CONSTANTS(:,280).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,349) =  CONSTANTS(:,27).*(exp(ALGEBRAIC(:,306)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,348)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,367) = (( - ALGEBRAIC(:,329) - ALGEBRAIC(:,341)) - ALGEBRAIC(:,349)) - ALGEBRAIC(:,365);
    RATES(:,36) = ALGEBRAIC(:,367);
    ALGEBRAIC(:,297) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,157).*STATES(:,42))+ CONSTANTS(:,273).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,330) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,160).*STATES(:,45))+ CONSTANTS(:,278).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,331) =  CONSTANTS(:,20).*(exp(ALGEBRAIC(:,297)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,330)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,303) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,157).*STATES(:,42))+ CONSTANTS(:,274).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,342) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,158).*STATES(:,43))+ CONSTANTS(:,279).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,343) =  CONSTANTS(:,25).*(exp(ALGEBRAIC(:,303)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,342)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,307) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,157).*STATES(:,42))+ CONSTANTS(:,275).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,350) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,159).*STATES(:,44))+ CONSTANTS(:,280).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,351) =  CONSTANTS(:,29).*(exp(ALGEBRAIC(:,307)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,350)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,368) = (( - ALGEBRAIC(:,331) - ALGEBRAIC(:,343)) - ALGEBRAIC(:,351)) -  - ALGEBRAIC(:,365);
    RATES(:,42) = ALGEBRAIC(:,368);
    ALGEBRAIC(:,285) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,152).*STATES(:,37));
    ALGEBRAIC(:,315) = ALGEBRAIC(:,285);
    ALGEBRAIC(:,366) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,158).*STATES(:,43))+ CONSTANTS(:,277).*ALGEBRAIC(:,281);
    ALGEBRAIC(:,369) =  CONSTANTS(:,37).*(exp(ALGEBRAIC(:,315)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,366)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,298) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,152).*STATES(:,37))+ CONSTANTS(:,273).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,332) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,155).*STATES(:,40))+ CONSTANTS(:,278).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,333) =  CONSTANTS(:,18).*(exp(ALGEBRAIC(:,298)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,332)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,310) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,152).*STATES(:,37))+ CONSTANTS(:,276).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,356) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,153).*STATES(:,38))+ CONSTANTS(:,281).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,357) =  CONSTANTS(:,31).*(exp(ALGEBRAIC(:,310)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,356)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,371) = (( - ALGEBRAIC(:,333)+ALGEBRAIC(:,341)) - ALGEBRAIC(:,369)) - ALGEBRAIC(:,357);
    RATES(:,37) = ALGEBRAIC(:,371);
    ALGEBRAIC(:,299) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,158).*STATES(:,43))+ CONSTANTS(:,273).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,334) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,161).*STATES(:,46))+ CONSTANTS(:,278).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,335) =  CONSTANTS(:,21).*(exp(ALGEBRAIC(:,299)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,334)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,311) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,158).*STATES(:,43))+ CONSTANTS(:,276).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,358) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,159).*STATES(:,44))+ CONSTANTS(:,281).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,359) =  CONSTANTS(:,33).*(exp(ALGEBRAIC(:,311)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,358)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,372) = (( - ALGEBRAIC(:,335)+ALGEBRAIC(:,343)) -  - ALGEBRAIC(:,369)) - ALGEBRAIC(:,359);
    RATES(:,43) = ALGEBRAIC(:,372);
    ALGEBRAIC(:,286) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,153).*STATES(:,38));
    ALGEBRAIC(:,316) = ALGEBRAIC(:,286);
    ALGEBRAIC(:,370) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,159).*STATES(:,44))+ CONSTANTS(:,277).*ALGEBRAIC(:,281);
    ALGEBRAIC(:,373) =  CONSTANTS(:,39).*(exp(ALGEBRAIC(:,316)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,370)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,300) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,153).*STATES(:,38))+ CONSTANTS(:,273).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,336) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,156).*STATES(:,41))+ CONSTANTS(:,278).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,337) =  CONSTANTS(:,19).*(exp(ALGEBRAIC(:,300)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,336)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,375) = (( - ALGEBRAIC(:,337)+ALGEBRAIC(:,349)) - ALGEBRAIC(:,373))+ALGEBRAIC(:,357);
    RATES(:,38) = ALGEBRAIC(:,375);
    ALGEBRAIC(:,301) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,159).*STATES(:,44))+ CONSTANTS(:,273).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,338) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,162).*STATES(:,47))+ CONSTANTS(:,278).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,339) =  CONSTANTS(:,22).*(exp(ALGEBRAIC(:,301)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,338)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,376) = (( - ALGEBRAIC(:,339)+ALGEBRAIC(:,351)) -  - ALGEBRAIC(:,373))+ALGEBRAIC(:,359);
    RATES(:,44) = ALGEBRAIC(:,376);
    ALGEBRAIC(:,287) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,154).*STATES(:,39));
    ALGEBRAIC(:,317) = ALGEBRAIC(:,287);
    ALGEBRAIC(:,374) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,160).*STATES(:,45))+ CONSTANTS(:,277).*ALGEBRAIC(:,281);
    ALGEBRAIC(:,377) =  CONSTANTS(:,36).*(exp(ALGEBRAIC(:,317)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,374)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,304) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,154).*STATES(:,39))+ CONSTANTS(:,274).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,344) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,155).*STATES(:,40))+ CONSTANTS(:,279).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,345) =  CONSTANTS(:,24).*(exp(ALGEBRAIC(:,304)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,344)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,308) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,154).*STATES(:,39))+ CONSTANTS(:,275).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,352) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,156).*STATES(:,41))+ CONSTANTS(:,280).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,353) =  CONSTANTS(:,28).*(exp(ALGEBRAIC(:,308)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,352)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,379) = (( - ALGEBRAIC(:,353)+ALGEBRAIC(:,329)) - ALGEBRAIC(:,345)) - ALGEBRAIC(:,377);
    RATES(:,39) = ALGEBRAIC(:,379);
    ALGEBRAIC(:,305) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,160).*STATES(:,45))+ CONSTANTS(:,274).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,346) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,161).*STATES(:,46))+ CONSTANTS(:,279).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,347) =  CONSTANTS(:,26).*(exp(ALGEBRAIC(:,305)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,346)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,309) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,160).*STATES(:,45))+ CONSTANTS(:,275).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,354) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,162).*STATES(:,47))+ CONSTANTS(:,280).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,355) =  CONSTANTS(:,30).*(exp(ALGEBRAIC(:,309)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,354)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,380) = (( - ALGEBRAIC(:,355)+ALGEBRAIC(:,331)) - ALGEBRAIC(:,347)) -  - ALGEBRAIC(:,377);
    RATES(:,45) = ALGEBRAIC(:,380);
    ALGEBRAIC(:,288) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,155).*STATES(:,40));
    ALGEBRAIC(:,318) = ALGEBRAIC(:,288);
    ALGEBRAIC(:,378) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,161).*STATES(:,46))+ CONSTANTS(:,277).*ALGEBRAIC(:,281);
    ALGEBRAIC(:,381) =  CONSTANTS(:,38).*(exp(ALGEBRAIC(:,318)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,378)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,312) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,155).*STATES(:,40))+ CONSTANTS(:,276).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,360) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,156).*STATES(:,41))+ CONSTANTS(:,281).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,361) =  CONSTANTS(:,32).*(exp(ALGEBRAIC(:,312)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,360)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,383) = ((ALGEBRAIC(:,345)+ALGEBRAIC(:,333)) - ALGEBRAIC(:,381)) - ALGEBRAIC(:,361);
    RATES(:,40) = ALGEBRAIC(:,383);
    ALGEBRAIC(:,290) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,156).*STATES(:,41));
    ALGEBRAIC(:,319) = ALGEBRAIC(:,290);
    ALGEBRAIC(:,382) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,162).*STATES(:,47))+ CONSTANTS(:,277).*ALGEBRAIC(:,281);
    ALGEBRAIC(:,384) =  CONSTANTS(:,40).*(exp(ALGEBRAIC(:,319)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,382)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,386) = ((ALGEBRAIC(:,353)+ALGEBRAIC(:,337)) - ALGEBRAIC(:,384))+ALGEBRAIC(:,361);
    RATES(:,41) = ALGEBRAIC(:,386);
    ALGEBRAIC(:,289) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,161).*STATES(:,46));
    ALGEBRAIC(:,292) = ALGEBRAIC(:,281)+ CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,279)+ALGEBRAIC(:,289);
    ALGEBRAIC(:,280) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,139).*STATES(:,2));
    ALGEBRAIC(:,324) = ALGEBRAIC(:,280)+ALGEBRAIC(:,289);
    ALGEBRAIC(:,320) =  CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,385) = piecewise({ALGEBRAIC(:,320)==0.00000,  CONSTANTS(:,13).*(exp(ALGEBRAIC(:,292)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,324)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,13).*ALGEBRAIC(:,320))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,320)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,292)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,324)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,283) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,294) = ALGEBRAIC(:,283)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,279)+ALGEBRAIC(:,289);
    ALGEBRAIC(:,282) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,326) = ALGEBRAIC(:,282)+ALGEBRAIC(:,289);
    ALGEBRAIC(:,322) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,390) = piecewise({ALGEBRAIC(:,322)==0.00000,  CONSTANTS(:,15).*(exp(ALGEBRAIC(:,294)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,326)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,15).*ALGEBRAIC(:,322))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,322)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,294)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,326)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,313) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,161).*STATES(:,46))+ CONSTANTS(:,276).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,362) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,162).*STATES(:,47))+ CONSTANTS(:,281).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,363) =  CONSTANTS(:,34).*(exp(ALGEBRAIC(:,313)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,362)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,391) = ((ALGEBRAIC(:,347)+ALGEBRAIC(:,335)) - (((( - ALGEBRAIC(:,381)+ALGEBRAIC(:,385)) - ALGEBRAIC(:,385))+ALGEBRAIC(:,390)) - ALGEBRAIC(:,390))) - ALGEBRAIC(:,363);
    RATES(:,46) = ALGEBRAIC(:,391);
    ALGEBRAIC(:,291) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,162).*STATES(:,47));
    ALGEBRAIC(:,293) = ALGEBRAIC(:,281)+ CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,279)+ALGEBRAIC(:,291);
    ALGEBRAIC(:,325) = ALGEBRAIC(:,280)+ALGEBRAIC(:,291);
    ALGEBRAIC(:,321) =  CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,387) = piecewise({ALGEBRAIC(:,321)==0.00000,  CONSTANTS(:,14).*(exp(ALGEBRAIC(:,293)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,325)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,14).*ALGEBRAIC(:,321))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,321)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,293)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,325)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,295) = ALGEBRAIC(:,283)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,279)+ALGEBRAIC(:,291);
    ALGEBRAIC(:,327) = ALGEBRAIC(:,282)+ALGEBRAIC(:,291);
    ALGEBRAIC(:,323) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,392) = piecewise({ALGEBRAIC(:,323)==0.00000,  CONSTANTS(:,16).*(exp(ALGEBRAIC(:,295)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,327)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,16).*ALGEBRAIC(:,323))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,323)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,295)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,327)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,393) = ((ALGEBRAIC(:,355)+ALGEBRAIC(:,339)) - (((( - ALGEBRAIC(:,384)+ALGEBRAIC(:,387)) - ALGEBRAIC(:,387))+ALGEBRAIC(:,392)) - ALGEBRAIC(:,392)))+ALGEBRAIC(:,363);
    RATES(:,47) = ALGEBRAIC(:,393);
    ALGEBRAIC(:,406) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,180).*STATES(:,83));
    ALGEBRAIC(:,422) = ALGEBRAIC(:,406);
    ALGEBRAIC(:,403) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7));
    ALGEBRAIC(:,407) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,181).*STATES(:,84));
    ALGEBRAIC(:,438) = ALGEBRAIC(:,403)+ALGEBRAIC(:,407);
    ALGEBRAIC(:,439) =  CONSTANTS(:,57).*(exp(ALGEBRAIC(:,422)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,438)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,399) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,423) = ALGEBRAIC(:,407)+ALGEBRAIC(:,399);
    ALGEBRAIC(:,408) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,182).*STATES(:,85));
    ALGEBRAIC(:,440) = ALGEBRAIC(:,408);
    ALGEBRAIC(:,441) =  CONSTANTS(:,58).*(exp(ALGEBRAIC(:,423)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,440)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,442) = ALGEBRAIC(:,439) - ALGEBRAIC(:,441);
    RATES(:,84) = ALGEBRAIC(:,442);
    ALGEBRAIC(:,424) = ALGEBRAIC(:,408)+ALGEBRAIC(:,399);
    ALGEBRAIC(:,409) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,183).*STATES(:,86));
    ALGEBRAIC(:,443) = ALGEBRAIC(:,409);
    ALGEBRAIC(:,444) =  CONSTANTS(:,59).*(exp(ALGEBRAIC(:,424)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,443)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,445) =  - ALGEBRAIC(:,444)+ALGEBRAIC(:,441);
    RATES(:,85) = ALGEBRAIC(:,445);
    ALGEBRAIC(:,425) = ALGEBRAIC(:,409);
    ALGEBRAIC(:,398) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,189).*STATES(:,13));
    ALGEBRAIC(:,420) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,188).*STATES(:,12));
    ALGEBRAIC(:,410) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,184).*STATES(:,75));
    ALGEBRAIC(:,446) = ALGEBRAIC(:,398)+ALGEBRAIC(:,420)+ALGEBRAIC(:,410);
    ALGEBRAIC(:,447) =  CONSTANTS(:,60).*(exp(ALGEBRAIC(:,425)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,446)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,448) = ALGEBRAIC(:,444) - ALGEBRAIC(:,447);
    RATES(:,86) = ALGEBRAIC(:,448);
    ALGEBRAIC(:,402) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,186).*STATES(:,10));
    ALGEBRAIC(:,426) = ALGEBRAIC(:,410)+ALGEBRAIC(:,402);
    ALGEBRAIC(:,411) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,185).*STATES(:,76));
    ALGEBRAIC(:,449) = ALGEBRAIC(:,411);
    ALGEBRAIC(:,450) =  CONSTANTS(:,61).*(exp(ALGEBRAIC(:,426)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,449)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,451) =  - ALGEBRAIC(:,450)+ALGEBRAIC(:,447);
    RATES(:,75) = ALGEBRAIC(:,451);
    ALGEBRAIC(:,427) = ALGEBRAIC(:,411);
    ALGEBRAIC(:,405) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,171).*STATES(:,77));
    ALGEBRAIC(:,452) = ALGEBRAIC(:,405);
    ALGEBRAIC(:,454) =  CONSTANTS(:,62).*(exp(ALGEBRAIC(:,427)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,452)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,456) = ALGEBRAIC(:,450) - ALGEBRAIC(:,454);
    RATES(:,76) = ALGEBRAIC(:,456);
    ALGEBRAIC(:,421) = ALGEBRAIC(:,405);
    ALGEBRAIC(:,400) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,412) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,172).*STATES(:,78));
    ALGEBRAIC(:,436) = ALGEBRAIC(:,400)+ALGEBRAIC(:,412);
    ALGEBRAIC(:,437) =  CONSTANTS(:,48).*(exp(ALGEBRAIC(:,421)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,436)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,457) =  - ALGEBRAIC(:,437)+ALGEBRAIC(:,454);
    RATES(:,77) = ALGEBRAIC(:,457);
    ALGEBRAIC(:,428) = ALGEBRAIC(:,412);
    ALGEBRAIC(:,413) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,173).*STATES(:,79));
    ALGEBRAIC(:,453) = ALGEBRAIC(:,413)+ALGEBRAIC(:,400);
    ALGEBRAIC(:,455) =  CONSTANTS(:,49).*(exp(ALGEBRAIC(:,428)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,453)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,458) =  - ALGEBRAIC(:,455)+ALGEBRAIC(:,437);
    RATES(:,78) = ALGEBRAIC(:,458);
    ALGEBRAIC(:,404) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,169).*STATES(:,6));
    ALGEBRAIC(:,429) = ALGEBRAIC(:,413)+ALGEBRAIC(:,404);
    ALGEBRAIC(:,414) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,174).*STATES(:,80));
    ALGEBRAIC(:,459) = ALGEBRAIC(:,414);
    ALGEBRAIC(:,460) =  CONSTANTS(:,50).*(exp(ALGEBRAIC(:,429)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,459)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,461) = ALGEBRAIC(:,455) - ALGEBRAIC(:,460);
    RATES(:,79) = ALGEBRAIC(:,461);
    ALGEBRAIC(:,430) = ALGEBRAIC(:,414)+ALGEBRAIC(:,404);
    ALGEBRAIC(:,415) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,175).*STATES(:,81));
    ALGEBRAIC(:,462) = ALGEBRAIC(:,415);
    ALGEBRAIC(:,463) =  CONSTANTS(:,51).*(exp(ALGEBRAIC(:,430)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,462)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,464) = ALGEBRAIC(:,460) - ALGEBRAIC(:,463);
    RATES(:,80) = ALGEBRAIC(:,464);
    ALGEBRAIC(:,431) = ALGEBRAIC(:,415)+ALGEBRAIC(:,404);
    ALGEBRAIC(:,397) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,465) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,176).*STATES(:,82))+ CONSTANTS(:,255).*ALGEBRAIC(:,397);
    ALGEBRAIC(:,466) =  CONSTANTS(:,52).*(exp(ALGEBRAIC(:,431)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,465)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,467) = ALGEBRAIC(:,463) - ALGEBRAIC(:,466);
    RATES(:,81) = ALGEBRAIC(:,467);
    ALGEBRAIC(:,416) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,176).*STATES(:,82));
    ALGEBRAIC(:,432) = ALGEBRAIC(:,416);
    ALGEBRAIC(:,401) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,187).*STATES(:,11));
    ALGEBRAIC(:,417) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,177).*STATES(:,74));
    ALGEBRAIC(:,468) = ALGEBRAIC(:,417)+ALGEBRAIC(:,401);
    ALGEBRAIC(:,469) =  CONSTANTS(:,53).*(exp(ALGEBRAIC(:,432)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,468)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,470) = ALGEBRAIC(:,466) - ALGEBRAIC(:,469);
    RATES(:,82) = ALGEBRAIC(:,470);
    ALGEBRAIC(:,433) = ALGEBRAIC(:,417);
    ALGEBRAIC(:,418) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,178).*STATES(:,87));
    ALGEBRAIC(:,471) = ALGEBRAIC(:,418);
    ALGEBRAIC(:,472) =  CONSTANTS(:,54).*(exp(ALGEBRAIC(:,433)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,471)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,473) = ALGEBRAIC(:,469) - ALGEBRAIC(:,472);
    RATES(:,74) = ALGEBRAIC(:,473);
    ALGEBRAIC(:,434) = ALGEBRAIC(:,418);
    ALGEBRAIC(:,474) =  CONSTANTS(:,256).*ALGEBRAIC(:,397)+ CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7))+ CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,179).*STATES(:,88));
    ALGEBRAIC(:,475) =  CONSTANTS(:,55).*(exp(ALGEBRAIC(:,434)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,474)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,476) =  - ALGEBRAIC(:,475)+ALGEBRAIC(:,472);
    RATES(:,87) = ALGEBRAIC(:,476);
    ALGEBRAIC(:,419) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,179).*STATES(:,88));
    ALGEBRAIC(:,435) = ALGEBRAIC(:,419);
    ALGEBRAIC(:,478) = ALGEBRAIC(:,406)+ALGEBRAIC(:,403);
    ALGEBRAIC(:,479) =  CONSTANTS(:,56).*(exp(ALGEBRAIC(:,435)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,478)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,480) = ALGEBRAIC(:,479) - ALGEBRAIC(:,439);
    RATES(:,83) = ALGEBRAIC(:,480);
    ALGEBRAIC(:,481) = ALGEBRAIC(:,475) - ALGEBRAIC(:,479);
    RATES(:,88) = ALGEBRAIC(:,481);
    ALGEBRAIC(:,500) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,163).*STATES(:,89));
    ALGEBRAIC(:,506) = ALGEBRAIC(:,500);
    ALGEBRAIC(:,499) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,169).*STATES(:,6));
    ALGEBRAIC(:,501) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,164).*STATES(:,90));
    ALGEBRAIC(:,512) =  CONSTANTS(:,253).*ALGEBRAIC(:,499)+ALGEBRAIC(:,501);
    ALGEBRAIC(:,513) =  CONSTANTS(:,41).*(exp(ALGEBRAIC(:,506)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,512)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,497) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,507) = ALGEBRAIC(:,501)+ALGEBRAIC(:,497);
    ALGEBRAIC(:,502) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,165).*STATES(:,91));
    ALGEBRAIC(:,514) = ALGEBRAIC(:,502);
    ALGEBRAIC(:,515) =  CONSTANTS(:,42).*(exp(ALGEBRAIC(:,507)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,514)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,517) = ALGEBRAIC(:,513) - ALGEBRAIC(:,515);
    RATES(:,90) = ALGEBRAIC(:,517);
    ALGEBRAIC(:,508) = ALGEBRAIC(:,502);
    ALGEBRAIC(:,503) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,166).*STATES(:,92));
    ALGEBRAIC(:,516) = ALGEBRAIC(:,503);
    ALGEBRAIC(:,518) =  CONSTANTS(:,43).*(exp(ALGEBRAIC(:,508)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,516)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,520) = ALGEBRAIC(:,515) - ALGEBRAIC(:,518);
    RATES(:,91) = ALGEBRAIC(:,520);
    ALGEBRAIC(:,509) = ALGEBRAIC(:,503);
    ALGEBRAIC(:,496) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,139).*STATES(:,2));
    ALGEBRAIC(:,504) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,167).*STATES(:,93));
    ALGEBRAIC(:,519) = ALGEBRAIC(:,504)+ALGEBRAIC(:,496);
    ALGEBRAIC(:,521) =  CONSTANTS(:,44).*(exp(ALGEBRAIC(:,509)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,519)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,523) =  - ALGEBRAIC(:,521)+ALGEBRAIC(:,518);
    RATES(:,92) = ALGEBRAIC(:,523);
    ALGEBRAIC(:,498) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7));
    ALGEBRAIC(:,510) = ALGEBRAIC(:,504)+ CONSTANTS(:,252).*ALGEBRAIC(:,498);
    ALGEBRAIC(:,505) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,168).*STATES(:,94));
    ALGEBRAIC(:,522) = ALGEBRAIC(:,505);
    ALGEBRAIC(:,524) =  CONSTANTS(:,45).*(exp(ALGEBRAIC(:,510)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,522)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,526) =  - ALGEBRAIC(:,524)+ALGEBRAIC(:,521);
    RATES(:,93) = ALGEBRAIC(:,526);
    ALGEBRAIC(:,495) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,511) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,168).*STATES(:,94))+ CONSTANTS(:,250).*CONSTANTS(:,302).*ALGEBRAIC(:,495);
    ALGEBRAIC(:,525) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,163).*STATES(:,89))+ CONSTANTS(:,251).*CONSTANTS(:,302).*ALGEBRAIC(:,495);
    ALGEBRAIC(:,527) =  CONSTANTS(:,46).*(exp(ALGEBRAIC(:,511)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,525)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,529) = ALGEBRAIC(:,527) - ALGEBRAIC(:,513);
    RATES(:,89) = ALGEBRAIC(:,529);
    ALGEBRAIC(:,530) =  - ALGEBRAIC(:,527)+ALGEBRAIC(:,524);
    RATES(:,94) = ALGEBRAIC(:,530);
    ALGEBRAIC(:,557) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,559) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,214).*STATES(:,14));
    ALGEBRAIC(:,560) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,215).*STATES(:,15));
    ALGEBRAIC(:,561) =  CONSTANTS(:,101).*(exp((ALGEBRAIC(:,557)+ALGEBRAIC(:,559))./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,560)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,558) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,139).*STATES(:,2));
    ALGEBRAIC(:,562) =  CONSTANTS(:,102).*(exp(ALGEBRAIC(:,560)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp((ALGEBRAIC(:,558)+ALGEBRAIC(:,559))./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    RATES(:,14) =  - ALGEBRAIC(:,561)+ALGEBRAIC(:,562);
    RATES(:,15) = ALGEBRAIC(:,561) - ALGEBRAIC(:,562);
    ALGEBRAIC(:,489) = ALGEBRAIC(:,447);
    ALGEBRAIC(:,569) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,188).*STATES(:,12));
    ALGEBRAIC(:,570) = CONSTANTS(:,307)+ALGEBRAIC(:,569);
    ALGEBRAIC(:,579) =  CONSTANTS(:,130).*(exp(CONSTANTS(:,319)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,570)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,580) = ALGEBRAIC(:,579);
    RATES(:,12) = ALGEBRAIC(:,489)+ALGEBRAIC(:,580);
    ALGEBRAIC(:,486) =  - ALGEBRAIC(:,450);
    ALGEBRAIC(:,568) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,186).*STATES(:,10));
    ALGEBRAIC(:,571) = CONSTANTS(:,307)+ALGEBRAIC(:,568);
    ALGEBRAIC(:,581) =  CONSTANTS(:,122).*(exp(ALGEBRAIC(:,571)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(CONSTANTS(:,320)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,582) =  - ALGEBRAIC(:,581);
    RATES(:,10) = ALGEBRAIC(:,486)+ALGEBRAIC(:,582);
    ALGEBRAIC(:,485) = ALGEBRAIC(:,469);
    ALGEBRAIC(:,567) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,187).*STATES(:,11));
    ALGEBRAIC(:,572) = ALGEBRAIC(:,567)+CONSTANTS(:,316);
    ALGEBRAIC(:,584) =  CONSTANTS(:,126).*(exp(CONSTANTS(:,321)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,572)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,585) = ALGEBRAIC(:,584);
    RATES(:,11) = ALGEBRAIC(:,485)+ALGEBRAIC(:,585);
    ALGEBRAIC(:,41) =  ( CONSTANTS(:,300).*CONSTANTS(:,301)).*log( CONSTANTS(:,216).*STATES(:,3));
    ALGEBRAIC(:,42) =  ( CONSTANTS(:,300).*CONSTANTS(:,301)).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,43) =  CONSTANTS(:,103).*(exp(ALGEBRAIC(:,41)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,42)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,565) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,216).*STATES(:,3));
    ALGEBRAIC(:,576) = CONSTANTS(:,317)+ CONSTANTS(:,304).*ALGEBRAIC(:,565);
    ALGEBRAIC(:,592) =  CONSTANTS(:,127).*(exp(CONSTANTS(:,325)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,576)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,596) =  CONSTANTS(:,304).*ALGEBRAIC(:,592);
    RATES(:,3) =  - ALGEBRAIC(:,43)+ALGEBRAIC(:,596);
    ALGEBRAIC(:,482) = ALGEBRAIC(:,447);
    ALGEBRAIC(:,566) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,189).*STATES(:,13));
    ALGEBRAIC(:,573) = CONSTANTS(:,310)+ALGEBRAIC(:,566);
    ALGEBRAIC(:,586) =  CONSTANTS(:,124).*(exp(ALGEBRAIC(:,573)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(CONSTANTS(:,322)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,575) = CONSTANTS(:,314)+ CONSTANTS(:,305).*ALGEBRAIC(:,566);
    ALGEBRAIC(:,589) =  CONSTANTS(:,125).*(exp(CONSTANTS(:,324)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,575)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,577) = CONSTANTS(:,317)+ CONSTANTS(:,305).*ALGEBRAIC(:,566);
    ALGEBRAIC(:,597) =  CONSTANTS(:,128).*(exp(ALGEBRAIC(:,577)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(CONSTANTS(:,326)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,578) = ALGEBRAIC(:,566)+CONSTANTS(:,315);
    ALGEBRAIC(:,600) =  CONSTANTS(:,129).*(exp(CONSTANTS(:,327)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,578)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,603) = (( CONSTANTS(:,305).*ALGEBRAIC(:,589) - ALGEBRAIC(:,586)) -  CONSTANTS(:,305).*ALGEBRAIC(:,597))+ALGEBRAIC(:,600);
    RATES(:,13) = ALGEBRAIC(:,482)+ALGEBRAIC(:,603);
    ALGEBRAIC(:,602) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,607) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,190).*STATES(:,48));
    ALGEBRAIC(:,608) = ALGEBRAIC(:,607)+ CONSTANTS(:,257).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,610) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,191).*STATES(:,49));
    ALGEBRAIC(:,611) = ALGEBRAIC(:,610)+ CONSTANTS(:,259).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,613) =  CONSTANTS(:,64).*(exp(ALGEBRAIC(:,608)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,611)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,609) = ALGEBRAIC(:,607)+ CONSTANTS(:,258).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,614) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,192).*STATES(:,50));
    ALGEBRAIC(:,616) = ALGEBRAIC(:,614)+ CONSTANTS(:,260).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,617) =  CONSTANTS(:,66).*(exp(ALGEBRAIC(:,609)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,616)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,618) =  - ALGEBRAIC(:,613) - ALGEBRAIC(:,617);
    RATES(:,48) = ALGEBRAIC(:,618);
    ALGEBRAIC(:,36) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,37) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,139).*STATES(:,2));
    ALGEBRAIC(:,1) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,38) =  CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,1);
    ALGEBRAIC(:,39) = piecewise({ALGEBRAIC(:,38)==0.00000,  CONSTANTS(:,2).*(exp(ALGEBRAIC(:,36)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,37)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,2).*ALGEBRAIC(:,38))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,38)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,36)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,37)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,388) = ALGEBRAIC(:,387)+ALGEBRAIC(:,385);
    ALGEBRAIC(:,535) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,539) =  CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,535);
    ALGEBRAIC(:,537) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,538) = ALGEBRAIC(:,537)+ CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,535);
    ALGEBRAIC(:,536) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,139).*STATES(:,2));
    ALGEBRAIC(:,540) = ALGEBRAIC(:,536);
    ALGEBRAIC(:,541) = piecewise({ALGEBRAIC(:,539)==0.00000,  CONSTANTS(:,115).*(exp(ALGEBRAIC(:,538)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,540)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,115).*ALGEBRAIC(:,539))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,539)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,538)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,540)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,531) = ALGEBRAIC(:,521);
    ALGEBRAIC(:,606) =  CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,595) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,619) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,193).*STATES(:,51));
    ALGEBRAIC(:,620) = ALGEBRAIC(:,619)+ALGEBRAIC(:,595)+ALGEBRAIC(:,606);
    ALGEBRAIC(:,599) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,139).*STATES(:,2));
    ALGEBRAIC(:,621) = ALGEBRAIC(:,619)+ALGEBRAIC(:,599);
    ALGEBRAIC(:,622) = piecewise({ALGEBRAIC(:,606)==0.00000,  CONSTANTS(:,63).*(exp(ALGEBRAIC(:,620)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,621)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,63).*ALGEBRAIC(:,606))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,606)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,620)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,621)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    RATES(:,2) =  1.00000.*(ALGEBRAIC(:,39)+ALGEBRAIC(:,388)+ALGEBRAIC(:,531)+ALGEBRAIC(:,562)+ALGEBRAIC(:,622)+ALGEBRAIC(:,541));
    ALGEBRAIC(:,615) = ALGEBRAIC(:,614)+ CONSTANTS(:,257).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,624) = ALGEBRAIC(:,619)+ CONSTANTS(:,259).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,628) =  CONSTANTS(:,65).*(exp(ALGEBRAIC(:,615)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,624)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,630) = ALGEBRAIC(:,617) - ALGEBRAIC(:,628);
    RATES(:,50) = ALGEBRAIC(:,630);
    ALGEBRAIC(:,612) = ALGEBRAIC(:,610)+ CONSTANTS(:,258).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,626) = ALGEBRAIC(:,619)+ CONSTANTS(:,260).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,631) =  CONSTANTS(:,67).*(exp(ALGEBRAIC(:,612)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,626)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,633) = ALGEBRAIC(:,613) - ALGEBRAIC(:,631);
    RATES(:,49) = ALGEBRAIC(:,633);
    ALGEBRAIC(:,634) = ALGEBRAIC(:,628)+ALGEBRAIC(:,631);
    RATES(:,51) = ALGEBRAIC(:,634);
    ALGEBRAIC(:,389) = (( (CONSTANTS(:,277)).*ALGEBRAIC(:,377)+ CONSTANTS(:,277).*ALGEBRAIC(:,381)+ CONSTANTS(:,277).*ALGEBRAIC(:,373)+ CONSTANTS(:,277).*ALGEBRAIC(:,369)+ CONSTANTS(:,277).*ALGEBRAIC(:,365)+ CONSTANTS(:,277).*ALGEBRAIC(:,384)) - ALGEBRAIC(:,385)) - ALGEBRAIC(:,387);
    ALGEBRAIC(:,532) =  - ALGEBRAIC(:,515);
    ALGEBRAIC(:,564) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,574) = CONSTANTS(:,310)+ CONSTANTS(:,303).*ALGEBRAIC(:,564);
    ALGEBRAIC(:,588) =  CONSTANTS(:,123).*(exp(ALGEBRAIC(:,574)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(CONSTANTS(:,323)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,591) =   - CONSTANTS(:,303).*ALGEBRAIC(:,588);
    ALGEBRAIC(:,623) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,194).*STATES(:,16));
    ALGEBRAIC(:,627) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,629) = ALGEBRAIC(:,627)+ALGEBRAIC(:,623);
    ALGEBRAIC(:,625) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,195).*STATES(:,17));
    ALGEBRAIC(:,632) = ALGEBRAIC(:,625);
    ALGEBRAIC(:,636) =  CONSTANTS(:,68).*(exp(ALGEBRAIC(:,629)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,632)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    RATES(:,1) = ((((((( - ALGEBRAIC(:,39)+ALGEBRAIC(:,43)) - ALGEBRAIC(:,49))+ALGEBRAIC(:,389)+ALGEBRAIC(:,532)) - ALGEBRAIC(:,561))+ALGEBRAIC(:,591)) - ALGEBRAIC(:,622)) - ALGEBRAIC(:,541)) - ALGEBRAIC(:,636);
    RATES(:,16) =  - ALGEBRAIC(:,636);
    RATES(:,17) = ALGEBRAIC(:,636);
    ALGEBRAIC(:,639) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,641) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,234).*STATES(:,52));
    ALGEBRAIC(:,642) = ALGEBRAIC(:,641)+ CONSTANTS(:,261).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,644) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,235).*STATES(:,53));
    ALGEBRAIC(:,645) = ALGEBRAIC(:,644)+ CONSTANTS(:,263).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,647) =  CONSTANTS(:,132).*(exp(ALGEBRAIC(:,642)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,645)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,643) = ALGEBRAIC(:,641)+ CONSTANTS(:,262).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,648) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,236).*STATES(:,54));
    ALGEBRAIC(:,649) = ALGEBRAIC(:,648)+ CONSTANTS(:,264).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,651) =  CONSTANTS(:,134).*(exp(ALGEBRAIC(:,643)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,649)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,652) =  - ALGEBRAIC(:,647)+ALGEBRAIC(:,651);
    RATES(:,52) = ALGEBRAIC(:,652);
    ALGEBRAIC(:,650) = ALGEBRAIC(:,648)+ CONSTANTS(:,261).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,653) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,237).*STATES(:,55));
    ALGEBRAIC(:,657) = ALGEBRAIC(:,653)+ CONSTANTS(:,263).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,659) =  CONSTANTS(:,133).*(exp(ALGEBRAIC(:,650)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,657)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,660) =  - ALGEBRAIC(:,659)+ALGEBRAIC(:,651);
    RATES(:,54) = ALGEBRAIC(:,660);
    ALGEBRAIC(:,646) = ALGEBRAIC(:,644)+ CONSTANTS(:,262).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,658) = ALGEBRAIC(:,653)+ CONSTANTS(:,264).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,661) =  CONSTANTS(:,135).*(exp(ALGEBRAIC(:,646)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,658)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,662) = ALGEBRAIC(:,647) - ALGEBRAIC(:,661);
    RATES(:,53) = ALGEBRAIC(:,662);
    ALGEBRAIC(:,663) = ALGEBRAIC(:,659)+ALGEBRAIC(:,661);
    RATES(:,55) = ALGEBRAIC(:,663);
    ALGEBRAIC(:,669) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,670) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,669);
    ALGEBRAIC(:,665) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,673) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,213).*STATES(:,73));
    ALGEBRAIC(:,674) = ALGEBRAIC(:,673)+ALGEBRAIC(:,665)+ALGEBRAIC(:,670);
    ALGEBRAIC(:,666) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,675) = ALGEBRAIC(:,673)+ALGEBRAIC(:,666);
    ALGEBRAIC(:,678) = piecewise({ALGEBRAIC(:,670)==0.00000,  1.00000.*CONSTANTS(:,99).*(exp(ALGEBRAIC(:,674)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,675)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( 1.00000.*CONSTANTS(:,99).*ALGEBRAIC(:,670))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,670)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,674)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,675)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,159) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,163) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,159);
    ALGEBRAIC(:,161) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,162) = ALGEBRAIC(:,161)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,159);
    ALGEBRAIC(:,160) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,164) = ALGEBRAIC(:,160);
    ALGEBRAIC(:,165) = piecewise({ALGEBRAIC(:,163)==0.00000,  CONSTANTS(:,114).*(exp(ALGEBRAIC(:,162)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,164)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,114).*ALGEBRAIC(:,163))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,163)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,162)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,164)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,234) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,231) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,248) = ALGEBRAIC(:,247)+ALGEBRAIC(:,231)+ALGEBRAIC(:,234);
    ALGEBRAIC(:,232) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,249) = ALGEBRAIC(:,247)+ALGEBRAIC(:,232);
    ALGEBRAIC(:,250) = piecewise({ALGEBRAIC(:,234)==0.00000,  1.00000.*CONSTANTS(:,5).*(exp(ALGEBRAIC(:,248)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,249)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( 1.00000.*CONSTANTS(:,5).*ALGEBRAIC(:,234))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,234)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,248)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,249)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,262) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,259) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,271) = ALGEBRAIC(:,270)+ALGEBRAIC(:,259)+ALGEBRAIC(:,262);
    ALGEBRAIC(:,260) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,272) = ALGEBRAIC(:,270)+ALGEBRAIC(:,260);
    ALGEBRAIC(:,273) = piecewise({ALGEBRAIC(:,262)==0.00000,  1.00000.*CONSTANTS(:,10).*(exp(ALGEBRAIC(:,271)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,272)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( 1.00000.*CONSTANTS(:,10).*ALGEBRAIC(:,262))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,262)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,271)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,272)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,396) =  - ALGEBRAIC(:,390) - ALGEBRAIC(:,392);
    ALGEBRAIC(:,484) = ALGEBRAIC(:,437)+ALGEBRAIC(:,455);
    ALGEBRAIC(:,553) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,535);
    ALGEBRAIC(:,551) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,552) = ALGEBRAIC(:,551)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,535);
    ALGEBRAIC(:,550) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,554) = ALGEBRAIC(:,550);
    ALGEBRAIC(:,555) = piecewise({ALGEBRAIC(:,553)==0.00000,  CONSTANTS(:,117).*(exp(ALGEBRAIC(:,552)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,554)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,117).*ALGEBRAIC(:,553))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,553)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,552)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,554)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,640) =  CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,637) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,654) = ALGEBRAIC(:,653)+ALGEBRAIC(:,637)+ALGEBRAIC(:,640);
    ALGEBRAIC(:,638) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,655) = ALGEBRAIC(:,653)+ALGEBRAIC(:,638);
    ALGEBRAIC(:,656) = piecewise({ALGEBRAIC(:,640)==0.00000,  1.00000.*CONSTANTS(:,131).*(exp(ALGEBRAIC(:,654)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,655)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( 1.00000.*CONSTANTS(:,131).*ALGEBRAIC(:,640))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,640)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,654)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,655)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    RATES(:,8) = (((((((( - ALGEBRAIC(:,214) - ALGEBRAIC(:,178)) - ALGEBRAIC(:,228)) - ALGEBRAIC(:,250)) - ALGEBRAIC(:,273))+ALGEBRAIC(:,396)+ALGEBRAIC(:,484)) - ALGEBRAIC(:,656)) - ALGEBRAIC(:,165)) - ALGEBRAIC(:,555)) - ALGEBRAIC(:,678);
    ALGEBRAIC(:,395) = ALGEBRAIC(:,392)+ALGEBRAIC(:,390);
    ALGEBRAIC(:,483) =  - ALGEBRAIC(:,441) - ALGEBRAIC(:,444);
    RATES(:,9) =  1.00000.*(ALGEBRAIC(:,214)+ALGEBRAIC(:,178)+ALGEBRAIC(:,228)+ALGEBRAIC(:,250)+ALGEBRAIC(:,273)+ALGEBRAIC(:,395)+ALGEBRAIC(:,483)+ALGEBRAIC(:,656)+ALGEBRAIC(:,165)+ALGEBRAIC(:,555)+ALGEBRAIC(:,678));
    ALGEBRAIC(:,671) =  CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,669);
    ALGEBRAIC(:,667) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,169).*STATES(:,6));
    ALGEBRAIC(:,676) = ALGEBRAIC(:,673)+ALGEBRAIC(:,667)+ALGEBRAIC(:,671);
    ALGEBRAIC(:,668) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7));
    ALGEBRAIC(:,677) = ALGEBRAIC(:,673)+ALGEBRAIC(:,668);
    ALGEBRAIC(:,679) = piecewise({ALGEBRAIC(:,671)==0.00000,  1.00000.*CONSTANTS(:,98).*(exp(ALGEBRAIC(:,676)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,677)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( 1.00000.*CONSTANTS(:,98).*ALGEBRAIC(:,671))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,671)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,676)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,677)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,488) =  - ALGEBRAIC(:,460) - (ALGEBRAIC(:,463)+ALGEBRAIC(:,466));
    ALGEBRAIC(:,490) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,169).*STATES(:,6));
    ALGEBRAIC(:,491) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7));
    ALGEBRAIC(:,492) =  CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,1);
    ALGEBRAIC(:,493) = piecewise({ALGEBRAIC(:,492)==0.00000,  CONSTANTS(:,47).*(exp(ALGEBRAIC(:,490)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,491)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,47).*ALGEBRAIC(:,492))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,492)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,490)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,491)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,546) =  CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,535);
    ALGEBRAIC(:,544) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,169).*STATES(:,6));
    ALGEBRAIC(:,545) = ALGEBRAIC(:,544)+ CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,535);
    ALGEBRAIC(:,543) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7));
    ALGEBRAIC(:,547) = ALGEBRAIC(:,543);
    ALGEBRAIC(:,548) = piecewise({ALGEBRAIC(:,546)==0.00000,  CONSTANTS(:,116).*(exp(ALGEBRAIC(:,545)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,547)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,116).*ALGEBRAIC(:,546))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,546)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,545)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,547)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,534) =  CONSTANTS(:,253).*ALGEBRAIC(:,513);
    RATES(:,6) = (((( - ALGEBRAIC(:,156)+ALGEBRAIC(:,488)) - ALGEBRAIC(:,493))+ALGEBRAIC(:,534)) - ALGEBRAIC(:,548)) - ALGEBRAIC(:,679);
    ALGEBRAIC(:,487) = ALGEBRAIC(:,475)+ALGEBRAIC(:,479)+ALGEBRAIC(:,439);
    ALGEBRAIC(:,533) =   - CONSTANTS(:,252).*ALGEBRAIC(:,524);
    RATES(:,7) =  1.00000.*(ALGEBRAIC(:,156)+ALGEBRAIC(:,487)+ALGEBRAIC(:,493)+ALGEBRAIC(:,533)+ALGEBRAIC(:,548)+ALGEBRAIC(:,679));
    ALGEBRAIC(:,672) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,212).*STATES(:,72));
    ALGEBRAIC(:,680) = ALGEBRAIC(:,672)+ CONSTANTS(:,271).*CONSTANTS(:,302).*ALGEBRAIC(:,669);
    ALGEBRAIC(:,681) = ALGEBRAIC(:,673)+ CONSTANTS(:,272).*CONSTANTS(:,302).*ALGEBRAIC(:,669);
    ALGEBRAIC(:,682) =  CONSTANTS(:,100).*(exp(ALGEBRAIC(:,680)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,681)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    RATES(:,72) =  - ALGEBRAIC(:,682);
    RATES(:,73) = ALGEBRAIC(:,682);
    ALGEBRAIC(:,34) = VOI -  floor(VOI./CONSTANTS(:,298)).*CONSTANTS(:,298);
    ALGEBRAIC(:,35) = piecewise({ALGEBRAIC(:,34)>=0.300000&ALGEBRAIC(:,34)<=0.300000+CONSTANTS(:,299), ( 1.00000.*0.0750000.*CONSTANTS(:,288))./CONSTANTS(:,299) }, 0.00000);
    ALGEBRAIC(:,40) =   - CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,39);
    ALGEBRAIC(:,158) =  CONSTANTS(:,302).*(((((((((((((((((((((((((((((  - CONSTANTS(:,254).*ALGEBRAIC(:,156)+ CONSTANTS(:,270).*ALGEBRAIC(:,118)) -  CONSTANTS(:,267).*ALGEBRAIC(:,118)+ CONSTANTS(:,270).*ALGEBRAIC(:,130)) -  CONSTANTS(:,267).*ALGEBRAIC(:,130)+ CONSTANTS(:,270).*ALGEBRAIC(:,124)) -  CONSTANTS(:,267).*ALGEBRAIC(:,124)+ CONSTANTS(:,270).*ALGEBRAIC(:,136)) -  CONSTANTS(:,267).*ALGEBRAIC(:,136)+ CONSTANTS(:,270).*ALGEBRAIC(:,150)) -  CONSTANTS(:,267).*ALGEBRAIC(:,150)+ CONSTANTS(:,268).*ALGEBRAIC(:,86)) -  CONSTANTS(:,265).*ALGEBRAIC(:,86)+ CONSTANTS(:,268).*ALGEBRAIC(:,94)) -  CONSTANTS(:,265).*ALGEBRAIC(:,94)+ CONSTANTS(:,269).*ALGEBRAIC(:,106)) -  CONSTANTS(:,266).*ALGEBRAIC(:,106)+ CONSTANTS(:,269).*ALGEBRAIC(:,110)) -  CONSTANTS(:,266).*ALGEBRAIC(:,110)+ CONSTANTS(:,269).*ALGEBRAIC(:,114)) -  CONSTANTS(:,266).*ALGEBRAIC(:,114)+ CONSTANTS(:,270).*ALGEBRAIC(:,142)) -  CONSTANTS(:,267).*ALGEBRAIC(:,142)+ CONSTANTS(:,268).*ALGEBRAIC(:,90)) -  CONSTANTS(:,265).*ALGEBRAIC(:,90)+ CONSTANTS(:,268).*ALGEBRAIC(:,98)) -  CONSTANTS(:,265).*ALGEBRAIC(:,98)+ CONSTANTS(:,269).*ALGEBRAIC(:,102)) -  CONSTANTS(:,266).*ALGEBRAIC(:,102)+ CONSTANTS(:,270).*ALGEBRAIC(:,121)) -  CONSTANTS(:,267).*ALGEBRAIC(:,121)+ CONSTANTS(:,270).*ALGEBRAIC(:,133)) -  CONSTANTS(:,267).*ALGEBRAIC(:,133)+ CONSTANTS(:,270).*ALGEBRAIC(:,127)) -  CONSTANTS(:,267).*ALGEBRAIC(:,127)+ CONSTANTS(:,270).*ALGEBRAIC(:,139)) -  CONSTANTS(:,267).*ALGEBRAIC(:,139)+ CONSTANTS(:,270).*ALGEBRAIC(:,154)) -  CONSTANTS(:,267).*ALGEBRAIC(:,154)+ CONSTANTS(:,268).*ALGEBRAIC(:,88)) -  CONSTANTS(:,265).*ALGEBRAIC(:,88)+ CONSTANTS(:,268).*ALGEBRAIC(:,96)) -  CONSTANTS(:,265).*ALGEBRAIC(:,96)+ CONSTANTS(:,269).*ALGEBRAIC(:,104)) -  CONSTANTS(:,266).*ALGEBRAIC(:,104)+ CONSTANTS(:,269).*ALGEBRAIC(:,108)) -  CONSTANTS(:,266).*ALGEBRAIC(:,108)+ CONSTANTS(:,269).*ALGEBRAIC(:,112)) -  CONSTANTS(:,266).*ALGEBRAIC(:,112)+ CONSTANTS(:,269).*ALGEBRAIC(:,116)) -  CONSTANTS(:,266).*ALGEBRAIC(:,116)+ CONSTANTS(:,270).*ALGEBRAIC(:,146)) -  CONSTANTS(:,267).*ALGEBRAIC(:,146)+ CONSTANTS(:,268).*ALGEBRAIC(:,92)) -  CONSTANTS(:,265).*ALGEBRAIC(:,92)+ CONSTANTS(:,268).*ALGEBRAIC(:,100)) -  CONSTANTS(:,265).*ALGEBRAIC(:,100));    ALGEBRAIC(:,683) =  CONSTANTS(:,302).*((  - CONSTANTS(:,239).*ALGEBRAIC(:,678)+ CONSTANTS(:,254).*ALGEBRAIC(:,679)+ CONSTANTS(:,272).*ALGEBRAIC(:,682)) -  CONSTANTS(:,271).*ALGEBRAIC(:,682));
    ALGEBRAIC(:,216) =  CONSTANTS(:,302).*((((((((((((((  - CONSTANTS(:,239).*ALGEBRAIC(:,214)+ CONSTANTS(:,286).*ALGEBRAIC(:,208)) -  CONSTANTS(:,284).*ALGEBRAIC(:,208))+ CONSTANTS(:,286).*ALGEBRAIC(:,204)) -  CONSTANTS(:,284).*ALGEBRAIC(:,204))+ CONSTANTS(:,285).*ALGEBRAIC(:,200)) -  CONSTANTS(:,283).*ALGEBRAIC(:,200))+ CONSTANTS(:,285).*ALGEBRAIC(:,196)) -  CONSTANTS(:,283).*ALGEBRAIC(:,196))+ CONSTANTS(:,286).*ALGEBRAIC(:,212)) -  CONSTANTS(:,284).*ALGEBRAIC(:,212))+ CONSTANTS(:,285).*ALGEBRAIC(:,202)) -  CONSTANTS(:,283).*ALGEBRAIC(:,202))+ CONSTANTS(:,285).*ALGEBRAIC(:,198)) -  CONSTANTS(:,283).*ALGEBRAIC(:,198));
    ALGEBRAIC(:,166) =  CONSTANTS(:,302).* - CONSTANTS(:,239).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,180) =  CONSTANTS(:,302).*((  - CONSTANTS(:,239).*ALGEBRAIC(:,178)+ CONSTANTS(:,241).*ALGEBRAIC(:,176)) -  CONSTANTS(:,240).*ALGEBRAIC(:,176));
    ALGEBRAIC(:,230) =  CONSTANTS(:,302).*((  - CONSTANTS(:,239).*ALGEBRAIC(:,228)+ CONSTANTS(:,243).*ALGEBRAIC(:,226)) -  CONSTANTS(:,242).*ALGEBRAIC(:,226));
    ALGEBRAIC(:,258) =  CONSTANTS(:,302).*(  - CONSTANTS(:,239).*ALGEBRAIC(:,250)+ ALGEBRAIC(:,241).*(CONSTANTS(:,245) - CONSTANTS(:,244))+ ALGEBRAIC(:,253).*(CONSTANTS(:,245) - CONSTANTS(:,245))+ ALGEBRAIC(:,245).*(CONSTANTS(:,247) - CONSTANTS(:,246))+ ALGEBRAIC(:,255).*(CONSTANTS(:,247) - CONSTANTS(:,246)));
    ALGEBRAIC(:,278) =  CONSTANTS(:,302).*(  - CONSTANTS(:,239).*ALGEBRAIC(:,273)+ (ALGEBRAIC(:,268)+ALGEBRAIC(:,275)).*(CONSTANTS(:,249) - CONSTANTS(:,248)));
    ALGEBRAIC(:,394) =  CONSTANTS(:,302).*(((((((((((((((((((( CONSTANTS(:,280).*ALGEBRAIC(:,351) -  CONSTANTS(:,275).*ALGEBRAIC(:,351))+ CONSTANTS(:,281).*ALGEBRAIC(:,359) -  CONSTANTS(:,276).*ALGEBRAIC(:,359))+ CONSTANTS(:,279).*ALGEBRAIC(:,347) -  CONSTANTS(:,274).*ALGEBRAIC(:,347))+ CONSTANTS(:,280).*ALGEBRAIC(:,355) -  CONSTANTS(:,275).*ALGEBRAIC(:,355))+ CONSTANTS(:,281).*ALGEBRAIC(:,363) -  CONSTANTS(:,276).*ALGEBRAIC(:,363))+ CONSTANTS(:,279).*ALGEBRAIC(:,343) -  CONSTANTS(:,274).*ALGEBRAIC(:,343))+ CONSTANTS(:,278).*ALGEBRAIC(:,339) -  CONSTANTS(:,273).*ALGEBRAIC(:,339))+ CONSTANTS(:,278).*ALGEBRAIC(:,335) -  CONSTANTS(:,273).*ALGEBRAIC(:,335))+ CONSTANTS(:,278).*ALGEBRAIC(:,331) -  CONSTANTS(:,273).*ALGEBRAIC(:,331))+ CONSTANTS(:,281).*ALGEBRAIC(:,361) -  CONSTANTS(:,276).*ALGEBRAIC(:,361))+ CONSTANTS(:,280).*ALGEBRAIC(:,353) -  CONSTANTS(:,275).*ALGEBRAIC(:,353))+ CONSTANTS(:,279).*ALGEBRAIC(:,345) -  CONSTANTS(:,274).*ALGEBRAIC(:,345))+ CONSTANTS(:,281).*ALGEBRAIC(:,357) -  CONSTANTS(:,276).*ALGEBRAIC(:,357))+ CONSTANTS(:,280).*ALGEBRAIC(:,349) -  CONSTANTS(:,275).*ALGEBRAIC(:,349))+ CONSTANTS(:,279).*ALGEBRAIC(:,341) -  CONSTANTS(:,274).*ALGEBRAIC(:,341))+ CONSTANTS(:,278).*ALGEBRAIC(:,337) -  CONSTANTS(:,273).*ALGEBRAIC(:,337))+ CONSTANTS(:,278).*ALGEBRAIC(:,333) -  CONSTANTS(:,273).*ALGEBRAIC(:,333))+ CONSTANTS(:,278).*ALGEBRAIC(:,329) -  CONSTANTS(:,273).*ALGEBRAIC(:,329)) - ( CONSTANTS(:,238).*ALGEBRAIC(:,385)+ CONSTANTS(:,238).*ALGEBRAIC(:,387))) - ( CONSTANTS(:,239).*ALGEBRAIC(:,390)+ CONSTANTS(:,239).*ALGEBRAIC(:,392)));
    ALGEBRAIC(:,477) =  CONSTANTS(:,256).*ALGEBRAIC(:,475)+ CONSTANTS(:,255).*ALGEBRAIC(:,466);
    ALGEBRAIC(:,494) =   - CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,493);
    ALGEBRAIC(:,542) =  CONSTANTS(:,302).* - CONSTANTS(:,238).*ALGEBRAIC(:,541);
    ALGEBRAIC(:,549) =  CONSTANTS(:,302).* - CONSTANTS(:,254).*ALGEBRAIC(:,548);
    ALGEBRAIC(:,556) =  CONSTANTS(:,302).* - CONSTANTS(:,239).*ALGEBRAIC(:,555);
    ALGEBRAIC(:,528) =  CONSTANTS(:,302).*(  - CONSTANTS(:,250).*ALGEBRAIC(:,527)+ CONSTANTS(:,251).*ALGEBRAIC(:,527));
    ALGEBRAIC(:,563) =   - CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,562);
    ALGEBRAIC(:,635) =  CONSTANTS(:,302).*(  - CONSTANTS(:,238).*ALGEBRAIC(:,622)+ ALGEBRAIC(:,613).*(CONSTANTS(:,259) - CONSTANTS(:,257))+ ALGEBRAIC(:,628).*(CONSTANTS(:,259) - CONSTANTS(:,257))+ ALGEBRAIC(:,617).*(CONSTANTS(:,260) - CONSTANTS(:,258))+ ALGEBRAIC(:,631).*(CONSTANTS(:,260) - CONSTANTS(:,258)));
    ALGEBRAIC(:,664) =  CONSTANTS(:,302).*(  - CONSTANTS(:,239).*ALGEBRAIC(:,656)+ (ALGEBRAIC(:,647)+ALGEBRAIC(:,659)).*(CONSTANTS(:,263) - CONSTANTS(:,261))+ (ALGEBRAIC(:,651)+ALGEBRAIC(:,661)).*(CONSTANTS(:,264) - CONSTANTS(:,262)));
    RATES(:,18) = ALGEBRAIC(:,40)+ALGEBRAIC(:,158)+ALGEBRAIC(:,216)+ALGEBRAIC(:,166)+ALGEBRAIC(:,180)+ALGEBRAIC(:,230)+ALGEBRAIC(:,258)+ALGEBRAIC(:,278)+ALGEBRAIC(:,394)+ALGEBRAIC(:,494)+ALGEBRAIC(:,477)+ALGEBRAIC(:,528)+ALGEBRAIC(:,542)+ALGEBRAIC(:,563)+ALGEBRAIC(:,635)+ALGEBRAIC(:,664)+ALGEBRAIC(:,35)+ALGEBRAIC(:,549)+ALGEBRAIC(:,556)+ALGEBRAIC(:,683);
   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(:,44) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,137).*STATES(:,4));
    ALGEBRAIC(:,47) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,48) = ALGEBRAIC(:,47)+ALGEBRAIC(:,44);
    ALGEBRAIC(:,45) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,138).*STATES(:,5));
    ALGEBRAIC(:,46) = ALGEBRAIC(:,45);
    ALGEBRAIC(:,49) =  CONSTANTS(:,1).*(exp(ALGEBRAIC(:,48)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,46)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,50) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,55) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,196).*STATES(:,56))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,85) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,200).*STATES(:,60))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,86) =  CONSTANTS(:,82).*(exp(ALGEBRAIC(:,55)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,85)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,63) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,196).*STATES(:,56))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,101) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,204).*STATES(:,64))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,102) =  CONSTANTS(:,90).*(exp(ALGEBRAIC(:,63)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,101)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,71) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,196).*STATES(:,56))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,117) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,197).*STATES(:,57))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,118) =  CONSTANTS(:,70).*(exp(ALGEBRAIC(:,71)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,117)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,119) = ( - ALGEBRAIC(:,118) - ALGEBRAIC(:,86)) - ALGEBRAIC(:,102);
    ALGEBRAIC(:,56) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,204).*STATES(:,64))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,87) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,208).*STATES(:,68))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,88) =  CONSTANTS(:,83).*(exp(ALGEBRAIC(:,56)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,87)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,72) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,204).*STATES(:,64))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,120) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,205).*STATES(:,65))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,121) =  CONSTANTS(:,71).*(exp(ALGEBRAIC(:,72)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,120)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,122) = ( - ALGEBRAIC(:,121) - ALGEBRAIC(:,88)) -  - ALGEBRAIC(:,102);
    ALGEBRAIC(:,64) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,200).*STATES(:,60))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,103) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,208).*STATES(:,68))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,104) =  CONSTANTS(:,91).*(exp(ALGEBRAIC(:,64)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,103)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,73) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,200).*STATES(:,60))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,123) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,201).*STATES(:,61))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,124) =  CONSTANTS(:,72).*(exp(ALGEBRAIC(:,73)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,123)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,125) = ( - ALGEBRAIC(:,124)+ALGEBRAIC(:,86)) - ALGEBRAIC(:,104);
    ALGEBRAIC(:,74) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,208).*STATES(:,68))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,126) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,209).*STATES(:,69))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,127) =  CONSTANTS(:,73).*(exp(ALGEBRAIC(:,74)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,126)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,128) = ( - ALGEBRAIC(:,127)+ALGEBRAIC(:,88)) -  - ALGEBRAIC(:,104);
    ALGEBRAIC(:,57) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,197).*STATES(:,57))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,89) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,201).*STATES(:,61))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,90) =  CONSTANTS(:,84).*(exp(ALGEBRAIC(:,57)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,89)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,65) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,197).*STATES(:,57))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,105) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,205).*STATES(:,65))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,106) =  CONSTANTS(:,92).*(exp(ALGEBRAIC(:,65)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,105)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,75) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,197).*STATES(:,57))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,129) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,198).*STATES(:,58))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,130) =  CONSTANTS(:,74).*(exp(ALGEBRAIC(:,75)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,129)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,131) = ((ALGEBRAIC(:,118) - ALGEBRAIC(:,130)) - ALGEBRAIC(:,90)) - ALGEBRAIC(:,106);
    ALGEBRAIC(:,58) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,205).*STATES(:,65))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,91) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,209).*STATES(:,69))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,92) =  CONSTANTS(:,85).*(exp(ALGEBRAIC(:,58)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,91)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,76) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,205).*STATES(:,65))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,132) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,206).*STATES(:,66))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,133) =  CONSTANTS(:,75).*(exp(ALGEBRAIC(:,76)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,132)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,134) = ((ALGEBRAIC(:,121) - ALGEBRAIC(:,133)) - ALGEBRAIC(:,92)) -  - ALGEBRAIC(:,106);
    ALGEBRAIC(:,66) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,201).*STATES(:,61))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,107) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,209).*STATES(:,69))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,108) =  CONSTANTS(:,93).*(exp(ALGEBRAIC(:,66)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,107)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,77) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,201).*STATES(:,61))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,135) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,202).*STATES(:,62))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,136) =  CONSTANTS(:,76).*(exp(ALGEBRAIC(:,77)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,135)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,137) = ((ALGEBRAIC(:,124) - ALGEBRAIC(:,136))+ALGEBRAIC(:,90)) - ALGEBRAIC(:,108);
    ALGEBRAIC(:,78) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,209).*STATES(:,69))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,138) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,210).*STATES(:,70))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,139) =  CONSTANTS(:,77).*(exp(ALGEBRAIC(:,78)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,138)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,140) = ((ALGEBRAIC(:,127) - ALGEBRAIC(:,139))+ALGEBRAIC(:,92)) -  - ALGEBRAIC(:,108);
    ALGEBRAIC(:,59) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,198).*STATES(:,58))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,93) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,202).*STATES(:,62))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,94) =  CONSTANTS(:,86).*(exp(ALGEBRAIC(:,59)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,93)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,67) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,198).*STATES(:,58))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,109) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,206).*STATES(:,66))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,110) =  CONSTANTS(:,94).*(exp(ALGEBRAIC(:,67)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,109)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,79) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,198).*STATES(:,58))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,141) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,199).*STATES(:,59))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,142) =  CONSTANTS(:,78).*(exp(ALGEBRAIC(:,79)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,141)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,143) = ((ALGEBRAIC(:,130) - ALGEBRAIC(:,142)) - ALGEBRAIC(:,94)) - ALGEBRAIC(:,110);
    ALGEBRAIC(:,61) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,199).*STATES(:,59))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,97) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,203).*STATES(:,63))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,98) =  CONSTANTS(:,88).*(exp(ALGEBRAIC(:,61)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,97)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,69) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,199).*STATES(:,59))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,113) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,207).*STATES(:,67))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,114) =  CONSTANTS(:,96).*(exp(ALGEBRAIC(:,69)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,113)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,144) = (ALGEBRAIC(:,142) - ALGEBRAIC(:,98)) - ALGEBRAIC(:,114);
    ALGEBRAIC(:,60) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,206).*STATES(:,66))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,95) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,210).*STATES(:,70))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,96) =  CONSTANTS(:,87).*(exp(ALGEBRAIC(:,60)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,95)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,80) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,206).*STATES(:,66))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,145) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,207).*STATES(:,67))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,146) =  CONSTANTS(:,79).*(exp(ALGEBRAIC(:,80)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,145)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,147) = ((ALGEBRAIC(:,133) - ALGEBRAIC(:,146)) - ALGEBRAIC(:,96)) -  - ALGEBRAIC(:,110);
    ALGEBRAIC(:,62) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,207).*STATES(:,67))+ CONSTANTS(:,265).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,99) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,211).*STATES(:,71))+ CONSTANTS(:,268).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,100) =  CONSTANTS(:,89).*(exp(ALGEBRAIC(:,62)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,99)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,148) = (ALGEBRAIC(:,146) - ALGEBRAIC(:,100)) -  - ALGEBRAIC(:,114);
    ALGEBRAIC(:,68) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,202).*STATES(:,62))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,111) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,210).*STATES(:,70))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,112) =  CONSTANTS(:,95).*(exp(ALGEBRAIC(:,68)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,111)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,81) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,202).*STATES(:,62))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,149) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,203).*STATES(:,63))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,150) =  CONSTANTS(:,80).*(exp(ALGEBRAIC(:,81)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,149)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,151) = ((ALGEBRAIC(:,136) - ALGEBRAIC(:,150))+ALGEBRAIC(:,94)) - ALGEBRAIC(:,112);
    ALGEBRAIC(:,70) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,203).*STATES(:,63))+ CONSTANTS(:,266).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,115) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,211).*STATES(:,71))+ CONSTANTS(:,269).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,116) =  CONSTANTS(:,97).*(exp(ALGEBRAIC(:,70)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,115)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,152) = (ALGEBRAIC(:,150)+ALGEBRAIC(:,98)) - ALGEBRAIC(:,116);
    ALGEBRAIC(:,82) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,210).*STATES(:,70))+ CONSTANTS(:,267).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,153) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,211).*STATES(:,71))+ CONSTANTS(:,270).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,154) =  CONSTANTS(:,81).*(exp(ALGEBRAIC(:,82)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,153)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,155) = ((ALGEBRAIC(:,139) - ALGEBRAIC(:,154))+ALGEBRAIC(:,96)) -  - ALGEBRAIC(:,112);
    ALGEBRAIC(:,83) =  CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,50);
    ALGEBRAIC(:,52) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,169).*STATES(:,6));
    ALGEBRAIC(:,53) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,211).*STATES(:,71));
    ALGEBRAIC(:,54) = ALGEBRAIC(:,52)+ CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,50)+ALGEBRAIC(:,53);
    ALGEBRAIC(:,51) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7));
    ALGEBRAIC(:,84) = ALGEBRAIC(:,51)+ALGEBRAIC(:,53);
    ALGEBRAIC(:,156) = piecewise({ALGEBRAIC(:,83)==0.00000,  CONSTANTS(:,69).*(exp(ALGEBRAIC(:,54)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,84)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,69).*ALGEBRAIC(:,83))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,83)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,54)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,84)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,157) = (ALGEBRAIC(:,154)+ALGEBRAIC(:,100)) - (( - ALGEBRAIC(:,116)+ALGEBRAIC(:,156)) - ALGEBRAIC(:,156));
    ALGEBRAIC(:,167) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,172) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,142).*STATES(:,25))+ CONSTANTS(:,240).*CONSTANTS(:,302).*ALGEBRAIC(:,167);
    ALGEBRAIC(:,175) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,143).*STATES(:,26))+ CONSTANTS(:,241).*CONSTANTS(:,302).*ALGEBRAIC(:,167);
    ALGEBRAIC(:,176) =  CONSTANTS(:,4).*(exp(ALGEBRAIC(:,172)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,175)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,177) =  - ALGEBRAIC(:,176);
    ALGEBRAIC(:,173) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,167);
    ALGEBRAIC(:,168) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,169) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,170) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,143).*STATES(:,26));
    ALGEBRAIC(:,171) = ALGEBRAIC(:,169)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,167)+ALGEBRAIC(:,170)+ CONSTANTS(:,282).*ALGEBRAIC(:,168);
    ALGEBRAIC(:,174) = ALGEBRAIC(:,168)+ALGEBRAIC(:,170)+ CONSTANTS(:,282).*ALGEBRAIC(:,168);
    ALGEBRAIC(:,178) = piecewise({ALGEBRAIC(:,173)==0.00000,  CONSTANTS(:,3).*(exp(ALGEBRAIC(:,171)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,174)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,3).*ALGEBRAIC(:,173))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,173)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,171)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,174)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,179) = ALGEBRAIC(:,176) - (ALGEBRAIC(:,178) - ALGEBRAIC(:,178));
    ALGEBRAIC(:,181) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,186) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,217).*STATES(:,19))+ CONSTANTS(:,283).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,195) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,218).*STATES(:,20))+ CONSTANTS(:,285).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,196) =  CONSTANTS(:,105).*(exp(ALGEBRAIC(:,186)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,195)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,190) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,217).*STATES(:,19))+ CONSTANTS(:,284).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,203) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,220).*STATES(:,22))+ CONSTANTS(:,286).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,204) =  CONSTANTS(:,109).*(exp(ALGEBRAIC(:,190)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,203)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,205) =  - ALGEBRAIC(:,196) - ALGEBRAIC(:,204);
    ALGEBRAIC(:,187) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,220).*STATES(:,22))+ CONSTANTS(:,283).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,197) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,221).*STATES(:,23))+ CONSTANTS(:,285).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,198) =  CONSTANTS(:,107).*(exp(ALGEBRAIC(:,187)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,197)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,206) =  - ALGEBRAIC(:,198)+ALGEBRAIC(:,204);
    ALGEBRAIC(:,188) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,218).*STATES(:,20))+ CONSTANTS(:,283).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,199) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,219).*STATES(:,21))+ CONSTANTS(:,285).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,200) =  CONSTANTS(:,106).*(exp(ALGEBRAIC(:,188)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,199)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,191) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,218).*STATES(:,20))+ CONSTANTS(:,284).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,207) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,221).*STATES(:,23))+ CONSTANTS(:,286).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,208) =  CONSTANTS(:,110).*(exp(ALGEBRAIC(:,191)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,207)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,209) = (ALGEBRAIC(:,196) - ALGEBRAIC(:,200)) - ALGEBRAIC(:,208);
    ALGEBRAIC(:,189) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,221).*STATES(:,23))+ CONSTANTS(:,283).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,201) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,222).*STATES(:,24))+ CONSTANTS(:,285).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,202) =  CONSTANTS(:,108).*(exp(ALGEBRAIC(:,189)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,201)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,210) = (ALGEBRAIC(:,198) - ALGEBRAIC(:,202))+ALGEBRAIC(:,208);
    ALGEBRAIC(:,192) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,219).*STATES(:,21))+ CONSTANTS(:,284).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,211) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,222).*STATES(:,24))+ CONSTANTS(:,286).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,212) =  CONSTANTS(:,111).*(exp(ALGEBRAIC(:,192)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,211)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,213) = ALGEBRAIC(:,200) - ALGEBRAIC(:,212);
    ALGEBRAIC(:,193) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,181);
    ALGEBRAIC(:,182) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,183) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,184) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,222).*STATES(:,24));
    ALGEBRAIC(:,185) = ALGEBRAIC(:,183)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,181)+ALGEBRAIC(:,184)+ CONSTANTS(:,282).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,194) = ALGEBRAIC(:,182)+ALGEBRAIC(:,184)+ CONSTANTS(:,282).*ALGEBRAIC(:,182);
    ALGEBRAIC(:,214) = piecewise({ALGEBRAIC(:,193)==0.00000,  CONSTANTS(:,104).*(exp(ALGEBRAIC(:,185)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,194)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,104).*ALGEBRAIC(:,193))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,193)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,185)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,194)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,215) = (ALGEBRAIC(:,202)+ALGEBRAIC(:,212)) - (ALGEBRAIC(:,214) - ALGEBRAIC(:,214));
    ALGEBRAIC(:,217) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,222) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,223).*STATES(:,27))+ CONSTANTS(:,242).*CONSTANTS(:,302).*ALGEBRAIC(:,217);
    ALGEBRAIC(:,225) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,224).*STATES(:,28))+ CONSTANTS(:,243).*CONSTANTS(:,302).*ALGEBRAIC(:,217);
    ALGEBRAIC(:,226) =  CONSTANTS(:,113).*(exp(ALGEBRAIC(:,222)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,225)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,227) =  - ALGEBRAIC(:,226);
    ALGEBRAIC(:,223) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,217);
    ALGEBRAIC(:,219) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,220) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,224).*STATES(:,28));
    ALGEBRAIC(:,221) = ALGEBRAIC(:,219)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,217)+ALGEBRAIC(:,220);
    ALGEBRAIC(:,218) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,224) = ALGEBRAIC(:,218)+ALGEBRAIC(:,220);
    ALGEBRAIC(:,228) = piecewise({ALGEBRAIC(:,223)==0.00000,  CONSTANTS(:,112).*(exp(ALGEBRAIC(:,221)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,224)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,112).*ALGEBRAIC(:,223))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,223)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,221)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,224)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,229) = ALGEBRAIC(:,226) - (ALGEBRAIC(:,228) - ALGEBRAIC(:,228));
    ALGEBRAIC(:,233) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,235) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,144).*STATES(:,29));
    ALGEBRAIC(:,236) = ALGEBRAIC(:,235)+ CONSTANTS(:,244).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,238) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,145).*STATES(:,30));
    ALGEBRAIC(:,239) = ALGEBRAIC(:,238)+ CONSTANTS(:,245).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,241) =  CONSTANTS(:,6).*(exp(ALGEBRAIC(:,236)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,239)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,237) = ALGEBRAIC(:,235)+ CONSTANTS(:,246).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,242) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,146).*STATES(:,31));
    ALGEBRAIC(:,244) = ALGEBRAIC(:,242)+ CONSTANTS(:,247).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,245) =  CONSTANTS(:,8).*(exp(ALGEBRAIC(:,237)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,244)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,246) =  - ALGEBRAIC(:,241) - ALGEBRAIC(:,245);
    ALGEBRAIC(:,243) = ALGEBRAIC(:,242)+ CONSTANTS(:,244).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,247) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,147).*STATES(:,32));
    ALGEBRAIC(:,251) = ALGEBRAIC(:,247)+ CONSTANTS(:,245).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,253) =  CONSTANTS(:,7).*(exp(ALGEBRAIC(:,243)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,251)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,254) = ALGEBRAIC(:,245) - ALGEBRAIC(:,253);
    ALGEBRAIC(:,240) = ALGEBRAIC(:,238)+ CONSTANTS(:,246).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,252) = ALGEBRAIC(:,247)+ CONSTANTS(:,247).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,255) =  CONSTANTS(:,9).*(exp(ALGEBRAIC(:,240)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,252)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,256) = ALGEBRAIC(:,241) - ALGEBRAIC(:,255);
    ALGEBRAIC(:,257) = ALGEBRAIC(:,253)+ALGEBRAIC(:,255);
    ALGEBRAIC(:,261) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,263) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,148).*STATES(:,33));
    ALGEBRAIC(:,264) = ALGEBRAIC(:,263)+ CONSTANTS(:,248).*CONSTANTS(:,302).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,265) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,149).*STATES(:,34));
    ALGEBRAIC(:,266) = ALGEBRAIC(:,265)+ CONSTANTS(:,249).*CONSTANTS(:,302).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,268) =  CONSTANTS(:,11).*(exp(ALGEBRAIC(:,264)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,266)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,269) =  - ALGEBRAIC(:,268);
    ALGEBRAIC(:,267) = ALGEBRAIC(:,265)+ CONSTANTS(:,248).*CONSTANTS(:,302).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,270) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,150).*STATES(:,35));
    ALGEBRAIC(:,274) = ALGEBRAIC(:,270)+ CONSTANTS(:,249).*CONSTANTS(:,302).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,275) =  CONSTANTS(:,12).*(exp(ALGEBRAIC(:,267)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,274)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,276) = ALGEBRAIC(:,268) - ALGEBRAIC(:,275);
    ALGEBRAIC(:,277) = ALGEBRAIC(:,275);
    ALGEBRAIC(:,284) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,151).*STATES(:,36));
    ALGEBRAIC(:,314) = ALGEBRAIC(:,284);
    ALGEBRAIC(:,281) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,364) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,157).*STATES(:,42))+ CONSTANTS(:,277).*ALGEBRAIC(:,281);
    ALGEBRAIC(:,365) =  CONSTANTS(:,35).*(exp(ALGEBRAIC(:,314)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,364)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,279) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,296) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,151).*STATES(:,36))+ CONSTANTS(:,273).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,328) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,154).*STATES(:,39))+ CONSTANTS(:,278).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,329) =  CONSTANTS(:,17).*(exp(ALGEBRAIC(:,296)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,328)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,302) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,151).*STATES(:,36))+ CONSTANTS(:,274).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,340) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,152).*STATES(:,37))+ CONSTANTS(:,279).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,341) =  CONSTANTS(:,23).*(exp(ALGEBRAIC(:,302)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,340)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,306) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,151).*STATES(:,36))+ CONSTANTS(:,275).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,348) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,153).*STATES(:,38))+ CONSTANTS(:,280).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,349) =  CONSTANTS(:,27).*(exp(ALGEBRAIC(:,306)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,348)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,367) = (( - ALGEBRAIC(:,329) - ALGEBRAIC(:,341)) - ALGEBRAIC(:,349)) - ALGEBRAIC(:,365);
    ALGEBRAIC(:,297) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,157).*STATES(:,42))+ CONSTANTS(:,273).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,330) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,160).*STATES(:,45))+ CONSTANTS(:,278).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,331) =  CONSTANTS(:,20).*(exp(ALGEBRAIC(:,297)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,330)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,303) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,157).*STATES(:,42))+ CONSTANTS(:,274).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,342) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,158).*STATES(:,43))+ CONSTANTS(:,279).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,343) =  CONSTANTS(:,25).*(exp(ALGEBRAIC(:,303)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,342)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,307) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,157).*STATES(:,42))+ CONSTANTS(:,275).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,350) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,159).*STATES(:,44))+ CONSTANTS(:,280).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,351) =  CONSTANTS(:,29).*(exp(ALGEBRAIC(:,307)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,350)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,368) = (( - ALGEBRAIC(:,331) - ALGEBRAIC(:,343)) - ALGEBRAIC(:,351)) -  - ALGEBRAIC(:,365);
    ALGEBRAIC(:,285) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,152).*STATES(:,37));
    ALGEBRAIC(:,315) = ALGEBRAIC(:,285);
    ALGEBRAIC(:,366) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,158).*STATES(:,43))+ CONSTANTS(:,277).*ALGEBRAIC(:,281);
    ALGEBRAIC(:,369) =  CONSTANTS(:,37).*(exp(ALGEBRAIC(:,315)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,366)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,298) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,152).*STATES(:,37))+ CONSTANTS(:,273).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,332) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,155).*STATES(:,40))+ CONSTANTS(:,278).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,333) =  CONSTANTS(:,18).*(exp(ALGEBRAIC(:,298)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,332)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,310) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,152).*STATES(:,37))+ CONSTANTS(:,276).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,356) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,153).*STATES(:,38))+ CONSTANTS(:,281).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,357) =  CONSTANTS(:,31).*(exp(ALGEBRAIC(:,310)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,356)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,371) = (( - ALGEBRAIC(:,333)+ALGEBRAIC(:,341)) - ALGEBRAIC(:,369)) - ALGEBRAIC(:,357);
    ALGEBRAIC(:,299) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,158).*STATES(:,43))+ CONSTANTS(:,273).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,334) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,161).*STATES(:,46))+ CONSTANTS(:,278).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,335) =  CONSTANTS(:,21).*(exp(ALGEBRAIC(:,299)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,334)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,311) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,158).*STATES(:,43))+ CONSTANTS(:,276).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,358) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,159).*STATES(:,44))+ CONSTANTS(:,281).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,359) =  CONSTANTS(:,33).*(exp(ALGEBRAIC(:,311)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,358)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,372) = (( - ALGEBRAIC(:,335)+ALGEBRAIC(:,343)) -  - ALGEBRAIC(:,369)) - ALGEBRAIC(:,359);
    ALGEBRAIC(:,286) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,153).*STATES(:,38));
    ALGEBRAIC(:,316) = ALGEBRAIC(:,286);
    ALGEBRAIC(:,370) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,159).*STATES(:,44))+ CONSTANTS(:,277).*ALGEBRAIC(:,281);
    ALGEBRAIC(:,373) =  CONSTANTS(:,39).*(exp(ALGEBRAIC(:,316)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,370)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,300) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,153).*STATES(:,38))+ CONSTANTS(:,273).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,336) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,156).*STATES(:,41))+ CONSTANTS(:,278).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,337) =  CONSTANTS(:,19).*(exp(ALGEBRAIC(:,300)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,336)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,375) = (( - ALGEBRAIC(:,337)+ALGEBRAIC(:,349)) - ALGEBRAIC(:,373))+ALGEBRAIC(:,357);
    ALGEBRAIC(:,301) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,159).*STATES(:,44))+ CONSTANTS(:,273).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,338) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,162).*STATES(:,47))+ CONSTANTS(:,278).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,339) =  CONSTANTS(:,22).*(exp(ALGEBRAIC(:,301)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,338)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,376) = (( - ALGEBRAIC(:,339)+ALGEBRAIC(:,351)) -  - ALGEBRAIC(:,373))+ALGEBRAIC(:,359);
    ALGEBRAIC(:,287) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,154).*STATES(:,39));
    ALGEBRAIC(:,317) = ALGEBRAIC(:,287);
    ALGEBRAIC(:,374) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,160).*STATES(:,45))+ CONSTANTS(:,277).*ALGEBRAIC(:,281);
    ALGEBRAIC(:,377) =  CONSTANTS(:,36).*(exp(ALGEBRAIC(:,317)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,374)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,304) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,154).*STATES(:,39))+ CONSTANTS(:,274).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,344) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,155).*STATES(:,40))+ CONSTANTS(:,279).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,345) =  CONSTANTS(:,24).*(exp(ALGEBRAIC(:,304)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,344)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,308) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,154).*STATES(:,39))+ CONSTANTS(:,275).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,352) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,156).*STATES(:,41))+ CONSTANTS(:,280).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,353) =  CONSTANTS(:,28).*(exp(ALGEBRAIC(:,308)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,352)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,379) = (( - ALGEBRAIC(:,353)+ALGEBRAIC(:,329)) - ALGEBRAIC(:,345)) - ALGEBRAIC(:,377);
    ALGEBRAIC(:,305) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,160).*STATES(:,45))+ CONSTANTS(:,274).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,346) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,161).*STATES(:,46))+ CONSTANTS(:,279).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,347) =  CONSTANTS(:,26).*(exp(ALGEBRAIC(:,305)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,346)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,309) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,160).*STATES(:,45))+ CONSTANTS(:,275).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,354) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,162).*STATES(:,47))+ CONSTANTS(:,280).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,355) =  CONSTANTS(:,30).*(exp(ALGEBRAIC(:,309)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,354)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,380) = (( - ALGEBRAIC(:,355)+ALGEBRAIC(:,331)) - ALGEBRAIC(:,347)) -  - ALGEBRAIC(:,377);
    ALGEBRAIC(:,288) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,155).*STATES(:,40));
    ALGEBRAIC(:,318) = ALGEBRAIC(:,288);
    ALGEBRAIC(:,378) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,161).*STATES(:,46))+ CONSTANTS(:,277).*ALGEBRAIC(:,281);
    ALGEBRAIC(:,381) =  CONSTANTS(:,38).*(exp(ALGEBRAIC(:,318)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,378)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,312) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,155).*STATES(:,40))+ CONSTANTS(:,276).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,360) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,156).*STATES(:,41))+ CONSTANTS(:,281).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,361) =  CONSTANTS(:,32).*(exp(ALGEBRAIC(:,312)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,360)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,383) = ((ALGEBRAIC(:,345)+ALGEBRAIC(:,333)) - ALGEBRAIC(:,381)) - ALGEBRAIC(:,361);
    ALGEBRAIC(:,290) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,156).*STATES(:,41));
    ALGEBRAIC(:,319) = ALGEBRAIC(:,290);
    ALGEBRAIC(:,382) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,162).*STATES(:,47))+ CONSTANTS(:,277).*ALGEBRAIC(:,281);
    ALGEBRAIC(:,384) =  CONSTANTS(:,40).*(exp(ALGEBRAIC(:,319)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,382)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,386) = ((ALGEBRAIC(:,353)+ALGEBRAIC(:,337)) - ALGEBRAIC(:,384))+ALGEBRAIC(:,361);
    ALGEBRAIC(:,289) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,161).*STATES(:,46));
    ALGEBRAIC(:,292) = ALGEBRAIC(:,281)+ CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,279)+ALGEBRAIC(:,289);
    ALGEBRAIC(:,280) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,139).*STATES(:,2));
    ALGEBRAIC(:,324) = ALGEBRAIC(:,280)+ALGEBRAIC(:,289);
    ALGEBRAIC(:,320) =  CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,385) = piecewise({ALGEBRAIC(:,320)==0.00000,  CONSTANTS(:,13).*(exp(ALGEBRAIC(:,292)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,324)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,13).*ALGEBRAIC(:,320))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,320)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,292)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,324)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,283) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,294) = ALGEBRAIC(:,283)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,279)+ALGEBRAIC(:,289);
    ALGEBRAIC(:,282) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,326) = ALGEBRAIC(:,282)+ALGEBRAIC(:,289);
    ALGEBRAIC(:,322) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,390) = piecewise({ALGEBRAIC(:,322)==0.00000,  CONSTANTS(:,15).*(exp(ALGEBRAIC(:,294)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,326)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,15).*ALGEBRAIC(:,322))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,322)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,294)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,326)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,313) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,161).*STATES(:,46))+ CONSTANTS(:,276).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,362) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,162).*STATES(:,47))+ CONSTANTS(:,281).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,363) =  CONSTANTS(:,34).*(exp(ALGEBRAIC(:,313)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,362)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,391) = ((ALGEBRAIC(:,347)+ALGEBRAIC(:,335)) - (((( - ALGEBRAIC(:,381)+ALGEBRAIC(:,385)) - ALGEBRAIC(:,385))+ALGEBRAIC(:,390)) - ALGEBRAIC(:,390))) - ALGEBRAIC(:,363);
    ALGEBRAIC(:,291) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,162).*STATES(:,47));
    ALGEBRAIC(:,293) = ALGEBRAIC(:,281)+ CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,279)+ALGEBRAIC(:,291);
    ALGEBRAIC(:,325) = ALGEBRAIC(:,280)+ALGEBRAIC(:,291);
    ALGEBRAIC(:,321) =  CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,387) = piecewise({ALGEBRAIC(:,321)==0.00000,  CONSTANTS(:,14).*(exp(ALGEBRAIC(:,293)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,325)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,14).*ALGEBRAIC(:,321))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,321)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,293)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,325)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,295) = ALGEBRAIC(:,283)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,279)+ALGEBRAIC(:,291);
    ALGEBRAIC(:,327) = ALGEBRAIC(:,282)+ALGEBRAIC(:,291);
    ALGEBRAIC(:,323) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,279);
    ALGEBRAIC(:,392) = piecewise({ALGEBRAIC(:,323)==0.00000,  CONSTANTS(:,16).*(exp(ALGEBRAIC(:,295)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,327)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,16).*ALGEBRAIC(:,323))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,323)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,295)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,327)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,393) = ((ALGEBRAIC(:,355)+ALGEBRAIC(:,339)) - (((( - ALGEBRAIC(:,384)+ALGEBRAIC(:,387)) - ALGEBRAIC(:,387))+ALGEBRAIC(:,392)) - ALGEBRAIC(:,392)))+ALGEBRAIC(:,363);
    ALGEBRAIC(:,406) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,180).*STATES(:,83));
    ALGEBRAIC(:,422) = ALGEBRAIC(:,406);
    ALGEBRAIC(:,403) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7));
    ALGEBRAIC(:,407) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,181).*STATES(:,84));
    ALGEBRAIC(:,438) = ALGEBRAIC(:,403)+ALGEBRAIC(:,407);
    ALGEBRAIC(:,439) =  CONSTANTS(:,57).*(exp(ALGEBRAIC(:,422)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,438)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,399) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,423) = ALGEBRAIC(:,407)+ALGEBRAIC(:,399);
    ALGEBRAIC(:,408) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,182).*STATES(:,85));
    ALGEBRAIC(:,440) = ALGEBRAIC(:,408);
    ALGEBRAIC(:,441) =  CONSTANTS(:,58).*(exp(ALGEBRAIC(:,423)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,440)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,442) = ALGEBRAIC(:,439) - ALGEBRAIC(:,441);
    ALGEBRAIC(:,424) = ALGEBRAIC(:,408)+ALGEBRAIC(:,399);
    ALGEBRAIC(:,409) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,183).*STATES(:,86));
    ALGEBRAIC(:,443) = ALGEBRAIC(:,409);
    ALGEBRAIC(:,444) =  CONSTANTS(:,59).*(exp(ALGEBRAIC(:,424)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,443)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,445) =  - ALGEBRAIC(:,444)+ALGEBRAIC(:,441);
    ALGEBRAIC(:,425) = ALGEBRAIC(:,409);
    ALGEBRAIC(:,398) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,189).*STATES(:,13));
    ALGEBRAIC(:,420) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,188).*STATES(:,12));
    ALGEBRAIC(:,410) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,184).*STATES(:,75));
    ALGEBRAIC(:,446) = ALGEBRAIC(:,398)+ALGEBRAIC(:,420)+ALGEBRAIC(:,410);
    ALGEBRAIC(:,447) =  CONSTANTS(:,60).*(exp(ALGEBRAIC(:,425)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,446)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,448) = ALGEBRAIC(:,444) - ALGEBRAIC(:,447);
    ALGEBRAIC(:,402) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,186).*STATES(:,10));
    ALGEBRAIC(:,426) = ALGEBRAIC(:,410)+ALGEBRAIC(:,402);
    ALGEBRAIC(:,411) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,185).*STATES(:,76));
    ALGEBRAIC(:,449) = ALGEBRAIC(:,411);
    ALGEBRAIC(:,450) =  CONSTANTS(:,61).*(exp(ALGEBRAIC(:,426)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,449)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,451) =  - ALGEBRAIC(:,450)+ALGEBRAIC(:,447);
    ALGEBRAIC(:,427) = ALGEBRAIC(:,411);
    ALGEBRAIC(:,405) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,171).*STATES(:,77));
    ALGEBRAIC(:,452) = ALGEBRAIC(:,405);
    ALGEBRAIC(:,454) =  CONSTANTS(:,62).*(exp(ALGEBRAIC(:,427)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,452)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,456) = ALGEBRAIC(:,450) - ALGEBRAIC(:,454);
    ALGEBRAIC(:,421) = ALGEBRAIC(:,405);
    ALGEBRAIC(:,400) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,412) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,172).*STATES(:,78));
    ALGEBRAIC(:,436) = ALGEBRAIC(:,400)+ALGEBRAIC(:,412);
    ALGEBRAIC(:,437) =  CONSTANTS(:,48).*(exp(ALGEBRAIC(:,421)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,436)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,457) =  - ALGEBRAIC(:,437)+ALGEBRAIC(:,454);
    ALGEBRAIC(:,428) = ALGEBRAIC(:,412);
    ALGEBRAIC(:,413) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,173).*STATES(:,79));
    ALGEBRAIC(:,453) = ALGEBRAIC(:,413)+ALGEBRAIC(:,400);
    ALGEBRAIC(:,455) =  CONSTANTS(:,49).*(exp(ALGEBRAIC(:,428)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,453)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,458) =  - ALGEBRAIC(:,455)+ALGEBRAIC(:,437);
    ALGEBRAIC(:,404) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,169).*STATES(:,6));
    ALGEBRAIC(:,429) = ALGEBRAIC(:,413)+ALGEBRAIC(:,404);
    ALGEBRAIC(:,414) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,174).*STATES(:,80));
    ALGEBRAIC(:,459) = ALGEBRAIC(:,414);
    ALGEBRAIC(:,460) =  CONSTANTS(:,50).*(exp(ALGEBRAIC(:,429)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,459)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,461) = ALGEBRAIC(:,455) - ALGEBRAIC(:,460);
    ALGEBRAIC(:,430) = ALGEBRAIC(:,414)+ALGEBRAIC(:,404);
    ALGEBRAIC(:,415) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,175).*STATES(:,81));
    ALGEBRAIC(:,462) = ALGEBRAIC(:,415);
    ALGEBRAIC(:,463) =  CONSTANTS(:,51).*(exp(ALGEBRAIC(:,430)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,462)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,464) = ALGEBRAIC(:,460) - ALGEBRAIC(:,463);
    ALGEBRAIC(:,431) = ALGEBRAIC(:,415)+ALGEBRAIC(:,404);
    ALGEBRAIC(:,397) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,465) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,176).*STATES(:,82))+ CONSTANTS(:,255).*ALGEBRAIC(:,397);
    ALGEBRAIC(:,466) =  CONSTANTS(:,52).*(exp(ALGEBRAIC(:,431)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,465)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,467) = ALGEBRAIC(:,463) - ALGEBRAIC(:,466);
    ALGEBRAIC(:,416) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,176).*STATES(:,82));
    ALGEBRAIC(:,432) = ALGEBRAIC(:,416);
    ALGEBRAIC(:,401) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,187).*STATES(:,11));
    ALGEBRAIC(:,417) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,177).*STATES(:,74));
    ALGEBRAIC(:,468) = ALGEBRAIC(:,417)+ALGEBRAIC(:,401);
    ALGEBRAIC(:,469) =  CONSTANTS(:,53).*(exp(ALGEBRAIC(:,432)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,468)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,470) = ALGEBRAIC(:,466) - ALGEBRAIC(:,469);
    ALGEBRAIC(:,433) = ALGEBRAIC(:,417);
    ALGEBRAIC(:,418) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,178).*STATES(:,87));
    ALGEBRAIC(:,471) = ALGEBRAIC(:,418);
    ALGEBRAIC(:,472) =  CONSTANTS(:,54).*(exp(ALGEBRAIC(:,433)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,471)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,473) = ALGEBRAIC(:,469) - ALGEBRAIC(:,472);
    ALGEBRAIC(:,434) = ALGEBRAIC(:,418);
    ALGEBRAIC(:,474) =  CONSTANTS(:,256).*ALGEBRAIC(:,397)+ CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7))+ CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,179).*STATES(:,88));
    ALGEBRAIC(:,475) =  CONSTANTS(:,55).*(exp(ALGEBRAIC(:,434)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,474)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,476) =  - ALGEBRAIC(:,475)+ALGEBRAIC(:,472);
    ALGEBRAIC(:,419) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,179).*STATES(:,88));
    ALGEBRAIC(:,435) = ALGEBRAIC(:,419);
    ALGEBRAIC(:,478) = ALGEBRAIC(:,406)+ALGEBRAIC(:,403);
    ALGEBRAIC(:,479) =  CONSTANTS(:,56).*(exp(ALGEBRAIC(:,435)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,478)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,480) = ALGEBRAIC(:,479) - ALGEBRAIC(:,439);
    ALGEBRAIC(:,481) = ALGEBRAIC(:,475) - ALGEBRAIC(:,479);
    ALGEBRAIC(:,500) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,163).*STATES(:,89));
    ALGEBRAIC(:,506) = ALGEBRAIC(:,500);
    ALGEBRAIC(:,499) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,169).*STATES(:,6));
    ALGEBRAIC(:,501) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,164).*STATES(:,90));
    ALGEBRAIC(:,512) =  CONSTANTS(:,253).*ALGEBRAIC(:,499)+ALGEBRAIC(:,501);
    ALGEBRAIC(:,513) =  CONSTANTS(:,41).*(exp(ALGEBRAIC(:,506)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,512)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,497) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,507) = ALGEBRAIC(:,501)+ALGEBRAIC(:,497);
    ALGEBRAIC(:,502) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,165).*STATES(:,91));
    ALGEBRAIC(:,514) = ALGEBRAIC(:,502);
    ALGEBRAIC(:,515) =  CONSTANTS(:,42).*(exp(ALGEBRAIC(:,507)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,514)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,517) = ALGEBRAIC(:,513) - ALGEBRAIC(:,515);
    ALGEBRAIC(:,508) = ALGEBRAIC(:,502);
    ALGEBRAIC(:,503) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,166).*STATES(:,92));
    ALGEBRAIC(:,516) = ALGEBRAIC(:,503);
    ALGEBRAIC(:,518) =  CONSTANTS(:,43).*(exp(ALGEBRAIC(:,508)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,516)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,520) = ALGEBRAIC(:,515) - ALGEBRAIC(:,518);
    ALGEBRAIC(:,509) = ALGEBRAIC(:,503);
    ALGEBRAIC(:,496) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,139).*STATES(:,2));
    ALGEBRAIC(:,504) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,167).*STATES(:,93));
    ALGEBRAIC(:,519) = ALGEBRAIC(:,504)+ALGEBRAIC(:,496);
    ALGEBRAIC(:,521) =  CONSTANTS(:,44).*(exp(ALGEBRAIC(:,509)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,519)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,523) =  - ALGEBRAIC(:,521)+ALGEBRAIC(:,518);
    ALGEBRAIC(:,498) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7));
    ALGEBRAIC(:,510) = ALGEBRAIC(:,504)+ CONSTANTS(:,252).*ALGEBRAIC(:,498);
    ALGEBRAIC(:,505) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,168).*STATES(:,94));
    ALGEBRAIC(:,522) = ALGEBRAIC(:,505);
    ALGEBRAIC(:,524) =  CONSTANTS(:,45).*(exp(ALGEBRAIC(:,510)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,522)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,526) =  - ALGEBRAIC(:,524)+ALGEBRAIC(:,521);
    ALGEBRAIC(:,495) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,511) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,168).*STATES(:,94))+ CONSTANTS(:,250).*CONSTANTS(:,302).*ALGEBRAIC(:,495);
    ALGEBRAIC(:,525) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,163).*STATES(:,89))+ CONSTANTS(:,251).*CONSTANTS(:,302).*ALGEBRAIC(:,495);
    ALGEBRAIC(:,527) =  CONSTANTS(:,46).*(exp(ALGEBRAIC(:,511)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,525)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,529) = ALGEBRAIC(:,527) - ALGEBRAIC(:,513);
    ALGEBRAIC(:,530) =  - ALGEBRAIC(:,527)+ALGEBRAIC(:,524);
    ALGEBRAIC(:,557) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,559) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,214).*STATES(:,14));
    ALGEBRAIC(:,560) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,215).*STATES(:,15));
    ALGEBRAIC(:,561) =  CONSTANTS(:,101).*(exp((ALGEBRAIC(:,557)+ALGEBRAIC(:,559))./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,560)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,558) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,139).*STATES(:,2));
    ALGEBRAIC(:,562) =  CONSTANTS(:,102).*(exp(ALGEBRAIC(:,560)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp((ALGEBRAIC(:,558)+ALGEBRAIC(:,559))./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,489) = ALGEBRAIC(:,447);
    ALGEBRAIC(:,569) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,188).*STATES(:,12));
    ALGEBRAIC(:,570) = CONSTANTS(:,307)+ALGEBRAIC(:,569);
    ALGEBRAIC(:,579) =  CONSTANTS(:,130).*(exp(CONSTANTS(:,319)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,570)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,580) = ALGEBRAIC(:,579);
    ALGEBRAIC(:,486) =  - ALGEBRAIC(:,450);
    ALGEBRAIC(:,568) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,186).*STATES(:,10));
    ALGEBRAIC(:,571) = CONSTANTS(:,307)+ALGEBRAIC(:,568);
    ALGEBRAIC(:,581) =  CONSTANTS(:,122).*(exp(ALGEBRAIC(:,571)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(CONSTANTS(:,320)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,582) =  - ALGEBRAIC(:,581);
    ALGEBRAIC(:,485) = ALGEBRAIC(:,469);
    ALGEBRAIC(:,567) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,187).*STATES(:,11));
    ALGEBRAIC(:,572) = ALGEBRAIC(:,567)+CONSTANTS(:,316);
    ALGEBRAIC(:,584) =  CONSTANTS(:,126).*(exp(CONSTANTS(:,321)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,572)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,585) = ALGEBRAIC(:,584);
    ALGEBRAIC(:,41) =  ( CONSTANTS(:,300).*CONSTANTS(:,301)).*log( CONSTANTS(:,216).*STATES(:,3));
    ALGEBRAIC(:,42) =  ( CONSTANTS(:,300).*CONSTANTS(:,301)).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,43) =  CONSTANTS(:,103).*(exp(ALGEBRAIC(:,41)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,42)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,565) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,216).*STATES(:,3));
    ALGEBRAIC(:,576) = CONSTANTS(:,317)+ CONSTANTS(:,304).*ALGEBRAIC(:,565);
    ALGEBRAIC(:,592) =  CONSTANTS(:,127).*(exp(CONSTANTS(:,325)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,576)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,596) =  CONSTANTS(:,304).*ALGEBRAIC(:,592);
    ALGEBRAIC(:,482) = ALGEBRAIC(:,447);
    ALGEBRAIC(:,566) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,189).*STATES(:,13));
    ALGEBRAIC(:,573) = CONSTANTS(:,310)+ALGEBRAIC(:,566);
    ALGEBRAIC(:,586) =  CONSTANTS(:,124).*(exp(ALGEBRAIC(:,573)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(CONSTANTS(:,322)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,575) = CONSTANTS(:,314)+ CONSTANTS(:,305).*ALGEBRAIC(:,566);
    ALGEBRAIC(:,589) =  CONSTANTS(:,125).*(exp(CONSTANTS(:,324)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,575)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,577) = CONSTANTS(:,317)+ CONSTANTS(:,305).*ALGEBRAIC(:,566);
    ALGEBRAIC(:,597) =  CONSTANTS(:,128).*(exp(ALGEBRAIC(:,577)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(CONSTANTS(:,326)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,578) = ALGEBRAIC(:,566)+CONSTANTS(:,315);
    ALGEBRAIC(:,600) =  CONSTANTS(:,129).*(exp(CONSTANTS(:,327)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,578)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,603) = (( CONSTANTS(:,305).*ALGEBRAIC(:,589) - ALGEBRAIC(:,586)) -  CONSTANTS(:,305).*ALGEBRAIC(:,597))+ALGEBRAIC(:,600);
    ALGEBRAIC(:,602) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,607) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,190).*STATES(:,48));
    ALGEBRAIC(:,608) = ALGEBRAIC(:,607)+ CONSTANTS(:,257).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,610) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,191).*STATES(:,49));
    ALGEBRAIC(:,611) = ALGEBRAIC(:,610)+ CONSTANTS(:,259).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,613) =  CONSTANTS(:,64).*(exp(ALGEBRAIC(:,608)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,611)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,609) = ALGEBRAIC(:,607)+ CONSTANTS(:,258).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,614) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,192).*STATES(:,50));
    ALGEBRAIC(:,616) = ALGEBRAIC(:,614)+ CONSTANTS(:,260).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,617) =  CONSTANTS(:,66).*(exp(ALGEBRAIC(:,609)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,616)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,618) =  - ALGEBRAIC(:,613) - ALGEBRAIC(:,617);
    ALGEBRAIC(:,36) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,37) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,139).*STATES(:,2));
    ALGEBRAIC(:,1) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,38) =  CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,1);
    ALGEBRAIC(:,39) = piecewise({ALGEBRAIC(:,38)==0.00000,  CONSTANTS(:,2).*(exp(ALGEBRAIC(:,36)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,37)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,2).*ALGEBRAIC(:,38))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,38)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,36)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,37)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,388) = ALGEBRAIC(:,387)+ALGEBRAIC(:,385);
    ALGEBRAIC(:,535) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,539) =  CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,535);
    ALGEBRAIC(:,537) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,538) = ALGEBRAIC(:,537)+ CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,535);
    ALGEBRAIC(:,536) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,139).*STATES(:,2));
    ALGEBRAIC(:,540) = ALGEBRAIC(:,536);
    ALGEBRAIC(:,541) = piecewise({ALGEBRAIC(:,539)==0.00000,  CONSTANTS(:,115).*(exp(ALGEBRAIC(:,538)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,540)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,115).*ALGEBRAIC(:,539))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,539)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,538)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,540)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,531) = ALGEBRAIC(:,521);
    ALGEBRAIC(:,606) =  CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,595) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,619) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,193).*STATES(:,51));
    ALGEBRAIC(:,620) = ALGEBRAIC(:,619)+ALGEBRAIC(:,595)+ALGEBRAIC(:,606);
    ALGEBRAIC(:,599) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,139).*STATES(:,2));
    ALGEBRAIC(:,621) = ALGEBRAIC(:,619)+ALGEBRAIC(:,599);
    ALGEBRAIC(:,622) = piecewise({ALGEBRAIC(:,606)==0.00000,  CONSTANTS(:,63).*(exp(ALGEBRAIC(:,620)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,621)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,63).*ALGEBRAIC(:,606))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,606)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,620)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,621)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,615) = ALGEBRAIC(:,614)+ CONSTANTS(:,257).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,624) = ALGEBRAIC(:,619)+ CONSTANTS(:,259).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,628) =  CONSTANTS(:,65).*(exp(ALGEBRAIC(:,615)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,624)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,630) = ALGEBRAIC(:,617) - ALGEBRAIC(:,628);
    ALGEBRAIC(:,612) = ALGEBRAIC(:,610)+ CONSTANTS(:,258).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,626) = ALGEBRAIC(:,619)+ CONSTANTS(:,260).*CONSTANTS(:,302).*ALGEBRAIC(:,602);
    ALGEBRAIC(:,631) =  CONSTANTS(:,67).*(exp(ALGEBRAIC(:,612)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,626)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,633) = ALGEBRAIC(:,613) - ALGEBRAIC(:,631);
    ALGEBRAIC(:,634) = ALGEBRAIC(:,628)+ALGEBRAIC(:,631);
    ALGEBRAIC(:,389) = (( (CONSTANTS(:,277)).*ALGEBRAIC(:,377)+ CONSTANTS(:,277).*ALGEBRAIC(:,381)+ CONSTANTS(:,277).*ALGEBRAIC(:,373)+ CONSTANTS(:,277).*ALGEBRAIC(:,369)+ CONSTANTS(:,277).*ALGEBRAIC(:,365)+ CONSTANTS(:,277).*ALGEBRAIC(:,384)) - ALGEBRAIC(:,385)) - ALGEBRAIC(:,387);
    ALGEBRAIC(:,532) =  - ALGEBRAIC(:,515);
    ALGEBRAIC(:,564) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,574) = CONSTANTS(:,310)+ CONSTANTS(:,303).*ALGEBRAIC(:,564);
    ALGEBRAIC(:,588) =  CONSTANTS(:,123).*(exp(ALGEBRAIC(:,574)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(CONSTANTS(:,323)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,591) =   - CONSTANTS(:,303).*ALGEBRAIC(:,588);
    ALGEBRAIC(:,623) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,194).*STATES(:,16));
    ALGEBRAIC(:,627) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,136).*STATES(:,1));
    ALGEBRAIC(:,629) = ALGEBRAIC(:,627)+ALGEBRAIC(:,623);
    ALGEBRAIC(:,625) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,195).*STATES(:,17));
    ALGEBRAIC(:,632) = ALGEBRAIC(:,625);
    ALGEBRAIC(:,636) =  CONSTANTS(:,68).*(exp(ALGEBRAIC(:,629)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,632)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,639) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,641) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,234).*STATES(:,52));
    ALGEBRAIC(:,642) = ALGEBRAIC(:,641)+ CONSTANTS(:,261).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,644) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,235).*STATES(:,53));
    ALGEBRAIC(:,645) = ALGEBRAIC(:,644)+ CONSTANTS(:,263).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,647) =  CONSTANTS(:,132).*(exp(ALGEBRAIC(:,642)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,645)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,643) = ALGEBRAIC(:,641)+ CONSTANTS(:,262).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,648) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,236).*STATES(:,54));
    ALGEBRAIC(:,649) = ALGEBRAIC(:,648)+ CONSTANTS(:,264).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,651) =  CONSTANTS(:,134).*(exp(ALGEBRAIC(:,643)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,649)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,652) =  - ALGEBRAIC(:,647)+ALGEBRAIC(:,651);
    ALGEBRAIC(:,650) = ALGEBRAIC(:,648)+ CONSTANTS(:,261).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,653) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,237).*STATES(:,55));
    ALGEBRAIC(:,657) = ALGEBRAIC(:,653)+ CONSTANTS(:,263).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,659) =  CONSTANTS(:,133).*(exp(ALGEBRAIC(:,650)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,657)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,660) =  - ALGEBRAIC(:,659)+ALGEBRAIC(:,651);
    ALGEBRAIC(:,646) = ALGEBRAIC(:,644)+ CONSTANTS(:,262).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,658) = ALGEBRAIC(:,653)+ CONSTANTS(:,264).*CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,661) =  CONSTANTS(:,135).*(exp(ALGEBRAIC(:,646)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,658)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,662) = ALGEBRAIC(:,647) - ALGEBRAIC(:,661);
    ALGEBRAIC(:,663) = ALGEBRAIC(:,659)+ALGEBRAIC(:,661);
    ALGEBRAIC(:,669) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,670) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,669);
    ALGEBRAIC(:,665) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,673) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,213).*STATES(:,73));
    ALGEBRAIC(:,674) = ALGEBRAIC(:,673)+ALGEBRAIC(:,665)+ALGEBRAIC(:,670);
    ALGEBRAIC(:,666) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,675) = ALGEBRAIC(:,673)+ALGEBRAIC(:,666);
    ALGEBRAIC(:,678) = piecewise({ALGEBRAIC(:,670)==0.00000,  1.00000.*CONSTANTS(:,99).*(exp(ALGEBRAIC(:,674)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,675)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( 1.00000.*CONSTANTS(:,99).*ALGEBRAIC(:,670))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,670)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,674)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,675)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,159) = STATES(:,18)./CONSTANTS(:,288);
    ALGEBRAIC(:,163) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,159);
    ALGEBRAIC(:,161) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,162) = ALGEBRAIC(:,161)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,159);
    ALGEBRAIC(:,160) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,164) = ALGEBRAIC(:,160);
    ALGEBRAIC(:,165) = piecewise({ALGEBRAIC(:,163)==0.00000,  CONSTANTS(:,114).*(exp(ALGEBRAIC(:,162)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,164)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,114).*ALGEBRAIC(:,163))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,163)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,162)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,164)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,234) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,233);
    ALGEBRAIC(:,231) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,248) = ALGEBRAIC(:,247)+ALGEBRAIC(:,231)+ALGEBRAIC(:,234);
    ALGEBRAIC(:,232) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,249) = ALGEBRAIC(:,247)+ALGEBRAIC(:,232);
    ALGEBRAIC(:,250) = piecewise({ALGEBRAIC(:,234)==0.00000,  1.00000.*CONSTANTS(:,5).*(exp(ALGEBRAIC(:,248)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,249)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( 1.00000.*CONSTANTS(:,5).*ALGEBRAIC(:,234))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,234)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,248)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,249)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,262) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,261);
    ALGEBRAIC(:,259) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,271) = ALGEBRAIC(:,270)+ALGEBRAIC(:,259)+ALGEBRAIC(:,262);
    ALGEBRAIC(:,260) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,272) = ALGEBRAIC(:,270)+ALGEBRAIC(:,260);
    ALGEBRAIC(:,273) = piecewise({ALGEBRAIC(:,262)==0.00000,  1.00000.*CONSTANTS(:,10).*(exp(ALGEBRAIC(:,271)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,272)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( 1.00000.*CONSTANTS(:,10).*ALGEBRAIC(:,262))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,262)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,271)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,272)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,396) =  - ALGEBRAIC(:,390) - ALGEBRAIC(:,392);
    ALGEBRAIC(:,484) = ALGEBRAIC(:,437)+ALGEBRAIC(:,455);
    ALGEBRAIC(:,553) =  CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,535);
    ALGEBRAIC(:,551) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,552) = ALGEBRAIC(:,551)+ CONSTANTS(:,239).*CONSTANTS(:,302).*ALGEBRAIC(:,535);
    ALGEBRAIC(:,550) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,554) = ALGEBRAIC(:,550);
    ALGEBRAIC(:,555) = piecewise({ALGEBRAIC(:,553)==0.00000,  CONSTANTS(:,117).*(exp(ALGEBRAIC(:,552)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,554)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,117).*ALGEBRAIC(:,553))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,553)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,552)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,554)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,640) =  CONSTANTS(:,302).*ALGEBRAIC(:,639);
    ALGEBRAIC(:,637) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,140).*STATES(:,8));
    ALGEBRAIC(:,654) = ALGEBRAIC(:,653)+ALGEBRAIC(:,637)+ALGEBRAIC(:,640);
    ALGEBRAIC(:,638) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,141).*STATES(:,9));
    ALGEBRAIC(:,655) = ALGEBRAIC(:,653)+ALGEBRAIC(:,638);
    ALGEBRAIC(:,656) = piecewise({ALGEBRAIC(:,640)==0.00000,  1.00000.*CONSTANTS(:,131).*(exp(ALGEBRAIC(:,654)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,655)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( 1.00000.*CONSTANTS(:,131).*ALGEBRAIC(:,640))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,640)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,654)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,655)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,395) = ALGEBRAIC(:,392)+ALGEBRAIC(:,390);
    ALGEBRAIC(:,483) =  - ALGEBRAIC(:,441) - ALGEBRAIC(:,444);
    ALGEBRAIC(:,671) =  CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,669);
    ALGEBRAIC(:,667) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,169).*STATES(:,6));
    ALGEBRAIC(:,676) = ALGEBRAIC(:,673)+ALGEBRAIC(:,667)+ALGEBRAIC(:,671);
    ALGEBRAIC(:,668) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7));
    ALGEBRAIC(:,677) = ALGEBRAIC(:,673)+ALGEBRAIC(:,668);
    ALGEBRAIC(:,679) = piecewise({ALGEBRAIC(:,671)==0.00000,  1.00000.*CONSTANTS(:,98).*(exp(ALGEBRAIC(:,676)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,677)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( 1.00000.*CONSTANTS(:,98).*ALGEBRAIC(:,671))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,671)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,676)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,677)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,488) =  - ALGEBRAIC(:,460) - (ALGEBRAIC(:,463)+ALGEBRAIC(:,466));
    ALGEBRAIC(:,490) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,169).*STATES(:,6));
    ALGEBRAIC(:,491) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7));
    ALGEBRAIC(:,492) =  CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,1);
    ALGEBRAIC(:,493) = piecewise({ALGEBRAIC(:,492)==0.00000,  CONSTANTS(:,47).*(exp(ALGEBRAIC(:,490)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,491)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,47).*ALGEBRAIC(:,492))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,492)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,490)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,491)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,546) =  CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,535);
    ALGEBRAIC(:,544) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,169).*STATES(:,6));
    ALGEBRAIC(:,545) = ALGEBRAIC(:,544)+ CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,535);
    ALGEBRAIC(:,543) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,170).*STATES(:,7));
    ALGEBRAIC(:,547) = ALGEBRAIC(:,543);
    ALGEBRAIC(:,548) = piecewise({ALGEBRAIC(:,546)==0.00000,  CONSTANTS(:,116).*(exp(ALGEBRAIC(:,545)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,547)./( CONSTANTS(:,300).*CONSTANTS(:,301)))) },  ((( CONSTANTS(:,116).*ALGEBRAIC(:,546))./( CONSTANTS(:,300).*CONSTANTS(:,301)))./(exp(ALGEBRAIC(:,546)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - 1.00000)).*(exp(ALGEBRAIC(:,545)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,547)./( CONSTANTS(:,300).*CONSTANTS(:,301)))));
    ALGEBRAIC(:,534) =  CONSTANTS(:,253).*ALGEBRAIC(:,513);
    ALGEBRAIC(:,487) = ALGEBRAIC(:,475)+ALGEBRAIC(:,479)+ALGEBRAIC(:,439);
    ALGEBRAIC(:,533) =   - CONSTANTS(:,252).*ALGEBRAIC(:,524);
    ALGEBRAIC(:,672) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,212).*STATES(:,72));
    ALGEBRAIC(:,680) = ALGEBRAIC(:,672)+ CONSTANTS(:,271).*CONSTANTS(:,302).*ALGEBRAIC(:,669);
    ALGEBRAIC(:,681) = ALGEBRAIC(:,673)+ CONSTANTS(:,272).*CONSTANTS(:,302).*ALGEBRAIC(:,669);
    ALGEBRAIC(:,682) =  CONSTANTS(:,100).*(exp(ALGEBRAIC(:,680)./( CONSTANTS(:,300).*CONSTANTS(:,301))) - exp(ALGEBRAIC(:,681)./( CONSTANTS(:,300).*CONSTANTS(:,301))));
    ALGEBRAIC(:,34) = VOI -  floor(VOI./CONSTANTS(:,298)).*CONSTANTS(:,298);
    ALGEBRAIC(:,35) = piecewise({ALGEBRAIC(:,34)>=0.300000&ALGEBRAIC(:,34)<=0.300000+CONSTANTS(:,299), ( 1.00000.*0.0750000.*CONSTANTS(:,288))./CONSTANTS(:,299) }, 0.00000);
    ALGEBRAIC(:,40) =   - CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,39);
    ALGEBRAIC(:,158) =  CONSTANTS(:,302).*(((((((((((((((((((((((((((((  - CONSTANTS(:,254).*ALGEBRAIC(:,156)+ CONSTANTS(:,270).*ALGEBRAIC(:,118)) -  CONSTANTS(:,267).*ALGEBRAIC(:,118)+ CONSTANTS(:,270).*ALGEBRAIC(:,130)) -  CONSTANTS(:,267).*ALGEBRAIC(:,130)+ CONSTANTS(:,270).*ALGEBRAIC(:,124)) -  CONSTANTS(:,267).*ALGEBRAIC(:,124)+ CONSTANTS(:,270).*ALGEBRAIC(:,136)) -  CONSTANTS(:,267).*ALGEBRAIC(:,136)+ CONSTANTS(:,270).*ALGEBRAIC(:,150)) -  CONSTANTS(:,267).*ALGEBRAIC(:,150)+ CONSTANTS(:,268).*ALGEBRAIC(:,86)) -  CONSTANTS(:,265).*ALGEBRAIC(:,86)+ CONSTANTS(:,268).*ALGEBRAIC(:,94)) -  CONSTANTS(:,265).*ALGEBRAIC(:,94)+ CONSTANTS(:,269).*ALGEBRAIC(:,106)) -  CONSTANTS(:,266).*ALGEBRAIC(:,106)+ CONSTANTS(:,269).*ALGEBRAIC(:,110)) -  CONSTANTS(:,266).*ALGEBRAIC(:,110)+ CONSTANTS(:,269).*ALGEBRAIC(:,114)) -  CONSTANTS(:,266).*ALGEBRAIC(:,114)+ CONSTANTS(:,270).*ALGEBRAIC(:,142)) -  CONSTANTS(:,267).*ALGEBRAIC(:,142)+ CONSTANTS(:,268).*ALGEBRAIC(:,90)) -  CONSTANTS(:,265).*ALGEBRAIC(:,90)+ CONSTANTS(:,268).*ALGEBRAIC(:,98)) -  CONSTANTS(:,265).*ALGEBRAIC(:,98)+ CONSTANTS(:,269).*ALGEBRAIC(:,102)) -  CONSTANTS(:,266).*ALGEBRAIC(:,102)+ CONSTANTS(:,270).*ALGEBRAIC(:,121)) -  CONSTANTS(:,267).*ALGEBRAIC(:,121)+ CONSTANTS(:,270).*ALGEBRAIC(:,133)) -  CONSTANTS(:,267).*ALGEBRAIC(:,133)+ CONSTANTS(:,270).*ALGEBRAIC(:,127)) -  CONSTANTS(:,267).*ALGEBRAIC(:,127)+ CONSTANTS(:,270).*ALGEBRAIC(:,139)) -  CONSTANTS(:,267).*ALGEBRAIC(:,139)+ CONSTANTS(:,270).*ALGEBRAIC(:,154)) -  CONSTANTS(:,267).*ALGEBRAIC(:,154)+ CONSTANTS(:,268).*ALGEBRAIC(:,88)) -  CONSTANTS(:,265).*ALGEBRAIC(:,88)+ CONSTANTS(:,268).*ALGEBRAIC(:,96)) -  CONSTANTS(:,265).*ALGEBRAIC(:,96)+ CONSTANTS(:,269).*ALGEBRAIC(:,104)) -  CONSTANTS(:,266).*ALGEBRAIC(:,104)+ CONSTANTS(:,269).*ALGEBRAIC(:,108)) -  CONSTANTS(:,266).*ALGEBRAIC(:,108)+ CONSTANTS(:,269).*ALGEBRAIC(:,112)) -  CONSTANTS(:,266).*ALGEBRAIC(:,112)+ CONSTANTS(:,269).*ALGEBRAIC(:,116)) -  CONSTANTS(:,266).*ALGEBRAIC(:,116)+ CONSTANTS(:,270).*ALGEBRAIC(:,146)) -  CONSTANTS(:,267).*ALGEBRAIC(:,146)+ CONSTANTS(:,268).*ALGEBRAIC(:,92)) -  CONSTANTS(:,265).*ALGEBRAIC(:,92)+ CONSTANTS(:,268).*ALGEBRAIC(:,100)) -  CONSTANTS(:,265).*ALGEBRAIC(:,100));    ALGEBRAIC(:,683) =  CONSTANTS(:,302).*((  - CONSTANTS(:,239).*ALGEBRAIC(:,678)+ CONSTANTS(:,254).*ALGEBRAIC(:,679)+ CONSTANTS(:,272).*ALGEBRAIC(:,682)) -  CONSTANTS(:,271).*ALGEBRAIC(:,682));
    ALGEBRAIC(:,216) =  CONSTANTS(:,302).*((((((((((((((  - CONSTANTS(:,239).*ALGEBRAIC(:,214)+ CONSTANTS(:,286).*ALGEBRAIC(:,208)) -  CONSTANTS(:,284).*ALGEBRAIC(:,208))+ CONSTANTS(:,286).*ALGEBRAIC(:,204)) -  CONSTANTS(:,284).*ALGEBRAIC(:,204))+ CONSTANTS(:,285).*ALGEBRAIC(:,200)) -  CONSTANTS(:,283).*ALGEBRAIC(:,200))+ CONSTANTS(:,285).*ALGEBRAIC(:,196)) -  CONSTANTS(:,283).*ALGEBRAIC(:,196))+ CONSTANTS(:,286).*ALGEBRAIC(:,212)) -  CONSTANTS(:,284).*ALGEBRAIC(:,212))+ CONSTANTS(:,285).*ALGEBRAIC(:,202)) -  CONSTANTS(:,283).*ALGEBRAIC(:,202))+ CONSTANTS(:,285).*ALGEBRAIC(:,198)) -  CONSTANTS(:,283).*ALGEBRAIC(:,198));
    ALGEBRAIC(:,166) =  CONSTANTS(:,302).* - CONSTANTS(:,239).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,180) =  CONSTANTS(:,302).*((  - CONSTANTS(:,239).*ALGEBRAIC(:,178)+ CONSTANTS(:,241).*ALGEBRAIC(:,176)) -  CONSTANTS(:,240).*ALGEBRAIC(:,176));
    ALGEBRAIC(:,230) =  CONSTANTS(:,302).*((  - CONSTANTS(:,239).*ALGEBRAIC(:,228)+ CONSTANTS(:,243).*ALGEBRAIC(:,226)) -  CONSTANTS(:,242).*ALGEBRAIC(:,226));
    ALGEBRAIC(:,258) =  CONSTANTS(:,302).*(  - CONSTANTS(:,239).*ALGEBRAIC(:,250)+ ALGEBRAIC(:,241).*(CONSTANTS(:,245) - CONSTANTS(:,244))+ ALGEBRAIC(:,253).*(CONSTANTS(:,245) - CONSTANTS(:,245))+ ALGEBRAIC(:,245).*(CONSTANTS(:,247) - CONSTANTS(:,246))+ ALGEBRAIC(:,255).*(CONSTANTS(:,247) - CONSTANTS(:,246)));
    ALGEBRAIC(:,278) =  CONSTANTS(:,302).*(  - CONSTANTS(:,239).*ALGEBRAIC(:,273)+ (ALGEBRAIC(:,268)+ALGEBRAIC(:,275)).*(CONSTANTS(:,249) - CONSTANTS(:,248)));
    ALGEBRAIC(:,394) =  CONSTANTS(:,302).*(((((((((((((((((((( CONSTANTS(:,280).*ALGEBRAIC(:,351) -  CONSTANTS(:,275).*ALGEBRAIC(:,351))+ CONSTANTS(:,281).*ALGEBRAIC(:,359) -  CONSTANTS(:,276).*ALGEBRAIC(:,359))+ CONSTANTS(:,279).*ALGEBRAIC(:,347) -  CONSTANTS(:,274).*ALGEBRAIC(:,347))+ CONSTANTS(:,280).*ALGEBRAIC(:,355) -  CONSTANTS(:,275).*ALGEBRAIC(:,355))+ CONSTANTS(:,281).*ALGEBRAIC(:,363) -  CONSTANTS(:,276).*ALGEBRAIC(:,363))+ CONSTANTS(:,279).*ALGEBRAIC(:,343) -  CONSTANTS(:,274).*ALGEBRAIC(:,343))+ CONSTANTS(:,278).*ALGEBRAIC(:,339) -  CONSTANTS(:,273).*ALGEBRAIC(:,339))+ CONSTANTS(:,278).*ALGEBRAIC(:,335) -  CONSTANTS(:,273).*ALGEBRAIC(:,335))+ CONSTANTS(:,278).*ALGEBRAIC(:,331) -  CONSTANTS(:,273).*ALGEBRAIC(:,331))+ CONSTANTS(:,281).*ALGEBRAIC(:,361) -  CONSTANTS(:,276).*ALGEBRAIC(:,361))+ CONSTANTS(:,280).*ALGEBRAIC(:,353) -  CONSTANTS(:,275).*ALGEBRAIC(:,353))+ CONSTANTS(:,279).*ALGEBRAIC(:,345) -  CONSTANTS(:,274).*ALGEBRAIC(:,345))+ CONSTANTS(:,281).*ALGEBRAIC(:,357) -  CONSTANTS(:,276).*ALGEBRAIC(:,357))+ CONSTANTS(:,280).*ALGEBRAIC(:,349) -  CONSTANTS(:,275).*ALGEBRAIC(:,349))+ CONSTANTS(:,279).*ALGEBRAIC(:,341) -  CONSTANTS(:,274).*ALGEBRAIC(:,341))+ CONSTANTS(:,278).*ALGEBRAIC(:,337) -  CONSTANTS(:,273).*ALGEBRAIC(:,337))+ CONSTANTS(:,278).*ALGEBRAIC(:,333) -  CONSTANTS(:,273).*ALGEBRAIC(:,333))+ CONSTANTS(:,278).*ALGEBRAIC(:,329) -  CONSTANTS(:,273).*ALGEBRAIC(:,329)) - ( CONSTANTS(:,238).*ALGEBRAIC(:,385)+ CONSTANTS(:,238).*ALGEBRAIC(:,387))) - ( CONSTANTS(:,239).*ALGEBRAIC(:,390)+ CONSTANTS(:,239).*ALGEBRAIC(:,392)));
    ALGEBRAIC(:,477) =  CONSTANTS(:,256).*ALGEBRAIC(:,475)+ CONSTANTS(:,255).*ALGEBRAIC(:,466);
    ALGEBRAIC(:,494) =   - CONSTANTS(:,254).*CONSTANTS(:,302).*ALGEBRAIC(:,493);
    ALGEBRAIC(:,542) =  CONSTANTS(:,302).* - CONSTANTS(:,238).*ALGEBRAIC(:,541);
    ALGEBRAIC(:,549) =  CONSTANTS(:,302).* - CONSTANTS(:,254).*ALGEBRAIC(:,548);
    ALGEBRAIC(:,556) =  CONSTANTS(:,302).* - CONSTANTS(:,239).*ALGEBRAIC(:,555);
    ALGEBRAIC(:,528) =  CONSTANTS(:,302).*(  - CONSTANTS(:,250).*ALGEBRAIC(:,527)+ CONSTANTS(:,251).*ALGEBRAIC(:,527));
    ALGEBRAIC(:,563) =   - CONSTANTS(:,238).*CONSTANTS(:,302).*ALGEBRAIC(:,562);
    ALGEBRAIC(:,635) =  CONSTANTS(:,302).*(  - CONSTANTS(:,238).*ALGEBRAIC(:,622)+ ALGEBRAIC(:,613).*(CONSTANTS(:,259) - CONSTANTS(:,257))+ ALGEBRAIC(:,628).*(CONSTANTS(:,259) - CONSTANTS(:,257))+ ALGEBRAIC(:,617).*(CONSTANTS(:,260) - CONSTANTS(:,258))+ ALGEBRAIC(:,631).*(CONSTANTS(:,260) - CONSTANTS(:,258)));
    ALGEBRAIC(:,664) =  CONSTANTS(:,302).*(  - CONSTANTS(:,239).*ALGEBRAIC(:,656)+ (ALGEBRAIC(:,647)+ALGEBRAIC(:,659)).*(CONSTANTS(:,263) - CONSTANTS(:,261))+ (ALGEBRAIC(:,651)+ALGEBRAIC(:,661)).*(CONSTANTS(:,264) - CONSTANTS(:,262)));
    ALGEBRAIC(:,2) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,196).*STATES(:,56));
    ALGEBRAIC(:,3) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,200).*STATES(:,60));
    ALGEBRAIC(:,4) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,197).*STATES(:,57));
    ALGEBRAIC(:,5) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,201).*STATES(:,61));
    ALGEBRAIC(:,6) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,198).*STATES(:,58));
    ALGEBRAIC(:,7) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,202).*STATES(:,62));
    ALGEBRAIC(:,8) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,199).*STATES(:,59));
    ALGEBRAIC(:,9) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,203).*STATES(:,63));
    ALGEBRAIC(:,10) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,204).*STATES(:,64));
    ALGEBRAIC(:,11) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,208).*STATES(:,68));
    ALGEBRAIC(:,12) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,205).*STATES(:,65));
    ALGEBRAIC(:,13) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,209).*STATES(:,69));
    ALGEBRAIC(:,14) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,206).*STATES(:,66));
    ALGEBRAIC(:,15) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,210).*STATES(:,70));
    ALGEBRAIC(:,16) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,207).*STATES(:,67));
    ALGEBRAIC(:,17) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,142).*STATES(:,25));
    ALGEBRAIC(:,18) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,217).*STATES(:,19));
    ALGEBRAIC(:,19) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,220).*STATES(:,22));
    ALGEBRAIC(:,20) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,218).*STATES(:,20));
    ALGEBRAIC(:,21) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,221).*STATES(:,23));
    ALGEBRAIC(:,22) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,219).*STATES(:,21));
    ALGEBRAIC(:,23) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,223).*STATES(:,27));
    ALGEBRAIC(:,24) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,157).*STATES(:,42));
    ALGEBRAIC(:,25) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,158).*STATES(:,43));
    ALGEBRAIC(:,26) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,159).*STATES(:,44));
    ALGEBRAIC(:,27) =  CONSTANTS(:,300).*CONSTANTS(:,301).*log( CONSTANTS(:,160).*STATES(:,45));
    ALGEBRAIC(:,28) = STATES(:,1)./CONSTANTS(:,306);
    ALGEBRAIC(:,29) = STATES(:,3)./CONSTANTS(:,309);
    ALGEBRAIC(:,30) = STATES(:,13)./CONSTANTS(:,311);
    ALGEBRAIC(:,31) = STATES(:,11)./CONSTANTS(:,306);
    ALGEBRAIC(:,32) = STATES(:,10)./CONSTANTS(:,306);
    ALGEBRAIC(:,33) = STATES(:,12)./CONSTANTS(:,306);
    ALGEBRAIC(:,583) = ALGEBRAIC(:,579) - ALGEBRAIC(:,581);
    ALGEBRAIC(:,587) = ALGEBRAIC(:,586);
    ALGEBRAIC(:,590) = ALGEBRAIC(:,581) - ALGEBRAIC(:,588);
    ALGEBRAIC(:,593) = ALGEBRAIC(:,588) - ALGEBRAIC(:,589);
    ALGEBRAIC(:,594) = ALGEBRAIC(:,589) - ALGEBRAIC(:,584);
    ALGEBRAIC(:,598) = ALGEBRAIC(:,584) - ALGEBRAIC(:,592);
    ALGEBRAIC(:,601) = ALGEBRAIC(:,592) - ALGEBRAIC(:,597);
    ALGEBRAIC(:,604) = ALGEBRAIC(:,597) - ALGEBRAIC(:,600);
    ALGEBRAIC(:,605) = ALGEBRAIC(:,600) - ALGEBRAIC(:,579);
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

