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 =754;
end
% There are a total of 124 entries in each of the rate and state variable arrays.
% There are a total of 357 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, 14.6];

    % Set numerical accuracy options for ODE solver
    options = odeset('RelTol', 1e-05, 'AbsTol', 1e-16, '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 = {'I_stim in component environment (fA)',...
        'V_mem in component environment (J_per_C)',...
        'q_Ca_i in component environment (fmol)',...
        'q_Ca_o in component environment (fmol)',...
        'q_Ca_D in component environment (fmol)',...
        'q_Ca_SR in component environment (fmol)',...
        'q_TRPN in component environment (fmol)',...
        'q_Ca_TRPN in component environment (fmol)',...
        'q_PLBp in component environment (fmol)',...
        'SL in component crossbridge_TRPN (metre)',...
        'T_active in component crossbridge_TRPN (kPa)',...
        'T_passive in component crossbridge_TRPN (kPa)'}; %I_pulse in component environment (fA)',...
    [~, i_st, i_alg] = find_indices(vlabels, cellstr(LEGEND_CONSTANTS), cellstr(LEGEND_STATES), cellstr(LEGEND_ALGEBRAIC));
    if i_st
        plot_selected(i_st,VOI,STATES,'s',LEGEND_STATES,'STATES',ceil(sqrt(length(i_st))))
    end
    plot_selected(i_alg,VOI,ALGEBRAIC,'s',LEGEND_ALGEBRAIC,'ALGEBRAIC',ceil(sqrt(length(i_alg))))

    % fluxes
    flabs = {'v_leak in component Ca_leak (fmol_per_sec)',...
        'v_R_TRPNCa in component crossbridge_TRPN (fmol_per_sec)',...
        'v_R_UW in component crossbridge_TRPN (fmol_per_sec)',...
        'v_R_WS in component crossbridge_TRPN (fmol_per_sec)',...
        'v_diadDf in component diadCaDiffusion (fmol_per_sec)',...
        'v_Ca_o_LCC in component LCC (fmol_per_sec)',...
        'v_Ca_i_NCX in component NCX (fmol_per_sec)',...
        'v_pCa_R1 in component pCa (fmol_per_sec)',...
        'v_pCa_R2 in component pCa (fmol_per_sec)',...
        'v_PLBph1 in component PLB (fmol_per_sec)',...
        'v_PLBph2 in component PLB (fmol_per_sec)',...
        'v_RyR in component RyR (fmol_per_sec)',...
        'v_Ca_i_SERCA in component SERCA (fmol_per_sec)'};
    [~, ~, i_alg] = find_indices(flabs, cellstr(LEGEND_CONSTANTS), cellstr(LEGEND_STATES), cellstr(LEGEND_ALGEBRAIC));
    plot_selected(i_alg,VOI,ALGEBRAIC,'s',LEGEND_ALGEBRAIC,'EC FLUXES',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_Na in component fast_Na (fmol_per_sec)',...
        'v_CaB in component CaB (fmol_per_sec)',...
        'v_funny_Na in component funny (fmol_per_sec)',...
        'v_Ca_D_LCC in component LCC (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 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('AP fluxes uA/uF')    
            else
                sgtitle('AP fluxes uA/uF')    
            end
        end
    end

    if true
        % Ca conservation 
        Ca_labels = {'q_Ca_i in component environment (fmol)',...
            'q_Ca_o in component environment (fmol)',...
            'q_Ca_D in component environment (fmol)',...
            'q_Ca_SR in component environment (fmol)',...
            'q_Ca_TRPN in component environment (fmol)',...
            'q_pCa_Ca in component environment (fmol)',...
            'q_CMDN_Ca in component environment (fmol)'};
        serca_ca = {};
        [~, i_st, ~] = find_indices(Ca_labels, cellstr(LEGEND_CONSTANTS), cellstr(LEGEND_STATES), cellstr(LEGEND_ALGEBRAIC));
        assert(length(Ca_labels)==length(i_st))
        figure,
        plot(VOI, sum(STATES(:,i_st),2));
        title('sum Ca fmol (no gates)')
    end

    % find pH
    Hlab = {'pHi in component environment (dimensionless)'};
    [~, ~, i_alg] = find_indices(Hlab, cellstr(LEGEND_CONSTANTS), cellstr(LEGEND_STATES), cellstr(LEGEND_ALGEBRAIC));
    figure,
    plot(VOI, ALGEBRAIC(:,i_alg))
    title(LEGEND_ALGEBRAIC(i_alg,:));
end            


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


function [] = plot_selected(ids,x,y,legend_x,legend_y,titlestr,ns)
    istart = 1;
    figure();
%     plot stimuli
    for i = 1:length(ids)
        subplot(ns,ns,i)
        plotting_x = x(istart:end);
        plotting_y = y(istart:end,ids(i));
        if isempty(plotting_y) % probably a constant scalar
            plotting_y = repmat(y(ids(i)),2);
            plotting_x = [x(istart), x(end)];
        end
        plot(plotting_x, plotting_y);
        xlabel('time (s)');
        str = split(legend_y(ids(i),:), ' ');
        str = legend_y(ids(i),:);
        l = legend(str);
        set(l,'interpreter','none');
    end
    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_leak in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,4) = strpad('kappa_K1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,5) = strpad('kappa_gK1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,6) = strpad('kappa_Kr in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,7) = strpad('kappa_xr10 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,8) = strpad('kappa_xr11 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,9) = strpad('kappa_xr20 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,10) = strpad('kappa_xr21 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,11) = strpad('kappa_Ks in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,12) = strpad('kappa_xs1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,13) = strpad('kappa_xs2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,14) = strpad('kappa_LCC_Ca1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,15) = strpad('kappa_LCC_Ca2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,16) = strpad('kappa_d000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,17) = strpad('kappa_d010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,18) = strpad('kappa_d020 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,19) = strpad('kappa_d001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,20) = strpad('kappa_d011 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,21) = strpad('kappa_d021 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,22) = strpad('kappa_f1_000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,23) = strpad('kappa_f1_100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,24) = strpad('kappa_f1_001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,25) = strpad('kappa_f1_101 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,26) = strpad('kappa_f2_000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,27) = strpad('kappa_f2_100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,28) = strpad('kappa_f2_001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,29) = strpad('kappa_f2_101 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,30) = strpad('kappa_f3_010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,31) = strpad('kappa_f3_110 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,32) = strpad('kappa_f3_011 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,33) = strpad('kappa_f3_111 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,34) = strpad('kappa_fCa000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,35) = strpad('kappa_fCa100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,36) = strpad('kappa_fCa010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,37) = strpad('kappa_fCa110 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,38) = strpad('kappa_fCa020 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,39) = strpad('kappa_fCa120 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,40) = strpad('kappa_1_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,41) = strpad('kappa_2_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,42) = strpad('kappa_3_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,43) = strpad('kappa_4_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,44) = strpad('kappa_5_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,45) = strpad('kappa_6_NCX in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,46) = strpad('kappa_NaB in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,47) = strpad('kappa_1_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,48) = strpad('kappa_2_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,49) = strpad('kappa_3_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,50) = strpad('kappa_4_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,51) = strpad('kappa_5_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,52) = strpad('kappa_6_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,53) = strpad('kappa_7_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,54) = strpad('kappa_8_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,55) = strpad('kappa_9_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,56) = strpad('kappa_10_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,57) = strpad('kappa_11_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,58) = strpad('kappa_12_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,59) = strpad('kappa_13_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,60) = strpad('kappa_14_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,61) = strpad('kappa_15_NaK in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,62) = strpad('kappa_PLBph1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,63) = strpad('kappa_PLBph2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,64) = strpad('kappa_PLBd1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,65) = strpad('kappa_PLBd2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,66) = strpad('kappa_Inh in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,67) = strpad('kappa_RyR in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,68) = strpad('kappa_OC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,69) = strpad('kappa_CCI in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,70) = strpad('kappa_CII in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,71) = strpad('kappa_IO in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,72) = strpad('kappa_SERCA_R1_2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,73) = strpad('kappa_SERCA_R2_4 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,74) = strpad('kappa_SERCA_R2_2a in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,75) = strpad('kappa_SERCA_R4_5 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,76) = strpad('kappa_SERCA_R5_6 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,77) = strpad('kappa_SERCA_R6_8 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,78) = strpad('kappa_SERCA_R8_9 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,79) = strpad('kappa_SERCA_R9_10 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,80) = strpad('kappa_SERCA_R10_1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,81) = strpad('kappa_TCC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,82) = strpad('kappa_R1_TCC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,83) = strpad('kappa_R2_TCC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,84) = strpad('kappa_R3_TCC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,85) = strpad('kappa_R4_TCC in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,86) = strpad('kappa_R_TRPNCa in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,87) = strpad('kappa_R_BU in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,88) = strpad('kappa_R_UW in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,89) = strpad('kappa_R_WS in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,90) = strpad('kappa_R_SU in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,91) = strpad('kappa_diadDf in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,92) = strpad('kappa_Na in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,93) = strpad('kappa_m000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,94) = strpad('kappa_m001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,95) = strpad('kappa_m010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,96) = strpad('kappa_m011 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,97) = strpad('kappa_m100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,98) = strpad('kappa_m101 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,99) = strpad('kappa_m110 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,100) = strpad('kappa_m111 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,101) = strpad('kappa_m200 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,102) = strpad('kappa_m201 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,103) = strpad('kappa_m210 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,104) = strpad('kappa_m211 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,105) = strpad('kappa_h000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,106) = strpad('kappa_h001 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,107) = strpad('kappa_h100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,108) = strpad('kappa_h101 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,109) = strpad('kappa_h200 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,110) = strpad('kappa_h201 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,111) = strpad('kappa_h300 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,112) = strpad('kappa_h301 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,113) = strpad('kappa_j000 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,114) = strpad('kappa_j010 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,115) = strpad('kappa_j100 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,116) = strpad('kappa_j110 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,117) = strpad('kappa_j200 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,118) = strpad('kappa_j210 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,119) = strpad('kappa_j300 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,120) = strpad('kappa_j310 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,121) = strpad('kappa_funny_Na in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,122) = strpad('kappa_funny_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,123) = strpad('kappa_R_xf in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,124) = strpad('kappa_pCa_R1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,125) = strpad('kappa_pCa_R2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,126) = strpad('kappa_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,127) = strpad('kappa_X00_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,128) = strpad('kappa_X10_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,129) = strpad('kappa_X01_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,130) = strpad('kappa_X11_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,131) = strpad('kappa_i00_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,132) = strpad('kappa_i10_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,133) = strpad('kappa_i20_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,134) = strpad('kappa_K_ATP in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,135) = strpad('kappa_TO in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,136) = strpad('kappa_gTO_1 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,137) = strpad('kappa_gTO_2 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,138) = strpad('kappa_gTO_3 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,139) = strpad('kappa_gTO_4 in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,140) = strpad('kappa_ns_Ca in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,141) = strpad('kappa_ns_Na in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,142) = strpad('kappa_ns_K in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,143) = strpad('kappa_Kp in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,144) = strpad('kappa_gKp in component BG_parameters (fmol_per_sec)');
    LEGEND_CONSTANTS(:,145) = strpad('K_Ca_i in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,146) = strpad('K_CMDN in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,147) = strpad('K_CMDN_Ca in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,148) = strpad('K_Ca_o in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,149) = strpad('K_Ca_SR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,150) = strpad('K_K_i in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,151) = strpad('K_K_o in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,152) = strpad('K_C_K1 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,153) = strpad('K_O_K1 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,154) = strpad('K_Sa_Kr in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,155) = strpad('K_Sb_Kr in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,156) = strpad('K_Sc_Kr in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,157) = strpad('K_Sd_Kr in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,158) = strpad('K_S_Ks0 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,159) = strpad('K_S_Ks1 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,160) = strpad('K_S_Ks2 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,161) = strpad('K_Ca_D in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,162) = strpad('K_000_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,163) = strpad('K_010_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,164) = strpad('K_020_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,165) = strpad('K_100_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,166) = strpad('K_110_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,167) = strpad('K_120_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,168) = strpad('K_001_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,169) = strpad('K_011_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,170) = strpad('K_021_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,171) = strpad('K_101_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,172) = strpad('K_111_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,173) = strpad('K_121_LCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,174) = strpad('K_1_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,175) = strpad('K_2_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,176) = strpad('K_3_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,177) = strpad('K_4_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,178) = strpad('K_5_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,179) = strpad('K_6_NCX in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,180) = strpad('K_Na_i in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,181) = strpad('K_Na_o in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,182) = strpad('K_1_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,183) = strpad('K_2_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,184) = strpad('K_3_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,185) = strpad('K_4_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,186) = strpad('K_5_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,187) = strpad('K_6_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,188) = strpad('K_7_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,189) = strpad('K_8_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,190) = strpad('K_9_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,191) = strpad('K_10_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,192) = strpad('K_11_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,193) = strpad('K_12_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,194) = strpad('K_13_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,195) = strpad('K_14_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,196) = strpad('K_15_NaK in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,197) = strpad('K_MgATP in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,198) = strpad('K_MgADP in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,199) = strpad('K_Pi in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,200) = strpad('K_H in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,201) = strpad('K_PLB in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,202) = strpad('K_PKACI in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,203) = strpad('K_PLB_PKACI in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,204) = strpad('K_PP1 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,205) = strpad('K_PLBp_PP1 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,206) = strpad('K_PLBp in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,207) = strpad('K_Ip in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,208) = strpad('K_Ip_PP1 in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,209) = strpad('K_C_RyR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,210) = strpad('K_CI_RyR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,211) = strpad('K_I_RyR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,212) = strpad('K_O_RyR in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,213) = strpad('K_P1_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,214) = strpad('K_P2_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,215) = strpad('K_P2a_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,216) = strpad('K_P4_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,217) = strpad('K_P5_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,218) = strpad('K_P6_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,219) = strpad('K_P8_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,220) = strpad('K_P9_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,221) = strpad('K_P10_SERCA in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,222) = strpad('K_S00_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,223) = strpad('K_S10_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,224) = strpad('K_S01_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,225) = strpad('K_S11_TCC in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,226) = strpad('K_TRPN in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,227) = strpad('K_Ca_TRPN in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,228) = strpad('K_B_XB in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,229) = strpad('K_U_XB in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,230) = strpad('K_W_XB in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,231) = strpad('K_S_XB in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,232) = strpad('K_000_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,233) = strpad('K_100_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,234) = strpad('K_200_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,235) = strpad('K_300_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,236) = strpad('K_010_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,237) = strpad('K_110_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,238) = strpad('K_210_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,239) = strpad('K_310_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,240) = strpad('K_001_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,241) = strpad('K_101_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,242) = strpad('K_201_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,243) = strpad('K_301_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,244) = strpad('K_011_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,245) = strpad('K_111_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,246) = strpad('K_211_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,247) = strpad('K_311_Na in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,248) = strpad('K_x0_funny in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,249) = strpad('K_x1_funny in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,250) = strpad('K_pCa in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,251) = strpad('K_pCa_Ca in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,252) = strpad('K_S00_K in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,253) = strpad('K_S10_K in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,254) = strpad('K_S20_K in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,255) = strpad('K_S01_K in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,256) = strpad('K_S11_K in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,257) = strpad('K_S21_K in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,258) = strpad('K_r0s0_TO in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,259) = strpad('K_r1s0_TO in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,260) = strpad('K_r0s1_TO in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,261) = strpad('K_r1s1_TO in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,262) = strpad('K_C_Kp in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,263) = strpad('K_O_Kp in component BG_parameters (per_fmol)');
    LEGEND_CONSTANTS(:,264) = strpad('zCa in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,265) = strpad('zK in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,266) = strpad('z_fK1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,267) = strpad('z_rK1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,268) = strpad('z_f_Kp in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,269) = strpad('z_r_Kp in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,270) = strpad('z_xr1_f in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,271) = strpad('z_xr1_r in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,272) = strpad('z_xr2_f in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,273) = strpad('z_xr2_r in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,274) = strpad('z_xs_f in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,275) = strpad('z_xs_r in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,276) = strpad('zf_NCX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,277) = strpad('zr_NCX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,278) = strpad('nNa_o_NCX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,279) = strpad('nNa_i_NCX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,280) = strpad('zNa in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,281) = strpad('zF_5 in component BG_parameters (C_per_mol)');
    LEGEND_CONSTANTS(:,282) = strpad('zF_8 in component BG_parameters (C_per_mol)');
    LEGEND_CONSTANTS(:,283) = strpad('z_df in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,284) = strpad('z_ff in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,285) = strpad('z_dr in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,286) = strpad('z_fr in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,287) = strpad('z_rTO_f in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,288) = strpad('z_sTO_f in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,289) = strpad('z_rTO_r in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,290) = strpad('z_sTO_r in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,291) = strpad('z_fh in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,292) = strpad('z_fj in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,293) = strpad('z_fm in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,294) = strpad('z_rh in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,295) = strpad('z_rj in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,296) = strpad('z_rm in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,297) = strpad('z_xff in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,298) = strpad('z_xfr in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,299) = strpad('z_fd in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,300) = strpad('z_ff1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,301) = strpad('z_ff2 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,302) = strpad('z_ff3 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,303) = strpad('z_rCa in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,304) = strpad('z_rd in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,305) = strpad('z_rf1 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,306) = strpad('z_rf2 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,307) = strpad('z_rf3 in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,308) = strpad('nK in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,309) = strpad('z_fX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,310) = strpad('z_fXi in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,311) = strpad('z_rX in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,312) = strpad('z_rXi in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,313) = strpad('n_Tm in component BG_parameters (dimensionless)');
    LEGEND_CONSTANTS(:,314) = strpad('n_CaTRPN in component BG_parameters (dimensionless)');
    LEGEND_VOI = strpad('time in component environment (second)');
    LEGEND_CONSTANTS(:,315) = strpad('vol_myo in component environment (pL)');
    LEGEND_CONSTANTS(:,316) = 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_Ca_D in component environment (fmol)');
    LEGEND_STATES(:,18) = strpad('q_Ca_TRPN in component environment (fmol)');
    LEGEND_STATES(:,19) = strpad('q_B_XB in component environment (fmol)');
    LEGEND_STATES(:,20) = strpad('q_U_XB in component environment (fmol)');
    LEGEND_STATES(:,21) = strpad('q_W_XB in component environment (fmol)');
    LEGEND_STATES(:,22) = strpad('q_S_XB in component environment (fmol)');
    LEGEND_STATES(:,23) = strpad('q_PLB in component environment (fmol)');
    LEGEND_STATES(:,24) = strpad('q_PKACI in component environment (fmol)');
    LEGEND_STATES(:,25) = strpad('q_PLB_PKACI in component environment (fmol)');
    LEGEND_STATES(:,26) = strpad('q_PP1 in component environment (fmol)');
    LEGEND_STATES(:,27) = strpad('q_PLBp_PP1 in component environment (fmol)');
    LEGEND_STATES(:,28) = strpad('q_PLBp in component environment (fmol)');
    LEGEND_CONSTANTS(:,317) = strpad('q_PLBp_baseline in component environment (fmol)');
    LEGEND_STATES(:,29) = strpad('q_Ip in component environment (fmol)');
    LEGEND_STATES(:,30) = strpad('q_Ip_PP1 in component environment (fmol)');
    LEGEND_STATES(:,31) = strpad('q_mem in component environment (fC)');
    LEGEND_ALGEBRAIC(:,4) = strpad('V_mem in component environment (J_per_C)');
    LEGEND_STATES(:,32) = strpad('q_S00_K in component environment (fmol)');
    LEGEND_STATES(:,33) = strpad('q_S10_K in component environment (fmol)');
    LEGEND_STATES(:,34) = strpad('q_S20_K in component environment (fmol)');
    LEGEND_STATES(:,35) = strpad('q_S01_K in component environment (fmol)');
    LEGEND_STATES(:,36) = strpad('q_S11_K in component environment (fmol)');
    LEGEND_STATES(:,37) = strpad('q_S21_K in component environment (fmol)');
    LEGEND_STATES(:,38) = strpad('q_C_K1 in component environment (fmol)');
    LEGEND_STATES(:,39) = strpad('q_O_K1 in component environment (fmol)');
    LEGEND_STATES(:,40) = strpad('q_C_Kp in component environment (fmol)');
    LEGEND_STATES(:,41) = strpad('q_O_Kp in component environment (fmol)');
    LEGEND_STATES(:,42) = strpad('q_Sa_Kr in component environment (fmol)');
    LEGEND_STATES(:,43) = strpad('q_Sb_Kr in component environment (fmol)');
    LEGEND_STATES(:,44) = strpad('q_Sc_Kr in component environment (fmol)');
    LEGEND_STATES(:,45) = strpad('q_Sd_Kr in component environment (fmol)');
    LEGEND_STATES(:,46) = strpad('q_S_Ks0 in component environment (fmol)');
    LEGEND_STATES(:,47) = strpad('q_S_Ks1 in component environment (fmol)');
    LEGEND_STATES(:,48) = strpad('q_S_Ks2 in component environment (fmol)');
    LEGEND_STATES(:,49) = strpad('q_000_LCC in component environment (fmol)');
    LEGEND_STATES(:,50) = strpad('q_010_LCC in component environment (fmol)');
    LEGEND_STATES(:,51) = strpad('q_020_LCC in component environment (fmol)');
    LEGEND_STATES(:,52) = strpad('q_100_LCC in component environment (fmol)');
    LEGEND_STATES(:,53) = strpad('q_110_LCC in component environment (fmol)');
    LEGEND_STATES(:,54) = strpad('q_120_LCC in component environment (fmol)');
    LEGEND_STATES(:,55) = strpad('q_001_LCC in component environment (fmol)');
    LEGEND_STATES(:,56) = strpad('q_011_LCC in component environment (fmol)');
    LEGEND_STATES(:,57) = strpad('q_021_LCC in component environment (fmol)');
    LEGEND_STATES(:,58) = strpad('q_101_LCC in component environment (fmol)');
    LEGEND_STATES(:,59) = strpad('q_111_LCC in component environment (fmol)');
    LEGEND_STATES(:,60) = strpad('q_121_LCC in component environment (fmol)');
    LEGEND_STATES(:,61) = strpad('q_1_NCX in component environment (fmol)');
    LEGEND_STATES(:,62) = strpad('q_2_NCX in component environment (fmol)');
    LEGEND_STATES(:,63) = strpad('q_3_NCX in component environment (fmol)');
    LEGEND_STATES(:,64) = strpad('q_4_NCX in component environment (fmol)');
    LEGEND_STATES(:,65) = strpad('q_5_NCX in component environment (fmol)');
    LEGEND_STATES(:,66) = strpad('q_6_NCX in component environment (fmol)');
    LEGEND_STATES(:,67) = strpad('q_C_RyR in component environment (fmol)');
    LEGEND_STATES(:,68) = strpad('q_CI_RyR in component environment (fmol)');
    LEGEND_STATES(:,69) = strpad('q_I_RyR in component environment (fmol)');
    LEGEND_STATES(:,70) = strpad('q_O_RyR in component environment (fmol)');
    LEGEND_STATES(:,71) = strpad('q_P1_SERCA in component environment (fmol)');
    LEGEND_STATES(:,72) = strpad('q_P2_SERCA in component environment (fmol)');
    LEGEND_STATES(:,73) = strpad('q_P2a_SERCA in component environment (fmol)');
    LEGEND_STATES(:,74) = strpad('q_P4_SERCA in component environment (fmol)');
    LEGEND_STATES(:,75) = strpad('q_P5_SERCA in component environment (fmol)');
    LEGEND_STATES(:,76) = strpad('q_P6_SERCA in component environment (fmol)');
    LEGEND_STATES(:,77) = strpad('q_P8_SERCA in component environment (fmol)');
    LEGEND_STATES(:,78) = strpad('q_P9_SERCA in component environment (fmol)');
    LEGEND_STATES(:,79) = strpad('q_P10_SERCA in component environment (fmol)');
    LEGEND_STATES(:,80) = strpad('q_S00_TCC in component environment (fmol)');
    LEGEND_STATES(:,81) = strpad('q_S10_TCC in component environment (fmol)');
    LEGEND_STATES(:,82) = strpad('q_S01_TCC in component environment (fmol)');
    LEGEND_STATES(:,83) = strpad('q_S11_TCC in component environment (fmol)');
    LEGEND_STATES(:,84) = strpad('q_r0s0_TO in component environment (fmol)');
    LEGEND_STATES(:,85) = strpad('q_r1s0_TO in component environment (fmol)');
    LEGEND_STATES(:,86) = strpad('q_r0s1_TO in component environment (fmol)');
    LEGEND_STATES(:,87) = strpad('q_r1s1_TO in component environment (fmol)');
    LEGEND_STATES(:,88) = strpad('q_000_Na in component environment (fmol)');
    LEGEND_STATES(:,89) = strpad('q_100_Na in component environment (fmol)');
    LEGEND_STATES(:,90) = strpad('q_200_Na in component environment (fmol)');
    LEGEND_STATES(:,91) = strpad('q_300_Na in component environment (fmol)');
    LEGEND_STATES(:,92) = strpad('q_010_Na in component environment (fmol)');
    LEGEND_STATES(:,93) = strpad('q_110_Na in component environment (fmol)');
    LEGEND_STATES(:,94) = strpad('q_210_Na in component environment (fmol)');
    LEGEND_STATES(:,95) = strpad('q_310_Na in component environment (fmol)');
    LEGEND_STATES(:,96) = strpad('q_001_Na in component environment (fmol)');
    LEGEND_STATES(:,97) = strpad('q_101_Na in component environment (fmol)');
    LEGEND_STATES(:,98) = strpad('q_201_Na in component environment (fmol)');
    LEGEND_STATES(:,99) = strpad('q_301_Na in component environment (fmol)');
    LEGEND_STATES(:,100) = strpad('q_011_Na in component environment (fmol)');
    LEGEND_STATES(:,101) = strpad('q_111_Na in component environment (fmol)');
    LEGEND_STATES(:,102) = strpad('q_211_Na in component environment (fmol)');
    LEGEND_STATES(:,103) = strpad('q_311_Na in component environment (fmol)');
    LEGEND_STATES(:,104) = strpad('q_x0_funny in component environment (fmol)');
    LEGEND_STATES(:,105) = strpad('q_x1_funny in component environment (fmol)');
    LEGEND_STATES(:,106) = strpad('q_P7 in component environment (fmol)');
    LEGEND_STATES(:,107) = strpad('q_P14 in component environment (fmol)');
    LEGEND_STATES(:,108) = strpad('q_P15 in component environment (fmol)');
    LEGEND_STATES(:,109) = strpad('q_P1 in component environment (fmol)');
    LEGEND_STATES(:,110) = strpad('q_P2 in component environment (fmol)');
    LEGEND_STATES(:,111) = strpad('q_P3 in component environment (fmol)');
    LEGEND_STATES(:,112) = strpad('q_P4 in component environment (fmol)');
    LEGEND_STATES(:,113) = strpad('q_P5 in component environment (fmol)');
    LEGEND_STATES(:,114) = strpad('q_P6 in component environment (fmol)');
    LEGEND_STATES(:,115) = strpad('q_P10 in component environment (fmol)');
    LEGEND_STATES(:,116) = strpad('q_P11 in component environment (fmol)');
    LEGEND_STATES(:,117) = strpad('q_P12 in component environment (fmol)');
    LEGEND_STATES(:,118) = strpad('q_P13 in component environment (fmol)');
    LEGEND_STATES(:,119) = strpad('q_P8 in component environment (fmol)');
    LEGEND_STATES(:,120) = strpad('q_P9 in component environment (fmol)');
    LEGEND_ALGEBRAIC(:,86) = strpad('v_CaB in component CaB (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,87) = strpad('I_mem_CaB in component CaB (fA)');
    LEGEND_ALGEBRAIC(:,90) = strpad('v_leak in component Ca_leak (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,79) = strpad('v_b2 in component CMDN_buffer (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,704) = strpad('v_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,705) = strpad('I_mem_Na in component fast_Na (fA)');
    LEGEND_ALGEBRAIC(:,720) = strpad('v_funny_K in component funny (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,721) = strpad('v_funny_Na in component funny (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,725) = strpad('I_mem_funny in component funny (fA)');
    LEGEND_ALGEBRAIC(:,124) = strpad('v_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,126) = strpad('I_mem_K in component K (fA)');
    LEGEND_ALGEBRAIC(:,147) = strpad('v_K_ATP in component K_ATP (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,148) = strpad('I_mem_K_ATP in component K_ATP (fA)');
    LEGEND_ALGEBRAIC(:,138) = strpad('v_K1 in component K1 (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,140) = strpad('I_mem_K1 in component K1 (fA)');
    LEGEND_ALGEBRAIC(:,160) = strpad('v_Kp in component Kp (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,162) = strpad('I_mem_Kp in component Kp (fA)');
    LEGEND_ALGEBRAIC(:,182) = strpad('v_Kr in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,190) = strpad('I_mem_Kr in component Kr (fA)');
    LEGEND_ALGEBRAIC(:,205) = strpad('v_Ks in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,210) = strpad('I_mem_Ks in component Ks (fA)');
    LEGEND_ALGEBRAIC(:,448) = strpad('v_K_o_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,449) = strpad('v_K_i_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,452) = strpad('v_Na_o_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,453) = strpad('v_Na_i_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,447) = strpad('v_H_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,450) = strpad('v_MgADP_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,451) = strpad('v_MgATP_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,454) = strpad('v_Pi_NaK in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,442) = strpad('I_mem_NaK in component NaK (fA)');
    LEGEND_ALGEBRAIC(:,360) = strpad('v_NaB in component NaB (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,361) = strpad('I_mem_NaB in component NaB (fA)');
    LEGEND_ALGEBRAIC(:,732) = strpad('v_ns_Ca in component ns (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,739) = strpad('v_ns_Na in component ns (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,746) = strpad('v_ns_K in component ns (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,733) = strpad('I_mem_ns_Ca in component ns (fA)');
    LEGEND_ALGEBRAIC(:,740) = strpad('I_mem_ns_Na in component ns (fA)');
    LEGEND_ALGEBRAIC(:,747) = strpad('I_mem_ns_K in component ns (fA)');
    LEGEND_ALGEBRAIC(:,353) = strpad('v_Ca_o_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,354) = strpad('v_Ca_i_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,355) = strpad('v_Na_o_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,356) = strpad('v_Na_i_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,352) = strpad('I_mem_NCX in component NCX (fA)');
    LEGEND_ALGEBRAIC(:,752) = strpad('v_pCa_R1 in component pCa (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,753) = strpad('v_pCa_R2 in component pCa (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,754) = strpad('I_mem_pCa in component pCa (fA)');
    LEGEND_ALGEBRAIC(:,515) = strpad('v_Ca_i_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,520) = strpad('v_Ca_SR_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,527) = strpad('v_H_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,509) = strpad('v_MgADP_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,506) = strpad('v_MgATP_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,504) = strpad('v_Pi_SERCA in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,546) = strpad('v_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,554) = strpad('I_mem_TCC in component TCC (fA)');
    LEGEND_ALGEBRAIC(:,574) = strpad('v_TO in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,582) = strpad('I_mem_TO in component TO (fA)');
    LEGEND_ALGEBRAIC(:,587) = strpad('v_R_TRPNCa in component crossbridge_TRPN (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,594) = strpad('v_R_BU in component crossbridge_TRPN (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,596) = strpad('v_R_UW in component crossbridge_TRPN (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,598) = strpad('v_R_WS in component crossbridge_TRPN (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,600) = strpad('v_R_SU in component crossbridge_TRPN (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,81) = strpad('T_total in component crossbridge_TRPN (kPa)');
    LEGEND_STATES(:,121) = strpad('SL in component crossbridge_TRPN (metre)');
    LEGEND_ALGEBRAIC(:,593) = strpad('v_diadDf in component diadCaDiffusion (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,316) = strpad('v_Ca_D_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,315) = strpad('v_Ca_o_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,314) = strpad('I_mem_LCC in component LCC (fA)');
    LEGEND_ALGEBRAIC(:,69) = strpad('v_PLBph1 in component PLB (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,74) = strpad('v_PLBph2 in component PLB (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,78) = strpad('v_PLBd1 in component PLB (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,82) = strpad('v_PLBd2 in component PLB (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,70) = strpad('v_Inh in component PLB (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,461) = strpad('v_RyR in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,466) = strpad('v_RyRgate_Ca_D in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,47) = strpad('I_stim in component environment (fA)');
    LEGEND_CONSTANTS(:,318) = strpad('stimPeriod in component environment (second)');
    LEGEND_CONSTANTS(:,319) = strpad('stimDuration in component environment (second)');
    LEGEND_ALGEBRAIC(:,43) = strpad('tPeriod in component environment (second)');
    LEGEND_ALGEBRAIC(:,2) = strpad('dSL in component environment (m_per_s)');
    LEGEND_CONSTANTS(:,320) = strpad('V_max in component environment (m_per_s)');
    LEGEND_ALGEBRAIC(:,3) = strpad('cHi in component environment (mM)');
    LEGEND_ALGEBRAIC(:,42) = strpad('pHi in component environment (dimensionless)');
    LEGEND_CONSTANTS(:,321) = strpad('R in component constants (J_per_K_per_mol)');
    LEGEND_CONSTANTS(:,322) = strpad('T in component constants (kelvin)');
    LEGEND_CONSTANTS(:,323) = strpad('F in component constants (C_per_mol)');
    LEGEND_ALGEBRAIC(:,52) = strpad('mu_CMDN in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,58) = strpad('mu_CMDN_Ca in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,71) = strpad('mu_Ca_i in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,75) = strpad('Af_b2 in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,64) = strpad('Ar_b2 in component CMDN_buffer (J_per_mol)');
    LEGEND_ALGEBRAIC(:,83) = strpad('mu_Ca_i in component CaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,84) = strpad('mu_Ca_o in component CaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,85) = strpad('Am_CaB in component CaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,88) = strpad('mu_Ca_SR in component Ca_leak (J_per_mol)');
    LEGEND_ALGEBRAIC(:,89) = strpad('mu_Ca_i in component Ca_leak (J_per_mol)');
    LEGEND_ALGEBRAIC(:,92) = strpad('mu_K_o in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,93) = strpad('mu_K_i in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,5) = strpad('mu_S00_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,6) = strpad('mu_S01_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,7) = strpad('mu_S10_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,8) = strpad('mu_S11_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,9) = strpad('mu_S20_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,94) = strpad('mu_S21_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,103) = strpad('Am_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,95) = strpad('Af_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,104) = strpad('Ar_K in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,96) = strpad('Af_X00 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,105) = strpad('Ar_X00 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,106) = strpad('v_X00 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,97) = strpad('Af_X01 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,107) = strpad('Ar_X01 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,108) = strpad('v_X01 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,98) = strpad('Af_X10 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,109) = strpad('Ar_X10 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,110) = strpad('v_X10 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,99) = strpad('Af_X11 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,111) = strpad('Ar_X11 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,112) = strpad('v_X11 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,100) = strpad('Af_i00 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,113) = strpad('Ar_i00 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,114) = strpad('v_i00 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,101) = strpad('Af_i10 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,117) = strpad('Ar_i10 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,118) = strpad('v_i10 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,102) = strpad('Af_i20 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,121) = strpad('Ar_i20 in component K (J_per_mol)');
    LEGEND_ALGEBRAIC(:,122) = strpad('v_i20 in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,91) = strpad('V_mem in component K (volt)');
    LEGEND_ALGEBRAIC(:,115) = strpad('v_S00_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,116) = strpad('v_S01_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,119) = strpad('v_S10_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,120) = strpad('v_S11_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,123) = strpad('v_S20_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,125) = strpad('v_S21_K in component K (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,128) = strpad('mu_K_o in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,129) = strpad('mu_K_i in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,10) = strpad('mu_C_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,130) = strpad('mu_O_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,137) = strpad('v_C_K1 in component K1 (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,139) = strpad('v_O_K1 in component K1 (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,133) = strpad('Am_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,131) = strpad('Af_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,134) = strpad('Ar_K1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,132) = strpad('Af_gK1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,135) = strpad('Ar_gK1 in component K1 (J_per_mol)');
    LEGEND_ALGEBRAIC(:,136) = strpad('v_gK1 in component K1 (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,127) = strpad('V_mem in component K1 (volt)');
    LEGEND_ALGEBRAIC(:,142) = strpad('mu_K_o in component K_ATP (J_per_mol)');
    LEGEND_ALGEBRAIC(:,143) = strpad('mu_K_i in component K_ATP (J_per_mol)');
    LEGEND_ALGEBRAIC(:,145) = strpad('Am_K_ATP in component K_ATP (J_per_mol)');
    LEGEND_ALGEBRAIC(:,144) = strpad('Af_K_ATP in component K_ATP (J_per_mol)');
    LEGEND_ALGEBRAIC(:,146) = strpad('Ar_K_ATP in component K_ATP (J_per_mol)');
    LEGEND_ALGEBRAIC(:,141) = strpad('V_mem in component K_ATP (volt)');
    LEGEND_ALGEBRAIC(:,150) = strpad('mu_K_o in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,151) = strpad('mu_K_i in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,11) = strpad('mu_C_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,152) = strpad('mu_O_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,155) = strpad('Am_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,153) = strpad('Af_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,156) = strpad('Ar_Kp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,154) = strpad('Af_gKp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,157) = strpad('Ar_gKp in component Kp (J_per_mol)');
    LEGEND_ALGEBRAIC(:,158) = strpad('v_gKp in component Kp (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,159) = strpad('v_C_Kp in component Kp (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,161) = strpad('v_O_Kp in component Kp (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,149) = strpad('V_mem in component Kp (volt)');
    LEGEND_ALGEBRAIC(:,163) = strpad('u_K_i in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,164) = strpad('u_K_o in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,165) = strpad('V_mem in component Kr (J_per_C)');
    LEGEND_ALGEBRAIC(:,166) = strpad('Am_Kr in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,180) = strpad('Af_Kr in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,181) = strpad('Ar_Kr in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,178) = strpad('v_Sa in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,188) = strpad('v_Sb in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,186) = strpad('v_Sc in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,189) = strpad('v_Sd in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,173) = strpad('v_x10 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,185) = strpad('v_x11 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,177) = strpad('v_x20 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,187) = strpad('v_x21 in component Kr (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,167) = strpad('mu_Sa in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,170) = strpad('mu_Sb in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,174) = strpad('mu_Sc in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,179) = strpad('mu_Sd in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,168) = strpad('Af_x10 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,171) = strpad('Ar_x10 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,175) = strpad('Af_x11 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,183) = strpad('Ar_x11 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,169) = strpad('Af_x20 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,176) = strpad('Ar_x20 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,172) = strpad('Af_x21 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,184) = strpad('Ar_x21 in component Kr (J_per_mol)');
    LEGEND_ALGEBRAIC(:,191) = strpad('u_K_i in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,192) = strpad('u_K_o in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,193) = strpad('V_mem in component Ks (J_per_C)');
    LEGEND_ALGEBRAIC(:,194) = strpad('Am_Ks in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,203) = strpad('Af_Ks in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,204) = strpad('Ar_Ks in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,201) = strpad('v_S_Ks0 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,208) = strpad('v_S_Ks1 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,209) = strpad('v_S_Ks2 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,200) = strpad('v_xs1 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,207) = strpad('v_xs2 in component Ks (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,195) = strpad('mu_S_Ks0 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,197) = strpad('mu_S_Ks1 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,202) = strpad('mu_S_Ks2 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,196) = strpad('Af_xs1 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,198) = strpad('Ar_xs1 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,199) = strpad('Af_xs2 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,206) = strpad('Ar_xs2 in component Ks (J_per_mol)');
    LEGEND_ALGEBRAIC(:,212) = strpad('mu_Ca_o in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,213) = strpad('mu_Ca_D in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,211) = strpad('V_mem in component LCC (volt)');
    LEGEND_ALGEBRAIC(:,222) = strpad('Af_LCC_Ca1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,250) = strpad('Ar_LCC_Ca1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,248) = strpad('Am_LCC_Ca1 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,310) = strpad('v_LCC_Ca1 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,223) = strpad('Af_LCC_Ca2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,251) = strpad('Ar_LCC_Ca2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,249) = strpad('Am_LCC_Ca2 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,312) = strpad('v_LCC_Ca2 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,242) = strpad('Af_fCa00 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,288) = strpad('Ar_fCa00 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,289) = strpad('v_fCa00 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,243) = strpad('Af_fCa01 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,292) = strpad('Ar_fCa01 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,293) = strpad('v_fCa01 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,244) = strpad('Af_fCa02 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,296) = strpad('Ar_fCa02 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,297) = strpad('v_fCa02 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,245) = strpad('Af_fCa10 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,300) = strpad('Ar_fCa10 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,301) = strpad('v_fCa10 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,246) = strpad('Af_fCa11 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,304) = strpad('Ar_fCa11 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,305) = strpad('v_fCa11 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,247) = strpad('Af_fCa12 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,307) = strpad('Ar_fCa12 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,308) = strpad('v_fCa12 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,214) = strpad('mu_S000_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,290) = strpad('v_S000_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,215) = strpad('mu_S010_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,294) = strpad('v_S010_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,216) = strpad('mu_S020_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,298) = strpad('v_S020_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,217) = strpad('mu_S100_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,302) = strpad('v_S100_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,218) = strpad('mu_S110_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,306) = strpad('v_S110_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,220) = strpad('mu_S120_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,309) = strpad('v_S120_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,12) = strpad('mu_S001_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,291) = strpad('v_S001_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,13) = strpad('mu_S011_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,295) = strpad('v_S011_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,14) = strpad('mu_S021_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,299) = strpad('v_S021_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,15) = strpad('mu_S101_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,303) = strpad('v_S101_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,219) = strpad('mu_S111_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,311) = strpad('v_S111_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,221) = strpad('mu_S121_LCC in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,313) = strpad('v_S121_LCC in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,224) = strpad('Af_d000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,252) = strpad('Ar_d000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,253) = strpad('v_d000 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,226) = strpad('Af_d010 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,256) = strpad('Ar_d010 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,257) = strpad('v_d010 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,228) = strpad('Af_d020 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,260) = strpad('Ar_d020 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,261) = strpad('v_d020 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,230) = strpad('Af_f1_000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,264) = strpad('Ar_f1_000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,265) = strpad('v_f1_000 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,234) = strpad('Af_f2_000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,272) = strpad('Ar_f2_000 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,273) = strpad('v_f2_000 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,238) = strpad('Af_f3_010 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,280) = strpad('Ar_f3_010 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,281) = strpad('v_f3_010 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,232) = strpad('Af_f1_100 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,268) = strpad('Ar_f1_100 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,269) = strpad('v_f1_100 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,236) = strpad('Af_f2_100 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,276) = strpad('Ar_f2_100 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,277) = strpad('v_f2_100 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,240) = strpad('Af_f3_110 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,284) = strpad('Ar_f3_110 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,285) = strpad('v_f3_110 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,225) = strpad('Af_d001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,254) = strpad('Ar_d001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,255) = strpad('v_d001 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,227) = strpad('Af_d011 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,258) = strpad('Ar_d011 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,259) = strpad('v_d011 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,229) = strpad('Af_d021 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,262) = strpad('Ar_d021 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,263) = strpad('v_d021 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,231) = strpad('Af_f1_001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,266) = strpad('Ar_f1_001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,267) = strpad('v_f1_001 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,235) = strpad('Af_f2_001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,274) = strpad('Ar_f2_001 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,275) = strpad('v_f2_001 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,239) = strpad('Af_f3_011 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,282) = strpad('Ar_f3_011 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,283) = strpad('v_f3_011 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,233) = strpad('Af_f1_101 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,270) = strpad('Ar_f1_101 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,271) = strpad('v_f1_101 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,237) = strpad('Af_f2_101 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,278) = strpad('Ar_f2_101 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,279) = strpad('v_f2_101 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,241) = strpad('Af_f3_111 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,286) = strpad('Ar_f3_111 in component LCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,287) = strpad('v_f3_111 in component LCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,16) = strpad('Ca_tot in component LCC (fmol)');
    LEGEND_ALGEBRAIC(:,318) = strpad('mu_Ca_o in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,319) = strpad('mu_Ca_i in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,320) = strpad('mu_Na_o in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,321) = strpad('mu_Na_i in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,322) = strpad('mu_P1_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,323) = strpad('mu_P2_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,324) = strpad('mu_P3_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,325) = strpad('mu_P4_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,326) = strpad('mu_P5_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,327) = strpad('mu_P6_NCX in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,350) = strpad('v_P1_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,339) = strpad('v_P2_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,342) = strpad('v_P3_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,344) = strpad('v_P4_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,347) = strpad('v_P5_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,351) = strpad('v_P6_NCX in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,328) = strpad('Af_r1 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,334) = strpad('Ar_r1 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,335) = strpad('v_r1 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,329) = strpad('Af_r2 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,336) = strpad('Ar_r2 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,337) = strpad('v_r2 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,330) = strpad('Af_r3 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,338) = strpad('Ar_r3 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,340) = strpad('v_r3 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,331) = strpad('Af_r4 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,341) = strpad('Ar_r4 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,343) = strpad('v_r4 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,332) = strpad('Af_r5 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,345) = strpad('Ar_r5 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,346) = strpad('v_r5 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,333) = strpad('Af_r6 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,348) = strpad('Ar_r6 in component NCX (J_per_mol)');
    LEGEND_ALGEBRAIC(:,349) = strpad('v_r6 in component NCX (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,317) = strpad('V_mem in component NCX (volt)');
    LEGEND_ALGEBRAIC(:,357) = strpad('mu_Na_i in component NaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,358) = strpad('mu_Na_o in component NaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,359) = strpad('Am_NaB in component NaB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,364) = strpad('mu_K_o in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,365) = strpad('mu_K_i in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,368) = strpad('mu_Na_o in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,369) = strpad('mu_Na_i in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,363) = strpad('mu_H in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,366) = strpad('mu_MgADP in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,367) = strpad('mu_MgATP in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,382) = strpad('mu_P7 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,385) = strpad('mu_Pi in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,375) = strpad('mu_P14 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,376) = strpad('mu_P15 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,370) = strpad('mu_P1 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,377) = strpad('mu_P2 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,378) = strpad('mu_P3 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,379) = strpad('mu_P4 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,380) = strpad('mu_P5 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,381) = strpad('mu_P6 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,371) = strpad('mu_P10 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,372) = strpad('mu_P11 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,373) = strpad('mu_P12 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,374) = strpad('mu_P13 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,383) = strpad('mu_P8 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,384) = strpad('mu_P9 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,416) = strpad('v_P14 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,421) = strpad('v_P15 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,422) = strpad('v_P1 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,423) = strpad('v_P2 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,426) = strpad('v_P3 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,429) = strpad('v_P4 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,432) = strpad('v_P5 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,435) = strpad('v_P6 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,445) = strpad('v_P10 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,407) = strpad('v_P11 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,410) = strpad('v_P12 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,413) = strpad('v_P13 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,438) = strpad('v_P7 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,441) = strpad('v_P8 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,446) = strpad('v_P9 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,386) = strpad('Af_R1 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,401) = strpad('Ar_R1 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,402) = strpad('v_R1 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,387) = strpad('Af_R10 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,403) = strpad('Ar_R10 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,404) = strpad('v_R10 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,388) = strpad('Af_R11 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,405) = strpad('Ar_R11 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,406) = strpad('v_R11 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,389) = strpad('Af_R12 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,408) = strpad('Ar_R12 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,409) = strpad('v_R12 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,390) = strpad('Af_R13 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,411) = strpad('Ar_R13 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,412) = strpad('v_R13 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,391) = strpad('Af_R14 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,414) = strpad('Ar_R14 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,415) = strpad('v_R14 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,392) = strpad('Af_R15 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,417) = strpad('Ar_R15 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,419) = strpad('v_R15 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,393) = strpad('Af_R2 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,418) = strpad('Ar_R2 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,420) = strpad('v_R2 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,394) = strpad('Af_R3 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,424) = strpad('Ar_R3 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,425) = strpad('v_R3 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,395) = strpad('Af_R4 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,427) = strpad('Ar_R4 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,428) = strpad('v_R4 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,396) = strpad('Af_R5 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,430) = strpad('Ar_R5 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,431) = strpad('v_R5 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,397) = strpad('Af_R6 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,433) = strpad('Ar_R6 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,434) = strpad('v_R6 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,398) = strpad('Af_R7 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,436) = strpad('Ar_R7 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,437) = strpad('v_R7 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,399) = strpad('Af_R8 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,439) = strpad('Ar_R8 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,440) = strpad('v_R8 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,400) = strpad('Af_R9 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,443) = strpad('Ar_R9 in component NaK (J_per_mol)');
    LEGEND_ALGEBRAIC(:,444) = strpad('v_R9 in component NaK (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,362) = strpad('V_mem in component NaK (volt)');
    LEGEND_ALGEBRAIC(:,1) = strpad('mu_PLB in component PLB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,41) = strpad('mu_PKACI in component PLB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,46) = strpad('mu_PLB_PKACI in component PLB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,51) = strpad('mu_PP1 in component PLB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,56) = strpad('mu_PLBp_PP1 in component PLB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,62) = strpad('mu_PLBp in component PLB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,57) = strpad('mu_Ip in component PLB (J_per_mol)');
    LEGEND_ALGEBRAIC(:,63) = strpad('mu_Ip_PP1 in component PLB (J_per_mol)');
    LEGEND_CONSTANTS(:,324) = strpad('nCa_1 in component RyR (dimensionless)');
    LEGEND_CONSTANTS(:,325) = strpad('nCa_2 in component RyR (dimensionless)');
    LEGEND_ALGEBRAIC(:,455) = strpad('mu_Ca_SR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,456) = strpad('mu_Ca_D in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,17) = strpad('q_Ca_gate_complexes in component RyR (fmol)');
    LEGEND_ALGEBRAIC(:,457) = strpad('mu_C_RyR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,458) = strpad('mu_CI_RyR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,459) = strpad('mu_I_RyR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,460) = strpad('mu_O_RyR in component RyR (J_per_mol)');
    LEGEND_ALGEBRAIC(:,462) = strpad('v_OC in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,463) = strpad('v_CCI in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,464) = strpad('v_CII in component RyR (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,465) = strpad('v_IO in component RyR (fmol_per_sec)');
    LEGEND_CONSTANTS(:,326) = strpad('n_Ca_i in component SERCA (dimensionless)');
    LEGEND_CONSTANTS(:,327) = strpad('n_Ca_SR in component SERCA (dimensionless)');
    LEGEND_CONSTANTS(:,328) = strpad('n_H in component SERCA (dimensionless)');
    LEGEND_ALGEBRAIC(:,18) = strpad('q_SERCA_Ca_complexes in component SERCA (fmol)');
    LEGEND_ALGEBRAIC(:,19) = strpad('c_Ca_i in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,20) = strpad('c_Ca_SR in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,21) = strpad('c_H in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,22) = strpad('c_MgADP in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,23) = strpad('c_MgATP in component SERCA (mM)');
    LEGEND_ALGEBRAIC(:,24) = strpad('c_Pi in component SERCA (mM)');
    LEGEND_CONSTANTS(:,329) = strpad('vol_i in component SERCA (pL)');
    LEGEND_CONSTANTS(:,347) = strpad('vol_sr in component SERCA (pL)');
    LEGEND_CONSTANTS(:,351) = strpad('vol_isr in component SERCA (pL)');
    LEGEND_ALGEBRAIC(:,467) = strpad('mu_Ca_i in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,468) = strpad('mu_Ca_SR in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,469) = strpad('mu_H in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,470) = strpad('mu_MgADP in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,471) = strpad('mu_MgATP in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,473) = strpad('mu_P1 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,507) = strpad('v_P1 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,472) = strpad('mu_Pi in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,474) = strpad('mu_P2 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,514) = strpad('v_P2 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,475) = strpad('mu_P2a in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,511) = strpad('v_P2a in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,476) = strpad('mu_P4 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,517) = strpad('v_P4 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,477) = strpad('mu_P5 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,518) = strpad('v_P5 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,479) = strpad('mu_P6 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,522) = strpad('v_P6 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,481) = strpad('mu_P8 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,525) = strpad('v_P8 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,482) = strpad('mu_P9 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,528) = strpad('v_P9 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,478) = strpad('mu_P10 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,529) = strpad('v_P10 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,483) = strpad('mu_PLBp_baseline in component SERCA (J_per_mol)');
    LEGEND_CONSTANTS(:,346) = strpad('mu_PLBp in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,484) = strpad('mu_PLBp_eff in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,487) = strpad('Af_R1_2 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,488) = strpad('Ar_R1_2 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,505) = strpad('v_SERCA_R1_2 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,489) = strpad('Af_R5_6 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,490) = strpad('Ar_R5_6 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,508) = strpad('v_SERCA_R5_6 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,491) = strpad('Af_R2_2a in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,492) = strpad('Ar_R2_2a in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,510) = strpad('v_SERCA_R2_2a in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,493) = strpad('Af_R2_4 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,494) = strpad('Ar_R2_4 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,512) = strpad('v_SERCA_R2_4 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,495) = strpad('Af_R4_5 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,496) = strpad('Ar_R4_5 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,513) = strpad('v_SERCA_R4_5 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,497) = strpad('Af_R6_8 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,498) = strpad('Ar_R6_8 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,516) = strpad('v_SERCA_R6_8 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,499) = strpad('Af_R8_9 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,500) = strpad('Ar_R8_9 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,521) = strpad('v_SERCA_R8_9 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,501) = strpad('Af_R9_10 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,502) = strpad('Ar_R9_10 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,524) = strpad('v_SERCA_R9_10 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,485) = strpad('Af_R10_1 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,486) = strpad('Ar_R10_1 in component SERCA (J_per_mol)');
    LEGEND_ALGEBRAIC(:,503) = strpad('v_SERCA_R10_1 in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,480) = strpad('v_SERCA_R10_1_noPLBp in component SERCA (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,519) = strpad('u_Ca_i in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,523) = strpad('u_Ca_o in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,526) = strpad('V_mem in component TCC (J_per_C)');
    LEGEND_ALGEBRAIC(:,530) = strpad('Am_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,544) = strpad('Af_Ca in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,545) = strpad('Ar_Ca in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,542) = strpad('v_s00_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,552) = strpad('v_s10_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,550) = strpad('v_s01_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,553) = strpad('v_s11_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,537) = strpad('v_R1_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,549) = strpad('v_R2_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,541) = strpad('v_R3_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,551) = strpad('v_R4_TCC in component TCC (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,531) = strpad('mu_s00_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,534) = strpad('mu_s10_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,538) = strpad('mu_s01_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,543) = strpad('mu_s11_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,532) = strpad('Af_R1_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,535) = strpad('Ar_R1_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,539) = strpad('Af_R2_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,547) = strpad('Ar_R2_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,533) = strpad('Af_R3_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,540) = strpad('Ar_R3_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,536) = strpad('Af_R4_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,548) = strpad('Ar_R4_TCC in component TCC (J_per_mol)');
    LEGEND_ALGEBRAIC(:,555) = strpad('u_K_i in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,556) = strpad('u_K_o in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,557) = strpad('V_mem in component TO (J_per_C)');
    LEGEND_ALGEBRAIC(:,558) = strpad('Am_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,572) = strpad('Af_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,573) = strpad('Ar_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,570) = strpad('v_r0s0_TO in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,580) = strpad('v_r1s0_TO in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,578) = strpad('v_r0s1_TO in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,581) = strpad('v_r1s1_TO in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,565) = strpad('v_gTO_1 in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,569) = strpad('v_gTO_3 in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,577) = strpad('v_gTO_2 in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,579) = strpad('v_gTO_4 in component TO (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,559) = strpad('mu_r0s0_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,562) = strpad('mu_r1s0_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,566) = strpad('mu_r0s1_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,571) = strpad('mu_r1s1_TO in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,560) = strpad('Af_gTO_1 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,563) = strpad('Ar_gTO_1 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,561) = strpad('Af_gTO_3 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,567) = strpad('Ar_gTO_3 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,568) = strpad('Af_gTO_2 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,575) = strpad('Ar_gTO_2 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,564) = strpad('Af_gTO_4 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,576) = strpad('Ar_gTO_4 in component TO (J_per_mol)');
    LEGEND_ALGEBRAIC(:,583) = strpad('mu_TRPN in component crossbridge_TRPN (J_per_mol)');
    LEGEND_ALGEBRAIC(:,584) = strpad('mu_Ca_i in component crossbridge_TRPN (J_per_mol)');
    LEGEND_ALGEBRAIC(:,585) = strpad('mu_Ca_TRPN in component crossbridge_TRPN (J_per_mol)');
    LEGEND_ALGEBRAIC(:,586) = strpad('mu_B_XB in component crossbridge_TRPN (J_per_mol)');
    LEGEND_ALGEBRAIC(:,588) = strpad('mu_U_XB in component crossbridge_TRPN (J_per_mol)');
    LEGEND_ALGEBRAIC(:,590) = strpad('mu_W_XB in component crossbridge_TRPN (J_per_mol)');
    LEGEND_ALGEBRAIC(:,592) = strpad('mu_S_XB in component crossbridge_TRPN (J_per_mol)');
    LEGEND_CONSTANTS(:,330) = strpad('SL_0 in component crossbridge_TRPN (metre)');
    LEGEND_CONSTANTS(:,331) = strpad('q_MS in component crossbridge_TRPN (fmol)');
    LEGEND_CONSTANTS(:,332) = strpad('r_s in component crossbridge_TRPN (dimensionless)');
    LEGEND_CONSTANTS(:,333) = strpad('r_w in component crossbridge_TRPN (dimensionless)');
    LEGEND_CONSTANTS(:,334) = strpad('A_eff in component crossbridge_TRPN (dimensionless)');
    LEGEND_CONSTANTS(:,335) = strpad('phi in component crossbridge_TRPN (dimensionless)');
    LEGEND_CONSTANTS(:,336) = strpad('k_uw in component crossbridge_TRPN (per_sec)');
    LEGEND_CONSTANTS(:,337) = strpad('k_ws in component crossbridge_TRPN (per_sec)');
    LEGEND_STATES(:,122) = strpad('G_w in component crossbridge_TRPN (metre)');
    LEGEND_STATES(:,123) = strpad('G_s in component crossbridge_TRPN (metre)');
    LEGEND_CONSTANTS(:,348) = strpad('c_w in component crossbridge_TRPN (per_sec)');
    LEGEND_CONSTANTS(:,349) = strpad('c_s in component crossbridge_TRPN (per_sec)');
    LEGEND_CONSTANTS(:,345) = strpad('A_w in component crossbridge_TRPN (dimensionless)');
    LEGEND_CONSTANTS(:,350) = strpad('A_s in component crossbridge_TRPN (dimensionless)');
    LEGEND_ALGEBRAIC(:,59) = strpad('nu_1 in component crossbridge_TRPN (m_per_s)');
    LEGEND_ALGEBRAIC(:,48) = strpad('nu_2 in component crossbridge_TRPN (m_per_s)');
    LEGEND_ALGEBRAIC(:,53) = strpad('nu_3 in component crossbridge_TRPN (m_per_s)');
    LEGEND_ALGEBRAIC(:,60) = strpad('nu_4 in component crossbridge_TRPN (m_per_s)');
    LEGEND_ALGEBRAIC(:,49) = strpad('nu_5 in component crossbridge_TRPN (m_per_s)');
    LEGEND_ALGEBRAIC(:,54) = strpad('nu_6 in component crossbridge_TRPN (m_per_s)');
    LEGEND_ALGEBRAIC(:,65) = strpad('v_1 in component crossbridge_TRPN (m_per_s)');
    LEGEND_ALGEBRAIC(:,44) = strpad('v_2 in component crossbridge_TRPN (m_per_s)');
    LEGEND_ALGEBRAIC(:,66) = strpad('v_4 in component crossbridge_TRPN (m_per_s)');
    LEGEND_CONSTANTS(:,338) = strpad('v_to_mu in component crossbridge_TRPN (Js_per_m2)');
    LEGEND_ALGEBRAIC(:,50) = strpad('T_active in component crossbridge_TRPN (kPa)');
    LEGEND_CONSTANTS(:,339) = strpad('T_ref in component crossbridge_TRPN (kPa)');
    LEGEND_ALGEBRAIC(:,25) = strpad('F_T_S in component crossbridge_TRPN (kPa)');
    LEGEND_ALGEBRAIC(:,45) = strpad('F_T_W in component crossbridge_TRPN (kPa)');
    LEGEND_ALGEBRAIC(:,55) = strpad('C_s in component crossbridge_TRPN (metre)');
    LEGEND_STATES(:,124) = strpad('C_d in component crossbridge_TRPN (metre)');
    LEGEND_ALGEBRAIC(:,61) = strpad('eta in component crossbridge_TRPN (second)');
    LEGEND_CONSTANTS(:,340) = strpad('eta_l in component crossbridge_TRPN (second)');
    LEGEND_CONSTANTS(:,341) = strpad('eta_s in component crossbridge_TRPN (second)');
    LEGEND_CONSTANTS(:,342) = strpad('k in component crossbridge_TRPN (dimensionless)');
    LEGEND_CONSTANTS(:,343) = strpad('alpha in component crossbridge_TRPN (kPa)');
    LEGEND_ALGEBRAIC(:,67) = strpad('v_Cdd in component crossbridge_TRPN (m_per_s)');
    LEGEND_ALGEBRAIC(:,76) = strpad('nu_d in component crossbridge_TRPN (m_per_s)');
    LEGEND_ALGEBRAIC(:,68) = strpad('nu_k in component crossbridge_TRPN (m_per_s)');
    LEGEND_ALGEBRAIC(:,72) = strpad('nu_f in component crossbridge_TRPN (m_per_s)');
    LEGEND_ALGEBRAIC(:,77) = strpad('F_d in component crossbridge_TRPN (kPa)');
    LEGEND_ALGEBRAIC(:,73) = strpad('F_1 in component crossbridge_TRPN (kPa)');
    LEGEND_ALGEBRAIC(:,80) = strpad('T_passive in component crossbridge_TRPN (kPa)');
    LEGEND_CONSTANTS(:,344) = strpad('b in component crossbridge_TRPN (dimensionless)');
    LEGEND_ALGEBRAIC(:,589) = strpad('mu_Ca_D in component diadCaDiffusion (J_per_mol)');
    LEGEND_ALGEBRAIC(:,591) = strpad('mu_Ca_i in component diadCaDiffusion (J_per_mol)');
    LEGEND_ALGEBRAIC(:,597) = strpad('mu_Na_o in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,599) = strpad('mu_Na_i in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,26) = strpad('mu_S000_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,27) = strpad('mu_S010_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,28) = strpad('mu_S100_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,29) = strpad('mu_S110_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,30) = strpad('mu_S200_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,31) = strpad('mu_S210_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,32) = strpad('mu_S300_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,33) = strpad('mu_S310_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,34) = strpad('mu_S001_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,35) = strpad('mu_S011_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,36) = strpad('mu_S101_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,37) = strpad('mu_S111_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,38) = strpad('mu_S201_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,39) = strpad('mu_S211_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,40) = strpad('mu_S301_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,601) = strpad('mu_S311_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,631) = strpad('Am_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,602) = strpad('Af_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,632) = strpad('Ar_Na in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,603) = strpad('Af_h000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,633) = strpad('Ar_h000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,634) = strpad('v_h000 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,604) = strpad('Af_h001 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,635) = strpad('Ar_h001 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,636) = strpad('v_h001 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,605) = strpad('Af_h100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,637) = strpad('Ar_h100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,638) = strpad('v_h100 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,606) = strpad('Af_h101 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,639) = strpad('Ar_h101 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,640) = strpad('v_h101 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,607) = strpad('Af_h200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,641) = strpad('Ar_h200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,642) = strpad('v_h200 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,608) = strpad('Af_h201 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,643) = strpad('Ar_h201 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,644) = strpad('v_h201 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,609) = strpad('Af_h300 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,645) = strpad('Ar_h300 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,646) = strpad('v_h300 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,610) = strpad('Af_h301 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,647) = strpad('Ar_h301 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,648) = strpad('v_h301 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,611) = strpad('Af_j000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,649) = strpad('Ar_j000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,650) = strpad('v_j000 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,612) = strpad('Af_j010 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,651) = strpad('Ar_j010 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,652) = strpad('v_j010 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,613) = strpad('Af_j100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,653) = strpad('Ar_j100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,654) = strpad('v_j100 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,614) = strpad('Af_j110 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,655) = strpad('Ar_j110 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,656) = strpad('v_j110 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,615) = strpad('Af_j200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,657) = strpad('Ar_j200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,658) = strpad('v_j200 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,616) = strpad('Af_j210 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,659) = strpad('Ar_j210 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,660) = strpad('v_j210 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,617) = strpad('Af_j300 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,661) = strpad('Ar_j300 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,662) = strpad('v_j300 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,618) = strpad('Af_j310 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,663) = strpad('Ar_j310 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,664) = strpad('v_j310 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,619) = strpad('Af_m000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,665) = strpad('Ar_m000 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,666) = strpad('v_m000 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,620) = strpad('Af_m001 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,668) = strpad('Ar_m001 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,669) = strpad('v_m001 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,621) = strpad('Af_m010 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,671) = strpad('Ar_m010 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,672) = strpad('v_m010 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,622) = strpad('Af_m011 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,674) = strpad('Ar_m011 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,675) = strpad('v_m011 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,623) = strpad('Af_m100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,677) = strpad('Ar_m100 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,678) = strpad('v_m100 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,624) = strpad('Af_m101 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,680) = strpad('Ar_m101 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,681) = strpad('v_m101 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,625) = strpad('Af_m110 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,683) = strpad('Ar_m110 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,684) = strpad('v_m110 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,626) = strpad('Af_m111 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,686) = strpad('Ar_m111 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,687) = strpad('v_m111 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,627) = strpad('Af_m200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,689) = strpad('Ar_m200 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,690) = strpad('v_m200 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,628) = strpad('Af_m201 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,693) = strpad('Ar_m201 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,694) = strpad('v_m201 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,629) = strpad('Af_m210 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,697) = strpad('Ar_m210 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,698) = strpad('v_m210 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,630) = strpad('Af_m211 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,701) = strpad('Ar_m211 in component fast_Na (J_per_mol)');
    LEGEND_ALGEBRAIC(:,702) = strpad('v_m211 in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,667) = strpad('v_S000_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,673) = strpad('v_S010_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,679) = strpad('v_S100_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,685) = strpad('v_S110_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,691) = strpad('v_S200_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,699) = strpad('v_S210_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,692) = strpad('v_S300_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,700) = strpad('v_S310_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,670) = strpad('v_S001_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,676) = strpad('v_S011_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,682) = strpad('v_S101_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,688) = strpad('v_S111_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,695) = strpad('v_S201_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,703) = strpad('v_S211_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,696) = strpad('v_S301_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,706) = strpad('v_S311_Na in component fast_Na (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,595) = strpad('V_mem in component fast_Na (volt)');
    LEGEND_ALGEBRAIC(:,707) = strpad('mu_K_i in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,708) = strpad('mu_K_o in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,709) = strpad('mu_Na_i in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,710) = strpad('mu_Na_o in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,711) = strpad('V_mem in component funny (J_per_C)');
    LEGEND_ALGEBRAIC(:,713) = strpad('Am_Na in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,712) = strpad('Am_K in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,716) = strpad('Af_K in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,717) = strpad('Ar_K in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,718) = strpad('Af_Na in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,719) = strpad('Ar_Na in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,714) = strpad('mu_x0_funny in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,715) = strpad('mu_x1_funny in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,722) = strpad('Af_R_xf in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,723) = strpad('Ar_R_xf in component funny (J_per_mol)');
    LEGEND_ALGEBRAIC(:,724) = strpad('v_xf in component funny (fmol_per_sec)');
    LEGEND_ALGEBRAIC(:,726) = strpad('V_mem in component ns (volt)');
    LEGEND_ALGEBRAIC(:,727) = strpad('mu_Ca_o in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,728) = strpad('mu_Ca_i in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,730) = strpad('Am_ns_Ca in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,729) = strpad('Af_ns_Ca in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,731) = strpad('Ar_ns_Ca in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,734) = strpad('mu_Na_o in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,735) = strpad('mu_Na_i in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,737) = strpad('Am_ns_Na in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,736) = strpad('Af_ns_Na in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,738) = strpad('Ar_ns_Na in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,741) = strpad('mu_K_o in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,742) = strpad('mu_K_i in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,744) = strpad('Am_ns_K in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,743) = strpad('Af_ns_K in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,745) = strpad('Ar_ns_K in component ns (J_per_mol)');
    LEGEND_ALGEBRAIC(:,748) = strpad('mu_Ca_i in component pCa (J_per_mol)');
    LEGEND_ALGEBRAIC(:,749) = strpad('mu_Ca_o in component pCa (J_per_mol)');
    LEGEND_ALGEBRAIC(:,750) = strpad('mu_pCa in component pCa (J_per_mol)');
    LEGEND_ALGEBRAIC(:,751) = strpad('mu_pCa_Ca in component pCa (J_per_mol)');
    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(:,17) = strpad('d/dt q_Ca_D in component environment (fmol)');
    LEGEND_RATES(:,2) = strpad('d/dt q_Ca_o 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(:,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(:,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(:,18) = strpad('d/dt q_Ca_TRPN in component environment (fmol)');
    LEGEND_RATES(:,19) = strpad('d/dt q_B_XB in component environment (fmol)');
    LEGEND_RATES(:,20) = strpad('d/dt q_U_XB in component environment (fmol)');
    LEGEND_RATES(:,21) = strpad('d/dt q_W_XB in component environment (fmol)');
    LEGEND_RATES(:,22) = strpad('d/dt q_S_XB in component environment (fmol)');
    LEGEND_RATES(:,23) = strpad('d/dt q_PLB in component environment (fmol)');
    LEGEND_RATES(:,24) = strpad('d/dt q_PKACI in component environment (fmol)');
    LEGEND_RATES(:,25) = strpad('d/dt q_PLB_PKACI in component environment (fmol)');
    LEGEND_RATES(:,26) = strpad('d/dt q_PP1 in component environment (fmol)');
    LEGEND_RATES(:,27) = strpad('d/dt q_PLBp_PP1 in component environment (fmol)');
    LEGEND_RATES(:,28) = strpad('d/dt q_PLBp in component environment (fmol)');
    LEGEND_RATES(:,29) = strpad('d/dt q_Ip in component environment (fmol)');
    LEGEND_RATES(:,30) = strpad('d/dt q_Ip_PP1 in component environment (fmol)');
    LEGEND_RATES(:,31) = strpad('d/dt q_mem in component environment (fC)');
    LEGEND_RATES(:,32) = strpad('d/dt q_S00_K in component environment (fmol)');
    LEGEND_RATES(:,35) = strpad('d/dt q_S01_K in component environment (fmol)');
    LEGEND_RATES(:,33) = strpad('d/dt q_S10_K in component environment (fmol)');
    LEGEND_RATES(:,36) = strpad('d/dt q_S11_K in component environment (fmol)');
    LEGEND_RATES(:,34) = strpad('d/dt q_S20_K in component environment (fmol)');
    LEGEND_RATES(:,37) = strpad('d/dt q_S21_K in component environment (fmol)');
    LEGEND_RATES(:,38) = strpad('d/dt q_C_K1 in component environment (fmol)');
    LEGEND_RATES(:,39) = strpad('d/dt q_O_K1 in component environment (fmol)');
    LEGEND_RATES(:,40) = strpad('d/dt q_C_Kp in component environment (fmol)');
    LEGEND_RATES(:,41) = strpad('d/dt q_O_Kp in component environment (fmol)');
    LEGEND_RATES(:,42) = strpad('d/dt q_Sa_Kr in component environment (fmol)');
    LEGEND_RATES(:,43) = strpad('d/dt q_Sb_Kr in component environment (fmol)');
    LEGEND_RATES(:,44) = strpad('d/dt q_Sc_Kr in component environment (fmol)');
    LEGEND_RATES(:,45) = strpad('d/dt q_Sd_Kr in component environment (fmol)');
    LEGEND_RATES(:,46) = strpad('d/dt q_S_Ks0 in component environment (fmol)');
    LEGEND_RATES(:,47) = strpad('d/dt q_S_Ks1 in component environment (fmol)');
    LEGEND_RATES(:,48) = strpad('d/dt q_S_Ks2 in component environment (fmol)');
    LEGEND_RATES(:,49) = strpad('d/dt q_000_LCC in component environment (fmol)');
    LEGEND_RATES(:,50) = strpad('d/dt q_010_LCC in component environment (fmol)');
    LEGEND_RATES(:,51) = strpad('d/dt q_020_LCC in component environment (fmol)');
    LEGEND_RATES(:,52) = strpad('d/dt q_100_LCC in component environment (fmol)');
    LEGEND_RATES(:,53) = strpad('d/dt q_110_LCC in component environment (fmol)');
    LEGEND_RATES(:,54) = strpad('d/dt q_120_LCC in component environment (fmol)');
    LEGEND_RATES(:,55) = strpad('d/dt q_001_LCC in component environment (fmol)');
    LEGEND_RATES(:,56) = strpad('d/dt q_011_LCC in component environment (fmol)');
    LEGEND_RATES(:,57) = strpad('d/dt q_021_LCC in component environment (fmol)');
    LEGEND_RATES(:,58) = strpad('d/dt q_101_LCC in component environment (fmol)');
    LEGEND_RATES(:,59) = strpad('d/dt q_111_LCC in component environment (fmol)');
    LEGEND_RATES(:,60) = strpad('d/dt q_121_LCC in component environment (fmol)');
    LEGEND_RATES(:,61) = strpad('d/dt q_1_NCX in component environment (fmol)');
    LEGEND_RATES(:,62) = strpad('d/dt q_2_NCX in component environment (fmol)');
    LEGEND_RATES(:,63) = strpad('d/dt q_3_NCX in component environment (fmol)');
    LEGEND_RATES(:,64) = strpad('d/dt q_4_NCX in component environment (fmol)');
    LEGEND_RATES(:,65) = strpad('d/dt q_5_NCX in component environment (fmol)');
    LEGEND_RATES(:,66) = strpad('d/dt q_6_NCX in component environment (fmol)');
    LEGEND_RATES(:,106) = strpad('d/dt q_P7 in component environment (fmol)');
    LEGEND_RATES(:,107) = strpad('d/dt q_P14 in component environment (fmol)');
    LEGEND_RATES(:,108) = strpad('d/dt q_P15 in component environment (fmol)');
    LEGEND_RATES(:,109) = strpad('d/dt q_P1 in component environment (fmol)');
    LEGEND_RATES(:,110) = strpad('d/dt q_P2 in component environment (fmol)');
    LEGEND_RATES(:,111) = strpad('d/dt q_P3 in component environment (fmol)');
    LEGEND_RATES(:,112) = strpad('d/dt q_P4 in component environment (fmol)');
    LEGEND_RATES(:,113) = strpad('d/dt q_P5 in component environment (fmol)');
    LEGEND_RATES(:,114) = strpad('d/dt q_P6 in component environment (fmol)');
    LEGEND_RATES(:,115) = strpad('d/dt q_P10 in component environment (fmol)');
    LEGEND_RATES(:,116) = strpad('d/dt q_P11 in component environment (fmol)');
    LEGEND_RATES(:,117) = strpad('d/dt q_P12 in component environment (fmol)');
    LEGEND_RATES(:,118) = strpad('d/dt q_P13 in component environment (fmol)');
    LEGEND_RATES(:,119) = strpad('d/dt q_P8 in component environment (fmol)');
    LEGEND_RATES(:,120) = strpad('d/dt q_P9 in component environment (fmol)');
    LEGEND_RATES(:,70) = strpad('d/dt q_O_RyR in component environment (fmol)');
    LEGEND_RATES(:,67) = strpad('d/dt q_C_RyR in component environment (fmol)');
    LEGEND_RATES(:,68) = strpad('d/dt q_CI_RyR in component environment (fmol)');
    LEGEND_RATES(:,69) = strpad('d/dt q_I_RyR in component environment (fmol)');
    LEGEND_RATES(:,71) = strpad('d/dt q_P1_SERCA in component environment (fmol)');
    LEGEND_RATES(:,72) = strpad('d/dt q_P2_SERCA in component environment (fmol)');
    LEGEND_RATES(:,73) = strpad('d/dt q_P2a_SERCA in component environment (fmol)');
    LEGEND_RATES(:,74) = strpad('d/dt q_P4_SERCA in component environment (fmol)');
    LEGEND_RATES(:,75) = strpad('d/dt q_P5_SERCA in component environment (fmol)');
    LEGEND_RATES(:,79) = strpad('d/dt q_P10_SERCA in component environment (fmol)');
    LEGEND_RATES(:,76) = strpad('d/dt q_P6_SERCA in component environment (fmol)');
    LEGEND_RATES(:,77) = strpad('d/dt q_P8_SERCA in component environment (fmol)');
    LEGEND_RATES(:,78) = strpad('d/dt q_P9_SERCA in component environment (fmol)');
    LEGEND_RATES(:,80) = strpad('d/dt q_S00_TCC in component environment (fmol)');
    LEGEND_RATES(:,81) = strpad('d/dt q_S10_TCC in component environment (fmol)');
    LEGEND_RATES(:,82) = strpad('d/dt q_S01_TCC in component environment (fmol)');
    LEGEND_RATES(:,83) = strpad('d/dt q_S11_TCC in component environment (fmol)');
    LEGEND_RATES(:,84) = strpad('d/dt q_r0s0_TO in component environment (fmol)');
    LEGEND_RATES(:,85) = strpad('d/dt q_r1s0_TO in component environment (fmol)');
    LEGEND_RATES(:,86) = strpad('d/dt q_r0s1_TO in component environment (fmol)');
    LEGEND_RATES(:,87) = strpad('d/dt q_r1s1_TO in component environment (fmol)');
    LEGEND_RATES(:,122) = strpad('d/dt G_w in component crossbridge_TRPN (metre)');
    LEGEND_RATES(:,121) = strpad('d/dt SL in component crossbridge_TRPN (metre)');
    LEGEND_RATES(:,123) = strpad('d/dt G_s in component crossbridge_TRPN (metre)');
    LEGEND_RATES(:,124) = strpad('d/dt C_d in component crossbridge_TRPN (metre)');
    LEGEND_RATES(:,88) = strpad('d/dt q_000_Na in component environment (fmol)');
    LEGEND_RATES(:,92) = strpad('d/dt q_010_Na in component environment (fmol)');
    LEGEND_RATES(:,89) = strpad('d/dt q_100_Na in component environment (fmol)');
    LEGEND_RATES(:,93) = strpad('d/dt q_110_Na in component environment (fmol)');
    LEGEND_RATES(:,90) = strpad('d/dt q_200_Na in component environment (fmol)');
    LEGEND_RATES(:,94) = strpad('d/dt q_210_Na in component environment (fmol)');
    LEGEND_RATES(:,91) = strpad('d/dt q_300_Na in component environment (fmol)');
    LEGEND_RATES(:,95) = strpad('d/dt q_310_Na in component environment (fmol)');
    LEGEND_RATES(:,96) = strpad('d/dt q_001_Na in component environment (fmol)');
    LEGEND_RATES(:,100) = strpad('d/dt q_011_Na in component environment (fmol)');
    LEGEND_RATES(:,97) = strpad('d/dt q_101_Na in component environment (fmol)');
    LEGEND_RATES(:,101) = strpad('d/dt q_111_Na in component environment (fmol)');
    LEGEND_RATES(:,98) = strpad('d/dt q_201_Na in component environment (fmol)');
    LEGEND_RATES(:,102) = strpad('d/dt q_211_Na in component environment (fmol)');
    LEGEND_RATES(:,99) = strpad('d/dt q_301_Na in component environment (fmol)');
    LEGEND_RATES(:,103) = strpad('d/dt q_311_Na in component environment (fmol)');
    LEGEND_RATES(:,104) = strpad('d/dt q_x0_funny in component environment (fmol)');
    LEGEND_RATES(:,105) = 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) = 730.008;
    CONSTANTS(:,2) = 0.00901911;
    CONSTANTS(:,3) = 3.49023e-07;
    CONSTANTS(:,4) = 11.6278;
    CONSTANTS(:,5) = 1095.07;
    CONSTANTS(:,6) = 45025.8;
    CONSTANTS(:,7) = 2.51352;
    CONSTANTS(:,8) = 0.0672974;
    CONSTANTS(:,9) = 8.45146;
    CONSTANTS(:,10) = 68.9799;
    CONSTANTS(:,11) = 1260.5;
    CONSTANTS(:,12) = 0.523159;
    CONSTANTS(:,13) = 1.86539;
    CONSTANTS(:,14) = 0.435643;
    CONSTANTS(:,15) = 0.573586;
    CONSTANTS(:,16) = 474.069;
    CONSTANTS(:,17) = 23.9404;
    CONSTANTS(:,18) = 31.5209;
    CONSTANTS(:,19) = 0.0820342;
    CONSTANTS(:,20) = 0.00414271;
    CONSTANTS(:,21) = 0.00545447;
    CONSTANTS(:,22) = 45.6644;
    CONSTANTS(:,23) = 226.758;
    CONSTANTS(:,24) = 0.0079019;
    CONSTANTS(:,25) = 0.0392389;
    CONSTANTS(:,26) = 2.96802;
    CONSTANTS(:,27) = 14.7385;
    CONSTANTS(:,28) = 0.000513595;
    CONSTANTS(:,29) = 0.00255038;
    CONSTANTS(:,30) = 6475.63;
    CONSTANTS(:,31) = 32156.4;
    CONSTANTS(:,32) = 1.12056;
    CONSTANTS(:,33) = 5.56443;
    CONSTANTS(:,34) = 28088.4;
    CONSTANTS(:,35) = 139480;
    CONSTANTS(:,36) = 1418.46;
    CONSTANTS(:,37) = 7043.71;
    CONSTANTS(:,38) = 1867.6;
    CONSTANTS(:,39) = 9274.05;
    CONSTANTS(:,40) = 1.70753e+06;
    CONSTANTS(:,41) = 3.9661e+07;
    CONSTANTS(:,42) = 1685.32;
    CONSTANTS(:,43) = 6.23757e+07;
    CONSTANTS(:,44) = 1.08571e+06;
    CONSTANTS(:,45) = 1.20854;
    CONSTANTS(:,46) = 0.00188588;
    CONSTANTS(:,47) = 157.722;
    CONSTANTS(:,48) = 495715;
    CONSTANTS(:,49) = 1.84118e+06;
    CONSTANTS(:,50) = 6.36624e+06;
    CONSTANTS(:,51) = 9492.58;
    CONSTANTS(:,52) = 13.2742;
    CONSTANTS(:,53) = 0.765166;
    CONSTANTS(:,54) = 0.721294;
    CONSTANTS(:,55) = 1188.11;
    CONSTANTS(:,56) = 489264;
    CONSTANTS(:,57) = 98765.9;
    CONSTANTS(:,58) = 466928;
    CONSTANTS(:,59) = 41.2376;
    CONSTANTS(:,60) = 35.0829;
    CONSTANTS(:,61) = 0.0075218;
    CONSTANTS(:,62) = 12.5109;
    CONSTANTS(:,63) = 1.80246;
    CONSTANTS(:,64) = 0.0610875;
    CONSTANTS(:,65) = 0.191583;
    CONSTANTS(:,66) = 1305.42;
    CONSTANTS(:,67) = 1.30319e+06;
    CONSTANTS(:,68) = 8.17222;
    CONSTANTS(:,69) = 0.217391;
    CONSTANTS(:,70) = 438.875;
    CONSTANTS(:,71) = 36.5729;
    CONSTANTS(:,72) = 4.34512e-08;
    CONSTANTS(:,73) = 18.3302;
    CONSTANTS(:,74) = 9519.76;
    CONSTANTS(:,75) = 18.6556;
    CONSTANTS(:,76) = 0.19414;
    CONSTANTS(:,77) = 437.886;
    CONSTANTS(:,78) = 17004.4;
    CONSTANTS(:,79) = 17306.3;
    CONSTANTS(:,80) = 5.47775e-06;
    CONSTANTS(:,81) = 5808.46;
    CONSTANTS(:,82) = 1266.14;
    CONSTANTS(:,83) = 4.33488;
    CONSTANTS(:,84) = 1.34962;
    CONSTANTS(:,85) = 7.44777;
    CONSTANTS(:,86) = 132.938;
    CONSTANTS(:,87) = 13.9779;
    CONSTANTS(:,88) = 0.265707;
    CONSTANTS(:,89) = 0.00625192;
    CONSTANTS(:,90) = 112535;
    CONSTANTS(:,91) = 0.0592562;
    CONSTANTS(:,92) = 17.1253;
    CONSTANTS(:,93) = 5.19377e+06;
    CONSTANTS(:,94) = 1.60678;
    CONSTANTS(:,95) = 2.17771;
    CONSTANTS(:,96) = 6.73711e-07;
    CONSTANTS(:,97) = 1.62519e+09;
    CONSTANTS(:,98) = 502.781;
    CONSTANTS(:,99) = 681.432;
    CONSTANTS(:,100) = 0.000210812;
    CONSTANTS(:,101) = 1.27136e+11;
    CONSTANTS(:,102) = 39331.6;
    CONSTANTS(:,103) = 53307.1;
    CONSTANTS(:,104) = 0.0164914;
    CONSTANTS(:,105) = 0.0463911;
    CONSTANTS(:,106) = 1.43519e-08;
    CONSTANTS(:,107) = 21.7745;
    CONSTANTS(:,108) = 6.73631e-06;
    CONSTANTS(:,109) = 3406.75;
    CONSTANTS(:,110) = 0.00105394;
    CONSTANTS(:,111) = 177669;
    CONSTANTS(:,112) = 0.0549649;
    CONSTANTS(:,113) = 0.0180903;
    CONSTANTS(:,114) = 7.58513e-09;
    CONSTANTS(:,115) = 8.49102;
    CONSTANTS(:,116) = 3.56022e-06;
    CONSTANTS(:,117) = 1328.47;
    CONSTANTS(:,118) = 0.000557018;
    CONSTANTS(:,119) = 69282.5;
    CONSTANTS(:,120) = 0.0290496;
    CONSTANTS(:,121) = 0.171301;
    CONSTANTS(:,122) = 0.00115689;
    CONSTANTS(:,123) = 0.188833;
    CONSTANTS(:,124) = 18766.4;
    CONSTANTS(:,125) = 1.23662e-05;
    CONSTANTS(:,126) = 0;
    CONSTANTS(:,127) = 0;
    CONSTANTS(:,128) = 0;
    CONSTANTS(:,129) = 0;
    CONSTANTS(:,130) = 0;
    CONSTANTS(:,131) = 0;
    CONSTANTS(:,132) = 0;
    CONSTANTS(:,133) = 0;
    CONSTANTS(:,134) = 0;
    CONSTANTS(:,135) = 0;
    CONSTANTS(:,136) = 0;
    CONSTANTS(:,137) = 0;
    CONSTANTS(:,138) = 0;
    CONSTANTS(:,139) = 0;
    CONSTANTS(:,140) = 0;
    CONSTANTS(:,141) = 0;
    CONSTANTS(:,142) = 0;
    CONSTANTS(:,143) = 0;
    CONSTANTS(:,144) = 0;
    CONSTANTS(:,145) = 0.177842;
    CONSTANTS(:,146) = 6.50909;
    CONSTANTS(:,147) = 0.0947743;
    CONSTANTS(:,148) = 0.14596;
    CONSTANTS(:,149) = 2.58277;
    CONSTANTS(:,150) = 0.0110732;
    CONSTANTS(:,151) = 0.0741574;
    CONSTANTS(:,152) = 1.02946;
    CONSTANTS(:,153) = 12368.8;
    CONSTANTS(:,154) = 1.47312;
    CONSTANTS(:,155) = 0.180487;
    CONSTANTS(:,156) = 55.02;
    CONSTANTS(:,157) = 6.74109;
    CONSTANTS(:,158) = 4.456;
    CONSTANTS(:,159) = 0.624857;
    CONSTANTS(:,160) = 0.350491;
    CONSTANTS(:,161) = 90.9131;
    CONSTANTS(:,162) = 1.02678;
    CONSTANTS(:,163) = 20.3323;
    CONSTANTS(:,164) = 15.4425;
    CONSTANTS(:,165) = 0.206771;
    CONSTANTS(:,166) = 4.0945;
    CONSTANTS(:,167) = 3.1098;
    CONSTANTS(:,168) = 5933.65;
    CONSTANTS(:,169) = 117498;
    CONSTANTS(:,170) = 89240.9;
    CONSTANTS(:,171) = 1194.91;
    CONSTANTS(:,172) = 23661.8;
    CONSTANTS(:,173) = 17971.3;
    CONSTANTS(:,174) = 8.02977e+07;
    CONSTANTS(:,175) = 320.082;
    CONSTANTS(:,176) = 82765.4;
    CONSTANTS(:,177) = 600864;
    CONSTANTS(:,178) = 2.22681e+07;
    CONSTANTS(:,179) = 328.196;
    CONSTANTS(:,180) = 0.00292933;
    CONSTANTS(:,181) = 0.0152356;
    CONSTANTS(:,182) = 2.11103e+08;
    CONSTANTS(:,183) = 16791.8;
    CONSTANTS(:,184) = 5.34266;
    CONSTANTS(:,185) = 1.54515;
    CONSTANTS(:,186) = 1.78749;
    CONSTANTS(:,187) = 106.276;
    CONSTANTS(:,188) = 14981.7;
    CONSTANTS(:,189) = 47932.8;
    CONSTANTS(:,190) = 1.77154e+07;
    CONSTANTS(:,191) = 10754.9;
    CONSTANTS(:,192) = 26.1168;
    CONSTANTS(:,193) = 5.5243;
    CONSTANTS(:,194) = 4.67406;
    CONSTANTS(:,195) = 8.98029;
    CONSTANTS(:,196) = 4.03648e+06;
    CONSTANTS(:,197) = 91.4607;
    CONSTANTS(:,198) = 3.33133e-05;
    CONSTANTS(:,199) = 0.0041009;
    CONSTANTS(:,200) = 157.763;
    CONSTANTS(:,201) = 0.413365;
    CONSTANTS(:,202) = 0.0082013;
    CONSTANTS(:,203) = 2.32356;
    CONSTANTS(:,204) = 0.0130674;
    CONSTANTS(:,205) = 1.28975;
    CONSTANTS(:,206) = 57.1656;
    CONSTANTS(:,207) = 49.5385;
    CONSTANTS(:,208) = 0.0222685;
    CONSTANTS(:,209) = 1235.18;
    CONSTANTS(:,210) = 23.0001;
    CONSTANTS(:,211) = 0.136713;
    CONSTANTS(:,212) = 7.34195;
    CONSTANTS(:,213) = 49.4242;
    CONSTANTS(:,214) = 11.8932;
    CONSTANTS(:,215) = 0.703539;
    CONSTANTS(:,216) = 362.181;
    CONSTANTS(:,217) = 0.00341313;
    CONSTANTS(:,218) = 77.423;
    CONSTANTS(:,219) = 1.28486;
    CONSTANTS(:,220) = 0.390419;
    CONSTANTS(:,221) = 0.976308;
    CONSTANTS(:,222) = 2.10659;
    CONSTANTS(:,223) = 0.381738;
    CONSTANTS(:,224) = 615.294;
    CONSTANTS(:,225) = 111.498;
    CONSTANTS(:,226) = 93.4815;
    CONSTANTS(:,227) = 0.0218672;
    CONSTANTS(:,228) = 7.58545;
    CONSTANTS(:,229) = 2.84454;
    CONSTANTS(:,230) = 18.5989;
    CONSTANTS(:,231) = 4.64973e-06;
    CONSTANTS(:,232) = 0.00722969;
    CONSTANTS(:,233) = 1.5403e-05;
    CONSTANTS(:,234) = 9.84495e-08;
    CONSTANTS(:,235) = 1.88774e-09;
    CONSTANTS(:,236) = 17242.6;
    CONSTANTS(:,237) = 36.7358;
    CONSTANTS(:,238) = 0.234799;
    CONSTANTS(:,239) = 0.0045022;
    CONSTANTS(:,240) = 23369.3;
    CONSTANTS(:,241) = 49.7889;
    CONSTANTS(:,242) = 0.318229;
    CONSTANTS(:,243) = 0.00610195;
    CONSTANTS(:,244) = 5.57351e+10;
    CONSTANTS(:,245) = 1.18745e+08;
    CONSTANTS(:,246) = 758967;
    CONSTANTS(:,247) = 14553;
    CONSTANTS(:,248) = 0.00306604;
    CONSTANTS(:,249) = 61.5887;
    CONSTANTS(:,250) = 0.0113547;
    CONSTANTS(:,251) = 0.0172712;
    CONSTANTS(:,252) = 1e-6;
    CONSTANTS(:,253) = 1e-6;
    CONSTANTS(:,254) = 1e-6;
    CONSTANTS(:,255) = 1e-6;
    CONSTANTS(:,256) = 1e-6;
    CONSTANTS(:,257) = 1e-6;
    CONSTANTS(:,258) = 1e-6;
    CONSTANTS(:,259) = 1e-6;
    CONSTANTS(:,260) = 1e-6;
    CONSTANTS(:,261) = 1e-6;
    CONSTANTS(:,262) = 1e-6;
    CONSTANTS(:,263) = 1e-6;
    CONSTANTS(:,264) = 2;
    CONSTANTS(:,265) = 1;
    CONSTANTS(:,266) = 0.033569;
    CONSTANTS(:,267) = 3.1153;
    CONSTANTS(:,268) = 0;
    CONSTANTS(:,269) = -4.4669;
    CONSTANTS(:,270) = 1.6149028778859738;
    CONSTANTS(:,271) = -1.3218634652232777;
    CONSTANTS(:,272) = -1.0273976425216251;
    CONSTANTS(:,273) = -0.18153135376657775;
    CONSTANTS(:,274) = 0.000400323747581994;
    CONSTANTS(:,275) = -1.41544821457997;
    CONSTANTS(:,276) = -0.55679;
    CONSTANTS(:,277) = 0.44321;
    CONSTANTS(:,278) = 3;
    CONSTANTS(:,279) = 3;
    CONSTANTS(:,280) = 1;
    CONSTANTS(:,281) = -5301.979;
    CONSTANTS(:,282) = -91183.021;
    CONSTANTS(:,283) = 0.876568910405296;
    CONSTANTS(:,284) = -0.576510778245838;
    CONSTANTS(:,285) = -0.872117216889333;
    CONSTANTS(:,286) = 1.73582739545622;
    CONSTANTS(:,287) = 2.28623234372134;
    CONSTANTS(:,288) = -1.51477720975217;
    CONSTANTS(:,289) = -0.131848324558065;
    CONSTANTS(:,290) = 1.75042355789096;
    CONSTANTS(:,291) = -4.1892;
    CONSTANTS(:,292) = -4.0381;
    CONSTANTS(:,293) = 0.49541;
    CONSTANTS(:,294) = 1.2995;
    CONSTANTS(:,295) = 1.4281;
    CONSTANTS(:,296) = -2.4284;
    CONSTANTS(:,297) = -2.29569;
    CONSTANTS(:,298) = 0.707659;
    CONSTANTS(:,299) = 2.1404;
    CONSTANTS(:,300) = -1.1495;
    CONSTANTS(:,301) = 0.72162;
    CONSTANTS(:,302) = 4.2933;
    CONSTANTS(:,303) = 2;
    CONSTANTS(:,304) = -2.1404;
    CONSTANTS(:,305) = 1.8993;
    CONSTANTS(:,306) = -0.52288;
    CONSTANTS(:,307) = 0;
    CONSTANTS(:,308) = 0.5;
    CONSTANTS(:,309) = 0.51923;
    CONSTANTS(:,310) = 0;
    CONSTANTS(:,311) = -0.73169;
    CONSTANTS(:,312) = 0.83216;
    CONSTANTS(:,313) = 1.1;
    CONSTANTS(:,314) = 2;
    CONSTANTS(:,315) = 34.4;
    CONSTANTS(:,316) = 153400;
    STATES(:,1) = 0.007540192;
    STATES(:,2) = 9.327272727;
    STATES(:,3) = 0.763997897;
    STATES(:,4) = 81.872;
    STATES(:,5) = 0.08256;
    STATES(:,6) = 246.623232;
    STATES(:,7) = 725.48;
    STATES(:,8) = 3603.359559;
    STATES(:,9) = 27.98181818;
    STATES(:,10) = 239.08;
    STATES(:,11) = 1.204;
    STATES(:,12) = 516;
    STATES(:,13) = 2.435233E-06;
    STATES(:,14) = 0.0032;
    STATES(:,15) = 1e-9;
    STATES(:,16) = 1.94197;
    STATES(:,17) = 3.68876E-07;
    STATES(:,18) = 1e-18;
    STATES(:,19) = 1e-5;
    STATES(:,20) = 0;
    STATES(:,21) = 0;
    STATES(:,22) = 0;
    STATES(:,23) = 3.646;
    STATES(:,24) = 2.234E-03;
    STATES(:,25) = 1e-18;
    STATES(:,26) = 3.062E-02;
    STATES(:,27) = 1e-18;
    STATES(:,28) = 2.54733e-08;
    CONSTANTS(:,317) = 2.54733e-08;
    STATES(:,29) = 1.999E-03;
    STATES(:,30) = 1e-18;
    STATES(:,31) = -13039;
    STATES(:,32) = 2.97188e-06;
    STATES(:,33) = 2.97188e-06;
    STATES(:,34) = 2.97188e-06;
    STATES(:,35) = 2.97188e-06;
    STATES(:,36) = 2.97188e-06;
    STATES(:,37) = 2.97188e-06;
    STATES(:,38) = 7.06883e-06;
    STATES(:,39) = 7.06883e-06;
    STATES(:,40) = 1.20998e-06;
    STATES(:,41) = 1.20998e-06;
    STATES(:,42) = 2.22891e-06;
    STATES(:,43) = 2.22891e-06;
    STATES(:,44) = 2.22891e-06;
    STATES(:,45) = 2.22891e-06;
    STATES(:,46) = 2.97188e-06;
    STATES(:,47) = 2.97188e-06;
    STATES(:,48) = 2.97188e-06;
    STATES(:,49) = 1.3798e-05;
    STATES(:,50) = 1.3798e-05;
    STATES(:,51) = 1.3798e-05;
    STATES(:,52) = 1.3798e-05;
    STATES(:,53) = 1.3798e-05;
    STATES(:,54) = 1.3798e-05;
    STATES(:,55) = 1.3798e-05;
    STATES(:,56) = 1.3798e-05;
    STATES(:,57) = 1.3798e-05;
    STATES(:,58) = 1.3798e-05;
    STATES(:,59) = 1.3798e-05;
    STATES(:,60) = 1.3798e-05;
    STATES(:,61) = 4.24554e-07;
    STATES(:,62) = 4.24554e-07;
    STATES(:,63) = 4.24554e-07;
    STATES(:,64) = 4.24554e-07;
    STATES(:,65) = 4.24554e-07;
    STATES(:,66) = 4.24554e-07;
    STATES(:,67) = 4.13941e-05;
    STATES(:,68) = 4.13941e-05;
    STATES(:,69) = 4.13941e-05;
    STATES(:,70) = 4.13941e-05;
    STATES(:,71) = 2.54733e-08;
    STATES(:,72) = 2.54733e-08;
    STATES(:,73) = 2.54733e-08;
    STATES(:,74) = 2.54733e-08;
    STATES(:,75) = 2.54733e-08;
    STATES(:,76) = 2.54733e-08;
    STATES(:,77) = 2.54733e-08;
    STATES(:,78) = 2.54733e-08;
    STATES(:,79) = 2.54733e-08;
    STATES(:,80) = 9.55247e-05;
    STATES(:,81) = 9.55247e-05;
    STATES(:,82) = 9.55247e-05;
    STATES(:,83) = 9.55247e-05;
    STATES(:,84) = 6.36832e-07;
    STATES(:,85) = 6.36832e-07;
    STATES(:,86) = 6.36832e-07;
    STATES(:,87) = 6.36832e-07;
    STATES(:,88) = 2.54733e-05;
    STATES(:,89) = 2.54733e-05;
    STATES(:,90) = 2.54733e-05;
    STATES(:,91) = 2.54733e-05;
    STATES(:,92) = 2.54733e-05;
    STATES(:,93) = 2.54733e-05;
    STATES(:,94) = 2.54733e-05;
    STATES(:,95) = 2.54733e-05;
    STATES(:,96) = 2.54733e-05;
    STATES(:,97) = 2.54733e-05;
    STATES(:,98) = 2.54733e-05;
    STATES(:,99) = 2.54733e-05;
    STATES(:,100) = 2.54733e-05;
    STATES(:,101) = 2.54733e-05;
    STATES(:,102) = 2.54733e-05;
    STATES(:,103) = 2.54733e-05;
    STATES(:,104) = 1.27366e-06;
    STATES(:,105) = 1.27366e-06;
    STATES(:,106) = 7.6683E-05;
    STATES(:,107) = 7.6683E-05;
    STATES(:,108) = 7.6683E-05;
    STATES(:,109) = 7.6683E-05;
    STATES(:,110) = 7.6683E-05;
    STATES(:,111) = 7.6683E-05;
    STATES(:,112) = 7.6683E-05;
    STATES(:,113) = 7.6683E-05;
    STATES(:,114) = 7.6683E-05;
    STATES(:,115) = 7.6683E-05;
    STATES(:,116) = 7.6683E-05;
    STATES(:,117) = 7.6683E-05;
    STATES(:,118) = 7.6683E-05;
    STATES(:,119) = 7.6683E-05;
    STATES(:,120) = 7.6683E-05;
    STATES(:,121) = 2e-6;
    CONSTANTS(:,318) = 1;
    CONSTANTS(:,319) = 0.0001;
    CONSTANTS(:,320) = 19e-6;
    CONSTANTS(:,321) = 8.31;
    CONSTANTS(:,322) = 310;
    CONSTANTS(:,323) = 96485;
    CONSTANTS(:,324) = 1;
    CONSTANTS(:,325) = 2;
    CONSTANTS(:,326) = 2;
    CONSTANTS(:,327) = 2;
    CONSTANTS(:,328) = 2;
    CONSTANTS(:,329) = 34.0;
    CONSTANTS(:,330) = 2e-6;
    CONSTANTS(:,331) = 1e-6;
    CONSTANTS(:,332) = 0.25;
    CONSTANTS(:,333) = 0.5;
    CONSTANTS(:,334) = 25;
    CONSTANTS(:,335) = 2.23;
    CONSTANTS(:,336) = 26;
    CONSTANTS(:,337) = 4;
    STATES(:,122) = 1e-6;
    STATES(:,123) = 1e-6;
    CONSTANTS(:,338) = 1;
    CONSTANTS(:,339) = 40.5;
    STATES(:,124) = 0;
    CONSTANTS(:,340) = 200e3;
    CONSTANTS(:,341) = 20e3;
    CONSTANTS(:,342) = 7;
    CONSTANTS(:,343) = 2.1;
    CONSTANTS(:,344) = 9.1;
    CONSTANTS(:,345) = ( CONSTANTS(:,334).*CONSTANTS(:,332))./( (1.00000 - CONSTANTS(:,332)).*CONSTANTS(:,333)+CONSTANTS(:,332));
    CONSTANTS(:,346) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,206).*CONSTANTS(:,317));
    CONSTANTS(:,347) =  CONSTANTS(:,329).*0.0350000;
    CONSTANTS(:,348) = ( CONSTANTS(:,335).*CONSTANTS(:,336).*(1.00000 - CONSTANTS(:,333)))./CONSTANTS(:,333);
    CONSTANTS(:,349) = ( CONSTANTS(:,335).*CONSTANTS(:,337).*(1.00000 - CONSTANTS(:,332)).*CONSTANTS(:,333))./CONSTANTS(:,332);
    CONSTANTS(:,350) = CONSTANTS(:,345);
    CONSTANTS(:,351) = CONSTANTS(:,329)+CONSTANTS(:,347);
    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(:,2) = piecewise({VOI<0.0600000,  1.00000.*CONSTANTS(:,320) , VOI>0.500000&VOI<1.10000,   - 0.100000.*CONSTANTS(:,320) },  0.00000.*CONSTANTS(:,320));
    ALGEBRAIC(:,44) = ALGEBRAIC(:,2);
    RATES(:,121) = ALGEBRAIC(:,44);
    ALGEBRAIC(:,48) =   - CONSTANTS(:,345).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,53) =  CONSTANTS(:,348).*STATES(:,122);
    ALGEBRAIC(:,59) =  - ALGEBRAIC(:,48) - ALGEBRAIC(:,53);
    ALGEBRAIC(:,65) = ALGEBRAIC(:,59);
    RATES(:,122) = ALGEBRAIC(:,65);
    ALGEBRAIC(:,49) =   - CONSTANTS(:,350).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,54) =  CONSTANTS(:,349).*STATES(:,123);
    ALGEBRAIC(:,60) =  - ALGEBRAIC(:,49) - ALGEBRAIC(:,54);
    ALGEBRAIC(:,66) = ALGEBRAIC(:,60);
    RATES(:,123) = ALGEBRAIC(:,66);
    ALGEBRAIC(:,55) = (STATES(:,121) - CONSTANTS(:,330)) - STATES(:,124);
    ALGEBRAIC(:,61) = piecewise({ALGEBRAIC(:,55)>0.00000, CONSTANTS(:,340) }, CONSTANTS(:,341));
    ALGEBRAIC(:,67) = ( CONSTANTS(:,342).*ALGEBRAIC(:,55))./ALGEBRAIC(:,61);
    RATES(:,124) = ALGEBRAIC(:,67);
    ALGEBRAIC(:,51) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,204).*STATES(:,26));
    ALGEBRAIC(:,57) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,207).*STATES(:,29));
    ALGEBRAIC(:,63) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,208).*STATES(:,30));
    ALGEBRAIC(:,70) =  CONSTANTS(:,66).*(exp((ALGEBRAIC(:,51)+ALGEBRAIC(:,57))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,63)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,29) =  - ALGEBRAIC(:,70);
    RATES(:,30) = ALGEBRAIC(:,70);
    ALGEBRAIC(:,1) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,201).*STATES(:,23));
    ALGEBRAIC(:,41) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,202).*STATES(:,24));
    ALGEBRAIC(:,46) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,203).*STATES(:,25));
    ALGEBRAIC(:,69) =  CONSTANTS(:,62).*(exp((ALGEBRAIC(:,1)+ALGEBRAIC(:,41))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,46)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,62) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,206).*STATES(:,28));
    ALGEBRAIC(:,74) =  CONSTANTS(:,63).*(exp(ALGEBRAIC(:,46)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,62)+ALGEBRAIC(:,41))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,24) = ALGEBRAIC(:,74) - ALGEBRAIC(:,69);
    RATES(:,25) = ALGEBRAIC(:,69) - ALGEBRAIC(:,74);
    RATES(:,26) = ALGEBRAIC(:,69) - ALGEBRAIC(:,74);
    ALGEBRAIC(:,52) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,146).*STATES(:,4));
    ALGEBRAIC(:,71) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,75) = ALGEBRAIC(:,71)+ALGEBRAIC(:,52);
    ALGEBRAIC(:,58) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,147).*STATES(:,5));
    ALGEBRAIC(:,64) = ALGEBRAIC(:,58);
    ALGEBRAIC(:,79) =  CONSTANTS(:,1).*(exp(ALGEBRAIC(:,75)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,64)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,4) =  - ALGEBRAIC(:,79);
    RATES(:,5) = ALGEBRAIC(:,79);
    ALGEBRAIC(:,56) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,205).*STATES(:,27));
    ALGEBRAIC(:,78) =  CONSTANTS(:,64).*(exp((ALGEBRAIC(:,62)+ALGEBRAIC(:,51))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,56)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,28) = ALGEBRAIC(:,74) - ALGEBRAIC(:,78);
    ALGEBRAIC(:,82) =  CONSTANTS(:,65).*(exp(ALGEBRAIC(:,56)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,1)+ALGEBRAIC(:,51))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,23) = ALGEBRAIC(:,82) - ALGEBRAIC(:,69);
    RATES(:,27) = ALGEBRAIC(:,78) - ALGEBRAIC(:,82);
    ALGEBRAIC(:,91) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,96) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,252).*STATES(:,32))+ CONSTANTS(:,309).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,105) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,253).*STATES(:,33))+ CONSTANTS(:,311).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,106) =  CONSTANTS(:,127).*(exp(ALGEBRAIC(:,96)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,105)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,100) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,252).*STATES(:,32))+ CONSTANTS(:,310).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,113) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,255).*STATES(:,35))+ CONSTANTS(:,312).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,114) =  CONSTANTS(:,131).*(exp(ALGEBRAIC(:,100)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,113)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,115) =  - ALGEBRAIC(:,106) - ALGEBRAIC(:,114);
    RATES(:,32) = ALGEBRAIC(:,115);
    ALGEBRAIC(:,97) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,255).*STATES(:,35))+ CONSTANTS(:,309).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,107) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,256).*STATES(:,36))+ CONSTANTS(:,311).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,108) =  CONSTANTS(:,129).*(exp(ALGEBRAIC(:,97)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,107)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,116) =  - ALGEBRAIC(:,108)+ALGEBRAIC(:,114);
    RATES(:,35) = ALGEBRAIC(:,116);
    ALGEBRAIC(:,98) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,253).*STATES(:,33))+ CONSTANTS(:,309).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,109) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,254).*STATES(:,34))+ CONSTANTS(:,311).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,110) =  CONSTANTS(:,128).*(exp(ALGEBRAIC(:,98)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,109)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,101) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,253).*STATES(:,33))+ CONSTANTS(:,310).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,117) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,256).*STATES(:,36))+ CONSTANTS(:,312).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,118) =  CONSTANTS(:,132).*(exp(ALGEBRAIC(:,101)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,117)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,119) = (ALGEBRAIC(:,106) - ALGEBRAIC(:,110)) - ALGEBRAIC(:,118);
    RATES(:,33) = ALGEBRAIC(:,119);
    ALGEBRAIC(:,99) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,256).*STATES(:,36))+ CONSTANTS(:,309).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,111) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,257).*STATES(:,37))+ CONSTANTS(:,311).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,112) =  CONSTANTS(:,130).*(exp(ALGEBRAIC(:,99)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,111)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,120) = (ALGEBRAIC(:,108) - ALGEBRAIC(:,112))+ALGEBRAIC(:,118);
    RATES(:,36) = ALGEBRAIC(:,120);
    ALGEBRAIC(:,102) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,254).*STATES(:,34))+ CONSTANTS(:,310).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,121) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,257).*STATES(:,37))+ CONSTANTS(:,312).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,122) =  CONSTANTS(:,133).*(exp(ALGEBRAIC(:,102)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,121)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,123) = ALGEBRAIC(:,110) - ALGEBRAIC(:,122);
    RATES(:,34) = ALGEBRAIC(:,123);
    ALGEBRAIC(:,103) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,92) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,93) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,94) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,257).*STATES(:,37));
    ALGEBRAIC(:,95) = ALGEBRAIC(:,93)+ CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,91)+ALGEBRAIC(:,94)+ CONSTANTS(:,308).*ALGEBRAIC(:,92);
    ALGEBRAIC(:,104) = ALGEBRAIC(:,92)+ALGEBRAIC(:,94)+ CONSTANTS(:,308).*ALGEBRAIC(:,92);
    ALGEBRAIC(:,124) = piecewise({ALGEBRAIC(:,103)==0.00000,  CONSTANTS(:,126).*(exp(ALGEBRAIC(:,95)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,104)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,126).*ALGEBRAIC(:,103))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,103)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,95)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,104)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,125) = (ALGEBRAIC(:,112)+ALGEBRAIC(:,122)) - (ALGEBRAIC(:,124) - ALGEBRAIC(:,124));
    RATES(:,37) = ALGEBRAIC(:,125);
    ALGEBRAIC(:,127) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,132) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,152).*STATES(:,38))+ CONSTANTS(:,266).*CONSTANTS(:,323).*ALGEBRAIC(:,127);
    ALGEBRAIC(:,135) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,153).*STATES(:,39))+ CONSTANTS(:,267).*CONSTANTS(:,323).*ALGEBRAIC(:,127);
    ALGEBRAIC(:,136) =  CONSTANTS(:,5).*(exp(ALGEBRAIC(:,132)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,135)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,137) =  - ALGEBRAIC(:,136);
    RATES(:,38) = ALGEBRAIC(:,137);
    ALGEBRAIC(:,133) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,127);
    ALGEBRAIC(:,128) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,129) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,130) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,153).*STATES(:,39));
    ALGEBRAIC(:,131) = ALGEBRAIC(:,129)+ CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,127)+ALGEBRAIC(:,130)+ CONSTANTS(:,308).*ALGEBRAIC(:,128);
    ALGEBRAIC(:,134) = ALGEBRAIC(:,128)+ALGEBRAIC(:,130)+ CONSTANTS(:,308).*ALGEBRAIC(:,128);
    ALGEBRAIC(:,138) = piecewise({ALGEBRAIC(:,133)==0.00000,  CONSTANTS(:,4).*(exp(ALGEBRAIC(:,131)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,134)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,4).*ALGEBRAIC(:,133))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,133)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,131)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,134)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,139) = ALGEBRAIC(:,136) - (ALGEBRAIC(:,138) - ALGEBRAIC(:,138));
    RATES(:,39) = ALGEBRAIC(:,139);
    ALGEBRAIC(:,149) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,154) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,262).*STATES(:,40))+ CONSTANTS(:,268).*CONSTANTS(:,323).*ALGEBRAIC(:,149);
    ALGEBRAIC(:,157) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,263).*STATES(:,41))+ CONSTANTS(:,269).*CONSTANTS(:,323).*ALGEBRAIC(:,149);
    ALGEBRAIC(:,158) =  CONSTANTS(:,144).*(exp(ALGEBRAIC(:,154)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,157)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,159) =  - ALGEBRAIC(:,158);
    RATES(:,40) = ALGEBRAIC(:,159);
    ALGEBRAIC(:,155) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,149);
    ALGEBRAIC(:,151) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,152) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,263).*STATES(:,41));
    ALGEBRAIC(:,153) = ALGEBRAIC(:,151)+ CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,149)+ALGEBRAIC(:,152);
    ALGEBRAIC(:,150) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,156) = ALGEBRAIC(:,150)+ALGEBRAIC(:,152);
    ALGEBRAIC(:,160) = piecewise({ALGEBRAIC(:,155)==0.00000,  CONSTANTS(:,143).*(exp(ALGEBRAIC(:,153)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,156)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,143).*ALGEBRAIC(:,155))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,155)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,153)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,156)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,161) = ALGEBRAIC(:,158) - (ALGEBRAIC(:,160) - ALGEBRAIC(:,160));
    RATES(:,41) = ALGEBRAIC(:,161);
    ALGEBRAIC(:,165) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,167) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,154).*STATES(:,42));
    ALGEBRAIC(:,168) = ALGEBRAIC(:,167)+ CONSTANTS(:,270).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,170) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,155).*STATES(:,43));
    ALGEBRAIC(:,171) = ALGEBRAIC(:,170)+ CONSTANTS(:,271).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,173) =  CONSTANTS(:,7).*(exp(ALGEBRAIC(:,168)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,171)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,169) = ALGEBRAIC(:,167)+ CONSTANTS(:,272).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,174) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,156).*STATES(:,44));
    ALGEBRAIC(:,176) = ALGEBRAIC(:,174)+ CONSTANTS(:,273).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,177) =  CONSTANTS(:,9).*(exp(ALGEBRAIC(:,169)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,176)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,178) =  - ALGEBRAIC(:,173) - ALGEBRAIC(:,177);
    RATES(:,42) = ALGEBRAIC(:,178);
    ALGEBRAIC(:,175) = ALGEBRAIC(:,174)+ CONSTANTS(:,270).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,179) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,157).*STATES(:,45));
    ALGEBRAIC(:,183) = ALGEBRAIC(:,179)+ CONSTANTS(:,271).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,185) =  CONSTANTS(:,8).*(exp(ALGEBRAIC(:,175)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,183)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,186) = ALGEBRAIC(:,177) - ALGEBRAIC(:,185);
    RATES(:,44) = ALGEBRAIC(:,186);
    ALGEBRAIC(:,172) = ALGEBRAIC(:,170)+ CONSTANTS(:,272).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,184) = ALGEBRAIC(:,179)+ CONSTANTS(:,273).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,187) =  CONSTANTS(:,10).*(exp(ALGEBRAIC(:,172)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,184)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,188) = ALGEBRAIC(:,173) - ALGEBRAIC(:,187);
    RATES(:,43) = ALGEBRAIC(:,188);
    ALGEBRAIC(:,189) = ALGEBRAIC(:,185)+ALGEBRAIC(:,187);
    RATES(:,45) = ALGEBRAIC(:,189);
    ALGEBRAIC(:,193) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,195) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,158).*STATES(:,46));
    ALGEBRAIC(:,196) = ALGEBRAIC(:,195)+ CONSTANTS(:,274).*CONSTANTS(:,323).*ALGEBRAIC(:,193);
    ALGEBRAIC(:,197) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,159).*STATES(:,47));
    ALGEBRAIC(:,198) = ALGEBRAIC(:,197)+ CONSTANTS(:,275).*CONSTANTS(:,323).*ALGEBRAIC(:,193);
    ALGEBRAIC(:,200) =  CONSTANTS(:,12).*(exp(ALGEBRAIC(:,196)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,198)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,201) =  - ALGEBRAIC(:,200);
    RATES(:,46) = ALGEBRAIC(:,201);
    ALGEBRAIC(:,199) = ALGEBRAIC(:,197)+ CONSTANTS(:,274).*CONSTANTS(:,323).*ALGEBRAIC(:,193);
    ALGEBRAIC(:,202) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,160).*STATES(:,48));
    ALGEBRAIC(:,206) = ALGEBRAIC(:,202)+ CONSTANTS(:,275).*CONSTANTS(:,323).*ALGEBRAIC(:,193);
    ALGEBRAIC(:,207) =  CONSTANTS(:,13).*(exp(ALGEBRAIC(:,199)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,206)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,208) = ALGEBRAIC(:,200) - ALGEBRAIC(:,207);
    RATES(:,47) = ALGEBRAIC(:,208);
    ALGEBRAIC(:,209) = ALGEBRAIC(:,207);
    RATES(:,48) = ALGEBRAIC(:,209);
    ALGEBRAIC(:,214) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,162).*STATES(:,49));
    ALGEBRAIC(:,242) = ALGEBRAIC(:,214);
    ALGEBRAIC(:,213) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,161).*STATES(:,17));
    ALGEBRAIC(:,288) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,168).*STATES(:,55))+ CONSTANTS(:,303).*ALGEBRAIC(:,213);
    ALGEBRAIC(:,289) =  CONSTANTS(:,34).*(exp(ALGEBRAIC(:,242)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,288)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,211) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,224) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,162).*STATES(:,49))+ CONSTANTS(:,299).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,252) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,165).*STATES(:,52))+ CONSTANTS(:,304).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,253) =  CONSTANTS(:,16).*(exp(ALGEBRAIC(:,224)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,252)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,230) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,162).*STATES(:,49))+ CONSTANTS(:,300).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,264) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,163).*STATES(:,50))+ CONSTANTS(:,305).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,265) =  CONSTANTS(:,22).*(exp(ALGEBRAIC(:,230)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,264)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,234) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,162).*STATES(:,49))+ CONSTANTS(:,301).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,272) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,164).*STATES(:,51))+ CONSTANTS(:,306).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,273) =  CONSTANTS(:,26).*(exp(ALGEBRAIC(:,234)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,272)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,290) = (( - ALGEBRAIC(:,253) - ALGEBRAIC(:,265)) - ALGEBRAIC(:,273)) - ALGEBRAIC(:,289);
    RATES(:,49) = ALGEBRAIC(:,290);
    ALGEBRAIC(:,225) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,168).*STATES(:,55))+ CONSTANTS(:,299).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,254) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,171).*STATES(:,58))+ CONSTANTS(:,304).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,255) =  CONSTANTS(:,19).*(exp(ALGEBRAIC(:,225)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,254)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,231) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,168).*STATES(:,55))+ CONSTANTS(:,300).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,266) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,169).*STATES(:,56))+ CONSTANTS(:,305).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,267) =  CONSTANTS(:,24).*(exp(ALGEBRAIC(:,231)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,266)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,235) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,168).*STATES(:,55))+ CONSTANTS(:,301).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,274) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,170).*STATES(:,57))+ CONSTANTS(:,306).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,275) =  CONSTANTS(:,28).*(exp(ALGEBRAIC(:,235)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,274)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,291) = (( - ALGEBRAIC(:,255) - ALGEBRAIC(:,267)) - ALGEBRAIC(:,275)) -  - ALGEBRAIC(:,289);
    RATES(:,55) = ALGEBRAIC(:,291);
    ALGEBRAIC(:,215) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,163).*STATES(:,50));
    ALGEBRAIC(:,243) = ALGEBRAIC(:,215);
    ALGEBRAIC(:,292) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,169).*STATES(:,56))+ CONSTANTS(:,303).*ALGEBRAIC(:,213);
    ALGEBRAIC(:,293) =  CONSTANTS(:,36).*(exp(ALGEBRAIC(:,243)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,292)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,226) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,163).*STATES(:,50))+ CONSTANTS(:,299).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,256) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,166).*STATES(:,53))+ CONSTANTS(:,304).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,257) =  CONSTANTS(:,17).*(exp(ALGEBRAIC(:,226)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,256)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,238) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,163).*STATES(:,50))+ CONSTANTS(:,302).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,280) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,164).*STATES(:,51))+ CONSTANTS(:,307).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,281) =  CONSTANTS(:,30).*(exp(ALGEBRAIC(:,238)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,280)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,294) = (( - ALGEBRAIC(:,257)+ALGEBRAIC(:,265)) - ALGEBRAIC(:,293)) - ALGEBRAIC(:,281);
    RATES(:,50) = ALGEBRAIC(:,294);
    ALGEBRAIC(:,227) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,169).*STATES(:,56))+ CONSTANTS(:,299).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,258) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,172).*STATES(:,59))+ CONSTANTS(:,304).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,259) =  CONSTANTS(:,20).*(exp(ALGEBRAIC(:,227)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,258)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,239) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,169).*STATES(:,56))+ CONSTANTS(:,302).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,282) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,170).*STATES(:,57))+ CONSTANTS(:,307).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,283) =  CONSTANTS(:,32).*(exp(ALGEBRAIC(:,239)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,282)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,295) = (( - ALGEBRAIC(:,259)+ALGEBRAIC(:,267)) -  - ALGEBRAIC(:,293)) - ALGEBRAIC(:,283);
    RATES(:,56) = ALGEBRAIC(:,295);
    ALGEBRAIC(:,216) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,164).*STATES(:,51));
    ALGEBRAIC(:,244) = ALGEBRAIC(:,216);
    ALGEBRAIC(:,296) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,170).*STATES(:,57))+ CONSTANTS(:,303).*ALGEBRAIC(:,213);
    ALGEBRAIC(:,297) =  CONSTANTS(:,38).*(exp(ALGEBRAIC(:,244)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,296)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,228) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,164).*STATES(:,51))+ CONSTANTS(:,299).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,260) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,167).*STATES(:,54))+ CONSTANTS(:,304).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,261) =  CONSTANTS(:,18).*(exp(ALGEBRAIC(:,228)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,260)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,298) = (( - ALGEBRAIC(:,261)+ALGEBRAIC(:,273)) - ALGEBRAIC(:,297))+ALGEBRAIC(:,281);
    RATES(:,51) = ALGEBRAIC(:,298);
    ALGEBRAIC(:,229) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,170).*STATES(:,57))+ CONSTANTS(:,299).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,262) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,173).*STATES(:,60))+ CONSTANTS(:,304).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,263) =  CONSTANTS(:,21).*(exp(ALGEBRAIC(:,229)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,262)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,299) = (( - ALGEBRAIC(:,263)+ALGEBRAIC(:,275)) -  - ALGEBRAIC(:,297))+ALGEBRAIC(:,283);
    RATES(:,57) = ALGEBRAIC(:,299);
    ALGEBRAIC(:,217) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,165).*STATES(:,52));
    ALGEBRAIC(:,245) = ALGEBRAIC(:,217);
    ALGEBRAIC(:,300) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,171).*STATES(:,58))+ CONSTANTS(:,303).*ALGEBRAIC(:,213);
    ALGEBRAIC(:,301) =  CONSTANTS(:,35).*(exp(ALGEBRAIC(:,245)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,300)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,232) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,165).*STATES(:,52))+ CONSTANTS(:,300).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,268) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,166).*STATES(:,53))+ CONSTANTS(:,305).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,269) =  CONSTANTS(:,23).*(exp(ALGEBRAIC(:,232)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,268)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,236) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,165).*STATES(:,52))+ CONSTANTS(:,301).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,276) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,167).*STATES(:,54))+ CONSTANTS(:,306).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,277) =  CONSTANTS(:,27).*(exp(ALGEBRAIC(:,236)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,276)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,302) = (( - ALGEBRAIC(:,277)+ALGEBRAIC(:,253)) - ALGEBRAIC(:,269)) - ALGEBRAIC(:,301);
    RATES(:,52) = ALGEBRAIC(:,302);
    ALGEBRAIC(:,233) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,171).*STATES(:,58))+ CONSTANTS(:,300).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,270) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,172).*STATES(:,59))+ CONSTANTS(:,305).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,271) =  CONSTANTS(:,25).*(exp(ALGEBRAIC(:,233)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,270)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,237) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,171).*STATES(:,58))+ CONSTANTS(:,301).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,278) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,173).*STATES(:,60))+ CONSTANTS(:,306).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,279) =  CONSTANTS(:,29).*(exp(ALGEBRAIC(:,237)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,278)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,303) = (( - ALGEBRAIC(:,279)+ALGEBRAIC(:,255)) - ALGEBRAIC(:,271)) -  - ALGEBRAIC(:,301);
    RATES(:,58) = ALGEBRAIC(:,303);
    ALGEBRAIC(:,218) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,166).*STATES(:,53));
    ALGEBRAIC(:,246) = ALGEBRAIC(:,218);
    ALGEBRAIC(:,304) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,172).*STATES(:,59))+ CONSTANTS(:,303).*ALGEBRAIC(:,213);
    ALGEBRAIC(:,305) =  CONSTANTS(:,37).*(exp(ALGEBRAIC(:,246)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,304)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,240) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,166).*STATES(:,53))+ CONSTANTS(:,302).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,284) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,167).*STATES(:,54))+ CONSTANTS(:,307).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,285) =  CONSTANTS(:,31).*(exp(ALGEBRAIC(:,240)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,284)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,306) = ((ALGEBRAIC(:,269)+ALGEBRAIC(:,257)) - ALGEBRAIC(:,305)) - ALGEBRAIC(:,285);
    RATES(:,53) = ALGEBRAIC(:,306);
    ALGEBRAIC(:,220) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,167).*STATES(:,54));
    ALGEBRAIC(:,247) = ALGEBRAIC(:,220);
    ALGEBRAIC(:,307) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,173).*STATES(:,60))+ CONSTANTS(:,303).*ALGEBRAIC(:,213);
    ALGEBRAIC(:,308) =  CONSTANTS(:,39).*(exp(ALGEBRAIC(:,247)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,307)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,309) = ((ALGEBRAIC(:,277)+ALGEBRAIC(:,261)) - ALGEBRAIC(:,308))+ALGEBRAIC(:,285);
    RATES(:,54) = ALGEBRAIC(:,309);
    ALGEBRAIC(:,219) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,172).*STATES(:,59));
    ALGEBRAIC(:,222) = ALGEBRAIC(:,213)+ CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,211)+ALGEBRAIC(:,219);
    ALGEBRAIC(:,212) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,148).*STATES(:,2));
    ALGEBRAIC(:,250) = ALGEBRAIC(:,212)+ALGEBRAIC(:,219);
    ALGEBRAIC(:,248) =  CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,310) = piecewise({ALGEBRAIC(:,248)==0.00000,  CONSTANTS(:,14).*(exp(ALGEBRAIC(:,222)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,250)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,14).*ALGEBRAIC(:,248))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,248)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,222)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,250)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,241) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,172).*STATES(:,59))+ CONSTANTS(:,302).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,286) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,173).*STATES(:,60))+ CONSTANTS(:,307).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,287) =  CONSTANTS(:,33).*(exp(ALGEBRAIC(:,241)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,286)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,311) = ((ALGEBRAIC(:,271)+ALGEBRAIC(:,259)) - (( - ALGEBRAIC(:,305)+ALGEBRAIC(:,310)) - ALGEBRAIC(:,310))) - ALGEBRAIC(:,287);
    RATES(:,59) = ALGEBRAIC(:,311);
    ALGEBRAIC(:,221) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,173).*STATES(:,60));
    ALGEBRAIC(:,223) = ALGEBRAIC(:,213)+ CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,211)+ALGEBRAIC(:,221);
    ALGEBRAIC(:,251) = ALGEBRAIC(:,212)+ALGEBRAIC(:,221);
    ALGEBRAIC(:,249) =  CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,312) = piecewise({ALGEBRAIC(:,249)==0.00000,  CONSTANTS(:,15).*(exp(ALGEBRAIC(:,223)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,251)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,15).*ALGEBRAIC(:,249))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,249)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,223)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,251)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,313) = ((ALGEBRAIC(:,279)+ALGEBRAIC(:,263)) - (( - ALGEBRAIC(:,308)+ALGEBRAIC(:,312)) - ALGEBRAIC(:,312)))+ALGEBRAIC(:,287);
    RATES(:,60) = ALGEBRAIC(:,313);
    ALGEBRAIC(:,322) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,174).*STATES(:,61));
    ALGEBRAIC(:,328) = ALGEBRAIC(:,322);
    ALGEBRAIC(:,321) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,180).*STATES(:,6));
    ALGEBRAIC(:,323) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,175).*STATES(:,62));
    ALGEBRAIC(:,334) =  CONSTANTS(:,279).*ALGEBRAIC(:,321)+ALGEBRAIC(:,323);
    ALGEBRAIC(:,335) =  CONSTANTS(:,40).*(exp(ALGEBRAIC(:,328)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,334)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,319) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,329) = ALGEBRAIC(:,323)+ALGEBRAIC(:,319);
    ALGEBRAIC(:,324) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,176).*STATES(:,63));
    ALGEBRAIC(:,336) = ALGEBRAIC(:,324);
    ALGEBRAIC(:,337) =  CONSTANTS(:,41).*(exp(ALGEBRAIC(:,329)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,336)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,339) = ALGEBRAIC(:,335) - ALGEBRAIC(:,337);
    RATES(:,62) = ALGEBRAIC(:,339);
    ALGEBRAIC(:,330) = ALGEBRAIC(:,324);
    ALGEBRAIC(:,325) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,177).*STATES(:,64));
    ALGEBRAIC(:,338) = ALGEBRAIC(:,325);
    ALGEBRAIC(:,340) =  CONSTANTS(:,42).*(exp(ALGEBRAIC(:,330)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,338)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,342) = ALGEBRAIC(:,337) - ALGEBRAIC(:,340);
    RATES(:,63) = ALGEBRAIC(:,342);
    ALGEBRAIC(:,331) = ALGEBRAIC(:,325);
    ALGEBRAIC(:,318) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,148).*STATES(:,2));
    ALGEBRAIC(:,326) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,178).*STATES(:,65));
    ALGEBRAIC(:,341) = ALGEBRAIC(:,326)+ALGEBRAIC(:,318);
    ALGEBRAIC(:,343) =  CONSTANTS(:,43).*(exp(ALGEBRAIC(:,331)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,341)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,344) =  - ALGEBRAIC(:,343)+ALGEBRAIC(:,340);
    RATES(:,64) = ALGEBRAIC(:,344);
    ALGEBRAIC(:,320) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7));
    ALGEBRAIC(:,332) = ALGEBRAIC(:,326)+ CONSTANTS(:,278).*ALGEBRAIC(:,320);
    ALGEBRAIC(:,327) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,179).*STATES(:,66));
    ALGEBRAIC(:,345) = ALGEBRAIC(:,327);
    ALGEBRAIC(:,346) =  CONSTANTS(:,44).*(exp(ALGEBRAIC(:,332)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,345)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,347) =  - ALGEBRAIC(:,346)+ALGEBRAIC(:,343);
    RATES(:,65) = ALGEBRAIC(:,347);
    ALGEBRAIC(:,317) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,333) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,179).*STATES(:,66))+ CONSTANTS(:,276).*CONSTANTS(:,323).*ALGEBRAIC(:,317);
    ALGEBRAIC(:,348) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,174).*STATES(:,61))+ CONSTANTS(:,277).*CONSTANTS(:,323).*ALGEBRAIC(:,317);
    ALGEBRAIC(:,349) =  CONSTANTS(:,45).*(exp(ALGEBRAIC(:,333)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,348)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,350) = ALGEBRAIC(:,349) - ALGEBRAIC(:,335);
    RATES(:,61) = ALGEBRAIC(:,350);
    ALGEBRAIC(:,351) =  - ALGEBRAIC(:,349)+ALGEBRAIC(:,346);
    RATES(:,66) = ALGEBRAIC(:,351);
    ALGEBRAIC(:,371) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,191).*STATES(:,115));
    ALGEBRAIC(:,387) = ALGEBRAIC(:,371);
    ALGEBRAIC(:,368) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7));
    ALGEBRAIC(:,372) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,192).*STATES(:,116));
    ALGEBRAIC(:,403) = ALGEBRAIC(:,368)+ALGEBRAIC(:,372);
    ALGEBRAIC(:,404) =  CONSTANTS(:,56).*(exp(ALGEBRAIC(:,387)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,403)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,364) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,388) = ALGEBRAIC(:,372)+ALGEBRAIC(:,364);
    ALGEBRAIC(:,373) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,193).*STATES(:,117));
    ALGEBRAIC(:,405) = ALGEBRAIC(:,373);
    ALGEBRAIC(:,406) =  CONSTANTS(:,57).*(exp(ALGEBRAIC(:,388)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,405)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,407) = ALGEBRAIC(:,404) - ALGEBRAIC(:,406);
    RATES(:,116) = ALGEBRAIC(:,407);
    ALGEBRAIC(:,389) = ALGEBRAIC(:,373)+ALGEBRAIC(:,364);
    ALGEBRAIC(:,374) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,194).*STATES(:,118));
    ALGEBRAIC(:,408) = ALGEBRAIC(:,374);
    ALGEBRAIC(:,409) =  CONSTANTS(:,58).*(exp(ALGEBRAIC(:,389)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,408)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,410) =  - ALGEBRAIC(:,409)+ALGEBRAIC(:,406);
    RATES(:,117) = ALGEBRAIC(:,410);
    ALGEBRAIC(:,390) = ALGEBRAIC(:,374);
    ALGEBRAIC(:,363) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,200).*STATES(:,13));
    ALGEBRAIC(:,385) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,199).*STATES(:,12));
    ALGEBRAIC(:,375) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,195).*STATES(:,107));
    ALGEBRAIC(:,411) = ALGEBRAIC(:,363)+ALGEBRAIC(:,385)+ALGEBRAIC(:,375);
    ALGEBRAIC(:,412) =  CONSTANTS(:,59).*(exp(ALGEBRAIC(:,390)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,411)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,413) = ALGEBRAIC(:,409) - ALGEBRAIC(:,412);
    RATES(:,118) = ALGEBRAIC(:,413);
    ALGEBRAIC(:,367) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,197).*STATES(:,10));
    ALGEBRAIC(:,391) = ALGEBRAIC(:,375)+ALGEBRAIC(:,367);
    ALGEBRAIC(:,376) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,196).*STATES(:,108));
    ALGEBRAIC(:,414) = ALGEBRAIC(:,376);
    ALGEBRAIC(:,415) =  CONSTANTS(:,60).*(exp(ALGEBRAIC(:,391)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,414)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,416) =  - ALGEBRAIC(:,415)+ALGEBRAIC(:,412);
    RATES(:,107) = ALGEBRAIC(:,416);
    ALGEBRAIC(:,392) = ALGEBRAIC(:,376);
    ALGEBRAIC(:,370) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,182).*STATES(:,109));
    ALGEBRAIC(:,417) = ALGEBRAIC(:,370);
    ALGEBRAIC(:,419) =  CONSTANTS(:,61).*(exp(ALGEBRAIC(:,392)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,417)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,421) = ALGEBRAIC(:,415) - ALGEBRAIC(:,419);
    RATES(:,108) = ALGEBRAIC(:,421);
    ALGEBRAIC(:,386) = ALGEBRAIC(:,370);
    ALGEBRAIC(:,365) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,377) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,183).*STATES(:,110));
    ALGEBRAIC(:,401) = ALGEBRAIC(:,365)+ALGEBRAIC(:,377);
    ALGEBRAIC(:,402) =  CONSTANTS(:,47).*(exp(ALGEBRAIC(:,386)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,401)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,422) =  - ALGEBRAIC(:,402)+ALGEBRAIC(:,419);
    RATES(:,109) = ALGEBRAIC(:,422);
    ALGEBRAIC(:,393) = ALGEBRAIC(:,377);
    ALGEBRAIC(:,378) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,184).*STATES(:,111));
    ALGEBRAIC(:,418) = ALGEBRAIC(:,378)+ALGEBRAIC(:,365);
    ALGEBRAIC(:,420) =  CONSTANTS(:,48).*(exp(ALGEBRAIC(:,393)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,418)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,423) =  - ALGEBRAIC(:,420)+ALGEBRAIC(:,402);
    RATES(:,110) = ALGEBRAIC(:,423);
    ALGEBRAIC(:,369) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,180).*STATES(:,6));
    ALGEBRAIC(:,394) = ALGEBRAIC(:,378)+ALGEBRAIC(:,369);
    ALGEBRAIC(:,379) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,185).*STATES(:,112));
    ALGEBRAIC(:,424) = ALGEBRAIC(:,379);
    ALGEBRAIC(:,425) =  CONSTANTS(:,49).*(exp(ALGEBRAIC(:,394)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,424)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,426) = ALGEBRAIC(:,420) - ALGEBRAIC(:,425);
    RATES(:,111) = ALGEBRAIC(:,426);
    ALGEBRAIC(:,395) = ALGEBRAIC(:,379)+ALGEBRAIC(:,369);
    ALGEBRAIC(:,380) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,186).*STATES(:,113));
    ALGEBRAIC(:,427) = ALGEBRAIC(:,380);
    ALGEBRAIC(:,428) =  CONSTANTS(:,50).*(exp(ALGEBRAIC(:,395)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,427)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,429) = ALGEBRAIC(:,425) - ALGEBRAIC(:,428);
    RATES(:,112) = ALGEBRAIC(:,429);
    ALGEBRAIC(:,396) = ALGEBRAIC(:,380)+ALGEBRAIC(:,369);
    ALGEBRAIC(:,362) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,430) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,187).*STATES(:,114))+ CONSTANTS(:,281).*ALGEBRAIC(:,362);
    ALGEBRAIC(:,431) =  CONSTANTS(:,51).*(exp(ALGEBRAIC(:,396)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,430)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,432) = ALGEBRAIC(:,428) - ALGEBRAIC(:,431);
    RATES(:,113) = ALGEBRAIC(:,432);
    ALGEBRAIC(:,381) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,187).*STATES(:,114));
    ALGEBRAIC(:,397) = ALGEBRAIC(:,381);
    ALGEBRAIC(:,366) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,198).*STATES(:,11));
    ALGEBRAIC(:,382) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,188).*STATES(:,106));
    ALGEBRAIC(:,433) = ALGEBRAIC(:,382)+ALGEBRAIC(:,366);
    ALGEBRAIC(:,434) =  CONSTANTS(:,52).*(exp(ALGEBRAIC(:,397)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,433)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,435) = ALGEBRAIC(:,431) - ALGEBRAIC(:,434);
    RATES(:,114) = ALGEBRAIC(:,435);
    ALGEBRAIC(:,398) = ALGEBRAIC(:,382);
    ALGEBRAIC(:,383) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,189).*STATES(:,119));
    ALGEBRAIC(:,436) = ALGEBRAIC(:,383);
    ALGEBRAIC(:,437) =  CONSTANTS(:,53).*(exp(ALGEBRAIC(:,398)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,436)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,438) = ALGEBRAIC(:,434) - ALGEBRAIC(:,437);
    RATES(:,106) = ALGEBRAIC(:,438);
    ALGEBRAIC(:,399) = ALGEBRAIC(:,383);
    ALGEBRAIC(:,439) =  CONSTANTS(:,282).*ALGEBRAIC(:,362)+ CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7))+ CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,190).*STATES(:,120));
    ALGEBRAIC(:,440) =  CONSTANTS(:,54).*(exp(ALGEBRAIC(:,399)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,439)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,441) =  - ALGEBRAIC(:,440)+ALGEBRAIC(:,437);
    RATES(:,119) = ALGEBRAIC(:,441);
    ALGEBRAIC(:,384) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,190).*STATES(:,120));
    ALGEBRAIC(:,400) = ALGEBRAIC(:,384);
    ALGEBRAIC(:,443) = ALGEBRAIC(:,371)+ALGEBRAIC(:,368);
    ALGEBRAIC(:,444) =  CONSTANTS(:,55).*(exp(ALGEBRAIC(:,400)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,443)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,445) = ALGEBRAIC(:,444) - ALGEBRAIC(:,404);
    RATES(:,115) = ALGEBRAIC(:,445);
    ALGEBRAIC(:,446) = ALGEBRAIC(:,440) - ALGEBRAIC(:,444);
    RATES(:,120) = ALGEBRAIC(:,446);
    ALGEBRAIC(:,456) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,161).*STATES(:,17));
    ALGEBRAIC(:,457) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,209).*STATES(:,67));
    ALGEBRAIC(:,460) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,212).*STATES(:,70));
    ALGEBRAIC(:,462) =  CONSTANTS(:,68).*(exp(ALGEBRAIC(:,460)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,457)+ CONSTANTS(:,325).*ALGEBRAIC(:,456))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,458) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,210).*STATES(:,68));
    ALGEBRAIC(:,463) =  CONSTANTS(:,69).*(exp((ALGEBRAIC(:,457)+ CONSTANTS(:,324).*ALGEBRAIC(:,456))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,458)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,67) = ALGEBRAIC(:,462) - ALGEBRAIC(:,463);
    ALGEBRAIC(:,459) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,211).*STATES(:,69));
    ALGEBRAIC(:,464) =  CONSTANTS(:,70).*(exp((ALGEBRAIC(:,458)+ CONSTANTS(:,325).*ALGEBRAIC(:,456))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,459)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,68) = ALGEBRAIC(:,463) - ALGEBRAIC(:,464);
    ALGEBRAIC(:,465) =  CONSTANTS(:,71).*(exp(ALGEBRAIC(:,459)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,460)+ CONSTANTS(:,324).*ALGEBRAIC(:,456))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,70) = ALGEBRAIC(:,465) - ALGEBRAIC(:,462);
    RATES(:,69) = ALGEBRAIC(:,464) - ALGEBRAIC(:,465);
    ALGEBRAIC(:,454) = ALGEBRAIC(:,412);
    ALGEBRAIC(:,478) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,221).*STATES(:,79));
    ALGEBRAIC(:,483) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,206).*STATES(:,28));
    ALGEBRAIC(:,484) = ALGEBRAIC(:,483) - CONSTANTS(:,346);
    ALGEBRAIC(:,485) = ALGEBRAIC(:,478)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,473) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,213).*STATES(:,71));
    ALGEBRAIC(:,472) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,199).*STATES(:,12));
    ALGEBRAIC(:,486) = ALGEBRAIC(:,473)+ALGEBRAIC(:,472)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,503) =  CONSTANTS(:,80).*(exp(ALGEBRAIC(:,485)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,486)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,504) = ALGEBRAIC(:,503);
    RATES(:,12) = ALGEBRAIC(:,454)+ALGEBRAIC(:,504);
    ALGEBRAIC(:,451) =  - ALGEBRAIC(:,415);
    ALGEBRAIC(:,471) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,197).*STATES(:,10));
    ALGEBRAIC(:,487) = ALGEBRAIC(:,473)+ALGEBRAIC(:,471)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,474) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,214).*STATES(:,72));
    ALGEBRAIC(:,488) = ALGEBRAIC(:,474)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,505) =  CONSTANTS(:,72).*(exp(ALGEBRAIC(:,487)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,488)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,506) =  - ALGEBRAIC(:,505);
    RATES(:,10) = ALGEBRAIC(:,451)+ALGEBRAIC(:,506);
    ALGEBRAIC(:,507) = ALGEBRAIC(:,503) - ALGEBRAIC(:,505);
    RATES(:,71) = ALGEBRAIC(:,507);
    ALGEBRAIC(:,450) = ALGEBRAIC(:,434);
    ALGEBRAIC(:,477) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,217).*STATES(:,75));
    ALGEBRAIC(:,489) = ALGEBRAIC(:,477)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,470) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,198).*STATES(:,11));
    ALGEBRAIC(:,479) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,218).*STATES(:,76));
    ALGEBRAIC(:,490) = ALGEBRAIC(:,470)+ALGEBRAIC(:,479)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,508) =  CONSTANTS(:,76).*(exp(ALGEBRAIC(:,489)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,490)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,509) = ALGEBRAIC(:,508);
    RATES(:,11) = ALGEBRAIC(:,450)+ALGEBRAIC(:,509);
    ALGEBRAIC(:,469) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,200).*STATES(:,13));
    ALGEBRAIC(:,491) = ALGEBRAIC(:,474)+ALGEBRAIC(:,469)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,475) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,215).*STATES(:,73));
    ALGEBRAIC(:,492) = ALGEBRAIC(:,475)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,510) =  CONSTANTS(:,74).*(exp(ALGEBRAIC(:,491)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,492)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,511) = ALGEBRAIC(:,510);
    RATES(:,73) = ALGEBRAIC(:,511);
    ALGEBRAIC(:,467) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,493) = ALGEBRAIC(:,474)+ CONSTANTS(:,326).*ALGEBRAIC(:,467)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,476) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,216).*STATES(:,74));
    ALGEBRAIC(:,494) = ALGEBRAIC(:,476)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,512) =  CONSTANTS(:,73).*(exp(ALGEBRAIC(:,493)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,494)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,514) = ALGEBRAIC(:,505) - ALGEBRAIC(:,512);
    RATES(:,72) = ALGEBRAIC(:,514);
    ALGEBRAIC(:,495) = ALGEBRAIC(:,476)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,496) = ALGEBRAIC(:,477)+ CONSTANTS(:,328).*ALGEBRAIC(:,469)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,513) =  CONSTANTS(:,75).*(exp(ALGEBRAIC(:,495)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,496)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,517) = ALGEBRAIC(:,512) - ALGEBRAIC(:,513);
    RATES(:,74) = ALGEBRAIC(:,517);
    ALGEBRAIC(:,518) = ALGEBRAIC(:,513) - ALGEBRAIC(:,508);
    RATES(:,75) = ALGEBRAIC(:,518);
    ALGEBRAIC(:,88) =  ( CONSTANTS(:,321).*CONSTANTS(:,322)).*log( CONSTANTS(:,149).*STATES(:,3));
    ALGEBRAIC(:,89) =  ( CONSTANTS(:,321).*CONSTANTS(:,322)).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,90) =  CONSTANTS(:,3).*(exp(ALGEBRAIC(:,88)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,89)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,497) = ALGEBRAIC(:,479)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,468) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,149).*STATES(:,3));
    ALGEBRAIC(:,481) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,219).*STATES(:,77));
    ALGEBRAIC(:,498) = ALGEBRAIC(:,481)+ CONSTANTS(:,327).*ALGEBRAIC(:,468)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,516) =  CONSTANTS(:,77).*(exp(ALGEBRAIC(:,497)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,498)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,520) =  CONSTANTS(:,327).*ALGEBRAIC(:,516);
    ALGEBRAIC(:,455) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,149).*STATES(:,3));
    ALGEBRAIC(:,461) =  CONSTANTS(:,67).*exp(ALGEBRAIC(:,460)./( CONSTANTS(:,321).*CONSTANTS(:,322))).*(exp(ALGEBRAIC(:,455)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,456)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,3) = ( - ALGEBRAIC(:,90)+ALGEBRAIC(:,520)) - ALGEBRAIC(:,461);
    ALGEBRAIC(:,522) = ALGEBRAIC(:,508) - ALGEBRAIC(:,516);
    RATES(:,76) = ALGEBRAIC(:,522);
    ALGEBRAIC(:,499) = ALGEBRAIC(:,481)+ CONSTANTS(:,328).*ALGEBRAIC(:,469)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,482) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,220).*STATES(:,78));
    ALGEBRAIC(:,500) = ALGEBRAIC(:,482)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,521) =  CONSTANTS(:,78).*(exp(ALGEBRAIC(:,499)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,500)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,525) = ALGEBRAIC(:,516) - ALGEBRAIC(:,521);
    RATES(:,77) = ALGEBRAIC(:,525);
    ALGEBRAIC(:,447) = ALGEBRAIC(:,412);
    ALGEBRAIC(:,501) = ALGEBRAIC(:,482)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,502) = ALGEBRAIC(:,469)+ALGEBRAIC(:,478)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,524) =  CONSTANTS(:,79).*(exp(ALGEBRAIC(:,501)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,502)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,527) = (( CONSTANTS(:,328).*ALGEBRAIC(:,513) - ALGEBRAIC(:,510)) -  CONSTANTS(:,328).*ALGEBRAIC(:,521))+ALGEBRAIC(:,524);
    RATES(:,13) = ALGEBRAIC(:,447)+ALGEBRAIC(:,527);
    ALGEBRAIC(:,529) = ALGEBRAIC(:,524) - ALGEBRAIC(:,503);
    RATES(:,79) = ALGEBRAIC(:,529);
    ALGEBRAIC(:,528) = ALGEBRAIC(:,521) - ALGEBRAIC(:,524);
    RATES(:,78) = ALGEBRAIC(:,528);
    ALGEBRAIC(:,526) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,531) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,222).*STATES(:,80));
    ALGEBRAIC(:,532) = ALGEBRAIC(:,531)+ CONSTANTS(:,283).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,534) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,223).*STATES(:,81));
    ALGEBRAIC(:,535) = ALGEBRAIC(:,534)+ CONSTANTS(:,285).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,537) =  CONSTANTS(:,82).*(exp(ALGEBRAIC(:,532)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,535)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,533) = ALGEBRAIC(:,531)+ CONSTANTS(:,284).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,538) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,224).*STATES(:,82));
    ALGEBRAIC(:,540) = ALGEBRAIC(:,538)+ CONSTANTS(:,286).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,541) =  CONSTANTS(:,84).*(exp(ALGEBRAIC(:,533)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,540)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,542) =  - ALGEBRAIC(:,537) - ALGEBRAIC(:,541);
    RATES(:,80) = ALGEBRAIC(:,542);
    ALGEBRAIC(:,539) = ALGEBRAIC(:,538)+ CONSTANTS(:,283).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,543) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,225).*STATES(:,83));
    ALGEBRAIC(:,547) = ALGEBRAIC(:,543)+ CONSTANTS(:,285).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,549) =  CONSTANTS(:,83).*(exp(ALGEBRAIC(:,539)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,547)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,550) = ALGEBRAIC(:,541) - ALGEBRAIC(:,549);
    RATES(:,82) = ALGEBRAIC(:,550);
    ALGEBRAIC(:,536) = ALGEBRAIC(:,534)+ CONSTANTS(:,284).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,548) = ALGEBRAIC(:,543)+ CONSTANTS(:,286).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,551) =  CONSTANTS(:,85).*(exp(ALGEBRAIC(:,536)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,548)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,552) = ALGEBRAIC(:,537) - ALGEBRAIC(:,551);
    RATES(:,81) = ALGEBRAIC(:,552);
    ALGEBRAIC(:,553) = ALGEBRAIC(:,549)+ALGEBRAIC(:,551);
    RATES(:,83) = ALGEBRAIC(:,553);
    ALGEBRAIC(:,557) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,559) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,258).*STATES(:,84));
    ALGEBRAIC(:,560) = ALGEBRAIC(:,559)+ CONSTANTS(:,287).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,562) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,259).*STATES(:,85));
    ALGEBRAIC(:,563) = ALGEBRAIC(:,562)+ CONSTANTS(:,289).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,565) =  CONSTANTS(:,136).*(exp(ALGEBRAIC(:,560)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,563)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,561) = ALGEBRAIC(:,559)+ CONSTANTS(:,288).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,566) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,260).*STATES(:,86));
    ALGEBRAIC(:,567) = ALGEBRAIC(:,566)+ CONSTANTS(:,290).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,569) =  CONSTANTS(:,138).*(exp(ALGEBRAIC(:,561)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,567)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,570) =  - ALGEBRAIC(:,565)+ALGEBRAIC(:,569);
    RATES(:,84) = ALGEBRAIC(:,570);
    ALGEBRAIC(:,568) = ALGEBRAIC(:,566)+ CONSTANTS(:,287).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,571) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,261).*STATES(:,87));
    ALGEBRAIC(:,575) = ALGEBRAIC(:,571)+ CONSTANTS(:,289).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,577) =  CONSTANTS(:,137).*(exp(ALGEBRAIC(:,568)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,575)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,578) =  - ALGEBRAIC(:,577)+ALGEBRAIC(:,569);
    RATES(:,86) = ALGEBRAIC(:,578);
    ALGEBRAIC(:,564) = ALGEBRAIC(:,562)+ CONSTANTS(:,288).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,576) = ALGEBRAIC(:,571)+ CONSTANTS(:,290).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,579) =  CONSTANTS(:,139).*(exp(ALGEBRAIC(:,564)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,576)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,580) = ALGEBRAIC(:,565) - ALGEBRAIC(:,579);
    RATES(:,85) = ALGEBRAIC(:,580);
    ALGEBRAIC(:,581) = ALGEBRAIC(:,577)+ALGEBRAIC(:,579);
    RATES(:,87) = ALGEBRAIC(:,581);
    ALGEBRAIC(:,583) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,226).*STATES(:,16));
    ALGEBRAIC(:,584) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,585) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,227).*STATES(:,18));
    ALGEBRAIC(:,587) =  CONSTANTS(:,86).*(exp(( CONSTANTS(:,314).*ALGEBRAIC(:,584)+ALGEBRAIC(:,583))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,585)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,16) =  - ALGEBRAIC(:,587);
    RATES(:,18) = ALGEBRAIC(:,587);
    ALGEBRAIC(:,589) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,161).*STATES(:,17));
    ALGEBRAIC(:,591) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,593) =  CONSTANTS(:,91).*(exp(ALGEBRAIC(:,589)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,591)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,316) = (( (CONSTANTS(:,303)).*ALGEBRAIC(:,301)+ CONSTANTS(:,303).*ALGEBRAIC(:,305)+ CONSTANTS(:,303).*ALGEBRAIC(:,297)+ CONSTANTS(:,303).*ALGEBRAIC(:,293)+ CONSTANTS(:,303).*ALGEBRAIC(:,289)+ CONSTANTS(:,303).*ALGEBRAIC(:,308)) - ALGEBRAIC(:,310)) - ALGEBRAIC(:,312);
    ALGEBRAIC(:,466) = (( CONSTANTS(:,325).*ALGEBRAIC(:,462) -  CONSTANTS(:,324).*ALGEBRAIC(:,463)) -  CONSTANTS(:,325).*ALGEBRAIC(:,464))+ CONSTANTS(:,324).*ALGEBRAIC(:,465);
    RATES(:,17) =  - ALGEBRAIC(:,593)+ALGEBRAIC(:,316)+ALGEBRAIC(:,461)+ALGEBRAIC(:,466);
    ALGEBRAIC(:,586) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,228).*STATES(:,19));
    ALGEBRAIC(:,588) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,229).*STATES(:,20));
    ALGEBRAIC(:,594) =  CONSTANTS(:,87).*(exp((ALGEBRAIC(:,586)+ CONSTANTS(:,313).*ALGEBRAIC(:,585))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,588)+ CONSTANTS(:,313).*ALGEBRAIC(:,585))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,19) =  - ALGEBRAIC(:,594);
    ALGEBRAIC(:,590) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,230).*STATES(:,21));
    ALGEBRAIC(:,596) =  CONSTANTS(:,88).*(exp(ALGEBRAIC(:,588)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,590)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,592) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,231).*STATES(:,22));
    ALGEBRAIC(:,598) =  CONSTANTS(:,89).*(exp(ALGEBRAIC(:,590)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,592)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,21) = ALGEBRAIC(:,596) - ALGEBRAIC(:,598);
    ALGEBRAIC(:,600) =  CONSTANTS(:,90).*(exp(ALGEBRAIC(:,592)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,588)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,20) = (ALGEBRAIC(:,594) - ALGEBRAIC(:,596))+ALGEBRAIC(:,600);
    RATES(:,22) = ALGEBRAIC(:,598) - ALGEBRAIC(:,600);
    ALGEBRAIC(:,595) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,603) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,232).*STATES(:,88))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,633) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,236).*STATES(:,92))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,634) =  CONSTANTS(:,105).*(exp(ALGEBRAIC(:,603)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,633)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,611) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,232).*STATES(:,88))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,649) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,240).*STATES(:,96))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,650) =  CONSTANTS(:,113).*(exp(ALGEBRAIC(:,611)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,649)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,619) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,232).*STATES(:,88))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,665) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,233).*STATES(:,89))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,666) =  CONSTANTS(:,93).*(exp(ALGEBRAIC(:,619)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,665)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,667) = ( - ALGEBRAIC(:,666) - ALGEBRAIC(:,634)) - ALGEBRAIC(:,650);
    RATES(:,88) = ALGEBRAIC(:,667);
    ALGEBRAIC(:,604) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,240).*STATES(:,96))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,635) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,244).*STATES(:,100))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,636) =  CONSTANTS(:,106).*(exp(ALGEBRAIC(:,604)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,635)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,620) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,240).*STATES(:,96))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,668) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,241).*STATES(:,97))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,669) =  CONSTANTS(:,94).*(exp(ALGEBRAIC(:,620)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,668)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,670) = ( - ALGEBRAIC(:,669) - ALGEBRAIC(:,636)) -  - ALGEBRAIC(:,650);
    RATES(:,96) = ALGEBRAIC(:,670);
    ALGEBRAIC(:,612) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,236).*STATES(:,92))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,651) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,244).*STATES(:,100))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,652) =  CONSTANTS(:,114).*(exp(ALGEBRAIC(:,612)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,651)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,621) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,236).*STATES(:,92))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,671) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,237).*STATES(:,93))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,672) =  CONSTANTS(:,95).*(exp(ALGEBRAIC(:,621)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,671)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,673) = ( - ALGEBRAIC(:,672)+ALGEBRAIC(:,634)) - ALGEBRAIC(:,652);
    RATES(:,92) = ALGEBRAIC(:,673);
    ALGEBRAIC(:,622) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,244).*STATES(:,100))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,674) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,245).*STATES(:,101))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,675) =  CONSTANTS(:,96).*(exp(ALGEBRAIC(:,622)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,674)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,676) = ( - ALGEBRAIC(:,675)+ALGEBRAIC(:,636)) -  - ALGEBRAIC(:,652);
    RATES(:,100) = ALGEBRAIC(:,676);
    ALGEBRAIC(:,605) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,233).*STATES(:,89))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,637) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,237).*STATES(:,93))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,638) =  CONSTANTS(:,107).*(exp(ALGEBRAIC(:,605)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,637)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,613) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,233).*STATES(:,89))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,653) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,241).*STATES(:,97))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,654) =  CONSTANTS(:,115).*(exp(ALGEBRAIC(:,613)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,653)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,623) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,233).*STATES(:,89))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,677) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,234).*STATES(:,90))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,678) =  CONSTANTS(:,97).*(exp(ALGEBRAIC(:,623)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,677)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,679) = ((ALGEBRAIC(:,666) - ALGEBRAIC(:,678)) - ALGEBRAIC(:,638)) - ALGEBRAIC(:,654);
    RATES(:,89) = ALGEBRAIC(:,679);
    ALGEBRAIC(:,606) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,241).*STATES(:,97))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,639) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,245).*STATES(:,101))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,640) =  CONSTANTS(:,108).*(exp(ALGEBRAIC(:,606)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,639)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,624) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,241).*STATES(:,97))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,680) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,242).*STATES(:,98))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,681) =  CONSTANTS(:,98).*(exp(ALGEBRAIC(:,624)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,680)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,682) = ((ALGEBRAIC(:,669) - ALGEBRAIC(:,681)) - ALGEBRAIC(:,640)) -  - ALGEBRAIC(:,654);
    RATES(:,97) = ALGEBRAIC(:,682);
    ALGEBRAIC(:,614) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,237).*STATES(:,93))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,655) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,245).*STATES(:,101))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,656) =  CONSTANTS(:,116).*(exp(ALGEBRAIC(:,614)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,655)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,625) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,237).*STATES(:,93))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,683) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,238).*STATES(:,94))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,684) =  CONSTANTS(:,99).*(exp(ALGEBRAIC(:,625)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,683)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,685) = ((ALGEBRAIC(:,672) - ALGEBRAIC(:,684))+ALGEBRAIC(:,638)) - ALGEBRAIC(:,656);
    RATES(:,93) = ALGEBRAIC(:,685);
    ALGEBRAIC(:,626) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,245).*STATES(:,101))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,686) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,246).*STATES(:,102))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,687) =  CONSTANTS(:,100).*(exp(ALGEBRAIC(:,626)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,686)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,688) = ((ALGEBRAIC(:,675) - ALGEBRAIC(:,687))+ALGEBRAIC(:,640)) -  - ALGEBRAIC(:,656);
    RATES(:,101) = ALGEBRAIC(:,688);
    ALGEBRAIC(:,607) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,234).*STATES(:,90))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,641) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,238).*STATES(:,94))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,642) =  CONSTANTS(:,109).*(exp(ALGEBRAIC(:,607)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,641)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,615) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,234).*STATES(:,90))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,657) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,242).*STATES(:,98))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,658) =  CONSTANTS(:,117).*(exp(ALGEBRAIC(:,615)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,657)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,627) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,234).*STATES(:,90))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,689) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,235).*STATES(:,91))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,690) =  CONSTANTS(:,101).*(exp(ALGEBRAIC(:,627)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,689)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,691) = ((ALGEBRAIC(:,678) - ALGEBRAIC(:,690)) - ALGEBRAIC(:,642)) - ALGEBRAIC(:,658);
    RATES(:,90) = ALGEBRAIC(:,691);
    ALGEBRAIC(:,609) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,235).*STATES(:,91))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,645) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,239).*STATES(:,95))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,646) =  CONSTANTS(:,111).*(exp(ALGEBRAIC(:,609)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,645)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,617) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,235).*STATES(:,91))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,661) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,243).*STATES(:,99))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,662) =  CONSTANTS(:,119).*(exp(ALGEBRAIC(:,617)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,661)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,692) = (ALGEBRAIC(:,690) - ALGEBRAIC(:,646)) - ALGEBRAIC(:,662);
    RATES(:,91) = ALGEBRAIC(:,692);
    ALGEBRAIC(:,608) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,242).*STATES(:,98))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,643) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,246).*STATES(:,102))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,644) =  CONSTANTS(:,110).*(exp(ALGEBRAIC(:,608)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,643)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,628) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,242).*STATES(:,98))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,693) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,243).*STATES(:,99))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,694) =  CONSTANTS(:,102).*(exp(ALGEBRAIC(:,628)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,693)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,695) = ((ALGEBRAIC(:,681) - ALGEBRAIC(:,694)) - ALGEBRAIC(:,644)) -  - ALGEBRAIC(:,658);
    RATES(:,98) = ALGEBRAIC(:,695);
    ALGEBRAIC(:,610) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,243).*STATES(:,99))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,647) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,247).*STATES(:,103))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,648) =  CONSTANTS(:,112).*(exp(ALGEBRAIC(:,610)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,647)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,696) = (ALGEBRAIC(:,694) - ALGEBRAIC(:,648)) -  - ALGEBRAIC(:,662);
    RATES(:,99) = ALGEBRAIC(:,696);
    ALGEBRAIC(:,616) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,238).*STATES(:,94))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,659) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,246).*STATES(:,102))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,660) =  CONSTANTS(:,118).*(exp(ALGEBRAIC(:,616)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,659)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,629) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,238).*STATES(:,94))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,697) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,239).*STATES(:,95))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,698) =  CONSTANTS(:,103).*(exp(ALGEBRAIC(:,629)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,697)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,699) = ((ALGEBRAIC(:,684) - ALGEBRAIC(:,698))+ALGEBRAIC(:,642)) - ALGEBRAIC(:,660);
    RATES(:,94) = ALGEBRAIC(:,699);
    ALGEBRAIC(:,618) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,239).*STATES(:,95))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,663) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,247).*STATES(:,103))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,664) =  CONSTANTS(:,120).*(exp(ALGEBRAIC(:,618)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,663)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,700) = (ALGEBRAIC(:,698)+ALGEBRAIC(:,646)) - ALGEBRAIC(:,664);
    RATES(:,95) = ALGEBRAIC(:,700);
    ALGEBRAIC(:,630) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,246).*STATES(:,102))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,701) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,247).*STATES(:,103))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,702) =  CONSTANTS(:,104).*(exp(ALGEBRAIC(:,630)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,701)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,703) = ((ALGEBRAIC(:,687) - ALGEBRAIC(:,702))+ALGEBRAIC(:,644)) -  - ALGEBRAIC(:,660);
    RATES(:,102) = ALGEBRAIC(:,703);
    ALGEBRAIC(:,631) =  CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,599) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,180).*STATES(:,6));
    ALGEBRAIC(:,601) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,247).*STATES(:,103));
    ALGEBRAIC(:,602) = ALGEBRAIC(:,599)+ CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,595)+ALGEBRAIC(:,601);
    ALGEBRAIC(:,597) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7));
    ALGEBRAIC(:,632) = ALGEBRAIC(:,597)+ALGEBRAIC(:,601);
    ALGEBRAIC(:,704) = piecewise({ALGEBRAIC(:,631)==0.00000,  CONSTANTS(:,92).*(exp(ALGEBRAIC(:,602)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,632)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,92).*ALGEBRAIC(:,631))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,631)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,602)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,632)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,706) = (ALGEBRAIC(:,702)+ALGEBRAIC(:,648)) - (( - ALGEBRAIC(:,664)+ALGEBRAIC(:,704)) - ALGEBRAIC(:,704));
    RATES(:,103) = ALGEBRAIC(:,706);
    ALGEBRAIC(:,711) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,714) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,248).*STATES(:,104));
    ALGEBRAIC(:,722) = ALGEBRAIC(:,714)+ CONSTANTS(:,297).*CONSTANTS(:,323).*ALGEBRAIC(:,711);
    ALGEBRAIC(:,715) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,249).*STATES(:,105));
    ALGEBRAIC(:,723) = ALGEBRAIC(:,715)+ CONSTANTS(:,298).*CONSTANTS(:,323).*ALGEBRAIC(:,711);
    ALGEBRAIC(:,724) =  CONSTANTS(:,123).*(exp(ALGEBRAIC(:,722)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,723)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    RATES(:,104) =  - ALGEBRAIC(:,724);
    RATES(:,105) = ALGEBRAIC(:,724);
    ALGEBRAIC(:,713) =  CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,711);
    ALGEBRAIC(:,709) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,180).*STATES(:,6));
    ALGEBRAIC(:,718) = ALGEBRAIC(:,715)+ALGEBRAIC(:,709)+ALGEBRAIC(:,713);
    ALGEBRAIC(:,710) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7));
    ALGEBRAIC(:,719) = ALGEBRAIC(:,715)+ALGEBRAIC(:,710);
    ALGEBRAIC(:,721) = piecewise({ALGEBRAIC(:,713)==0.00000,  1.00000.*CONSTANTS(:,121).*(exp(ALGEBRAIC(:,718)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,719)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( 1.00000.*CONSTANTS(:,121).*ALGEBRAIC(:,713))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,713)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,718)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,719)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,453) =  - ALGEBRAIC(:,425) - (ALGEBRAIC(:,428)+ALGEBRAIC(:,431));
    ALGEBRAIC(:,357) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,180).*STATES(:,6));
    ALGEBRAIC(:,358) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7));
    ALGEBRAIC(:,4) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,359) =  CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,4);
    ALGEBRAIC(:,360) = piecewise({ALGEBRAIC(:,359)==0.00000,  CONSTANTS(:,46).*(exp(ALGEBRAIC(:,357)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,358)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,46).*ALGEBRAIC(:,359))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,359)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,357)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,358)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,726) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,737) =  CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,726);
    ALGEBRAIC(:,735) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,180).*STATES(:,6));
    ALGEBRAIC(:,736) = ALGEBRAIC(:,735)+ CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,726);
    ALGEBRAIC(:,734) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7));
    ALGEBRAIC(:,738) = ALGEBRAIC(:,734);
    ALGEBRAIC(:,739) = piecewise({ALGEBRAIC(:,737)==0.00000,  CONSTANTS(:,141).*(exp(ALGEBRAIC(:,736)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,738)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,141).*ALGEBRAIC(:,737))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,737)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,736)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,738)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,356) =  CONSTANTS(:,279).*ALGEBRAIC(:,335);
    RATES(:,6) = (((( - ALGEBRAIC(:,704)+ALGEBRAIC(:,453)) - ALGEBRAIC(:,360))+ALGEBRAIC(:,356)) - ALGEBRAIC(:,739)) - ALGEBRAIC(:,721);
    ALGEBRAIC(:,452) = ALGEBRAIC(:,440)+ALGEBRAIC(:,444)+ALGEBRAIC(:,404);
    ALGEBRAIC(:,355) =   - CONSTANTS(:,278).*ALGEBRAIC(:,346);
    RATES(:,7) =  1.00000.*(ALGEBRAIC(:,704)+ALGEBRAIC(:,452)+ALGEBRAIC(:,360)+ALGEBRAIC(:,355)+ALGEBRAIC(:,739)+ALGEBRAIC(:,721));
    ALGEBRAIC(:,712) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,711);
    ALGEBRAIC(:,707) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,716) = ALGEBRAIC(:,715)+ALGEBRAIC(:,707)+ALGEBRAIC(:,712);
    ALGEBRAIC(:,708) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,717) = ALGEBRAIC(:,715)+ALGEBRAIC(:,708);
    ALGEBRAIC(:,720) = piecewise({ALGEBRAIC(:,712)==0.00000,  1.00000.*CONSTANTS(:,122).*(exp(ALGEBRAIC(:,716)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,717)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( 1.00000.*CONSTANTS(:,122).*ALGEBRAIC(:,712))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,712)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,716)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,717)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,141) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,145) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,141);
    ALGEBRAIC(:,143) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,144) = ALGEBRAIC(:,143)+ CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,141);
    ALGEBRAIC(:,142) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,146) = ALGEBRAIC(:,142);
    ALGEBRAIC(:,147) = piecewise({ALGEBRAIC(:,145)==0.00000,  CONSTANTS(:,134).*(exp(ALGEBRAIC(:,144)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,146)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,134).*ALGEBRAIC(:,145))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,145)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,144)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,146)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,166) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,163) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,180) = ALGEBRAIC(:,179)+ALGEBRAIC(:,163)+ALGEBRAIC(:,166);
    ALGEBRAIC(:,164) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,181) = ALGEBRAIC(:,179)+ALGEBRAIC(:,164);
    ALGEBRAIC(:,182) = piecewise({ALGEBRAIC(:,166)==0.00000,  1.00000.*CONSTANTS(:,6).*(exp(ALGEBRAIC(:,180)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,181)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( 1.00000.*CONSTANTS(:,6).*ALGEBRAIC(:,166))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,166)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,180)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,181)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,194) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,193);
    ALGEBRAIC(:,191) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,203) = ALGEBRAIC(:,202)+ALGEBRAIC(:,191)+ALGEBRAIC(:,194);
    ALGEBRAIC(:,192) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,204) = ALGEBRAIC(:,202)+ALGEBRAIC(:,192);
    ALGEBRAIC(:,205) = piecewise({ALGEBRAIC(:,194)==0.00000,  1.00000.*CONSTANTS(:,11).*(exp(ALGEBRAIC(:,203)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,204)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( 1.00000.*CONSTANTS(:,11).*ALGEBRAIC(:,194))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,194)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,203)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,204)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,449) = ALGEBRAIC(:,402)+ALGEBRAIC(:,420);
    ALGEBRAIC(:,744) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,726);
    ALGEBRAIC(:,742) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,743) = ALGEBRAIC(:,742)+ CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,726);
    ALGEBRAIC(:,741) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,745) = ALGEBRAIC(:,741);
    ALGEBRAIC(:,746) = piecewise({ALGEBRAIC(:,744)==0.00000,  CONSTANTS(:,142).*(exp(ALGEBRAIC(:,743)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,745)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,142).*ALGEBRAIC(:,744))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,744)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,743)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,745)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,558) =  CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,555) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,572) = ALGEBRAIC(:,571)+ALGEBRAIC(:,555)+ALGEBRAIC(:,558);
    ALGEBRAIC(:,556) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,573) = ALGEBRAIC(:,571)+ALGEBRAIC(:,556);
    ALGEBRAIC(:,574) = piecewise({ALGEBRAIC(:,558)==0.00000,  1.00000.*CONSTANTS(:,135).*(exp(ALGEBRAIC(:,572)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,573)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( 1.00000.*CONSTANTS(:,135).*ALGEBRAIC(:,558))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,558)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,572)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,573)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    RATES(:,8) = (((((((( - ALGEBRAIC(:,124) - ALGEBRAIC(:,138)) - ALGEBRAIC(:,160)) - ALGEBRAIC(:,182)) - ALGEBRAIC(:,205))+ALGEBRAIC(:,449)) - ALGEBRAIC(:,574)) - ALGEBRAIC(:,147)) - ALGEBRAIC(:,746)) - ALGEBRAIC(:,720);
    ALGEBRAIC(:,448) =  - ALGEBRAIC(:,406) - ALGEBRAIC(:,409);
    RATES(:,9) =  1.00000.*(ALGEBRAIC(:,124)+ALGEBRAIC(:,138)+ALGEBRAIC(:,160)+ALGEBRAIC(:,182)+ALGEBRAIC(:,205)+ALGEBRAIC(:,448)+ALGEBRAIC(:,574)+ALGEBRAIC(:,147)+ALGEBRAIC(:,746)+ALGEBRAIC(:,720));
    ALGEBRAIC(:,83) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,84) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,148).*STATES(:,2));
    ALGEBRAIC(:,85) =  CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,4);
    ALGEBRAIC(:,86) = piecewise({ALGEBRAIC(:,85)==0.00000,  CONSTANTS(:,2).*(exp(ALGEBRAIC(:,83)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,84)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,2).*ALGEBRAIC(:,85))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,85)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,83)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,84)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,730) =  CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,726);
    ALGEBRAIC(:,728) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,729) = ALGEBRAIC(:,728)+ CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,726);
    ALGEBRAIC(:,727) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,148).*STATES(:,2));
    ALGEBRAIC(:,731) = ALGEBRAIC(:,727);
    ALGEBRAIC(:,732) = piecewise({ALGEBRAIC(:,730)==0.00000,  CONSTANTS(:,140).*(exp(ALGEBRAIC(:,729)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,731)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,140).*ALGEBRAIC(:,730))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,730)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,729)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,731)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,354) =  - ALGEBRAIC(:,337);
    ALGEBRAIC(:,748) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,750) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,250).*STATES(:,14));
    ALGEBRAIC(:,751) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,251).*STATES(:,15));
    ALGEBRAIC(:,752) =  CONSTANTS(:,124).*(exp((ALGEBRAIC(:,748)+ALGEBRAIC(:,750))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,751)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,515) =   - CONSTANTS(:,326).*ALGEBRAIC(:,512);
    ALGEBRAIC(:,530) =  CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,519) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,544) = ALGEBRAIC(:,543)+ALGEBRAIC(:,519)+ALGEBRAIC(:,530);
    ALGEBRAIC(:,523) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,148).*STATES(:,2));
    ALGEBRAIC(:,545) = ALGEBRAIC(:,543)+ALGEBRAIC(:,523);
    ALGEBRAIC(:,546) = piecewise({ALGEBRAIC(:,530)==0.00000,  CONSTANTS(:,81).*(exp(ALGEBRAIC(:,544)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,545)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,81).*ALGEBRAIC(:,530))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,530)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,544)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,545)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    RATES(:,1) = (((((((( - ALGEBRAIC(:,86)+ALGEBRAIC(:,90)) - ALGEBRAIC(:,79))+ALGEBRAIC(:,354)) - ALGEBRAIC(:,752))+ALGEBRAIC(:,515)) - ALGEBRAIC(:,546)) - ALGEBRAIC(:,732)) -  ALGEBRAIC(:,587).*CONSTANTS(:,314))+ALGEBRAIC(:,593);
    ALGEBRAIC(:,353) = ALGEBRAIC(:,343);
    ALGEBRAIC(:,749) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,148).*STATES(:,2));
    ALGEBRAIC(:,753) =  CONSTANTS(:,125).*(exp(ALGEBRAIC(:,751)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,749)+ALGEBRAIC(:,750))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,315) = ALGEBRAIC(:,312)+ALGEBRAIC(:,310);
    RATES(:,2) =  1.00000.*(ALGEBRAIC(:,86)+ALGEBRAIC(:,315)+ALGEBRAIC(:,353)+ALGEBRAIC(:,753)+ALGEBRAIC(:,546)+ALGEBRAIC(:,732));
    RATES(:,14) =  - ALGEBRAIC(:,752)+ALGEBRAIC(:,753);
    RATES(:,15) = ALGEBRAIC(:,752) - ALGEBRAIC(:,753);
    ALGEBRAIC(:,87) =   - CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,86);
    ALGEBRAIC(:,705) =  CONSTANTS(:,323).*(((((((((((((((((((((((((((((  - CONSTANTS(:,280).*ALGEBRAIC(:,704)+ CONSTANTS(:,296).*ALGEBRAIC(:,666)) -  CONSTANTS(:,293).*ALGEBRAIC(:,666)+ CONSTANTS(:,296).*ALGEBRAIC(:,678)) -  CONSTANTS(:,293).*ALGEBRAIC(:,678)+ CONSTANTS(:,296).*ALGEBRAIC(:,672)) -  CONSTANTS(:,293).*ALGEBRAIC(:,672)+ CONSTANTS(:,296).*ALGEBRAIC(:,684)) -  CONSTANTS(:,293).*ALGEBRAIC(:,684)+ CONSTANTS(:,296).*ALGEBRAIC(:,698)) -  CONSTANTS(:,293).*ALGEBRAIC(:,698)+ CONSTANTS(:,294).*ALGEBRAIC(:,634)) -  CONSTANTS(:,291).*ALGEBRAIC(:,634)+ CONSTANTS(:,294).*ALGEBRAIC(:,642)) -  CONSTANTS(:,291).*ALGEBRAIC(:,642)+ CONSTANTS(:,295).*ALGEBRAIC(:,654)) -  CONSTANTS(:,292).*ALGEBRAIC(:,654)+ CONSTANTS(:,295).*ALGEBRAIC(:,658)) -  CONSTANTS(:,292).*ALGEBRAIC(:,658)+ CONSTANTS(:,295).*ALGEBRAIC(:,662)) -  CONSTANTS(:,292).*ALGEBRAIC(:,662)+ CONSTANTS(:,296).*ALGEBRAIC(:,690)) -  CONSTANTS(:,293).*ALGEBRAIC(:,690)+ CONSTANTS(:,294).*ALGEBRAIC(:,638)) -  CONSTANTS(:,291).*ALGEBRAIC(:,638)+ CONSTANTS(:,294).*ALGEBRAIC(:,646)) -  CONSTANTS(:,291).*ALGEBRAIC(:,646)+ CONSTANTS(:,295).*ALGEBRAIC(:,650)) -  CONSTANTS(:,292).*ALGEBRAIC(:,650)+ CONSTANTS(:,296).*ALGEBRAIC(:,669)) -  CONSTANTS(:,293).*ALGEBRAIC(:,669)+ CONSTANTS(:,296).*ALGEBRAIC(:,681)) -  CONSTANTS(:,293).*ALGEBRAIC(:,681)+ CONSTANTS(:,296).*ALGEBRAIC(:,675)) -  CONSTANTS(:,293).*ALGEBRAIC(:,675)+ CONSTANTS(:,296).*ALGEBRAIC(:,687)) -  CONSTANTS(:,293).*ALGEBRAIC(:,687)+ CONSTANTS(:,296).*ALGEBRAIC(:,702)) -  CONSTANTS(:,293).*ALGEBRAIC(:,702)+ CONSTANTS(:,294).*ALGEBRAIC(:,636)) -  CONSTANTS(:,291).*ALGEBRAIC(:,636)+ CONSTANTS(:,294).*ALGEBRAIC(:,644)) -  CONSTANTS(:,291).*ALGEBRAIC(:,644)+ CONSTANTS(:,295).*ALGEBRAIC(:,652)) -  CONSTANTS(:,292).*ALGEBRAIC(:,652)+ CONSTANTS(:,295).*ALGEBRAIC(:,656)) -  CONSTANTS(:,292).*ALGEBRAIC(:,656)+ CONSTANTS(:,295).*ALGEBRAIC(:,660)) -  CONSTANTS(:,292).*ALGEBRAIC(:,660)+ CONSTANTS(:,295).*ALGEBRAIC(:,664)) -  CONSTANTS(:,292).*ALGEBRAIC(:,664)+ CONSTANTS(:,296).*ALGEBRAIC(:,694)) -  CONSTANTS(:,293).*ALGEBRAIC(:,694)+ CONSTANTS(:,294).*ALGEBRAIC(:,640)) -  CONSTANTS(:,291).*ALGEBRAIC(:,640)+ CONSTANTS(:,294).*ALGEBRAIC(:,648)) -  CONSTANTS(:,291).*ALGEBRAIC(:,648));
    ALGEBRAIC(:,725) =  CONSTANTS(:,323).*((  - CONSTANTS(:,265).*ALGEBRAIC(:,720)+ CONSTANTS(:,280).*ALGEBRAIC(:,721)+ CONSTANTS(:,298).*ALGEBRAIC(:,724)) -  CONSTANTS(:,297).*ALGEBRAIC(:,724));
    ALGEBRAIC(:,126) =  CONSTANTS(:,323).*((((((((((((((  - CONSTANTS(:,265).*ALGEBRAIC(:,124)+ CONSTANTS(:,312).*ALGEBRAIC(:,118)) -  CONSTANTS(:,310).*ALGEBRAIC(:,118))+ CONSTANTS(:,312).*ALGEBRAIC(:,114)) -  CONSTANTS(:,310).*ALGEBRAIC(:,114))+ CONSTANTS(:,311).*ALGEBRAIC(:,110)) -  CONSTANTS(:,309).*ALGEBRAIC(:,110))+ CONSTANTS(:,311).*ALGEBRAIC(:,106)) -  CONSTANTS(:,309).*ALGEBRAIC(:,106))+ CONSTANTS(:,312).*ALGEBRAIC(:,122)) -  CONSTANTS(:,310).*ALGEBRAIC(:,122))+ CONSTANTS(:,311).*ALGEBRAIC(:,112)) -  CONSTANTS(:,309).*ALGEBRAIC(:,112))+ CONSTANTS(:,311).*ALGEBRAIC(:,108)) -  CONSTANTS(:,309).*ALGEBRAIC(:,108));
    ALGEBRAIC(:,148) =  CONSTANTS(:,323).* - CONSTANTS(:,265).*ALGEBRAIC(:,147);
    ALGEBRAIC(:,140) =  CONSTANTS(:,323).*((  - CONSTANTS(:,265).*ALGEBRAIC(:,138)+ CONSTANTS(:,267).*ALGEBRAIC(:,136)) -  CONSTANTS(:,266).*ALGEBRAIC(:,136));
    ALGEBRAIC(:,162) =  CONSTANTS(:,323).*((  - CONSTANTS(:,265).*ALGEBRAIC(:,160)+ CONSTANTS(:,269).*ALGEBRAIC(:,158)) -  CONSTANTS(:,268).*ALGEBRAIC(:,158));
    ALGEBRAIC(:,190) =  CONSTANTS(:,323).*(  - CONSTANTS(:,265).*ALGEBRAIC(:,182)+ ALGEBRAIC(:,173).*(CONSTANTS(:,271) - CONSTANTS(:,270))+ ALGEBRAIC(:,185).*(CONSTANTS(:,271) - CONSTANTS(:,271))+ ALGEBRAIC(:,177).*(CONSTANTS(:,273) - CONSTANTS(:,272))+ ALGEBRAIC(:,187).*(CONSTANTS(:,273) - CONSTANTS(:,272)));
    ALGEBRAIC(:,210) =  CONSTANTS(:,323).*(  - CONSTANTS(:,265).*ALGEBRAIC(:,205)+ (ALGEBRAIC(:,200)+ALGEBRAIC(:,207)).*(CONSTANTS(:,275) - CONSTANTS(:,274)));
    ALGEBRAIC(:,442) =  CONSTANTS(:,282).*ALGEBRAIC(:,440)+ CONSTANTS(:,281).*ALGEBRAIC(:,431);
    ALGEBRAIC(:,361) =   - CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,360);
    ALGEBRAIC(:,733) =  CONSTANTS(:,323).* - CONSTANTS(:,264).*ALGEBRAIC(:,732);
    ALGEBRAIC(:,740) =  CONSTANTS(:,323).* - CONSTANTS(:,280).*ALGEBRAIC(:,739);
    ALGEBRAIC(:,747) =  CONSTANTS(:,323).* - CONSTANTS(:,265).*ALGEBRAIC(:,746);
    ALGEBRAIC(:,352) =  CONSTANTS(:,323).*(  - CONSTANTS(:,276).*ALGEBRAIC(:,349)+ CONSTANTS(:,277).*ALGEBRAIC(:,349));
    ALGEBRAIC(:,754) =   - CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,753);
    ALGEBRAIC(:,554) =  CONSTANTS(:,323).*(  - CONSTANTS(:,264).*ALGEBRAIC(:,546)+ ALGEBRAIC(:,537).*(CONSTANTS(:,285) - CONSTANTS(:,283))+ ALGEBRAIC(:,549).*(CONSTANTS(:,285) - CONSTANTS(:,283))+ ALGEBRAIC(:,541).*(CONSTANTS(:,286) - CONSTANTS(:,284))+ ALGEBRAIC(:,551).*(CONSTANTS(:,286) - CONSTANTS(:,284)));
    ALGEBRAIC(:,582) =  CONSTANTS(:,323).*(  - CONSTANTS(:,265).*ALGEBRAIC(:,574)+ (ALGEBRAIC(:,565)+ALGEBRAIC(:,577)).*(CONSTANTS(:,289) - CONSTANTS(:,287))+ (ALGEBRAIC(:,569)+ALGEBRAIC(:,579)).*(CONSTANTS(:,290) - CONSTANTS(:,288)));
    ALGEBRAIC(:,314) =  CONSTANTS(:,323).*((((((((((((((((((( CONSTANTS(:,306).*ALGEBRAIC(:,275) -  CONSTANTS(:,301).*ALGEBRAIC(:,275))+ CONSTANTS(:,307).*ALGEBRAIC(:,283) -  CONSTANTS(:,302).*ALGEBRAIC(:,283))+ CONSTANTS(:,305).*ALGEBRAIC(:,271) -  CONSTANTS(:,300).*ALGEBRAIC(:,271))+ CONSTANTS(:,306).*ALGEBRAIC(:,279) -  CONSTANTS(:,301).*ALGEBRAIC(:,279))+ CONSTANTS(:,307).*ALGEBRAIC(:,287) -  CONSTANTS(:,302).*ALGEBRAIC(:,287))+ CONSTANTS(:,305).*ALGEBRAIC(:,267) -  CONSTANTS(:,300).*ALGEBRAIC(:,267))+ CONSTANTS(:,304).*ALGEBRAIC(:,263) -  CONSTANTS(:,299).*ALGEBRAIC(:,263))+ CONSTANTS(:,304).*ALGEBRAIC(:,259) -  CONSTANTS(:,299).*ALGEBRAIC(:,259))+ CONSTANTS(:,304).*ALGEBRAIC(:,255) -  CONSTANTS(:,299).*ALGEBRAIC(:,255))+ CONSTANTS(:,307).*ALGEBRAIC(:,285) -  CONSTANTS(:,302).*ALGEBRAIC(:,285))+ CONSTANTS(:,306).*ALGEBRAIC(:,277) -  CONSTANTS(:,301).*ALGEBRAIC(:,277))+ CONSTANTS(:,305).*ALGEBRAIC(:,269) -  CONSTANTS(:,300).*ALGEBRAIC(:,269))+ CONSTANTS(:,307).*ALGEBRAIC(:,281) -  CONSTANTS(:,302).*ALGEBRAIC(:,281))+ CONSTANTS(:,306).*ALGEBRAIC(:,273) -  CONSTANTS(:,301).*ALGEBRAIC(:,273))+ CONSTANTS(:,305).*ALGEBRAIC(:,265) -  CONSTANTS(:,300).*ALGEBRAIC(:,265))+ CONSTANTS(:,304).*ALGEBRAIC(:,261) -  CONSTANTS(:,299).*ALGEBRAIC(:,261))+ CONSTANTS(:,304).*ALGEBRAIC(:,257) -  CONSTANTS(:,299).*ALGEBRAIC(:,257))+ CONSTANTS(:,304).*ALGEBRAIC(:,253) -  CONSTANTS(:,299).*ALGEBRAIC(:,253)) - ( CONSTANTS(:,264).*ALGEBRAIC(:,310)+ CONSTANTS(:,264).*ALGEBRAIC(:,312)));
    ALGEBRAIC(:,43) = VOI -  floor(VOI./CONSTANTS(:,318)).*CONSTANTS(:,318);
    ALGEBRAIC(:,47) = piecewise({ALGEBRAIC(:,43)>=0.300000&ALGEBRAIC(:,43)<=0.300000+CONSTANTS(:,319), ( 1.00000.*0.0750000.*CONSTANTS(:,316))./CONSTANTS(:,319) }, 0.00000);
    RATES(:,31) = ALGEBRAIC(:,87)+ALGEBRAIC(:,705)+ALGEBRAIC(:,126)+ALGEBRAIC(:,148)+ALGEBRAIC(:,140)+ALGEBRAIC(:,162)+ALGEBRAIC(:,190)+ALGEBRAIC(:,210)+ALGEBRAIC(:,314)+ALGEBRAIC(:,361)+ALGEBRAIC(:,442)+ALGEBRAIC(:,352)+ALGEBRAIC(:,733)+ALGEBRAIC(:,754)+ALGEBRAIC(:,554)+ALGEBRAIC(:,582)+ALGEBRAIC(:,47)+ALGEBRAIC(:,740)+ALGEBRAIC(:,747)+ALGEBRAIC(:,725);
   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(:,2) = piecewise({VOI<0.0600000,  1.00000.*CONSTANTS(:,320) , VOI>0.500000&VOI<1.10000,   - 0.100000.*CONSTANTS(:,320) },  0.00000.*CONSTANTS(:,320));
    ALGEBRAIC(:,44) = ALGEBRAIC(:,2);
    ALGEBRAIC(:,48) =   - CONSTANTS(:,345).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,53) =  CONSTANTS(:,348).*STATES(:,122);
    ALGEBRAIC(:,59) =  - ALGEBRAIC(:,48) - ALGEBRAIC(:,53);
    ALGEBRAIC(:,65) = ALGEBRAIC(:,59);
    ALGEBRAIC(:,49) =   - CONSTANTS(:,350).*ALGEBRAIC(:,44);
    ALGEBRAIC(:,54) =  CONSTANTS(:,349).*STATES(:,123);
    ALGEBRAIC(:,60) =  - ALGEBRAIC(:,49) - ALGEBRAIC(:,54);
    ALGEBRAIC(:,66) = ALGEBRAIC(:,60);
    ALGEBRAIC(:,55) = (STATES(:,121) - CONSTANTS(:,330)) - STATES(:,124);
    ALGEBRAIC(:,61) = piecewise({ALGEBRAIC(:,55)>0.00000, CONSTANTS(:,340) }, CONSTANTS(:,341));
    ALGEBRAIC(:,67) = ( CONSTANTS(:,342).*ALGEBRAIC(:,55))./ALGEBRAIC(:,61);
    ALGEBRAIC(:,51) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,204).*STATES(:,26));
    ALGEBRAIC(:,57) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,207).*STATES(:,29));
    ALGEBRAIC(:,63) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,208).*STATES(:,30));
    ALGEBRAIC(:,70) =  CONSTANTS(:,66).*(exp((ALGEBRAIC(:,51)+ALGEBRAIC(:,57))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,63)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,1) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,201).*STATES(:,23));
    ALGEBRAIC(:,41) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,202).*STATES(:,24));
    ALGEBRAIC(:,46) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,203).*STATES(:,25));
    ALGEBRAIC(:,69) =  CONSTANTS(:,62).*(exp((ALGEBRAIC(:,1)+ALGEBRAIC(:,41))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,46)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,62) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,206).*STATES(:,28));
    ALGEBRAIC(:,74) =  CONSTANTS(:,63).*(exp(ALGEBRAIC(:,46)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,62)+ALGEBRAIC(:,41))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,52) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,146).*STATES(:,4));
    ALGEBRAIC(:,71) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,75) = ALGEBRAIC(:,71)+ALGEBRAIC(:,52);
    ALGEBRAIC(:,58) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,147).*STATES(:,5));
    ALGEBRAIC(:,64) = ALGEBRAIC(:,58);
    ALGEBRAIC(:,79) =  CONSTANTS(:,1).*(exp(ALGEBRAIC(:,75)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,64)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,56) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,205).*STATES(:,27));
    ALGEBRAIC(:,78) =  CONSTANTS(:,64).*(exp((ALGEBRAIC(:,62)+ALGEBRAIC(:,51))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,56)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,82) =  CONSTANTS(:,65).*(exp(ALGEBRAIC(:,56)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,1)+ALGEBRAIC(:,51))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,91) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,96) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,252).*STATES(:,32))+ CONSTANTS(:,309).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,105) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,253).*STATES(:,33))+ CONSTANTS(:,311).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,106) =  CONSTANTS(:,127).*(exp(ALGEBRAIC(:,96)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,105)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,100) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,252).*STATES(:,32))+ CONSTANTS(:,310).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,113) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,255).*STATES(:,35))+ CONSTANTS(:,312).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,114) =  CONSTANTS(:,131).*(exp(ALGEBRAIC(:,100)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,113)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,115) =  - ALGEBRAIC(:,106) - ALGEBRAIC(:,114);
    ALGEBRAIC(:,97) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,255).*STATES(:,35))+ CONSTANTS(:,309).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,107) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,256).*STATES(:,36))+ CONSTANTS(:,311).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,108) =  CONSTANTS(:,129).*(exp(ALGEBRAIC(:,97)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,107)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,116) =  - ALGEBRAIC(:,108)+ALGEBRAIC(:,114);
    ALGEBRAIC(:,98) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,253).*STATES(:,33))+ CONSTANTS(:,309).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,109) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,254).*STATES(:,34))+ CONSTANTS(:,311).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,110) =  CONSTANTS(:,128).*(exp(ALGEBRAIC(:,98)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,109)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,101) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,253).*STATES(:,33))+ CONSTANTS(:,310).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,117) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,256).*STATES(:,36))+ CONSTANTS(:,312).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,118) =  CONSTANTS(:,132).*(exp(ALGEBRAIC(:,101)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,117)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,119) = (ALGEBRAIC(:,106) - ALGEBRAIC(:,110)) - ALGEBRAIC(:,118);
    ALGEBRAIC(:,99) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,256).*STATES(:,36))+ CONSTANTS(:,309).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,111) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,257).*STATES(:,37))+ CONSTANTS(:,311).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,112) =  CONSTANTS(:,130).*(exp(ALGEBRAIC(:,99)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,111)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,120) = (ALGEBRAIC(:,108) - ALGEBRAIC(:,112))+ALGEBRAIC(:,118);
    ALGEBRAIC(:,102) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,254).*STATES(:,34))+ CONSTANTS(:,310).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,121) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,257).*STATES(:,37))+ CONSTANTS(:,312).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,122) =  CONSTANTS(:,133).*(exp(ALGEBRAIC(:,102)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,121)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,123) = ALGEBRAIC(:,110) - ALGEBRAIC(:,122);
    ALGEBRAIC(:,103) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,91);
    ALGEBRAIC(:,92) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,93) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,94) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,257).*STATES(:,37));
    ALGEBRAIC(:,95) = ALGEBRAIC(:,93)+ CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,91)+ALGEBRAIC(:,94)+ CONSTANTS(:,308).*ALGEBRAIC(:,92);
    ALGEBRAIC(:,104) = ALGEBRAIC(:,92)+ALGEBRAIC(:,94)+ CONSTANTS(:,308).*ALGEBRAIC(:,92);
    ALGEBRAIC(:,124) = piecewise({ALGEBRAIC(:,103)==0.00000,  CONSTANTS(:,126).*(exp(ALGEBRAIC(:,95)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,104)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,126).*ALGEBRAIC(:,103))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,103)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,95)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,104)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,125) = (ALGEBRAIC(:,112)+ALGEBRAIC(:,122)) - (ALGEBRAIC(:,124) - ALGEBRAIC(:,124));
    ALGEBRAIC(:,127) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,132) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,152).*STATES(:,38))+ CONSTANTS(:,266).*CONSTANTS(:,323).*ALGEBRAIC(:,127);
    ALGEBRAIC(:,135) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,153).*STATES(:,39))+ CONSTANTS(:,267).*CONSTANTS(:,323).*ALGEBRAIC(:,127);
    ALGEBRAIC(:,136) =  CONSTANTS(:,5).*(exp(ALGEBRAIC(:,132)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,135)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,137) =  - ALGEBRAIC(:,136);
    ALGEBRAIC(:,133) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,127);
    ALGEBRAIC(:,128) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,129) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,130) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,153).*STATES(:,39));
    ALGEBRAIC(:,131) = ALGEBRAIC(:,129)+ CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,127)+ALGEBRAIC(:,130)+ CONSTANTS(:,308).*ALGEBRAIC(:,128);
    ALGEBRAIC(:,134) = ALGEBRAIC(:,128)+ALGEBRAIC(:,130)+ CONSTANTS(:,308).*ALGEBRAIC(:,128);
    ALGEBRAIC(:,138) = piecewise({ALGEBRAIC(:,133)==0.00000,  CONSTANTS(:,4).*(exp(ALGEBRAIC(:,131)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,134)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,4).*ALGEBRAIC(:,133))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,133)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,131)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,134)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,139) = ALGEBRAIC(:,136) - (ALGEBRAIC(:,138) - ALGEBRAIC(:,138));
    ALGEBRAIC(:,149) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,154) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,262).*STATES(:,40))+ CONSTANTS(:,268).*CONSTANTS(:,323).*ALGEBRAIC(:,149);
    ALGEBRAIC(:,157) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,263).*STATES(:,41))+ CONSTANTS(:,269).*CONSTANTS(:,323).*ALGEBRAIC(:,149);
    ALGEBRAIC(:,158) =  CONSTANTS(:,144).*(exp(ALGEBRAIC(:,154)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,157)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,159) =  - ALGEBRAIC(:,158);
    ALGEBRAIC(:,155) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,149);
    ALGEBRAIC(:,151) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,152) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,263).*STATES(:,41));
    ALGEBRAIC(:,153) = ALGEBRAIC(:,151)+ CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,149)+ALGEBRAIC(:,152);
    ALGEBRAIC(:,150) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,156) = ALGEBRAIC(:,150)+ALGEBRAIC(:,152);
    ALGEBRAIC(:,160) = piecewise({ALGEBRAIC(:,155)==0.00000,  CONSTANTS(:,143).*(exp(ALGEBRAIC(:,153)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,156)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,143).*ALGEBRAIC(:,155))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,155)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,153)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,156)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,161) = ALGEBRAIC(:,158) - (ALGEBRAIC(:,160) - ALGEBRAIC(:,160));
    ALGEBRAIC(:,165) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,167) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,154).*STATES(:,42));
    ALGEBRAIC(:,168) = ALGEBRAIC(:,167)+ CONSTANTS(:,270).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,170) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,155).*STATES(:,43));
    ALGEBRAIC(:,171) = ALGEBRAIC(:,170)+ CONSTANTS(:,271).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,173) =  CONSTANTS(:,7).*(exp(ALGEBRAIC(:,168)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,171)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,169) = ALGEBRAIC(:,167)+ CONSTANTS(:,272).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,174) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,156).*STATES(:,44));
    ALGEBRAIC(:,176) = ALGEBRAIC(:,174)+ CONSTANTS(:,273).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,177) =  CONSTANTS(:,9).*(exp(ALGEBRAIC(:,169)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,176)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,178) =  - ALGEBRAIC(:,173) - ALGEBRAIC(:,177);
    ALGEBRAIC(:,175) = ALGEBRAIC(:,174)+ CONSTANTS(:,270).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,179) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,157).*STATES(:,45));
    ALGEBRAIC(:,183) = ALGEBRAIC(:,179)+ CONSTANTS(:,271).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,185) =  CONSTANTS(:,8).*(exp(ALGEBRAIC(:,175)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,183)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,186) = ALGEBRAIC(:,177) - ALGEBRAIC(:,185);
    ALGEBRAIC(:,172) = ALGEBRAIC(:,170)+ CONSTANTS(:,272).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,184) = ALGEBRAIC(:,179)+ CONSTANTS(:,273).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,187) =  CONSTANTS(:,10).*(exp(ALGEBRAIC(:,172)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,184)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,188) = ALGEBRAIC(:,173) - ALGEBRAIC(:,187);
    ALGEBRAIC(:,189) = ALGEBRAIC(:,185)+ALGEBRAIC(:,187);
    ALGEBRAIC(:,193) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,195) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,158).*STATES(:,46));
    ALGEBRAIC(:,196) = ALGEBRAIC(:,195)+ CONSTANTS(:,274).*CONSTANTS(:,323).*ALGEBRAIC(:,193);
    ALGEBRAIC(:,197) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,159).*STATES(:,47));
    ALGEBRAIC(:,198) = ALGEBRAIC(:,197)+ CONSTANTS(:,275).*CONSTANTS(:,323).*ALGEBRAIC(:,193);
    ALGEBRAIC(:,200) =  CONSTANTS(:,12).*(exp(ALGEBRAIC(:,196)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,198)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,201) =  - ALGEBRAIC(:,200);
    ALGEBRAIC(:,199) = ALGEBRAIC(:,197)+ CONSTANTS(:,274).*CONSTANTS(:,323).*ALGEBRAIC(:,193);
    ALGEBRAIC(:,202) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,160).*STATES(:,48));
    ALGEBRAIC(:,206) = ALGEBRAIC(:,202)+ CONSTANTS(:,275).*CONSTANTS(:,323).*ALGEBRAIC(:,193);
    ALGEBRAIC(:,207) =  CONSTANTS(:,13).*(exp(ALGEBRAIC(:,199)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,206)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,208) = ALGEBRAIC(:,200) - ALGEBRAIC(:,207);
    ALGEBRAIC(:,209) = ALGEBRAIC(:,207);
    ALGEBRAIC(:,214) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,162).*STATES(:,49));
    ALGEBRAIC(:,242) = ALGEBRAIC(:,214);
    ALGEBRAIC(:,213) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,161).*STATES(:,17));
    ALGEBRAIC(:,288) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,168).*STATES(:,55))+ CONSTANTS(:,303).*ALGEBRAIC(:,213);
    ALGEBRAIC(:,289) =  CONSTANTS(:,34).*(exp(ALGEBRAIC(:,242)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,288)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,211) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,224) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,162).*STATES(:,49))+ CONSTANTS(:,299).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,252) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,165).*STATES(:,52))+ CONSTANTS(:,304).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,253) =  CONSTANTS(:,16).*(exp(ALGEBRAIC(:,224)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,252)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,230) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,162).*STATES(:,49))+ CONSTANTS(:,300).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,264) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,163).*STATES(:,50))+ CONSTANTS(:,305).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,265) =  CONSTANTS(:,22).*(exp(ALGEBRAIC(:,230)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,264)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,234) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,162).*STATES(:,49))+ CONSTANTS(:,301).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,272) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,164).*STATES(:,51))+ CONSTANTS(:,306).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,273) =  CONSTANTS(:,26).*(exp(ALGEBRAIC(:,234)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,272)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,290) = (( - ALGEBRAIC(:,253) - ALGEBRAIC(:,265)) - ALGEBRAIC(:,273)) - ALGEBRAIC(:,289);
    ALGEBRAIC(:,225) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,168).*STATES(:,55))+ CONSTANTS(:,299).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,254) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,171).*STATES(:,58))+ CONSTANTS(:,304).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,255) =  CONSTANTS(:,19).*(exp(ALGEBRAIC(:,225)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,254)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,231) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,168).*STATES(:,55))+ CONSTANTS(:,300).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,266) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,169).*STATES(:,56))+ CONSTANTS(:,305).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,267) =  CONSTANTS(:,24).*(exp(ALGEBRAIC(:,231)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,266)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,235) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,168).*STATES(:,55))+ CONSTANTS(:,301).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,274) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,170).*STATES(:,57))+ CONSTANTS(:,306).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,275) =  CONSTANTS(:,28).*(exp(ALGEBRAIC(:,235)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,274)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,291) = (( - ALGEBRAIC(:,255) - ALGEBRAIC(:,267)) - ALGEBRAIC(:,275)) -  - ALGEBRAIC(:,289);
    ALGEBRAIC(:,215) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,163).*STATES(:,50));
    ALGEBRAIC(:,243) = ALGEBRAIC(:,215);
    ALGEBRAIC(:,292) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,169).*STATES(:,56))+ CONSTANTS(:,303).*ALGEBRAIC(:,213);
    ALGEBRAIC(:,293) =  CONSTANTS(:,36).*(exp(ALGEBRAIC(:,243)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,292)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,226) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,163).*STATES(:,50))+ CONSTANTS(:,299).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,256) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,166).*STATES(:,53))+ CONSTANTS(:,304).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,257) =  CONSTANTS(:,17).*(exp(ALGEBRAIC(:,226)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,256)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,238) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,163).*STATES(:,50))+ CONSTANTS(:,302).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,280) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,164).*STATES(:,51))+ CONSTANTS(:,307).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,281) =  CONSTANTS(:,30).*(exp(ALGEBRAIC(:,238)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,280)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,294) = (( - ALGEBRAIC(:,257)+ALGEBRAIC(:,265)) - ALGEBRAIC(:,293)) - ALGEBRAIC(:,281);
    ALGEBRAIC(:,227) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,169).*STATES(:,56))+ CONSTANTS(:,299).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,258) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,172).*STATES(:,59))+ CONSTANTS(:,304).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,259) =  CONSTANTS(:,20).*(exp(ALGEBRAIC(:,227)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,258)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,239) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,169).*STATES(:,56))+ CONSTANTS(:,302).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,282) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,170).*STATES(:,57))+ CONSTANTS(:,307).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,283) =  CONSTANTS(:,32).*(exp(ALGEBRAIC(:,239)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,282)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,295) = (( - ALGEBRAIC(:,259)+ALGEBRAIC(:,267)) -  - ALGEBRAIC(:,293)) - ALGEBRAIC(:,283);
    ALGEBRAIC(:,216) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,164).*STATES(:,51));
    ALGEBRAIC(:,244) = ALGEBRAIC(:,216);
    ALGEBRAIC(:,296) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,170).*STATES(:,57))+ CONSTANTS(:,303).*ALGEBRAIC(:,213);
    ALGEBRAIC(:,297) =  CONSTANTS(:,38).*(exp(ALGEBRAIC(:,244)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,296)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,228) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,164).*STATES(:,51))+ CONSTANTS(:,299).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,260) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,167).*STATES(:,54))+ CONSTANTS(:,304).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,261) =  CONSTANTS(:,18).*(exp(ALGEBRAIC(:,228)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,260)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,298) = (( - ALGEBRAIC(:,261)+ALGEBRAIC(:,273)) - ALGEBRAIC(:,297))+ALGEBRAIC(:,281);
    ALGEBRAIC(:,229) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,170).*STATES(:,57))+ CONSTANTS(:,299).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,262) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,173).*STATES(:,60))+ CONSTANTS(:,304).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,263) =  CONSTANTS(:,21).*(exp(ALGEBRAIC(:,229)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,262)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,299) = (( - ALGEBRAIC(:,263)+ALGEBRAIC(:,275)) -  - ALGEBRAIC(:,297))+ALGEBRAIC(:,283);
    ALGEBRAIC(:,217) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,165).*STATES(:,52));
    ALGEBRAIC(:,245) = ALGEBRAIC(:,217);
    ALGEBRAIC(:,300) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,171).*STATES(:,58))+ CONSTANTS(:,303).*ALGEBRAIC(:,213);
    ALGEBRAIC(:,301) =  CONSTANTS(:,35).*(exp(ALGEBRAIC(:,245)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,300)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,232) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,165).*STATES(:,52))+ CONSTANTS(:,300).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,268) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,166).*STATES(:,53))+ CONSTANTS(:,305).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,269) =  CONSTANTS(:,23).*(exp(ALGEBRAIC(:,232)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,268)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,236) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,165).*STATES(:,52))+ CONSTANTS(:,301).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,276) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,167).*STATES(:,54))+ CONSTANTS(:,306).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,277) =  CONSTANTS(:,27).*(exp(ALGEBRAIC(:,236)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,276)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,302) = (( - ALGEBRAIC(:,277)+ALGEBRAIC(:,253)) - ALGEBRAIC(:,269)) - ALGEBRAIC(:,301);
    ALGEBRAIC(:,233) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,171).*STATES(:,58))+ CONSTANTS(:,300).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,270) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,172).*STATES(:,59))+ CONSTANTS(:,305).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,271) =  CONSTANTS(:,25).*(exp(ALGEBRAIC(:,233)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,270)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,237) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,171).*STATES(:,58))+ CONSTANTS(:,301).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,278) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,173).*STATES(:,60))+ CONSTANTS(:,306).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,279) =  CONSTANTS(:,29).*(exp(ALGEBRAIC(:,237)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,278)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,303) = (( - ALGEBRAIC(:,279)+ALGEBRAIC(:,255)) - ALGEBRAIC(:,271)) -  - ALGEBRAIC(:,301);
    ALGEBRAIC(:,218) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,166).*STATES(:,53));
    ALGEBRAIC(:,246) = ALGEBRAIC(:,218);
    ALGEBRAIC(:,304) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,172).*STATES(:,59))+ CONSTANTS(:,303).*ALGEBRAIC(:,213);
    ALGEBRAIC(:,305) =  CONSTANTS(:,37).*(exp(ALGEBRAIC(:,246)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,304)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,240) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,166).*STATES(:,53))+ CONSTANTS(:,302).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,284) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,167).*STATES(:,54))+ CONSTANTS(:,307).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,285) =  CONSTANTS(:,31).*(exp(ALGEBRAIC(:,240)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,284)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,306) = ((ALGEBRAIC(:,269)+ALGEBRAIC(:,257)) - ALGEBRAIC(:,305)) - ALGEBRAIC(:,285);
    ALGEBRAIC(:,220) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,167).*STATES(:,54));
    ALGEBRAIC(:,247) = ALGEBRAIC(:,220);
    ALGEBRAIC(:,307) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,173).*STATES(:,60))+ CONSTANTS(:,303).*ALGEBRAIC(:,213);
    ALGEBRAIC(:,308) =  CONSTANTS(:,39).*(exp(ALGEBRAIC(:,247)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,307)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,309) = ((ALGEBRAIC(:,277)+ALGEBRAIC(:,261)) - ALGEBRAIC(:,308))+ALGEBRAIC(:,285);
    ALGEBRAIC(:,219) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,172).*STATES(:,59));
    ALGEBRAIC(:,222) = ALGEBRAIC(:,213)+ CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,211)+ALGEBRAIC(:,219);
    ALGEBRAIC(:,212) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,148).*STATES(:,2));
    ALGEBRAIC(:,250) = ALGEBRAIC(:,212)+ALGEBRAIC(:,219);
    ALGEBRAIC(:,248) =  CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,310) = piecewise({ALGEBRAIC(:,248)==0.00000,  CONSTANTS(:,14).*(exp(ALGEBRAIC(:,222)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,250)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,14).*ALGEBRAIC(:,248))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,248)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,222)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,250)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,241) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,172).*STATES(:,59))+ CONSTANTS(:,302).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,286) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,173).*STATES(:,60))+ CONSTANTS(:,307).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,287) =  CONSTANTS(:,33).*(exp(ALGEBRAIC(:,241)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,286)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,311) = ((ALGEBRAIC(:,271)+ALGEBRAIC(:,259)) - (( - ALGEBRAIC(:,305)+ALGEBRAIC(:,310)) - ALGEBRAIC(:,310))) - ALGEBRAIC(:,287);
    ALGEBRAIC(:,221) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,173).*STATES(:,60));
    ALGEBRAIC(:,223) = ALGEBRAIC(:,213)+ CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,211)+ALGEBRAIC(:,221);
    ALGEBRAIC(:,251) = ALGEBRAIC(:,212)+ALGEBRAIC(:,221);
    ALGEBRAIC(:,249) =  CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,211);
    ALGEBRAIC(:,312) = piecewise({ALGEBRAIC(:,249)==0.00000,  CONSTANTS(:,15).*(exp(ALGEBRAIC(:,223)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,251)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,15).*ALGEBRAIC(:,249))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,249)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,223)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,251)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,313) = ((ALGEBRAIC(:,279)+ALGEBRAIC(:,263)) - (( - ALGEBRAIC(:,308)+ALGEBRAIC(:,312)) - ALGEBRAIC(:,312)))+ALGEBRAIC(:,287);
    ALGEBRAIC(:,322) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,174).*STATES(:,61));
    ALGEBRAIC(:,328) = ALGEBRAIC(:,322);
    ALGEBRAIC(:,321) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,180).*STATES(:,6));
    ALGEBRAIC(:,323) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,175).*STATES(:,62));
    ALGEBRAIC(:,334) =  CONSTANTS(:,279).*ALGEBRAIC(:,321)+ALGEBRAIC(:,323);
    ALGEBRAIC(:,335) =  CONSTANTS(:,40).*(exp(ALGEBRAIC(:,328)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,334)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,319) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,329) = ALGEBRAIC(:,323)+ALGEBRAIC(:,319);
    ALGEBRAIC(:,324) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,176).*STATES(:,63));
    ALGEBRAIC(:,336) = ALGEBRAIC(:,324);
    ALGEBRAIC(:,337) =  CONSTANTS(:,41).*(exp(ALGEBRAIC(:,329)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,336)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,339) = ALGEBRAIC(:,335) - ALGEBRAIC(:,337);
    ALGEBRAIC(:,330) = ALGEBRAIC(:,324);
    ALGEBRAIC(:,325) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,177).*STATES(:,64));
    ALGEBRAIC(:,338) = ALGEBRAIC(:,325);
    ALGEBRAIC(:,340) =  CONSTANTS(:,42).*(exp(ALGEBRAIC(:,330)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,338)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,342) = ALGEBRAIC(:,337) - ALGEBRAIC(:,340);
    ALGEBRAIC(:,331) = ALGEBRAIC(:,325);
    ALGEBRAIC(:,318) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,148).*STATES(:,2));
    ALGEBRAIC(:,326) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,178).*STATES(:,65));
    ALGEBRAIC(:,341) = ALGEBRAIC(:,326)+ALGEBRAIC(:,318);
    ALGEBRAIC(:,343) =  CONSTANTS(:,43).*(exp(ALGEBRAIC(:,331)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,341)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,344) =  - ALGEBRAIC(:,343)+ALGEBRAIC(:,340);
    ALGEBRAIC(:,320) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7));
    ALGEBRAIC(:,332) = ALGEBRAIC(:,326)+ CONSTANTS(:,278).*ALGEBRAIC(:,320);
    ALGEBRAIC(:,327) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,179).*STATES(:,66));
    ALGEBRAIC(:,345) = ALGEBRAIC(:,327);
    ALGEBRAIC(:,346) =  CONSTANTS(:,44).*(exp(ALGEBRAIC(:,332)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,345)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,347) =  - ALGEBRAIC(:,346)+ALGEBRAIC(:,343);
    ALGEBRAIC(:,317) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,333) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,179).*STATES(:,66))+ CONSTANTS(:,276).*CONSTANTS(:,323).*ALGEBRAIC(:,317);
    ALGEBRAIC(:,348) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,174).*STATES(:,61))+ CONSTANTS(:,277).*CONSTANTS(:,323).*ALGEBRAIC(:,317);
    ALGEBRAIC(:,349) =  CONSTANTS(:,45).*(exp(ALGEBRAIC(:,333)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,348)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,350) = ALGEBRAIC(:,349) - ALGEBRAIC(:,335);
    ALGEBRAIC(:,351) =  - ALGEBRAIC(:,349)+ALGEBRAIC(:,346);
    ALGEBRAIC(:,371) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,191).*STATES(:,115));
    ALGEBRAIC(:,387) = ALGEBRAIC(:,371);
    ALGEBRAIC(:,368) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7));
    ALGEBRAIC(:,372) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,192).*STATES(:,116));
    ALGEBRAIC(:,403) = ALGEBRAIC(:,368)+ALGEBRAIC(:,372);
    ALGEBRAIC(:,404) =  CONSTANTS(:,56).*(exp(ALGEBRAIC(:,387)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,403)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,364) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,388) = ALGEBRAIC(:,372)+ALGEBRAIC(:,364);
    ALGEBRAIC(:,373) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,193).*STATES(:,117));
    ALGEBRAIC(:,405) = ALGEBRAIC(:,373);
    ALGEBRAIC(:,406) =  CONSTANTS(:,57).*(exp(ALGEBRAIC(:,388)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,405)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,407) = ALGEBRAIC(:,404) - ALGEBRAIC(:,406);
    ALGEBRAIC(:,389) = ALGEBRAIC(:,373)+ALGEBRAIC(:,364);
    ALGEBRAIC(:,374) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,194).*STATES(:,118));
    ALGEBRAIC(:,408) = ALGEBRAIC(:,374);
    ALGEBRAIC(:,409) =  CONSTANTS(:,58).*(exp(ALGEBRAIC(:,389)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,408)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,410) =  - ALGEBRAIC(:,409)+ALGEBRAIC(:,406);
    ALGEBRAIC(:,390) = ALGEBRAIC(:,374);
    ALGEBRAIC(:,363) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,200).*STATES(:,13));
    ALGEBRAIC(:,385) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,199).*STATES(:,12));
    ALGEBRAIC(:,375) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,195).*STATES(:,107));
    ALGEBRAIC(:,411) = ALGEBRAIC(:,363)+ALGEBRAIC(:,385)+ALGEBRAIC(:,375);
    ALGEBRAIC(:,412) =  CONSTANTS(:,59).*(exp(ALGEBRAIC(:,390)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,411)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,413) = ALGEBRAIC(:,409) - ALGEBRAIC(:,412);
    ALGEBRAIC(:,367) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,197).*STATES(:,10));
    ALGEBRAIC(:,391) = ALGEBRAIC(:,375)+ALGEBRAIC(:,367);
    ALGEBRAIC(:,376) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,196).*STATES(:,108));
    ALGEBRAIC(:,414) = ALGEBRAIC(:,376);
    ALGEBRAIC(:,415) =  CONSTANTS(:,60).*(exp(ALGEBRAIC(:,391)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,414)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,416) =  - ALGEBRAIC(:,415)+ALGEBRAIC(:,412);
    ALGEBRAIC(:,392) = ALGEBRAIC(:,376);
    ALGEBRAIC(:,370) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,182).*STATES(:,109));
    ALGEBRAIC(:,417) = ALGEBRAIC(:,370);
    ALGEBRAIC(:,419) =  CONSTANTS(:,61).*(exp(ALGEBRAIC(:,392)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,417)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,421) = ALGEBRAIC(:,415) - ALGEBRAIC(:,419);
    ALGEBRAIC(:,386) = ALGEBRAIC(:,370);
    ALGEBRAIC(:,365) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,377) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,183).*STATES(:,110));
    ALGEBRAIC(:,401) = ALGEBRAIC(:,365)+ALGEBRAIC(:,377);
    ALGEBRAIC(:,402) =  CONSTANTS(:,47).*(exp(ALGEBRAIC(:,386)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,401)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,422) =  - ALGEBRAIC(:,402)+ALGEBRAIC(:,419);
    ALGEBRAIC(:,393) = ALGEBRAIC(:,377);
    ALGEBRAIC(:,378) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,184).*STATES(:,111));
    ALGEBRAIC(:,418) = ALGEBRAIC(:,378)+ALGEBRAIC(:,365);
    ALGEBRAIC(:,420) =  CONSTANTS(:,48).*(exp(ALGEBRAIC(:,393)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,418)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,423) =  - ALGEBRAIC(:,420)+ALGEBRAIC(:,402);
    ALGEBRAIC(:,369) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,180).*STATES(:,6));
    ALGEBRAIC(:,394) = ALGEBRAIC(:,378)+ALGEBRAIC(:,369);
    ALGEBRAIC(:,379) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,185).*STATES(:,112));
    ALGEBRAIC(:,424) = ALGEBRAIC(:,379);
    ALGEBRAIC(:,425) =  CONSTANTS(:,49).*(exp(ALGEBRAIC(:,394)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,424)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,426) = ALGEBRAIC(:,420) - ALGEBRAIC(:,425);
    ALGEBRAIC(:,395) = ALGEBRAIC(:,379)+ALGEBRAIC(:,369);
    ALGEBRAIC(:,380) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,186).*STATES(:,113));
    ALGEBRAIC(:,427) = ALGEBRAIC(:,380);
    ALGEBRAIC(:,428) =  CONSTANTS(:,50).*(exp(ALGEBRAIC(:,395)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,427)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,429) = ALGEBRAIC(:,425) - ALGEBRAIC(:,428);
    ALGEBRAIC(:,396) = ALGEBRAIC(:,380)+ALGEBRAIC(:,369);
    ALGEBRAIC(:,362) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,430) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,187).*STATES(:,114))+ CONSTANTS(:,281).*ALGEBRAIC(:,362);
    ALGEBRAIC(:,431) =  CONSTANTS(:,51).*(exp(ALGEBRAIC(:,396)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,430)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,432) = ALGEBRAIC(:,428) - ALGEBRAIC(:,431);
    ALGEBRAIC(:,381) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,187).*STATES(:,114));
    ALGEBRAIC(:,397) = ALGEBRAIC(:,381);
    ALGEBRAIC(:,366) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,198).*STATES(:,11));
    ALGEBRAIC(:,382) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,188).*STATES(:,106));
    ALGEBRAIC(:,433) = ALGEBRAIC(:,382)+ALGEBRAIC(:,366);
    ALGEBRAIC(:,434) =  CONSTANTS(:,52).*(exp(ALGEBRAIC(:,397)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,433)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,435) = ALGEBRAIC(:,431) - ALGEBRAIC(:,434);
    ALGEBRAIC(:,398) = ALGEBRAIC(:,382);
    ALGEBRAIC(:,383) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,189).*STATES(:,119));
    ALGEBRAIC(:,436) = ALGEBRAIC(:,383);
    ALGEBRAIC(:,437) =  CONSTANTS(:,53).*(exp(ALGEBRAIC(:,398)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,436)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,438) = ALGEBRAIC(:,434) - ALGEBRAIC(:,437);
    ALGEBRAIC(:,399) = ALGEBRAIC(:,383);
    ALGEBRAIC(:,439) =  CONSTANTS(:,282).*ALGEBRAIC(:,362)+ CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7))+ CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,190).*STATES(:,120));
    ALGEBRAIC(:,440) =  CONSTANTS(:,54).*(exp(ALGEBRAIC(:,399)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,439)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,441) =  - ALGEBRAIC(:,440)+ALGEBRAIC(:,437);
    ALGEBRAIC(:,384) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,190).*STATES(:,120));
    ALGEBRAIC(:,400) = ALGEBRAIC(:,384);
    ALGEBRAIC(:,443) = ALGEBRAIC(:,371)+ALGEBRAIC(:,368);
    ALGEBRAIC(:,444) =  CONSTANTS(:,55).*(exp(ALGEBRAIC(:,400)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,443)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,445) = ALGEBRAIC(:,444) - ALGEBRAIC(:,404);
    ALGEBRAIC(:,446) = ALGEBRAIC(:,440) - ALGEBRAIC(:,444);
    ALGEBRAIC(:,456) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,161).*STATES(:,17));
    ALGEBRAIC(:,457) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,209).*STATES(:,67));
    ALGEBRAIC(:,460) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,212).*STATES(:,70));
    ALGEBRAIC(:,462) =  CONSTANTS(:,68).*(exp(ALGEBRAIC(:,460)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,457)+ CONSTANTS(:,325).*ALGEBRAIC(:,456))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,458) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,210).*STATES(:,68));
    ALGEBRAIC(:,463) =  CONSTANTS(:,69).*(exp((ALGEBRAIC(:,457)+ CONSTANTS(:,324).*ALGEBRAIC(:,456))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,458)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,459) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,211).*STATES(:,69));
    ALGEBRAIC(:,464) =  CONSTANTS(:,70).*(exp((ALGEBRAIC(:,458)+ CONSTANTS(:,325).*ALGEBRAIC(:,456))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,459)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,465) =  CONSTANTS(:,71).*(exp(ALGEBRAIC(:,459)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,460)+ CONSTANTS(:,324).*ALGEBRAIC(:,456))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,454) = ALGEBRAIC(:,412);
    ALGEBRAIC(:,478) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,221).*STATES(:,79));
    ALGEBRAIC(:,483) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,206).*STATES(:,28));
    ALGEBRAIC(:,484) = ALGEBRAIC(:,483) - CONSTANTS(:,346);
    ALGEBRAIC(:,485) = ALGEBRAIC(:,478)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,473) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,213).*STATES(:,71));
    ALGEBRAIC(:,472) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,199).*STATES(:,12));
    ALGEBRAIC(:,486) = ALGEBRAIC(:,473)+ALGEBRAIC(:,472)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,503) =  CONSTANTS(:,80).*(exp(ALGEBRAIC(:,485)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,486)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,504) = ALGEBRAIC(:,503);
    ALGEBRAIC(:,451) =  - ALGEBRAIC(:,415);
    ALGEBRAIC(:,471) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,197).*STATES(:,10));
    ALGEBRAIC(:,487) = ALGEBRAIC(:,473)+ALGEBRAIC(:,471)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,474) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,214).*STATES(:,72));
    ALGEBRAIC(:,488) = ALGEBRAIC(:,474)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,505) =  CONSTANTS(:,72).*(exp(ALGEBRAIC(:,487)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,488)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,506) =  - ALGEBRAIC(:,505);
    ALGEBRAIC(:,507) = ALGEBRAIC(:,503) - ALGEBRAIC(:,505);
    ALGEBRAIC(:,450) = ALGEBRAIC(:,434);
    ALGEBRAIC(:,477) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,217).*STATES(:,75));
    ALGEBRAIC(:,489) = ALGEBRAIC(:,477)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,470) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,198).*STATES(:,11));
    ALGEBRAIC(:,479) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,218).*STATES(:,76));
    ALGEBRAIC(:,490) = ALGEBRAIC(:,470)+ALGEBRAIC(:,479)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,508) =  CONSTANTS(:,76).*(exp(ALGEBRAIC(:,489)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,490)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,509) = ALGEBRAIC(:,508);
    ALGEBRAIC(:,469) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,200).*STATES(:,13));
    ALGEBRAIC(:,491) = ALGEBRAIC(:,474)+ALGEBRAIC(:,469)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,475) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,215).*STATES(:,73));
    ALGEBRAIC(:,492) = ALGEBRAIC(:,475)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,510) =  CONSTANTS(:,74).*(exp(ALGEBRAIC(:,491)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,492)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,511) = ALGEBRAIC(:,510);
    ALGEBRAIC(:,467) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,493) = ALGEBRAIC(:,474)+ CONSTANTS(:,326).*ALGEBRAIC(:,467)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,476) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,216).*STATES(:,74));
    ALGEBRAIC(:,494) = ALGEBRAIC(:,476)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,512) =  CONSTANTS(:,73).*(exp(ALGEBRAIC(:,493)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,494)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,514) = ALGEBRAIC(:,505) - ALGEBRAIC(:,512);
    ALGEBRAIC(:,495) = ALGEBRAIC(:,476)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,496) = ALGEBRAIC(:,477)+ CONSTANTS(:,328).*ALGEBRAIC(:,469)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,513) =  CONSTANTS(:,75).*(exp(ALGEBRAIC(:,495)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,496)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,517) = ALGEBRAIC(:,512) - ALGEBRAIC(:,513);
    ALGEBRAIC(:,518) = ALGEBRAIC(:,513) - ALGEBRAIC(:,508);
    ALGEBRAIC(:,88) =  ( CONSTANTS(:,321).*CONSTANTS(:,322)).*log( CONSTANTS(:,149).*STATES(:,3));
    ALGEBRAIC(:,89) =  ( CONSTANTS(:,321).*CONSTANTS(:,322)).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,90) =  CONSTANTS(:,3).*(exp(ALGEBRAIC(:,88)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,89)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,497) = ALGEBRAIC(:,479)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,468) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,149).*STATES(:,3));
    ALGEBRAIC(:,481) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,219).*STATES(:,77));
    ALGEBRAIC(:,498) = ALGEBRAIC(:,481)+ CONSTANTS(:,327).*ALGEBRAIC(:,468)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,516) =  CONSTANTS(:,77).*(exp(ALGEBRAIC(:,497)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,498)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,520) =  CONSTANTS(:,327).*ALGEBRAIC(:,516);
    ALGEBRAIC(:,455) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,149).*STATES(:,3));
    ALGEBRAIC(:,461) =  CONSTANTS(:,67).*exp(ALGEBRAIC(:,460)./( CONSTANTS(:,321).*CONSTANTS(:,322))).*(exp(ALGEBRAIC(:,455)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,456)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,522) = ALGEBRAIC(:,508) - ALGEBRAIC(:,516);
    ALGEBRAIC(:,499) = ALGEBRAIC(:,481)+ CONSTANTS(:,328).*ALGEBRAIC(:,469)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,482) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,220).*STATES(:,78));
    ALGEBRAIC(:,500) = ALGEBRAIC(:,482)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,521) =  CONSTANTS(:,78).*(exp(ALGEBRAIC(:,499)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,500)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,525) = ALGEBRAIC(:,516) - ALGEBRAIC(:,521);
    ALGEBRAIC(:,447) = ALGEBRAIC(:,412);
    ALGEBRAIC(:,501) = ALGEBRAIC(:,482)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,502) = ALGEBRAIC(:,469)+ALGEBRAIC(:,478)+ALGEBRAIC(:,484);
    ALGEBRAIC(:,524) =  CONSTANTS(:,79).*(exp(ALGEBRAIC(:,501)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,502)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,527) = (( CONSTANTS(:,328).*ALGEBRAIC(:,513) - ALGEBRAIC(:,510)) -  CONSTANTS(:,328).*ALGEBRAIC(:,521))+ALGEBRAIC(:,524);
    ALGEBRAIC(:,529) = ALGEBRAIC(:,524) - ALGEBRAIC(:,503);
    ALGEBRAIC(:,528) = ALGEBRAIC(:,521) - ALGEBRAIC(:,524);
    ALGEBRAIC(:,526) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,531) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,222).*STATES(:,80));
    ALGEBRAIC(:,532) = ALGEBRAIC(:,531)+ CONSTANTS(:,283).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,534) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,223).*STATES(:,81));
    ALGEBRAIC(:,535) = ALGEBRAIC(:,534)+ CONSTANTS(:,285).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,537) =  CONSTANTS(:,82).*(exp(ALGEBRAIC(:,532)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,535)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,533) = ALGEBRAIC(:,531)+ CONSTANTS(:,284).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,538) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,224).*STATES(:,82));
    ALGEBRAIC(:,540) = ALGEBRAIC(:,538)+ CONSTANTS(:,286).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,541) =  CONSTANTS(:,84).*(exp(ALGEBRAIC(:,533)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,540)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,542) =  - ALGEBRAIC(:,537) - ALGEBRAIC(:,541);
    ALGEBRAIC(:,539) = ALGEBRAIC(:,538)+ CONSTANTS(:,283).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,543) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,225).*STATES(:,83));
    ALGEBRAIC(:,547) = ALGEBRAIC(:,543)+ CONSTANTS(:,285).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,549) =  CONSTANTS(:,83).*(exp(ALGEBRAIC(:,539)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,547)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,550) = ALGEBRAIC(:,541) - ALGEBRAIC(:,549);
    ALGEBRAIC(:,536) = ALGEBRAIC(:,534)+ CONSTANTS(:,284).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,548) = ALGEBRAIC(:,543)+ CONSTANTS(:,286).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,551) =  CONSTANTS(:,85).*(exp(ALGEBRAIC(:,536)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,548)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,552) = ALGEBRAIC(:,537) - ALGEBRAIC(:,551);
    ALGEBRAIC(:,553) = ALGEBRAIC(:,549)+ALGEBRAIC(:,551);
    ALGEBRAIC(:,557) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,559) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,258).*STATES(:,84));
    ALGEBRAIC(:,560) = ALGEBRAIC(:,559)+ CONSTANTS(:,287).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,562) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,259).*STATES(:,85));
    ALGEBRAIC(:,563) = ALGEBRAIC(:,562)+ CONSTANTS(:,289).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,565) =  CONSTANTS(:,136).*(exp(ALGEBRAIC(:,560)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,563)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,561) = ALGEBRAIC(:,559)+ CONSTANTS(:,288).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,566) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,260).*STATES(:,86));
    ALGEBRAIC(:,567) = ALGEBRAIC(:,566)+ CONSTANTS(:,290).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,569) =  CONSTANTS(:,138).*(exp(ALGEBRAIC(:,561)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,567)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,570) =  - ALGEBRAIC(:,565)+ALGEBRAIC(:,569);
    ALGEBRAIC(:,568) = ALGEBRAIC(:,566)+ CONSTANTS(:,287).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,571) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,261).*STATES(:,87));
    ALGEBRAIC(:,575) = ALGEBRAIC(:,571)+ CONSTANTS(:,289).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,577) =  CONSTANTS(:,137).*(exp(ALGEBRAIC(:,568)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,575)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,578) =  - ALGEBRAIC(:,577)+ALGEBRAIC(:,569);
    ALGEBRAIC(:,564) = ALGEBRAIC(:,562)+ CONSTANTS(:,288).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,576) = ALGEBRAIC(:,571)+ CONSTANTS(:,290).*CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,579) =  CONSTANTS(:,139).*(exp(ALGEBRAIC(:,564)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,576)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,580) = ALGEBRAIC(:,565) - ALGEBRAIC(:,579);
    ALGEBRAIC(:,581) = ALGEBRAIC(:,577)+ALGEBRAIC(:,579);
    ALGEBRAIC(:,583) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,226).*STATES(:,16));
    ALGEBRAIC(:,584) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,585) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,227).*STATES(:,18));
    ALGEBRAIC(:,587) =  CONSTANTS(:,86).*(exp(( CONSTANTS(:,314).*ALGEBRAIC(:,584)+ALGEBRAIC(:,583))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,585)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,589) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,161).*STATES(:,17));
    ALGEBRAIC(:,591) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,593) =  CONSTANTS(:,91).*(exp(ALGEBRAIC(:,589)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,591)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,316) = (( (CONSTANTS(:,303)).*ALGEBRAIC(:,301)+ CONSTANTS(:,303).*ALGEBRAIC(:,305)+ CONSTANTS(:,303).*ALGEBRAIC(:,297)+ CONSTANTS(:,303).*ALGEBRAIC(:,293)+ CONSTANTS(:,303).*ALGEBRAIC(:,289)+ CONSTANTS(:,303).*ALGEBRAIC(:,308)) - ALGEBRAIC(:,310)) - ALGEBRAIC(:,312);
    ALGEBRAIC(:,466) = (( CONSTANTS(:,325).*ALGEBRAIC(:,462) -  CONSTANTS(:,324).*ALGEBRAIC(:,463)) -  CONSTANTS(:,325).*ALGEBRAIC(:,464))+ CONSTANTS(:,324).*ALGEBRAIC(:,465);
    ALGEBRAIC(:,586) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,228).*STATES(:,19));
    ALGEBRAIC(:,588) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,229).*STATES(:,20));
    ALGEBRAIC(:,594) =  CONSTANTS(:,87).*(exp((ALGEBRAIC(:,586)+ CONSTANTS(:,313).*ALGEBRAIC(:,585))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,588)+ CONSTANTS(:,313).*ALGEBRAIC(:,585))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,590) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,230).*STATES(:,21));
    ALGEBRAIC(:,596) =  CONSTANTS(:,88).*(exp(ALGEBRAIC(:,588)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,590)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,592) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,231).*STATES(:,22));
    ALGEBRAIC(:,598) =  CONSTANTS(:,89).*(exp(ALGEBRAIC(:,590)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,592)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,600) =  CONSTANTS(:,90).*(exp(ALGEBRAIC(:,592)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,588)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,595) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,603) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,232).*STATES(:,88))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,633) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,236).*STATES(:,92))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,634) =  CONSTANTS(:,105).*(exp(ALGEBRAIC(:,603)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,633)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,611) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,232).*STATES(:,88))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,649) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,240).*STATES(:,96))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,650) =  CONSTANTS(:,113).*(exp(ALGEBRAIC(:,611)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,649)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,619) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,232).*STATES(:,88))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,665) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,233).*STATES(:,89))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,666) =  CONSTANTS(:,93).*(exp(ALGEBRAIC(:,619)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,665)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,667) = ( - ALGEBRAIC(:,666) - ALGEBRAIC(:,634)) - ALGEBRAIC(:,650);
    ALGEBRAIC(:,604) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,240).*STATES(:,96))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,635) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,244).*STATES(:,100))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,636) =  CONSTANTS(:,106).*(exp(ALGEBRAIC(:,604)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,635)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,620) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,240).*STATES(:,96))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,668) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,241).*STATES(:,97))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,669) =  CONSTANTS(:,94).*(exp(ALGEBRAIC(:,620)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,668)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,670) = ( - ALGEBRAIC(:,669) - ALGEBRAIC(:,636)) -  - ALGEBRAIC(:,650);
    ALGEBRAIC(:,612) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,236).*STATES(:,92))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,651) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,244).*STATES(:,100))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,652) =  CONSTANTS(:,114).*(exp(ALGEBRAIC(:,612)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,651)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,621) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,236).*STATES(:,92))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,671) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,237).*STATES(:,93))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,672) =  CONSTANTS(:,95).*(exp(ALGEBRAIC(:,621)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,671)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,673) = ( - ALGEBRAIC(:,672)+ALGEBRAIC(:,634)) - ALGEBRAIC(:,652);
    ALGEBRAIC(:,622) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,244).*STATES(:,100))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,674) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,245).*STATES(:,101))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,675) =  CONSTANTS(:,96).*(exp(ALGEBRAIC(:,622)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,674)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,676) = ( - ALGEBRAIC(:,675)+ALGEBRAIC(:,636)) -  - ALGEBRAIC(:,652);
    ALGEBRAIC(:,605) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,233).*STATES(:,89))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,637) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,237).*STATES(:,93))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,638) =  CONSTANTS(:,107).*(exp(ALGEBRAIC(:,605)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,637)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,613) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,233).*STATES(:,89))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,653) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,241).*STATES(:,97))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,654) =  CONSTANTS(:,115).*(exp(ALGEBRAIC(:,613)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,653)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,623) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,233).*STATES(:,89))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,677) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,234).*STATES(:,90))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,678) =  CONSTANTS(:,97).*(exp(ALGEBRAIC(:,623)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,677)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,679) = ((ALGEBRAIC(:,666) - ALGEBRAIC(:,678)) - ALGEBRAIC(:,638)) - ALGEBRAIC(:,654);
    ALGEBRAIC(:,606) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,241).*STATES(:,97))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,639) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,245).*STATES(:,101))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,640) =  CONSTANTS(:,108).*(exp(ALGEBRAIC(:,606)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,639)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,624) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,241).*STATES(:,97))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,680) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,242).*STATES(:,98))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,681) =  CONSTANTS(:,98).*(exp(ALGEBRAIC(:,624)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,680)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,682) = ((ALGEBRAIC(:,669) - ALGEBRAIC(:,681)) - ALGEBRAIC(:,640)) -  - ALGEBRAIC(:,654);
    ALGEBRAIC(:,614) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,237).*STATES(:,93))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,655) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,245).*STATES(:,101))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,656) =  CONSTANTS(:,116).*(exp(ALGEBRAIC(:,614)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,655)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,625) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,237).*STATES(:,93))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,683) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,238).*STATES(:,94))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,684) =  CONSTANTS(:,99).*(exp(ALGEBRAIC(:,625)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,683)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,685) = ((ALGEBRAIC(:,672) - ALGEBRAIC(:,684))+ALGEBRAIC(:,638)) - ALGEBRAIC(:,656);
    ALGEBRAIC(:,626) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,245).*STATES(:,101))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,686) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,246).*STATES(:,102))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,687) =  CONSTANTS(:,100).*(exp(ALGEBRAIC(:,626)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,686)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,688) = ((ALGEBRAIC(:,675) - ALGEBRAIC(:,687))+ALGEBRAIC(:,640)) -  - ALGEBRAIC(:,656);
    ALGEBRAIC(:,607) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,234).*STATES(:,90))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,641) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,238).*STATES(:,94))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,642) =  CONSTANTS(:,109).*(exp(ALGEBRAIC(:,607)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,641)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,615) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,234).*STATES(:,90))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,657) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,242).*STATES(:,98))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,658) =  CONSTANTS(:,117).*(exp(ALGEBRAIC(:,615)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,657)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,627) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,234).*STATES(:,90))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,689) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,235).*STATES(:,91))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,690) =  CONSTANTS(:,101).*(exp(ALGEBRAIC(:,627)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,689)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,691) = ((ALGEBRAIC(:,678) - ALGEBRAIC(:,690)) - ALGEBRAIC(:,642)) - ALGEBRAIC(:,658);
    ALGEBRAIC(:,609) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,235).*STATES(:,91))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,645) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,239).*STATES(:,95))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,646) =  CONSTANTS(:,111).*(exp(ALGEBRAIC(:,609)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,645)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,617) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,235).*STATES(:,91))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,661) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,243).*STATES(:,99))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,662) =  CONSTANTS(:,119).*(exp(ALGEBRAIC(:,617)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,661)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,692) = (ALGEBRAIC(:,690) - ALGEBRAIC(:,646)) - ALGEBRAIC(:,662);
    ALGEBRAIC(:,608) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,242).*STATES(:,98))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,643) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,246).*STATES(:,102))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,644) =  CONSTANTS(:,110).*(exp(ALGEBRAIC(:,608)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,643)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,628) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,242).*STATES(:,98))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,693) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,243).*STATES(:,99))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,694) =  CONSTANTS(:,102).*(exp(ALGEBRAIC(:,628)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,693)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,695) = ((ALGEBRAIC(:,681) - ALGEBRAIC(:,694)) - ALGEBRAIC(:,644)) -  - ALGEBRAIC(:,658);
    ALGEBRAIC(:,610) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,243).*STATES(:,99))+ CONSTANTS(:,291).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,647) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,247).*STATES(:,103))+ CONSTANTS(:,294).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,648) =  CONSTANTS(:,112).*(exp(ALGEBRAIC(:,610)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,647)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,696) = (ALGEBRAIC(:,694) - ALGEBRAIC(:,648)) -  - ALGEBRAIC(:,662);
    ALGEBRAIC(:,616) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,238).*STATES(:,94))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,659) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,246).*STATES(:,102))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,660) =  CONSTANTS(:,118).*(exp(ALGEBRAIC(:,616)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,659)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,629) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,238).*STATES(:,94))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,697) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,239).*STATES(:,95))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,698) =  CONSTANTS(:,103).*(exp(ALGEBRAIC(:,629)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,697)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,699) = ((ALGEBRAIC(:,684) - ALGEBRAIC(:,698))+ALGEBRAIC(:,642)) - ALGEBRAIC(:,660);
    ALGEBRAIC(:,618) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,239).*STATES(:,95))+ CONSTANTS(:,292).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,663) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,247).*STATES(:,103))+ CONSTANTS(:,295).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,664) =  CONSTANTS(:,120).*(exp(ALGEBRAIC(:,618)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,663)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,700) = (ALGEBRAIC(:,698)+ALGEBRAIC(:,646)) - ALGEBRAIC(:,664);
    ALGEBRAIC(:,630) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,246).*STATES(:,102))+ CONSTANTS(:,293).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,701) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,247).*STATES(:,103))+ CONSTANTS(:,296).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,702) =  CONSTANTS(:,104).*(exp(ALGEBRAIC(:,630)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,701)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,703) = ((ALGEBRAIC(:,687) - ALGEBRAIC(:,702))+ALGEBRAIC(:,644)) -  - ALGEBRAIC(:,660);
    ALGEBRAIC(:,631) =  CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,595);
    ALGEBRAIC(:,599) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,180).*STATES(:,6));
    ALGEBRAIC(:,601) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,247).*STATES(:,103));
    ALGEBRAIC(:,602) = ALGEBRAIC(:,599)+ CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,595)+ALGEBRAIC(:,601);
    ALGEBRAIC(:,597) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7));
    ALGEBRAIC(:,632) = ALGEBRAIC(:,597)+ALGEBRAIC(:,601);
    ALGEBRAIC(:,704) = piecewise({ALGEBRAIC(:,631)==0.00000,  CONSTANTS(:,92).*(exp(ALGEBRAIC(:,602)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,632)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,92).*ALGEBRAIC(:,631))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,631)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,602)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,632)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,706) = (ALGEBRAIC(:,702)+ALGEBRAIC(:,648)) - (( - ALGEBRAIC(:,664)+ALGEBRAIC(:,704)) - ALGEBRAIC(:,704));
    ALGEBRAIC(:,711) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,714) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,248).*STATES(:,104));
    ALGEBRAIC(:,722) = ALGEBRAIC(:,714)+ CONSTANTS(:,297).*CONSTANTS(:,323).*ALGEBRAIC(:,711);
    ALGEBRAIC(:,715) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,249).*STATES(:,105));
    ALGEBRAIC(:,723) = ALGEBRAIC(:,715)+ CONSTANTS(:,298).*CONSTANTS(:,323).*ALGEBRAIC(:,711);
    ALGEBRAIC(:,724) =  CONSTANTS(:,123).*(exp(ALGEBRAIC(:,722)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,723)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,713) =  CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,711);
    ALGEBRAIC(:,709) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,180).*STATES(:,6));
    ALGEBRAIC(:,718) = ALGEBRAIC(:,715)+ALGEBRAIC(:,709)+ALGEBRAIC(:,713);
    ALGEBRAIC(:,710) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7));
    ALGEBRAIC(:,719) = ALGEBRAIC(:,715)+ALGEBRAIC(:,710);
    ALGEBRAIC(:,721) = piecewise({ALGEBRAIC(:,713)==0.00000,  1.00000.*CONSTANTS(:,121).*(exp(ALGEBRAIC(:,718)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,719)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( 1.00000.*CONSTANTS(:,121).*ALGEBRAIC(:,713))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,713)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,718)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,719)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,453) =  - ALGEBRAIC(:,425) - (ALGEBRAIC(:,428)+ALGEBRAIC(:,431));
    ALGEBRAIC(:,357) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,180).*STATES(:,6));
    ALGEBRAIC(:,358) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7));
    ALGEBRAIC(:,4) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,359) =  CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,4);
    ALGEBRAIC(:,360) = piecewise({ALGEBRAIC(:,359)==0.00000,  CONSTANTS(:,46).*(exp(ALGEBRAIC(:,357)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,358)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,46).*ALGEBRAIC(:,359))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,359)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,357)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,358)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,726) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,737) =  CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,726);
    ALGEBRAIC(:,735) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,180).*STATES(:,6));
    ALGEBRAIC(:,736) = ALGEBRAIC(:,735)+ CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,726);
    ALGEBRAIC(:,734) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,181).*STATES(:,7));
    ALGEBRAIC(:,738) = ALGEBRAIC(:,734);
    ALGEBRAIC(:,739) = piecewise({ALGEBRAIC(:,737)==0.00000,  CONSTANTS(:,141).*(exp(ALGEBRAIC(:,736)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,738)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,141).*ALGEBRAIC(:,737))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,737)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,736)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,738)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,356) =  CONSTANTS(:,279).*ALGEBRAIC(:,335);
    ALGEBRAIC(:,452) = ALGEBRAIC(:,440)+ALGEBRAIC(:,444)+ALGEBRAIC(:,404);
    ALGEBRAIC(:,355) =   - CONSTANTS(:,278).*ALGEBRAIC(:,346);
    ALGEBRAIC(:,712) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,711);
    ALGEBRAIC(:,707) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,716) = ALGEBRAIC(:,715)+ALGEBRAIC(:,707)+ALGEBRAIC(:,712);
    ALGEBRAIC(:,708) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,717) = ALGEBRAIC(:,715)+ALGEBRAIC(:,708);
    ALGEBRAIC(:,720) = piecewise({ALGEBRAIC(:,712)==0.00000,  1.00000.*CONSTANTS(:,122).*(exp(ALGEBRAIC(:,716)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,717)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( 1.00000.*CONSTANTS(:,122).*ALGEBRAIC(:,712))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,712)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,716)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,717)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,141) = STATES(:,31)./CONSTANTS(:,316);
    ALGEBRAIC(:,145) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,141);
    ALGEBRAIC(:,143) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,144) = ALGEBRAIC(:,143)+ CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,141);
    ALGEBRAIC(:,142) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,146) = ALGEBRAIC(:,142);
    ALGEBRAIC(:,147) = piecewise({ALGEBRAIC(:,145)==0.00000,  CONSTANTS(:,134).*(exp(ALGEBRAIC(:,144)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,146)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,134).*ALGEBRAIC(:,145))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,145)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,144)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,146)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,166) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,165);
    ALGEBRAIC(:,163) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,180) = ALGEBRAIC(:,179)+ALGEBRAIC(:,163)+ALGEBRAIC(:,166);
    ALGEBRAIC(:,164) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,181) = ALGEBRAIC(:,179)+ALGEBRAIC(:,164);
    ALGEBRAIC(:,182) = piecewise({ALGEBRAIC(:,166)==0.00000,  1.00000.*CONSTANTS(:,6).*(exp(ALGEBRAIC(:,180)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,181)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( 1.00000.*CONSTANTS(:,6).*ALGEBRAIC(:,166))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,166)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,180)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,181)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,194) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,193);
    ALGEBRAIC(:,191) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,203) = ALGEBRAIC(:,202)+ALGEBRAIC(:,191)+ALGEBRAIC(:,194);
    ALGEBRAIC(:,192) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,204) = ALGEBRAIC(:,202)+ALGEBRAIC(:,192);
    ALGEBRAIC(:,205) = piecewise({ALGEBRAIC(:,194)==0.00000,  1.00000.*CONSTANTS(:,11).*(exp(ALGEBRAIC(:,203)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,204)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( 1.00000.*CONSTANTS(:,11).*ALGEBRAIC(:,194))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,194)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,203)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,204)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,449) = ALGEBRAIC(:,402)+ALGEBRAIC(:,420);
    ALGEBRAIC(:,744) =  CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,726);
    ALGEBRAIC(:,742) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,743) = ALGEBRAIC(:,742)+ CONSTANTS(:,265).*CONSTANTS(:,323).*ALGEBRAIC(:,726);
    ALGEBRAIC(:,741) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,745) = ALGEBRAIC(:,741);
    ALGEBRAIC(:,746) = piecewise({ALGEBRAIC(:,744)==0.00000,  CONSTANTS(:,142).*(exp(ALGEBRAIC(:,743)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,745)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,142).*ALGEBRAIC(:,744))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,744)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,743)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,745)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,558) =  CONSTANTS(:,323).*ALGEBRAIC(:,557);
    ALGEBRAIC(:,555) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,150).*STATES(:,8));
    ALGEBRAIC(:,572) = ALGEBRAIC(:,571)+ALGEBRAIC(:,555)+ALGEBRAIC(:,558);
    ALGEBRAIC(:,556) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,151).*STATES(:,9));
    ALGEBRAIC(:,573) = ALGEBRAIC(:,571)+ALGEBRAIC(:,556);
    ALGEBRAIC(:,574) = piecewise({ALGEBRAIC(:,558)==0.00000,  1.00000.*CONSTANTS(:,135).*(exp(ALGEBRAIC(:,572)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,573)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( 1.00000.*CONSTANTS(:,135).*ALGEBRAIC(:,558))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,558)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,572)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,573)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,448) =  - ALGEBRAIC(:,406) - ALGEBRAIC(:,409);
    ALGEBRAIC(:,83) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,84) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,148).*STATES(:,2));
    ALGEBRAIC(:,85) =  CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,4);
    ALGEBRAIC(:,86) = piecewise({ALGEBRAIC(:,85)==0.00000,  CONSTANTS(:,2).*(exp(ALGEBRAIC(:,83)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,84)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,2).*ALGEBRAIC(:,85))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,85)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,83)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,84)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,730) =  CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,726);
    ALGEBRAIC(:,728) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,729) = ALGEBRAIC(:,728)+ CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,726);
    ALGEBRAIC(:,727) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,148).*STATES(:,2));
    ALGEBRAIC(:,731) = ALGEBRAIC(:,727);
    ALGEBRAIC(:,732) = piecewise({ALGEBRAIC(:,730)==0.00000,  CONSTANTS(:,140).*(exp(ALGEBRAIC(:,729)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,731)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,140).*ALGEBRAIC(:,730))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,730)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,729)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,731)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,354) =  - ALGEBRAIC(:,337);
    ALGEBRAIC(:,748) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,750) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,250).*STATES(:,14));
    ALGEBRAIC(:,751) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,251).*STATES(:,15));
    ALGEBRAIC(:,752) =  CONSTANTS(:,124).*(exp((ALGEBRAIC(:,748)+ALGEBRAIC(:,750))./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,751)./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,515) =   - CONSTANTS(:,326).*ALGEBRAIC(:,512);
    ALGEBRAIC(:,530) =  CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,526);
    ALGEBRAIC(:,519) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,145).*STATES(:,1));
    ALGEBRAIC(:,544) = ALGEBRAIC(:,543)+ALGEBRAIC(:,519)+ALGEBRAIC(:,530);
    ALGEBRAIC(:,523) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,148).*STATES(:,2));
    ALGEBRAIC(:,545) = ALGEBRAIC(:,543)+ALGEBRAIC(:,523);
    ALGEBRAIC(:,546) = piecewise({ALGEBRAIC(:,530)==0.00000,  CONSTANTS(:,81).*(exp(ALGEBRAIC(:,544)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,545)./( CONSTANTS(:,321).*CONSTANTS(:,322)))) },  ((( CONSTANTS(:,81).*ALGEBRAIC(:,530))./( CONSTANTS(:,321).*CONSTANTS(:,322)))./(exp(ALGEBRAIC(:,530)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - 1.00000)).*(exp(ALGEBRAIC(:,544)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp(ALGEBRAIC(:,545)./( CONSTANTS(:,321).*CONSTANTS(:,322)))));
    ALGEBRAIC(:,353) = ALGEBRAIC(:,343);
    ALGEBRAIC(:,749) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,148).*STATES(:,2));
    ALGEBRAIC(:,753) =  CONSTANTS(:,125).*(exp(ALGEBRAIC(:,751)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,749)+ALGEBRAIC(:,750))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
    ALGEBRAIC(:,315) = ALGEBRAIC(:,312)+ALGEBRAIC(:,310);
    ALGEBRAIC(:,87) =   - CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,86);
    ALGEBRAIC(:,705) =  CONSTANTS(:,323).*(((((((((((((((((((((((((((((  - CONSTANTS(:,280).*ALGEBRAIC(:,704)+ CONSTANTS(:,296).*ALGEBRAIC(:,666)) -  CONSTANTS(:,293).*ALGEBRAIC(:,666)+ CONSTANTS(:,296).*ALGEBRAIC(:,678)) -  CONSTANTS(:,293).*ALGEBRAIC(:,678)+ CONSTANTS(:,296).*ALGEBRAIC(:,672)) -  CONSTANTS(:,293).*ALGEBRAIC(:,672)+ CONSTANTS(:,296).*ALGEBRAIC(:,684)) -  CONSTANTS(:,293).*ALGEBRAIC(:,684)+ CONSTANTS(:,296).*ALGEBRAIC(:,698)) -  CONSTANTS(:,293).*ALGEBRAIC(:,698)+ CONSTANTS(:,294).*ALGEBRAIC(:,634)) -  CONSTANTS(:,291).*ALGEBRAIC(:,634)+ CONSTANTS(:,294).*ALGEBRAIC(:,642)) -  CONSTANTS(:,291).*ALGEBRAIC(:,642)+ CONSTANTS(:,295).*ALGEBRAIC(:,654)) -  CONSTANTS(:,292).*ALGEBRAIC(:,654)+ CONSTANTS(:,295).*ALGEBRAIC(:,658)) -  CONSTANTS(:,292).*ALGEBRAIC(:,658)+ CONSTANTS(:,295).*ALGEBRAIC(:,662)) -  CONSTANTS(:,292).*ALGEBRAIC(:,662)+ CONSTANTS(:,296).*ALGEBRAIC(:,690)) -  CONSTANTS(:,293).*ALGEBRAIC(:,690)+ CONSTANTS(:,294).*ALGEBRAIC(:,638)) -  CONSTANTS(:,291).*ALGEBRAIC(:,638)+ CONSTANTS(:,294).*ALGEBRAIC(:,646)) -  CONSTANTS(:,291).*ALGEBRAIC(:,646)+ CONSTANTS(:,295).*ALGEBRAIC(:,650)) -  CONSTANTS(:,292).*ALGEBRAIC(:,650)+ CONSTANTS(:,296).*ALGEBRAIC(:,669)) -  CONSTANTS(:,293).*ALGEBRAIC(:,669)+ CONSTANTS(:,296).*ALGEBRAIC(:,681)) -  CONSTANTS(:,293).*ALGEBRAIC(:,681)+ CONSTANTS(:,296).*ALGEBRAIC(:,675)) -  CONSTANTS(:,293).*ALGEBRAIC(:,675)+ CONSTANTS(:,296).*ALGEBRAIC(:,687)) -  CONSTANTS(:,293).*ALGEBRAIC(:,687)+ CONSTANTS(:,296).*ALGEBRAIC(:,702)) -  CONSTANTS(:,293).*ALGEBRAIC(:,702)+ CONSTANTS(:,294).*ALGEBRAIC(:,636)) -  CONSTANTS(:,291).*ALGEBRAIC(:,636)+ CONSTANTS(:,294).*ALGEBRAIC(:,644)) -  CONSTANTS(:,291).*ALGEBRAIC(:,644)+ CONSTANTS(:,295).*ALGEBRAIC(:,652)) -  CONSTANTS(:,292).*ALGEBRAIC(:,652)+ CONSTANTS(:,295).*ALGEBRAIC(:,656)) -  CONSTANTS(:,292).*ALGEBRAIC(:,656)+ CONSTANTS(:,295).*ALGEBRAIC(:,660)) -  CONSTANTS(:,292).*ALGEBRAIC(:,660)+ CONSTANTS(:,295).*ALGEBRAIC(:,664)) -  CONSTANTS(:,292).*ALGEBRAIC(:,664)+ CONSTANTS(:,296).*ALGEBRAIC(:,694)) -  CONSTANTS(:,293).*ALGEBRAIC(:,694)+ CONSTANTS(:,294).*ALGEBRAIC(:,640)) -  CONSTANTS(:,291).*ALGEBRAIC(:,640)+ CONSTANTS(:,294).*ALGEBRAIC(:,648)) -  CONSTANTS(:,291).*ALGEBRAIC(:,648));
    ALGEBRAIC(:,725) =  CONSTANTS(:,323).*((  - CONSTANTS(:,265).*ALGEBRAIC(:,720)+ CONSTANTS(:,280).*ALGEBRAIC(:,721)+ CONSTANTS(:,298).*ALGEBRAIC(:,724)) -  CONSTANTS(:,297).*ALGEBRAIC(:,724));
    ALGEBRAIC(:,126) =  CONSTANTS(:,323).*((((((((((((((  - CONSTANTS(:,265).*ALGEBRAIC(:,124)+ CONSTANTS(:,312).*ALGEBRAIC(:,118)) -  CONSTANTS(:,310).*ALGEBRAIC(:,118))+ CONSTANTS(:,312).*ALGEBRAIC(:,114)) -  CONSTANTS(:,310).*ALGEBRAIC(:,114))+ CONSTANTS(:,311).*ALGEBRAIC(:,110)) -  CONSTANTS(:,309).*ALGEBRAIC(:,110))+ CONSTANTS(:,311).*ALGEBRAIC(:,106)) -  CONSTANTS(:,309).*ALGEBRAIC(:,106))+ CONSTANTS(:,312).*ALGEBRAIC(:,122)) -  CONSTANTS(:,310).*ALGEBRAIC(:,122))+ CONSTANTS(:,311).*ALGEBRAIC(:,112)) -  CONSTANTS(:,309).*ALGEBRAIC(:,112))+ CONSTANTS(:,311).*ALGEBRAIC(:,108)) -  CONSTANTS(:,309).*ALGEBRAIC(:,108));
    ALGEBRAIC(:,148) =  CONSTANTS(:,323).* - CONSTANTS(:,265).*ALGEBRAIC(:,147);
    ALGEBRAIC(:,140) =  CONSTANTS(:,323).*((  - CONSTANTS(:,265).*ALGEBRAIC(:,138)+ CONSTANTS(:,267).*ALGEBRAIC(:,136)) -  CONSTANTS(:,266).*ALGEBRAIC(:,136));
    ALGEBRAIC(:,162) =  CONSTANTS(:,323).*((  - CONSTANTS(:,265).*ALGEBRAIC(:,160)+ CONSTANTS(:,269).*ALGEBRAIC(:,158)) -  CONSTANTS(:,268).*ALGEBRAIC(:,158));
    ALGEBRAIC(:,190) =  CONSTANTS(:,323).*(  - CONSTANTS(:,265).*ALGEBRAIC(:,182)+ ALGEBRAIC(:,173).*(CONSTANTS(:,271) - CONSTANTS(:,270))+ ALGEBRAIC(:,185).*(CONSTANTS(:,271) - CONSTANTS(:,271))+ ALGEBRAIC(:,177).*(CONSTANTS(:,273) - CONSTANTS(:,272))+ ALGEBRAIC(:,187).*(CONSTANTS(:,273) - CONSTANTS(:,272)));
    ALGEBRAIC(:,210) =  CONSTANTS(:,323).*(  - CONSTANTS(:,265).*ALGEBRAIC(:,205)+ (ALGEBRAIC(:,200)+ALGEBRAIC(:,207)).*(CONSTANTS(:,275) - CONSTANTS(:,274)));
    ALGEBRAIC(:,442) =  CONSTANTS(:,282).*ALGEBRAIC(:,440)+ CONSTANTS(:,281).*ALGEBRAIC(:,431);
    ALGEBRAIC(:,361) =   - CONSTANTS(:,280).*CONSTANTS(:,323).*ALGEBRAIC(:,360);
    ALGEBRAIC(:,733) =  CONSTANTS(:,323).* - CONSTANTS(:,264).*ALGEBRAIC(:,732);
    ALGEBRAIC(:,740) =  CONSTANTS(:,323).* - CONSTANTS(:,280).*ALGEBRAIC(:,739);
    ALGEBRAIC(:,747) =  CONSTANTS(:,323).* - CONSTANTS(:,265).*ALGEBRAIC(:,746);
    ALGEBRAIC(:,352) =  CONSTANTS(:,323).*(  - CONSTANTS(:,276).*ALGEBRAIC(:,349)+ CONSTANTS(:,277).*ALGEBRAIC(:,349));
    ALGEBRAIC(:,754) =   - CONSTANTS(:,264).*CONSTANTS(:,323).*ALGEBRAIC(:,753);
    ALGEBRAIC(:,554) =  CONSTANTS(:,323).*(  - CONSTANTS(:,264).*ALGEBRAIC(:,546)+ ALGEBRAIC(:,537).*(CONSTANTS(:,285) - CONSTANTS(:,283))+ ALGEBRAIC(:,549).*(CONSTANTS(:,285) - CONSTANTS(:,283))+ ALGEBRAIC(:,541).*(CONSTANTS(:,286) - CONSTANTS(:,284))+ ALGEBRAIC(:,551).*(CONSTANTS(:,286) - CONSTANTS(:,284)));
    ALGEBRAIC(:,582) =  CONSTANTS(:,323).*(  - CONSTANTS(:,265).*ALGEBRAIC(:,574)+ (ALGEBRAIC(:,565)+ALGEBRAIC(:,577)).*(CONSTANTS(:,289) - CONSTANTS(:,287))+ (ALGEBRAIC(:,569)+ALGEBRAIC(:,579)).*(CONSTANTS(:,290) - CONSTANTS(:,288)));
    ALGEBRAIC(:,314) =  CONSTANTS(:,323).*((((((((((((((((((( CONSTANTS(:,306).*ALGEBRAIC(:,275) -  CONSTANTS(:,301).*ALGEBRAIC(:,275))+ CONSTANTS(:,307).*ALGEBRAIC(:,283) -  CONSTANTS(:,302).*ALGEBRAIC(:,283))+ CONSTANTS(:,305).*ALGEBRAIC(:,271) -  CONSTANTS(:,300).*ALGEBRAIC(:,271))+ CONSTANTS(:,306).*ALGEBRAIC(:,279) -  CONSTANTS(:,301).*ALGEBRAIC(:,279))+ CONSTANTS(:,307).*ALGEBRAIC(:,287) -  CONSTANTS(:,302).*ALGEBRAIC(:,287))+ CONSTANTS(:,305).*ALGEBRAIC(:,267) -  CONSTANTS(:,300).*ALGEBRAIC(:,267))+ CONSTANTS(:,304).*ALGEBRAIC(:,263) -  CONSTANTS(:,299).*ALGEBRAIC(:,263))+ CONSTANTS(:,304).*ALGEBRAIC(:,259) -  CONSTANTS(:,299).*ALGEBRAIC(:,259))+ CONSTANTS(:,304).*ALGEBRAIC(:,255) -  CONSTANTS(:,299).*ALGEBRAIC(:,255))+ CONSTANTS(:,307).*ALGEBRAIC(:,285) -  CONSTANTS(:,302).*ALGEBRAIC(:,285))+ CONSTANTS(:,306).*ALGEBRAIC(:,277) -  CONSTANTS(:,301).*ALGEBRAIC(:,277))+ CONSTANTS(:,305).*ALGEBRAIC(:,269) -  CONSTANTS(:,300).*ALGEBRAIC(:,269))+ CONSTANTS(:,307).*ALGEBRAIC(:,281) -  CONSTANTS(:,302).*ALGEBRAIC(:,281))+ CONSTANTS(:,306).*ALGEBRAIC(:,273) -  CONSTANTS(:,301).*ALGEBRAIC(:,273))+ CONSTANTS(:,305).*ALGEBRAIC(:,265) -  CONSTANTS(:,300).*ALGEBRAIC(:,265))+ CONSTANTS(:,304).*ALGEBRAIC(:,261) -  CONSTANTS(:,299).*ALGEBRAIC(:,261))+ CONSTANTS(:,304).*ALGEBRAIC(:,257) -  CONSTANTS(:,299).*ALGEBRAIC(:,257))+ CONSTANTS(:,304).*ALGEBRAIC(:,253) -  CONSTANTS(:,299).*ALGEBRAIC(:,253)) - ( CONSTANTS(:,264).*ALGEBRAIC(:,310)+ CONSTANTS(:,264).*ALGEBRAIC(:,312)));
    ALGEBRAIC(:,43) = VOI -  floor(VOI./CONSTANTS(:,318)).*CONSTANTS(:,318);
    ALGEBRAIC(:,47) = piecewise({ALGEBRAIC(:,43)>=0.300000&ALGEBRAIC(:,43)<=0.300000+CONSTANTS(:,319), ( 1.00000.*0.0750000.*CONSTANTS(:,316))./CONSTANTS(:,319) }, 0.00000);
    ALGEBRAIC(:,3) = STATES(:,13)./CONSTANTS(:,315);
    ALGEBRAIC(:,5) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,252).*STATES(:,32));
    ALGEBRAIC(:,6) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,255).*STATES(:,35));
    ALGEBRAIC(:,7) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,253).*STATES(:,33));
    ALGEBRAIC(:,8) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,256).*STATES(:,36));
    ALGEBRAIC(:,9) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,254).*STATES(:,34));
    ALGEBRAIC(:,10) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,152).*STATES(:,38));
    ALGEBRAIC(:,11) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,262).*STATES(:,40));
    ALGEBRAIC(:,12) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,168).*STATES(:,55));
    ALGEBRAIC(:,13) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,169).*STATES(:,56));
    ALGEBRAIC(:,14) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,170).*STATES(:,57));
    ALGEBRAIC(:,15) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,171).*STATES(:,58));
    ALGEBRAIC(:,16) = STATES(:,2)+STATES(:,17)+STATES(:,55)+STATES(:,56)+STATES(:,57)+STATES(:,58)+STATES(:,59)+STATES(:,60);
    ALGEBRAIC(:,17) =  CONSTANTS(:,325).*STATES(:,70)+ CONSTANTS(:,324).*STATES(:,68)+ (CONSTANTS(:,324)+CONSTANTS(:,325)).*STATES(:,69);
    ALGEBRAIC(:,18) =  CONSTANTS(:,326).*STATES(:,74)+ CONSTANTS(:,326).*STATES(:,75)+ CONSTANTS(:,327).*STATES(:,76);
    ALGEBRAIC(:,19) = STATES(:,1)./CONSTANTS(:,329);
    ALGEBRAIC(:,20) = STATES(:,3)./CONSTANTS(:,347);
    ALGEBRAIC(:,21) = STATES(:,13)./CONSTANTS(:,351);
    ALGEBRAIC(:,22) = STATES(:,11)./CONSTANTS(:,329);
    ALGEBRAIC(:,23) = STATES(:,10)./CONSTANTS(:,329);
    ALGEBRAIC(:,24) = STATES(:,12)./CONSTANTS(:,329);
    ALGEBRAIC(:,25) =  (CONSTANTS(:,339)./( CONSTANTS(:,330).*CONSTANTS(:,331).*CONSTANTS(:,332))).*STATES(:,22).*(STATES(:,123)+CONSTANTS(:,330));
    ALGEBRAIC(:,26) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,232).*STATES(:,88));
    ALGEBRAIC(:,27) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,236).*STATES(:,92));
    ALGEBRAIC(:,28) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,233).*STATES(:,89));
    ALGEBRAIC(:,29) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,237).*STATES(:,93));
    ALGEBRAIC(:,30) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,234).*STATES(:,90));
    ALGEBRAIC(:,31) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,238).*STATES(:,94));
    ALGEBRAIC(:,32) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,235).*STATES(:,91));
    ALGEBRAIC(:,33) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,239).*STATES(:,95));
    ALGEBRAIC(:,34) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,240).*STATES(:,96));
    ALGEBRAIC(:,35) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,244).*STATES(:,100));
    ALGEBRAIC(:,36) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,241).*STATES(:,97));
    ALGEBRAIC(:,37) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,245).*STATES(:,101));
    ALGEBRAIC(:,38) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,242).*STATES(:,98));
    ALGEBRAIC(:,39) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,246).*STATES(:,102));
    ALGEBRAIC(:,40) =  CONSTANTS(:,321).*CONSTANTS(:,322).*log( CONSTANTS(:,243).*STATES(:,99));
    ALGEBRAIC(:,42) =  - arbitrary_log(ALGEBRAIC(:,3), 10);
    ALGEBRAIC(:,45) =  (CONSTANTS(:,339)./( CONSTANTS(:,330).*CONSTANTS(:,331).*CONSTANTS(:,332))).*STATES(:,21).*STATES(:,122);
    ALGEBRAIC(:,50) = ALGEBRAIC(:,25)+ALGEBRAIC(:,45);
    ALGEBRAIC(:,68) =  (CONSTANTS(:,342)./ALGEBRAIC(:,61)).*STATES(:,124);
    ALGEBRAIC(:,72) =  (CONSTANTS(:,342)./ALGEBRAIC(:,61)).*(STATES(:,121) - CONSTANTS(:,330));
    ALGEBRAIC(:,73) =  CONSTANTS(:,343).*(exp(( CONSTANTS(:,344).*STATES(:,121))./CONSTANTS(:,330)) - 1.00000);
    ALGEBRAIC(:,76) =  - ALGEBRAIC(:,68)+ALGEBRAIC(:,72);
    ALGEBRAIC(:,77) =  (( CONSTANTS(:,343).*ALGEBRAIC(:,61))./CONSTANTS(:,330)).*ALGEBRAIC(:,67);
    ALGEBRAIC(:,80) = ALGEBRAIC(:,73)+ALGEBRAIC(:,77);
    ALGEBRAIC(:,81) = ALGEBRAIC(:,50)+ALGEBRAIC(:,80);
    ALGEBRAIC(:,480) =  CONSTANTS(:,80).*(exp(ALGEBRAIC(:,478)./( CONSTANTS(:,321).*CONSTANTS(:,322))) - exp((ALGEBRAIC(:,473)+ALGEBRAIC(:,472))./( CONSTANTS(:,321).*CONSTANTS(:,322))));
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

% Compute a logarithm to any base" +
function x = arbitrary_log(a, base)
    x = log(a) ./ log(base);
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

