Generated Code

The following is matlab code generated by the CellML API from this CellML file. (Back to language selection)

The raw code is available.

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

function [VOI, STATES, ALGEBRAIC, CONSTANTS] = solveModel()
    % 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, 10];

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

    % 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);

    % Plot state variables against variable of integration
    [LEGEND_STATES, LEGEND_ALGEBRAIC, LEGEND_VOI, LEGEND_CONSTANTS] = createLegends();
    figure();
    plot(VOI, STATES);
    xlabel(LEGEND_VOI);
    l = legend(LEGEND_STATES);
    set(l,'Interpreter','none');
end

function [LEGEND_STATES, LEGEND_ALGEBRAIC, LEGEND_VOI, LEGEND_CONSTANTS] = createLegends()
    LEGEND_STATES = ''; LEGEND_ALGEBRAIC = ''; LEGEND_VOI = ''; LEGEND_CONSTANTS = '';
    LEGEND_CONSTANTS(:,325) = strpad('AC47_cyt in component ac (uM)');
    LEGEND_CONSTANTS(:,330) = strpad('AC47_eca in component ac (uM)');
    LEGEND_CONSTANTS(:,321) = strpad('AC56_cav in component ac (uM)');
    LEGEND_CONSTANTS(:,329) = strpad('AC56_cyt in component ac (uM)');
    LEGEND_CONSTANTS(:,297) = strpad('AC_tot in component ac (uM)');
    LEGEND_CONSTANTS(:,1) = strpad('ATP in component ac (uM)');
    LEGEND_CONSTANTS(:,2) = strpad('KmATP in component ac (uM)');
    LEGEND_CONSTANTS(:,3) = strpad('KmGiAC56 in component ac (uM)');
    LEGEND_CONSTANTS(:,4) = strpad('KmGsAC47 in component ac (dimensionless)');
    LEGEND_CONSTANTS(:,5) = strpad('KmGsAC56 in component ac (dimensionless)');
    LEGEND_CONSTANTS(:,6) = strpad('KmGsGiAC56 in component ac (dimensionless)');
    LEGEND_ALGEBRAIC(:,1) = strpad('ac_kAC47_cyt_gsa in component ac (dimensionless)');
    LEGEND_ALGEBRAIC(:,2) = strpad('ac_kAC47_eca_gsa in component ac (dimensionless)');
    LEGEND_ALGEBRAIC(:,3) = strpad('ac_kAC56_cav_gsa in component ac (dimensionless)');
    LEGEND_ALGEBRAIC(:,31) = strpad('ac_kAC56_cyt_gsa in component ac (dimensionless)');
    LEGEND_CONSTANTS(:,7) = strpad('afAC47 in component ac (hertz)');
    LEGEND_CONSTANTS(:,8) = strpad('afAC56 in component ac (hertz)');
    LEGEND_CONSTANTS(:,9) = strpad('basalAC47 in component ac (dimensionless)');
    LEGEND_CONSTANTS(:,10) = strpad('basalAC56 in component ac (dimensionless)');
    LEGEND_CONSTANTS(:,295) = strpad('R_b1_tot in component beta (uM)');
    LEGEND_STATES(:,1) = strpad('Gi_bg in component beta_cav (uM)');
    LEGEND_STATES(:,2) = strpad('Gs_aGTP in component beta_cav (uM)');
    LEGEND_STATES(:,3) = strpad('Gs_aGTP in component beta_cyt (uM)');
    LEGEND_STATES(:,4) = strpad('Gs_aGTP in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,69) = strpad('dcAMP_AC47_cyt in component ac (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,68) = strpad('dcAMP_AC47_eca in component ac (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,83) = strpad('dcAMP_AC56_cav in component ac (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,107) = strpad('dcAMP_AC56_cyt in component ac (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_CONSTANTS(:,228) = strpad('fATP in component ac (dimensionless)');
    LEGEND_CONSTANTS(:,11) = strpad('f_AC47_eca in component ac (dimensionless)');
    LEGEND_CONSTANTS(:,261) = strpad('f_AC56_AC47 in component ac (dimensionless)');
    LEGEND_CONSTANTS(:,12) = strpad('f_AC56_cav in component ac (dimensionless)');
    LEGEND_ALGEBRAIC(:,33) = strpad('gsi in component ac (dimensionless)');
    LEGEND_CONSTANTS(:,13) = strpad('hGsAC47 in component ac (dimensionless)');
    LEGEND_CONSTANTS(:,14) = strpad('hGsAC56 in component ac (dimensionless)');
    LEGEND_CONSTANTS(:,15) = strpad('hGsGiAC56 in component ac (dimensionless)');
    LEGEND_ALGEBRAIC(:,56) = strpad('kAC47_cyt in component ac (hertz)');
    LEGEND_ALGEBRAIC(:,32) = strpad('kAC47_eca in component ac (hertz)');
    LEGEND_ALGEBRAIC(:,57) = strpad('kAC56_cav in component ac (hertz)');
    LEGEND_ALGEBRAIC(:,85) = strpad('kAC56_cyt in component ac (hertz)');
    LEGEND_CONSTANTS(:,16) = strpad('vGsGiAC56 in component ac (dimensionless)');
    LEGEND_CONSTANTS(:,320) = strpad('vr_cav in component cell (dimensionless)');
    LEGEND_CONSTANTS(:,322) = strpad('vr_cyt in component cell (dimensionless)');
    LEGEND_CONSTANTS(:,327) = strpad('vr_eca in component cell (dimensionless)');
    LEGEND_CONSTANTS(:,17) = strpad('ICaL_akap in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,392) = strpad('ICaL_akapf in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,393) = strpad('ICaL_arn in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,394) = strpad('ICaL_arp in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,18) = strpad('ICaL_tot in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,282) = strpad('ICaLf in component akap_sig (uM)');
    LEGEND_STATES(:,5) = strpad('ICaLp in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,19) = strpad('Ka_ical in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,20) = strpad('Ka_ryr in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,21) = strpad('Ki in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,22) = strpad('Kp_ical in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,23) = strpad('Kp_ryr in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,24) = strpad('Kr in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,25) = strpad('Li in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,26) = strpad('Lr in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,27) = strpad('Mi in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,28) = strpad('Mr in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,381) = strpad('PKA_cav in component pka (uM)');
    LEGEND_CONSTANTS(:,391) = strpad('PKAf in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,29) = strpad('PP1_cav in component pp1 (uM)');
    LEGEND_CONSTANTS(:,292) = strpad('PP1f_cav in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,30) = strpad('RyR_akap in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,395) = strpad('RyR_akapf in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,396) = strpad('RyR_arn in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,397) = strpad('RyR_arp in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,31) = strpad('RyR_tot in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,294) = strpad('RyRf in component akap_sig (uM)');
    LEGEND_STATES(:,6) = strpad('RyRp in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,274) = strpad('akap_sig_ICaLf_sum in component akap_sig (dimensionless)');
    LEGEND_ALGEBRAIC(:,4) = strpad('akap_sig_ICaLp_dif in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,388) = strpad('akap_sig_PKAf_arg in component akap_sig (dimensionless)');
    LEGEND_CONSTANTS(:,382) = strpad('akap_sig_PKAf_b in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,383) = strpad('akap_sig_PKAf_c in component akap_sig (mM2_times_1e_minus_6)');
    LEGEND_CONSTANTS(:,384) = strpad('akap_sig_PKAf_d in component akap_sig (mM3_times_1e_minus_9)');
    LEGEND_CONSTANTS(:,389) = strpad('akap_sig_PKAf_mag in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,385) = strpad('akap_sig_PKAf_rr in component akap_sig (mol6_per_m18_times_1e_minus_18)');
    LEGEND_CONSTANTS(:,390) = strpad('akap_sig_PKAf_x in component akap_sig (dimensionless)');
    LEGEND_CONSTANTS(:,386) = strpad('akap_sig_PKAf_yi in component akap_sig (mM3_times_1e_minus_9)');
    LEGEND_CONSTANTS(:,387) = strpad('akap_sig_PKAf_yr in component akap_sig (mM3_times_1e_minus_9)');
    LEGEND_CONSTANTS(:,289) = strpad('akap_sig_PP1f_cav_arg in component akap_sig (dimensionless)');
    LEGEND_CONSTANTS(:,283) = strpad('akap_sig_PP1f_cav_b in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,284) = strpad('akap_sig_PP1f_cav_c in component akap_sig (mM2_times_1e_minus_6)');
    LEGEND_CONSTANTS(:,285) = strpad('akap_sig_PP1f_cav_d in component akap_sig (mM3_times_1e_minus_9)');
    LEGEND_CONSTANTS(:,290) = strpad('akap_sig_PP1f_cav_mag in component akap_sig (uM)');
    LEGEND_CONSTANTS(:,286) = strpad('akap_sig_PP1f_cav_rr in component akap_sig (mol6_per_m18_times_1e_minus_18)');
    LEGEND_CONSTANTS(:,291) = strpad('akap_sig_PP1f_cav_x in component akap_sig (dimensionless)');
    LEGEND_CONSTANTS(:,287) = strpad('akap_sig_PP1f_cav_yi in component akap_sig (mM3_times_1e_minus_9)');
    LEGEND_CONSTANTS(:,288) = strpad('akap_sig_PP1f_cav_yr in component akap_sig (mM3_times_1e_minus_9)');
    LEGEND_CONSTANTS(:,293) = strpad('akap_sig_RyRf_sum in component akap_sig (dimensionless)');
    LEGEND_ALGEBRAIC(:,5) = strpad('akap_sig_RyRp_dif in component akap_sig (uM)');
    LEGEND_ALGEBRAIC(:,11) = strpad('fp_ICaL in component akap_sig (dimensionless)');
    LEGEND_ALGEBRAIC(:,39) = strpad('fp_RyR in component akap_sig (dimensionless)');
    LEGEND_CONSTANTS(:,32) = strpad('ka_ical in component akap_sig (hertz)');
    LEGEND_CONSTANTS(:,33) = strpad('ka_ryr in component akap_sig (hertz)');
    LEGEND_CONSTANTS(:,34) = strpad('kp_ical in component akap_sig (hertz)');
    LEGEND_CONSTANTS(:,35) = strpad('kp_ryr in component akap_sig (hertz)');
    LEGEND_STATES(:,7) = strpad('C in component pka_cav (uM)');
    LEGEND_VOI = strpad('time in component engine (ms)');
    LEGEND_CONSTANTS(:,36) = strpad('Gi_tot in component beta (uM)');
    LEGEND_CONSTANTS(:,296) = strpad('Gs_tot in component beta (uM)');
    LEGEND_CONSTANTS(:,298) = strpad('R_b2_tot in component beta (uM)');
    LEGEND_CONSTANTS(:,37) = strpad('f_Gi_cav in component beta (dimensionless)');
    LEGEND_CONSTANTS(:,216) = strpad('f_Gi_eca in component beta (dimensionless)');
    LEGEND_CONSTANTS(:,38) = strpad('f_Gs_cav in component beta (dimensionless)');
    LEGEND_CONSTANTS(:,217) = strpad('f_Gs_cyt in component beta (dimensionless)');
    LEGEND_CONSTANTS(:,39) = strpad('f_Gs_eca in component beta (dimensionless)');
    LEGEND_CONSTANTS(:,40) = strpad('f_Rb1_cav in component beta (dimensionless)');
    LEGEND_CONSTANTS(:,299) = strpad('f_Rb1_cyt in component beta (dimensionless)');
    LEGEND_CONSTANTS(:,41) = strpad('f_Rb1_eca in component beta (dimensionless)');
    LEGEND_CONSTANTS(:,42) = strpad('f_Rb2_cav in component beta (dimensionless)');
    LEGEND_CONSTANTS(:,300) = strpad('f_Rb2_eca in component beta (dimensionless)');
    LEGEND_CONSTANTS(:,43) = strpad('k_act1_Gi in component beta (hertz)');
    LEGEND_CONSTANTS(:,44) = strpad('k_act1_Gs in component beta (hertz)');
    LEGEND_CONSTANTS(:,45) = strpad('k_act2_Gi in component beta (hertz)');
    LEGEND_CONSTANTS(:,46) = strpad('k_act2_Gs in component beta (hertz)');
    LEGEND_CONSTANTS(:,47) = strpad('k_b1_c in component beta (uM)');
    LEGEND_CONSTANTS(:,48) = strpad('k_b1_h in component beta (uM)');
    LEGEND_CONSTANTS(:,49) = strpad('k_b1_l in component beta (uM)');
    LEGEND_CONSTANTS(:,50) = strpad('k_b2_a in component beta (uM)');
    LEGEND_CONSTANTS(:,51) = strpad('k_b2_c in component beta (uM)');
    LEGEND_CONSTANTS(:,52) = strpad('k_b2_f in component beta (uM)');
    LEGEND_CONSTANTS(:,53) = strpad('k_b2_h in component beta (uM)');
    LEGEND_CONSTANTS(:,54) = strpad('k_b2_l in component beta (uM)');
    LEGEND_CONSTANTS(:,55) = strpad('k_b2_n in component beta (uM)');
    LEGEND_CONSTANTS(:,218) = strpad('k_grk_dp in component beta (hertz)');
    LEGEND_CONSTANTS(:,219) = strpad('k_grk_p in component beta (hertz)');
    LEGEND_CONSTANTS(:,220) = strpad('k_hydr_Gi in component beta (hertz)');
    LEGEND_CONSTANTS(:,56) = strpad('k_hydr_Gs in component beta (hertz)');
    LEGEND_CONSTANTS(:,258) = strpad('k_pka_dp in component beta (hertz)');
    LEGEND_CONSTANTS(:,221) = strpad('k_pka_p in component beta (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,222) = strpad('k_reas_Gi in component beta (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,57) = strpad('k_reas_Gs in component beta (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,58) = strpad('rate_bds in component beta (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,59) = strpad('GRK in component beta_cav (dimensionless)');
    LEGEND_STATES(:,8) = strpad('Gi_aGDP in component beta_cav (uM)');
    LEGEND_STATES(:,9) = strpad('Gi_aGTP in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,6) = strpad('Gi_abg in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,87) = strpad('Gi_f in component beta_cav (uM)');
    LEGEND_STATES(:,10) = strpad('Gs_aGDP in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,7) = strpad('Gs_abg in component beta_cav (uM)');
    LEGEND_STATES(:,11) = strpad('Gs_bg in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,157) = strpad('Gs_f in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,189) = strpad('LRGs_tot in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,165) = strpad('LRb1 in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,169) = strpad('LRb1Gs in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,181) = strpad('LRb2 in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,109) = strpad('LRb2Gi in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,185) = strpad('LRb2Gs in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,197) = strpad('RGs_tot in component beta_cav (uM)');
    LEGEND_CONSTANTS(:,323) = strpad('R_b1_tot in component beta_cav (uM)');
    LEGEND_CONSTANTS(:,324) = strpad('R_b2_tot in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,173) = strpad('Rb1Gs in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,161) = strpad('Rb1_f in component beta_cav (uM)');
    LEGEND_STATES(:,12) = strpad('Rb1_grk_tot in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,34) = strpad('Rb1_np_tot in component beta_cav (uM)');
    LEGEND_STATES(:,13) = strpad('Rb1_pka_tot in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,99) = strpad('Rb2Gi in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,193) = strpad('Rb2Gs in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,177) = strpad('Rb2_f in component beta_cav (uM)');
    LEGEND_STATES(:,14) = strpad('Rb2_grk_tot in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,58) = strpad('Rb2_np_tot in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,71) = strpad('Rb2_pka_f in component beta_cav (uM)');
    LEGEND_STATES(:,15) = strpad('Rb2_pka_tot in component beta_cav (uM)');
    LEGEND_CONSTANTS(:,224) = strpad('beta_cav_Gs_f_a in component beta_cav (mol4_per_m12_times_1e_minus_12)');
    LEGEND_ALGEBRAIC(:,132) = strpad('beta_cav_Gs_f_arg in component beta_cav (dimensionless)');
    LEGEND_ALGEBRAIC(:,70) = strpad('beta_cav_Gs_f_b in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,86) = strpad('beta_cav_Gs_f_c in component beta_cav (mM2_times_1e_minus_6)');
    LEGEND_CONSTANTS(:,259) = strpad('beta_cav_Gs_f_c11 in component beta_cav (mol5_per_m15_times_1e_minus_15)');
    LEGEND_CONSTANTS(:,272) = strpad('beta_cav_Gs_f_c22 in component beta_cav (mol5_per_m15_times_1e_minus_15)');
    LEGEND_CONSTANTS(:,280) = strpad('beta_cav_Gs_f_c33 in component beta_cav (mol6_per_m18_times_1e_minus_18)');
    LEGEND_ALGEBRAIC(:,98) = strpad('beta_cav_Gs_f_d in component beta_cav (mM3_times_1e_minus_9)');
    LEGEND_ALGEBRAIC(:,148) = strpad('beta_cav_Gs_f_i in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,138) = strpad('beta_cav_Gs_f_mag in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,152) = strpad('beta_cav_Gs_f_r in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,110) = strpad('beta_cav_Gs_f_rr in component beta_cav (mol6_per_m18_times_1e_minus_18)');
    LEGEND_ALGEBRAIC(:,143) = strpad('beta_cav_Gs_f_x in component beta_cav (dimensionless)');
    LEGEND_ALGEBRAIC(:,118) = strpad('beta_cav_Gs_f_yi in component beta_cav (mM3_times_1e_minus_9)');
    LEGEND_ALGEBRAIC(:,126) = strpad('beta_cav_Gs_f_yr in component beta_cav (mM3_times_1e_minus_9)');
    LEGEND_CONSTANTS(:,223) = strpad('beta_cav_Rb2_pka_f_a in component beta_cav (uM)');
    LEGEND_ALGEBRAIC(:,35) = strpad('beta_cav_Rb2_pka_f_b in component beta_cav (mM2_times_1e_minus_6)');
    LEGEND_ALGEBRAIC(:,59) = strpad('beta_cav_Rb2_pka_f_c in component beta_cav (mM3_times_1e_minus_9)');
    LEGEND_CONSTANTS(:,60) = strpad('L in component iso (uM)');
    LEGEND_CONSTANTS(:,61) = strpad('k_GsAct_b2 in component beta_cav (dimensionless)');
    LEGEND_CONSTANTS(:,62) = strpad('GRK in component beta_cyt (dimensionless)');
    LEGEND_STATES(:,16) = strpad('Gs_aGDP in component beta_cyt (uM)');
    LEGEND_ALGEBRAIC(:,8) = strpad('Gs_abg in component beta_cyt (uM)');
    LEGEND_STATES(:,17) = strpad('Gs_bg in component beta_cyt (uM)');
    LEGEND_ALGEBRAIC(:,100) = strpad('Gs_f in component beta_cyt (uM)');
    LEGEND_ALGEBRAIC(:,111) = strpad('LRb1Gs_np in component beta_cyt (uM)');
    LEGEND_ALGEBRAIC(:,119) = strpad('LRb1_np in component beta_cyt (uM)');
    LEGEND_CONSTANTS(:,326) = strpad('R_b1_tot in component beta_cyt (uM)');
    LEGEND_ALGEBRAIC(:,120) = strpad('Rb1Gs_np in component beta_cyt (uM)');
    LEGEND_STATES(:,18) = strpad('Rb1_grk_tot in component beta_cyt (uM)');
    LEGEND_ALGEBRAIC(:,88) = strpad('Rb1_np_f in component beta_cyt (uM)');
    LEGEND_ALGEBRAIC(:,36) = strpad('Rb1_np_tot in component beta_cyt (uM)');
    LEGEND_STATES(:,19) = strpad('Rb1_pka_tot in component beta_cyt (uM)');
    LEGEND_CONSTANTS(:,225) = strpad('beta_cyt_Rb1_np_f_a in component beta_cyt (uM)');
    LEGEND_ALGEBRAIC(:,60) = strpad('beta_cyt_Rb1_np_f_b in component beta_cyt (mM2_times_1e_minus_6)');
    LEGEND_ALGEBRAIC(:,72) = strpad('beta_cyt_Rb1_np_f_c in component beta_cyt (mM3_times_1e_minus_9)');
    LEGEND_STATES(:,20) = strpad('C in component pka_cyt (uM)');
    LEGEND_CONSTANTS(:,63) = strpad('GRK in component beta_eca (dimensionless)');
    LEGEND_STATES(:,21) = strpad('Gi_aGDP in component beta_eca (uM)');
    LEGEND_STATES(:,22) = strpad('Gi_aGTP in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,9) = strpad('Gi_abg in component beta_eca (uM)');
    LEGEND_STATES(:,23) = strpad('Gi_bg in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,90) = strpad('Gi_f in component beta_eca (uM)');
    LEGEND_STATES(:,24) = strpad('Gs_aGDP in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,10) = strpad('Gs_abg in component beta_eca (uM)');
    LEGEND_STATES(:,25) = strpad('Gs_bg in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,158) = strpad('Gs_f in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,190) = strpad('LRGs_tot in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,166) = strpad('LRb1 in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,170) = strpad('LRb1Gs in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,182) = strpad('LRb2 in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,112) = strpad('LRb2Gi in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,186) = strpad('LRb2Gs in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,198) = strpad('RGs_tot in component beta_eca (uM)');
    LEGEND_CONSTANTS(:,331) = strpad('R_b1_tot in component beta_eca (uM)');
    LEGEND_CONSTANTS(:,332) = strpad('R_b2_tot in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,174) = strpad('Rb1Gs in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,162) = strpad('Rb1_f in component beta_eca (uM)');
    LEGEND_STATES(:,26) = strpad('Rb1_grk_tot in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,37) = strpad('Rb1_np_tot in component beta_eca (uM)');
    LEGEND_STATES(:,27) = strpad('Rb1_pka_tot in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,102) = strpad('Rb2Gi in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,194) = strpad('Rb2Gs in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,178) = strpad('Rb2_f in component beta_eca (uM)');
    LEGEND_STATES(:,28) = strpad('Rb2_grk_tot in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,61) = strpad('Rb2_np_tot in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,74) = strpad('Rb2_pka_f in component beta_eca (uM)');
    LEGEND_STATES(:,29) = strpad('Rb2_pka_tot in component beta_eca (uM)');
    LEGEND_CONSTANTS(:,227) = strpad('beta_eca_Gs_f_a in component beta_eca (mol4_per_m12_times_1e_minus_12)');
    LEGEND_ALGEBRAIC(:,133) = strpad('beta_eca_Gs_f_arg in component beta_eca (dimensionless)');
    LEGEND_ALGEBRAIC(:,73) = strpad('beta_eca_Gs_f_b in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,89) = strpad('beta_eca_Gs_f_c in component beta_eca (mM2_times_1e_minus_6)');
    LEGEND_CONSTANTS(:,260) = strpad('beta_eca_Gs_f_c11 in component beta_eca (mol5_per_m15_times_1e_minus_15)');
    LEGEND_CONSTANTS(:,273) = strpad('beta_eca_Gs_f_c22 in component beta_eca (mol5_per_m15_times_1e_minus_15)');
    LEGEND_CONSTANTS(:,281) = strpad('beta_eca_Gs_f_c33 in component beta_eca (mol6_per_m18_times_1e_minus_18)');
    LEGEND_ALGEBRAIC(:,101) = strpad('beta_eca_Gs_f_d in component beta_eca (mM3_times_1e_minus_9)');
    LEGEND_ALGEBRAIC(:,149) = strpad('beta_eca_Gs_f_i in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,139) = strpad('beta_eca_Gs_f_mag in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,153) = strpad('beta_eca_Gs_f_r in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,113) = strpad('beta_eca_Gs_f_rr in component beta_eca (mol6_per_m18_times_1e_minus_18)');
    LEGEND_ALGEBRAIC(:,144) = strpad('beta_eca_Gs_f_x in component beta_eca (dimensionless)');
    LEGEND_ALGEBRAIC(:,121) = strpad('beta_eca_Gs_f_yi in component beta_eca (mM3_times_1e_minus_9)');
    LEGEND_ALGEBRAIC(:,127) = strpad('beta_eca_Gs_f_yr in component beta_eca (mM3_times_1e_minus_9)');
    LEGEND_CONSTANTS(:,226) = strpad('beta_eca_Rb2_pka_f_a in component beta_eca (uM)');
    LEGEND_ALGEBRAIC(:,38) = strpad('beta_eca_Rb2_pka_f_b in component beta_eca (mM2_times_1e_minus_6)');
    LEGEND_ALGEBRAIC(:,62) = strpad('beta_eca_Rb2_pka_f_c in component beta_eca (mM3_times_1e_minus_9)');
    LEGEND_CONSTANTS(:,64) = strpad('k_GsAct_b2 in component beta_eca (dimensionless)');
    LEGEND_STATES(:,30) = strpad('C in component pka_eca (uM)');
    LEGEND_CONSTANTS(:,303) = strpad('AF in component cell (m2_mol_per_s_per_A_times_1e_minus_4)');
    LEGEND_ALGEBRAIC(:,187) = strpad('Ca in component calcium (mM)');
    LEGEND_ALGEBRAIC(:,103) = strpad('Ca_CaL in component calcium (mM)');
    LEGEND_ALGEBRAIC(:,128) = strpad('Ca_jsr in component calcium (mM)');
    LEGEND_STATES(:,31) = strpad('Ca_nsr in component calcium (mM)');
    LEGEND_ALGEBRAIC(:,150) = strpad('Ca_sr in component calcium (mM)');
    LEGEND_ALGEBRAIC(:,306) = strpad('ICa_tot in component calcium (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,218) = strpad('ICab in component icab (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,298) = strpad('INaCa in component inaca (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,292) = strpad('INaCaSR in component inaca (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,202) = strpad('Idiff_Ca in component diff (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,210) = strpad('Idiff_sr in component diff (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,305) = strpad('IpCa in component ipca (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,320) = strpad('Irel in component irel (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,212) = strpad('Itr in component diff (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,329) = strpad('Iup in component iup (mM_per_ms)');
    LEGEND_CONSTANTS(:,65) = strpad('Ka_tni in component calcium (uM)');
    LEGEND_CONSTANTS(:,66) = strpad('Kp_tni in component calcium (uM)');
    LEGEND_CONSTANTS(:,67) = strpad('PP2A in component pp1 (uM)');
    LEGEND_CONSTANTS(:,229) = strpad('bar_sum in component calcium (mM)');
    LEGEND_CONSTANTS(:,68) = strpad('bsl_bar in component calcium (mM)');
    LEGEND_CONSTANTS(:,69) = strpad('bsl_km in component calcium (mM)');
    LEGEND_CONSTANTS(:,70) = strpad('bsr_bar in component calcium (mM)');
    LEGEND_CONSTANTS(:,71) = strpad('bsr_km in component calcium (mM)');
    LEGEND_ALGEBRAIC(:,63) = strpad('calcium_Ca_CaL_b in component calcium (mM)');
    LEGEND_ALGEBRAIC(:,75) = strpad('calcium_Ca_CaL_c in component calcium (mM2)');
    LEGEND_ALGEBRAIC(:,91) = strpad('calcium_Ca_CaL_d in component calcium (mM3)');
    LEGEND_ALGEBRAIC(:,179) = strpad('calcium_Ca_b in component calcium (mM)');
    LEGEND_ALGEBRAIC(:,183) = strpad('calcium_Ca_c in component calcium (mM2)');
    LEGEND_ALGEBRAIC(:,171) = strpad('calcium_Ca_d in component calcium (mM3)');
    LEGEND_ALGEBRAIC(:,114) = strpad('calcium_Ca_jsr_b in component calcium (mM)');
    LEGEND_ALGEBRAIC(:,122) = strpad('calcium_Ca_jsr_c in component calcium (mM2)');
    LEGEND_CONSTANTS(:,313) = strpad('calcium_Ca_nsr_r1 in component calcium (dimensionless)');
    LEGEND_ALGEBRAIC(:,134) = strpad('calcium_Ca_sr_b in component calcium (mM)');
    LEGEND_ALGEBRAIC(:,140) = strpad('calcium_Ca_sr_c in component calcium (mM2)');
    LEGEND_ALGEBRAIC(:,145) = strpad('calcium_Ca_sr_d in component calcium (mM3)');
    LEGEND_ALGEBRAIC(:,154) = strpad('calcium_fhat_val in component calcium (dimensionless)');
    LEGEND_CONSTANTS(:,306) = strpad('calcium_uCa_CaL_r1 in component calcium (mol_per_m_per_s_per_A_times_1e5)');
    LEGEND_CONSTANTS(:,316) = strpad('calcium_uCa_CaL_r2 in component calcium (dimensionless)');
    LEGEND_CONSTANTS(:,309) = strpad('calcium_uCa_r1 in component calcium (mol_per_m_per_s_per_A_times_1e5)');
    LEGEND_CONSTANTS(:,314) = strpad('calcium_uCa_r2 in component calcium (dimensionless)');
    LEGEND_CONSTANTS(:,317) = strpad('calcium_uCa_sr_r1 in component calcium (mol_per_m_per_s_per_A_times_1e5)');
    LEGEND_CONSTANTS(:,318) = strpad('calcium_uCa_sr_r2 in component calcium (dimensionless)');
    LEGEND_CONSTANTS(:,72) = strpad('cbar in component calcium (mM)');
    LEGEND_CONSTANTS(:,73) = strpad('csqn_bar in component calcium (mM)');
    LEGEND_CONSTANTS(:,74) = strpad('csqn_km in component calcium (mM)');
    LEGEND_STATES(:,32) = strpad('f_tni in component calcium (dimensionless)');
    LEGEND_ALGEBRAIC(:,159) = strpad('fhat in component calcium (dimensionless)');
    LEGEND_ALGEBRAIC(:,249) = strpad('ICaL in component ical (uA_per_cm2)');
    LEGEND_CONSTANTS(:,75) = strpad('ka_tni in component calcium (hertz)');
    LEGEND_CONSTANTS(:,76) = strpad('kc in component calcium (mM)');
    LEGEND_CONSTANTS(:,231) = strpad('km_pro in component calcium (mM2)');
    LEGEND_CONSTANTS(:,262) = strpad('km_sum in component calcium (mM)');
    LEGEND_CONSTANTS(:,77) = strpad('kp_tni in component calcium (hertz)');
    LEGEND_ALGEBRAIC(:,167) = strpad('kpro in component calcium (mM2)');
    LEGEND_ALGEBRAIC(:,175) = strpad('ksum in component calcium (mM)');
    LEGEND_ALGEBRAIC(:,163) = strpad('kt in component calcium (mM)');
    LEGEND_CONSTANTS(:,78) = strpad('ktn in component calcium (mM)');
    LEGEND_CONSTANTS(:,230) = strpad('ktp in component calcium (mM)');
    LEGEND_CONSTANTS(:,319) = strpad('r3 in component calcium (dimensionless)');
    LEGEND_CONSTANTS(:,263) = strpad('ss_pro in component calcium (mM2)');
    LEGEND_CONSTANTS(:,275) = strpad('ss_sum in component calcium (mM)');
    LEGEND_CONSTANTS(:,79) = strpad('tbar in component calcium (mM)');
    LEGEND_STATES(:,33) = strpad('uCa in component calcium (mM)');
    LEGEND_STATES(:,34) = strpad('uCa_CaL in component calcium (mM)');
    LEGEND_STATES(:,35) = strpad('uCa_jsr in component calcium (mM)');
    LEGEND_STATES(:,36) = strpad('uCa_sr in component calcium (mM)');
    LEGEND_CONSTANTS(:,305) = strpad('v_CaL in component cell (uL)');
    LEGEND_CONSTANTS(:,308) = strpad('v_cyt in component cell (uL)');
    LEGEND_CONSTANTS(:,311) = strpad('v_jsr in component cell (uL)');
    LEGEND_CONSTANTS(:,312) = strpad('v_nsr in component cell (uL)');
    LEGEND_CONSTANTS(:,315) = strpad('v_sr in component cell (uL)');
    LEGEND_CONSTANTS(:,80) = strpad('CaMK0 in component camk (dimensionless)');
    LEGEND_CONSTANTS(:,81) = strpad('K in component camk (dimensionless)');
    LEGEND_CONSTANTS(:,82) = strpad('Km in component camk (mM)');
    LEGEND_CONSTANTS(:,83) = strpad('PP1_eca in component pp1 (uM)');
    LEGEND_ALGEBRAIC(:,207) = strpad('PP1_tot in component camk (uM)');
    LEGEND_ALGEBRAIC(:,204) = strpad('PP1f_cyt in component pp1 (uM)');
    LEGEND_ALGEBRAIC(:,195) = strpad('active in component camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,191) = strpad('bound in component camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,200) = strpad('c in component camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,201) = strpad('camk_f_ryr_d in component camk (dimensionless)');
    LEGEND_CONSTANTS(:,84) = strpad('camk_trap_alpha in component camk (mS_per_uF)');
    LEGEND_CONSTANTS(:,85) = strpad('camk_trap_beta in component camk (mS_per_uF)');
    LEGEND_STATES(:,37) = strpad('f_ical in component camk (dimensionless)');
    LEGEND_STATES(:,38) = strpad('f_ik1 in component camk (dimensionless)');
    LEGEND_STATES(:,39) = strpad('f_ina in component camk (dimensionless)');
    LEGEND_STATES(:,40) = strpad('f_ito in component camk (dimensionless)');
    LEGEND_STATES(:,41) = strpad('f_plb in component camk (dimensionless)');
    LEGEND_STATES(:,42) = strpad('f_ryr in component camk (dimensionless)');
    LEGEND_CONSTANTS(:,232) = strpad('tau_cal in component camk (ms)');
    LEGEND_CONSTANTS(:,233) = strpad('tau_ik1 in component camk (ms)');
    LEGEND_CONSTANTS(:,234) = strpad('tau_ina in component camk (ms)');
    LEGEND_CONSTANTS(:,235) = strpad('tau_ito in component camk (ms)');
    LEGEND_CONSTANTS(:,86) = strpad('tau_plb in component camk (ms)');
    LEGEND_CONSTANTS(:,87) = strpad('tau_ryr in component camk (ms)');
    LEGEND_STATES(:,43) = strpad('trap in component camk (dimensionless)');
    LEGEND_STATES(:,44) = strpad('cAMP_cav in component camp (uM)');
    LEGEND_STATES(:,45) = strpad('cAMP_cyt in component camp (uM)');
    LEGEND_STATES(:,46) = strpad('cAMP_eca in component camp (uM)');
    LEGEND_ALGEBRAIC(:,96) = strpad('camp_cAMP_cav_j1 in component camp (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,106) = strpad('camp_cAMP_cav_j2 in component camp (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,136) = strpad('camp_cAMP_cav_pde in component camp (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,116) = strpad('camp_cAMP_cyt_j1 in component camp (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,124) = strpad('camp_cAMP_cyt_j2 in component camp (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,147) = strpad('camp_cAMP_cyt_pde in component camp (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,84) = strpad('camp_cAMP_eca_j1 in component camp (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,97) = strpad('camp_cAMP_eca_j2 in component camp (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,125) = strpad('camp_cAMP_eca_pde in component camp (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,115) = strpad('dcAMP_PDE2_cav in component pde (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,130) = strpad('dcAMP_PDE2_cyt in component pde (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,108) = strpad('dcAMP_PDE2_eca in component pde (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,123) = strpad('dcAMP_PDE3_cav in component pde (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,137) = strpad('dcAMP_PDE3_cyt in component pde (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,129) = strpad('dcAMP_PDE4_cav in component pde (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,142) = strpad('dcAMP_PDE4_cyt in component pde (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,117) = strpad('dcAMP_PDE4_eca in component pde (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_CONSTANTS(:,236) = strpad('j_cav_cyt in component camp (m3_per_s_times_1e_minus_9)');
    LEGEND_CONSTANTS(:,237) = strpad('j_cav_eca in component camp (m3_per_s_times_1e_minus_9)');
    LEGEND_CONSTANTS(:,238) = strpad('j_eca_cyt in component camp (m3_per_s_times_1e_minus_9)');
    LEGEND_ALGEBRAIC(:,146) = strpad('dcAMP in component pka_cav (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,155) = strpad('dcAMP in component pka_cyt (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_ALGEBRAIC(:,135) = strpad('dcAMP in component pka_eca (mol_per_m3_per_s_times_1e_minus_3)');
    LEGEND_CONSTANTS(:,307) = strpad('v_cav in component cell (uL)');
    LEGEND_CONSTANTS(:,310) = strpad('v_eca in component cell (uL)');
    LEGEND_CONSTANTS(:,88) = strpad('F in component phys (C_per_mol)');
    LEGEND_CONSTANTS(:,302) = strpad('capArea in component cell (cm2)');
    LEGEND_CONSTANTS(:,301) = strpad('geoArea in component cell (cm2)');
    LEGEND_CONSTANTS(:,89) = strpad('length in component cell (cm)');
    LEGEND_CONSTANTS(:,90) = strpad('pi in component cell (dimensionless)');
    LEGEND_CONSTANTS(:,91) = strpad('radius in component cell (cm)');
    LEGEND_CONSTANTS(:,304) = strpad('volume in component cell (uL)');
    LEGEND_ALGEBRAIC(:,334) = strpad('CTKCl in component ctkcl (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,355) = strpad('CTNaCl in component ctnacl (mM_per_ms)');
    LEGEND_STATES(:,47) = strpad('Cl in component chloride (mM)');
    LEGEND_STATES(:,48) = strpad('Cl_sr in component chloride (mM)');
    LEGEND_ALGEBRAIC(:,324) = strpad('IClCa in component iclca (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,331) = strpad('ICl_tot in component chloride (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,330) = strpad('IClb in component iclb (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,205) = strpad('Idiff_Cl in component diff (mM_per_ms)');
    LEGEND_CONSTANTS(:,333) = strpad('chloride_Cl_r1 in component chloride (mol_per_m_per_s_per_A_times_1e5)');
    LEGEND_CONSTANTS(:,338) = strpad('chloride_Cl_r2 in component chloride (dimensionless)');
    LEGEND_CONSTANTS(:,342) = strpad('chloride_Cl_sr_r1 in component chloride (mol_per_m_per_s_per_A_times_1e5)');
    LEGEND_ALGEBRAIC(:,328) = strpad('ECl in component nernst (mV)');
    LEGEND_ALGEBRAIC(:,332) = strpad('EK in component nernst (mV)');
    LEGEND_CONSTANTS(:,92) = strpad('KClBar in component ctkcl (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,333) = strpad('ctkcl_CTKCl_z1 in component ctkcl (mV)');
    LEGEND_CONSTANTS(:,93) = strpad('ctkcl_CTKCl_z2 in component ctkcl (mV)');
    LEGEND_ALGEBRAIC(:,353) = strpad('ENa in component nernst (mV)');
    LEGEND_CONSTANTS(:,94) = strpad('NaClBar in component ctnacl (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,354) = strpad('ctnacl_CTNaCl_z1 in component ctnacl (g4_m8_per_s12_per_A4)');
    LEGEND_CONSTANTS(:,347) = strpad('ctnacl_CTNaCl_z2 in component ctnacl (g4_m8_per_s12_per_A4)');
    LEGEND_ALGEBRAIC(:,208) = strpad('Idiff_Na in component diff (mM_per_ms)');
    LEGEND_STATES(:,49) = strpad('Na in component sodium (mM)');
    LEGEND_STATES(:,50) = strpad('Na_sr in component sodium (mM)');
    LEGEND_CONSTANTS(:,95) = strpad('tau in component diff (ms)');
    LEGEND_CONSTANTS(:,96) = strpad('tau_sr in component diff (ms)');
    LEGEND_CONSTANTS(:,97) = strpad('tau_tr in component diff (ms)');
    LEGEND_CONSTANTS(:,98) = strpad('Cao in component extra (mM)');
    LEGEND_CONSTANTS(:,99) = strpad('Clo in component extra (mM)');
    LEGEND_CONSTANTS(:,100) = strpad('Ko in component extra (mM)');
    LEGEND_CONSTANTS(:,101) = strpad('Nao in component extra (mM)');
    LEGEND_CONSTANTS(:,264) = strpad('FRT in component phys (per_mV)');
    LEGEND_STATES(:,51) = strpad('V in component membrane (mV)');
    LEGEND_ALGEBRAIC(:,216) = strpad('efrt in component icab (dimensionless)');
    LEGEND_CONSTANTS(:,102) = strpad('pCab in component icab (cm_per_s)');
    LEGEND_ALGEBRAIC(:,214) = strpad('vfrt in component icab (dimensionless)');
    LEGEND_ALGEBRAIC(:,224) = strpad('f_hat in component ical (dimensionless)');
    LEGEND_ALGEBRAIC(:,236) = strpad('ICaL in component ical_camk (uA_per_cm2)');
    LEGEND_CONSTANTS(:,398) = strpad('ical_f_hat_ratio in component ical (dimensionless)');
    LEGEND_ALGEBRAIC(:,221) = strpad('ical_f_hat_val in component ical (dimensionless)');
    LEGEND_ALGEBRAIC(:,247) = strpad('ICaL in component ical_np (uA_per_cm2)');
    LEGEND_STATES(:,52) = strpad('C in component ical_camk (dimensionless)');
    LEGEND_STATES(:,53) = strpad('CI in component ical_camk (dimensionless)');
    LEGEND_STATES(:,54) = strpad('CIs in component ical_camk (dimensionless)');
    LEGEND_STATES(:,55) = strpad('Cs in component ical_camk (dimensionless)');
    LEGEND_CONSTANTS(:,276) = strpad('FFRT in component phys (s4_A2_per_g_per_m2_per_mol)');
    LEGEND_ALGEBRAIC(:,233) = strpad('IBar in component ical_camk (uA_per_cm2)');
    LEGEND_STATES(:,56) = strpad('O in component ical_camk (dimensionless)');
    LEGEND_STATES(:,57) = strpad('OI in component ical_camk (dimensionless)');
    LEGEND_STATES(:,58) = strpad('OIs in component ical_camk (dimensionless)');
    LEGEND_STATES(:,59) = strpad('Os in component ical_camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,227) = strpad('PCa in component ical_camk (cm_per_s)');
    LEGEND_ALGEBRAIC(:,156) = strpad('ac_inf in component ical_camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,196) = strpad('ac_tau in component ical_np (ms)');
    LEGEND_ALGEBRAIC(:,203) = strpad('alpha in component ical_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,206) = strpad('beta in component ical_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,184) = strpad('delta in component ical_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,243) = strpad('delta1 in component ical_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,160) = strpad('delta_tau in component ical_camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,230) = strpad('ical_camk_IBar_vv in component ical_camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,231) = strpad('ical_camk_delta1_xs_cor in component ical_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,237) = strpad('ical_camk_delta1_y_cor in component ical_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,215) = strpad('in_a in component ical_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,217) = strpad('in_b in component ical_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,168) = strpad('in_hi_inf in component ical_camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,219) = strpad('in_hi_tau in component ical_camk (ms)');
    LEGEND_ALGEBRAIC(:,164) = strpad('in_inf in component ical_camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,172) = strpad('in_lo_inf in component ical_camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,222) = strpad('in_lo_tau in component ical_camk (ms)');
    LEGEND_ALGEBRAIC(:,188) = strpad('inca in component ical_camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,176) = strpad('ss_cal_10 in component ical_camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,180) = strpad('ss_cal_4 in component ical_camk (dimensionless)');
    LEGEND_CONSTANTS(:,103) = strpad('theta in component ical_camk (mS_per_uF)');
    LEGEND_CONSTANTS(:,104) = strpad('theta1 in component ical_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,225) = strpad('x in component ical_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,228) = strpad('xs in component ical_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,234) = strpad('y in component ical_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,240) = strpad('ys in component ical_camk (mS_per_uF)');
    LEGEND_STATES(:,60) = strpad('C in component ical_np (dimensionless)');
    LEGEND_STATES(:,61) = strpad('CI in component ical_np (dimensionless)');
    LEGEND_STATES(:,62) = strpad('CIs in component ical_np (dimensionless)');
    LEGEND_STATES(:,63) = strpad('Cs in component ical_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,245) = strpad('IBar in component ical_np (uA_per_cm2)');
    LEGEND_STATES(:,64) = strpad('O in component ical_np (dimensionless)');
    LEGEND_STATES(:,65) = strpad('OI in component ical_np (dimensionless)');
    LEGEND_STATES(:,66) = strpad('OIs in component ical_np (dimensionless)');
    LEGEND_STATES(:,67) = strpad('Os in component ical_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,239) = strpad('PCa in component ical_np (cm_per_s)');
    LEGEND_ALGEBRAIC(:,192) = strpad('ac_inf in component ical_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,209) = strpad('alpha in component ical_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,211) = strpad('beta in component ical_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,238) = strpad('delta in component ical_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,261) = strpad('delta1 in component ical_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,213) = strpad('delta_tau in component ical_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,242) = strpad('ical_np_IBar_vv in component ical_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,250) = strpad('ical_np_delta1_xs_cor in component ical_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,255) = strpad('ical_np_delta1_y_cor in component ical_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,223) = strpad('in_hi_inf in component ical_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,244) = strpad('in_hi_tau in component ical_np (ms)');
    LEGEND_ALGEBRAIC(:,220) = strpad('in_inf in component ical_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,226) = strpad('in_lo_inf in component ical_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,229) = strpad('in_lo_tau in component ical_np (ms)');
    LEGEND_ALGEBRAIC(:,241) = strpad('inca in component ical_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,232) = strpad('ss_cal_10 in component ical_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,235) = strpad('ss_cal_4 in component ical_np (dimensionless)');
    LEGEND_CONSTANTS(:,105) = strpad('theta in component ical_np (mS_per_uF)');
    LEGEND_CONSTANTS(:,106) = strpad('theta1 in component ical_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,246) = strpad('x in component ical_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,248) = strpad('xs in component ical_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,252) = strpad('y in component ical_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,258) = strpad('ys in component ical_np (mS_per_uF)');
    LEGEND_CONSTANTS(:,107) = strpad('Gbar in component iclb (mS_per_cm2)');
    LEGEND_ALGEBRAIC(:,254) = strpad('IClCa_bar in component iclca (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,318) = strpad('Irel_pure in component irel (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,321) = strpad('KClCa in component iclca (dimensionless)');
    LEGEND_CONSTANTS(:,108) = strpad('PCl in component iclca (cm_per_s)');
    LEGEND_STATES(:,68) = strpad('i2 in component iclca (dimensionless)');
    LEGEND_ALGEBRAIC(:,12) = strpad('iclca_i2_alpha in component iclca (dimensionless)');
    LEGEND_ALGEBRAIC(:,40) = strpad('iclca_i2_beta in component iclca (dimensionless)');
    LEGEND_CONSTANTS(:,109) = strpad('kCaCl in component iclca (mM_per_ms)');
    LEGEND_CONSTANTS(:,110) = strpad('tau in component iclca (ms)');
    LEGEND_ALGEBRAIC(:,251) = strpad('vexp in component iclca (dimensionless)');
    LEGEND_CONSTANTS(:,240) = strpad('Gbar in component ik1 (mS_per_cm2)');
    LEGEND_ALGEBRAIC(:,340) = strpad('IK1 in component ik1 (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,339) = strpad('IK1_camk in component ik1 (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,338) = strpad('IK1_np in component ik1 (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,336) = strpad('ik1_IK1_np_alpha in component ik1 (dimensionless)');
    LEGEND_ALGEBRAIC(:,337) = strpad('ik1_IK1_np_beta in component ik1 (dimensionless)');
    LEGEND_ALGEBRAIC(:,335) = strpad('ik1_IK1_np_vv in component ik1 (mV)');
    LEGEND_CONSTANTS(:,241) = strpad('GKr in component ikr (mS_per_cm2)');
    LEGEND_ALGEBRAIC(:,341) = strpad('IKr in component ikr (uA_per_cm2)');
    LEGEND_STATES(:,69) = strpad('ac in component ikr (dimensionless)');
    LEGEND_ALGEBRAIC(:,13) = strpad('ikr_ac_tau in component ikr (ms)');
    LEGEND_ALGEBRAIC(:,41) = strpad('inf in component ikr (dimensionless)');
    LEGEND_ALGEBRAIC(:,257) = strpad('inx in component ikr (dimensionless)');
    LEGEND_ALGEBRAIC(:,349) = strpad('EKs in component nernst (mV)');
    LEGEND_ALGEBRAIC(:,260) = strpad('G in component iks (mS_per_cm2)');
    LEGEND_ALGEBRAIC(:,352) = strpad('IKs in component iks (uA_per_cm2)');
    LEGEND_CONSTANTS(:,404) = strpad('IKs_arn in component iks_sig (uM)');
    LEGEND_ALGEBRAIC(:,350) = strpad('IKs_np in component iks (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,351) = strpad('IKs_pka in component iks (uA_per_cm2)');
    LEGEND_CONSTANTS(:,111) = strpad('IKs_tot in component iks_sig (uM)');
    LEGEND_ALGEBRAIC(:,267) = strpad('f_hat in component iks (dimensionless)');
    LEGEND_ALGEBRAIC(:,263) = strpad('fp_iks in component iks_sig (dimensionless)');
    LEGEND_CONSTANTS(:,405) = strpad('iks_f_hat_ratio in component iks (dimensionless)');
    LEGEND_ALGEBRAIC(:,265) = strpad('iks_f_hat_val in component iks (dimensionless)');
    LEGEND_STATES(:,70) = strpad('O1 in component iks_np (dimensionless)');
    LEGEND_STATES(:,71) = strpad('O2 in component iks_np (dimensionless)');
    LEGEND_STATES(:,72) = strpad('O1 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,73) = strpad('O2 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,74) = strpad('C1 in component iks_np (dimensionless)');
    LEGEND_STATES(:,75) = strpad('C10 in component iks_np (dimensionless)');
    LEGEND_STATES(:,76) = strpad('C11 in component iks_np (dimensionless)');
    LEGEND_STATES(:,77) = strpad('C12 in component iks_np (dimensionless)');
    LEGEND_STATES(:,78) = strpad('C13 in component iks_np (dimensionless)');
    LEGEND_STATES(:,79) = strpad('C14 in component iks_np (dimensionless)');
    LEGEND_STATES(:,80) = strpad('C15 in component iks_np (dimensionless)');
    LEGEND_STATES(:,81) = strpad('C2 in component iks_np (dimensionless)');
    LEGEND_STATES(:,82) = strpad('C3 in component iks_np (dimensionless)');
    LEGEND_STATES(:,83) = strpad('C4 in component iks_np (dimensionless)');
    LEGEND_STATES(:,84) = strpad('C5 in component iks_np (dimensionless)');
    LEGEND_STATES(:,85) = strpad('C6 in component iks_np (dimensionless)');
    LEGEND_STATES(:,86) = strpad('C7 in component iks_np (dimensionless)');
    LEGEND_STATES(:,87) = strpad('C8 in component iks_np (dimensionless)');
    LEGEND_STATES(:,88) = strpad('C9 in component iks_np (dimensionless)');
    LEGEND_ALGEBRAIC(:,14) = strpad('a in component iks_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,42) = strpad('b in component iks_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,64) = strpad('d in component iks_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,76) = strpad('e in component iks_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,92) = strpad('g in component iks_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,93) = strpad('o in component iks_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,104) = strpad('p in component iks_np (mS_per_uF)');
    LEGEND_CONSTANTS(:,112) = strpad('t in component iks_np (mS_per_uF)');
    LEGEND_STATES(:,89) = strpad('C1 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,90) = strpad('C10 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,91) = strpad('C11 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,92) = strpad('C12 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,93) = strpad('C13 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,94) = strpad('C14 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,95) = strpad('C15 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,96) = strpad('C2 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,97) = strpad('C3 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,98) = strpad('C4 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,99) = strpad('C5 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,100) = strpad('C6 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,101) = strpad('C7 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,102) = strpad('C8 in component iks_pka (dimensionless)');
    LEGEND_STATES(:,103) = strpad('C9 in component iks_pka (dimensionless)');
    LEGEND_ALGEBRAIC(:,15) = strpad('a in component iks_pka (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,43) = strpad('b in component iks_pka (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,65) = strpad('d in component iks_pka (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,77) = strpad('e in component iks_pka (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,94) = strpad('g in component iks_pka (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,95) = strpad('o in component iks_pka (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,105) = strpad('p in component iks_pka (mS_per_uF)');
    LEGEND_CONSTANTS(:,113) = strpad('t in component iks_pka (mS_per_uF)');
    LEGEND_CONSTANTS(:,406) = strpad('IKs_arp in component iks_sig (uM)');
    LEGEND_CONSTANTS(:,357) = strpad('IKsf in component iks_sig (uM)');
    LEGEND_STATES(:,104) = strpad('IKsp in component iks_sig (uM)');
    LEGEND_CONSTANTS(:,114) = strpad('K in component iks_sig (uM)');
    LEGEND_CONSTANTS(:,115) = strpad('Ka_iks in component iks_sig (uM)');
    LEGEND_CONSTANTS(:,116) = strpad('Kp_iks in component iks_sig (uM)');
    LEGEND_CONSTANTS(:,117) = strpad('L in component iks_sig (uM)');
    LEGEND_CONSTANTS(:,118) = strpad('M in component iks_sig (uM)');
    LEGEND_CONSTANTS(:,400) = strpad('PKA_eca in component pka (uM)');
    LEGEND_CONSTANTS(:,402) = strpad('PKAf in component iks_sig (uM)');
    LEGEND_CONSTANTS(:,361) = strpad('PP1f_eca in component iks_sig (uM)');
    LEGEND_CONSTANTS(:,119) = strpad('Yotiao in component iks_sig (uM)');
    LEGEND_CONSTANTS(:,403) = strpad('Yotiaof in component iks_sig (uM)');
    LEGEND_CONSTANTS(:,354) = strpad('iks_sig_IKsf_sum in component iks_sig (dimensionless)');
    LEGEND_ALGEBRAIC(:,16) = strpad('iks_sig_IKsp_dif in component iks_sig (uM)');
    LEGEND_CONSTANTS(:,401) = strpad('iks_sig_PKAf_sum in component iks_sig (dimensionless)');
    LEGEND_CONSTANTS(:,359) = strpad('iks_sig_PP1f_eca_sum in component iks_sig (dimensionless)');
    LEGEND_CONSTANTS(:,120) = strpad('ka_iks in component iks_sig (hertz)');
    LEGEND_CONSTANTS(:,121) = strpad('kp_iks in component iks_sig (hertz)');
    LEGEND_ALGEBRAIC(:,344) = strpad('IKur in component ikur (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,342) = strpad('IKur_np in component ikur (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,343) = strpad('IKur_p in component ikur (uA_per_cm2)');
    LEGEND_CONSTANTS(:,122) = strpad('Ka_ikur in component ikur (uM)');
    LEGEND_CONSTANTS(:,123) = strpad('Kp_ikur in component ikur (uM)');
    LEGEND_STATES(:,105) = strpad('f_ikur in component ikur (dimensionless)');
    LEGEND_ALGEBRAIC(:,271) = strpad('fhat in component ikur (dimensionless)');
    LEGEND_CONSTANTS(:,124) = strpad('gbar_np in component ikur (mS_per_cm2)');
    LEGEND_ALGEBRAIC(:,269) = strpad('ikur_fhat_val in component ikur (dimensionless)');
    LEGEND_CONSTANTS(:,125) = strpad('ka_ikur in component ikur (hertz)');
    LEGEND_CONSTANTS(:,126) = strpad('kp_ikur in component ikur (hertz)');
    LEGEND_ALGEBRAIC(:,360) = strpad('INa in component ina (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,356) = strpad('INa_both in component ina (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,357) = strpad('INa_camk in component ina (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,358) = strpad('INa_np in component ina (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,359) = strpad('INa_pka in component ina (uA_per_cm2)');
    LEGEND_CONSTANTS(:,127) = strpad('Ka_ina in component ina (uM)');
    LEGEND_CONSTANTS(:,128) = strpad('Kp_ina in component ina (uM)');
    LEGEND_ALGEBRAIC(:,276) = strpad('f_both in component ina (dimensionless)');
    LEGEND_ALGEBRAIC(:,277) = strpad('f_camk_only in component ina (dimensionless)');
    LEGEND_STATES(:,106) = strpad('f_ina in component ina (dimensionless)');
    LEGEND_ALGEBRAIC(:,279) = strpad('f_np in component ina (dimensionless)');
    LEGEND_ALGEBRAIC(:,275) = strpad('f_pka in component ina (dimensionless)');
    LEGEND_ALGEBRAIC(:,278) = strpad('f_pka_only in component ina (dimensionless)');
    LEGEND_CONSTANTS(:,242) = strpad('gNaBar in component ina (mS_per_cm2)');
    LEGEND_STATES(:,107) = strpad('h in component ina_camk (dimensionless)');
    LEGEND_STATES(:,108) = strpad('j in component ina_camk (dimensionless)');
    LEGEND_STATES(:,109) = strpad('m in component ina_camk (dimensionless)');
    LEGEND_ALGEBRAIC(:,274) = strpad('ina_f_pka_val in component ina (dimensionless)');
    LEGEND_STATES(:,110) = strpad('h in component ina_np (dimensionless)');
    LEGEND_STATES(:,111) = strpad('j in component ina_np (dimensionless)');
    LEGEND_STATES(:,112) = strpad('m in component ina_np (dimensionless)');
    LEGEND_STATES(:,113) = strpad('h in component ina_pka (dimensionless)');
    LEGEND_STATES(:,114) = strpad('j in component ina_pka (dimensionless)');
    LEGEND_STATES(:,115) = strpad('m in component ina_pka (dimensionless)');
    LEGEND_CONSTANTS(:,129) = strpad('ka_ina in component ina (hertz)');
    LEGEND_CONSTANTS(:,130) = strpad('kp_ina in component ina (hertz)');
    LEGEND_CONSTANTS(:,131) = strpad('dVIn in component ina_camk (mV)');
    LEGEND_ALGEBRAIC(:,17) = strpad('ina_camk_h_alpha in component ina_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,44) = strpad('ina_camk_h_beta in component ina_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,18) = strpad('ina_camk_j_alpha in component ina_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,45) = strpad('ina_camk_j_beta in component ina_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,19) = strpad('ina_camk_m_alpha in component ina_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,46) = strpad('ina_camk_m_beta in component ina_camk (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,20) = strpad('ina_np_h_alpha in component ina_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,47) = strpad('ina_np_h_beta in component ina_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,21) = strpad('ina_np_j_alpha in component ina_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,48) = strpad('ina_np_j_beta in component ina_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,22) = strpad('ina_np_m_alpha in component ina_np (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,49) = strpad('ina_np_m_beta in component ina_np (mS_per_uF)');
    LEGEND_CONSTANTS(:,132) = strpad('dVAc in component ina_pka (mV)');
    LEGEND_CONSTANTS(:,133) = strpad('dVIn in component ina_pka (mV)');
    LEGEND_ALGEBRAIC(:,23) = strpad('ina_pka_h_alpha in component ina_pka (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,50) = strpad('ina_pka_h_beta in component ina_pka (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,24) = strpad('ina_pka_j_alpha in component ina_pka (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,51) = strpad('ina_pka_j_beta in component ina_pka (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,25) = strpad('ina_pka_m_alpha in component ina_pka (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,52) = strpad('ina_pka_m_beta in component ina_pka (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,282) = strpad('INab in component inab (uA_per_cm2)');
    LEGEND_CONSTANTS(:,134) = strpad('P in component inab (cm_per_s)');
    LEGEND_ALGEBRAIC(:,281) = strpad('ePhi in component inab (dimensionless)');
    LEGEND_ALGEBRAIC(:,280) = strpad('inab_INab_phi in component inab (dimensionless)');
    LEGEND_CONSTANTS(:,363) = strpad('KmNai3 in component inaca (mM3)');
    LEGEND_CONSTANTS(:,365) = strpad('KmNao3 in component inaca (mM3)');
    LEGEND_CONSTANTS(:,135) = strpad('Km_Ca in component inaca (mM)');
    LEGEND_CONSTANTS(:,136) = strpad('Km_Cai in component inaca (mM)');
    LEGEND_CONSTANTS(:,137) = strpad('Km_Cao in component inaca (mM)');
    LEGEND_CONSTANTS(:,138) = strpad('Km_Nai in component inaca (mM)');
    LEGEND_CONSTANTS(:,139) = strpad('Km_Nao in component inaca (mM)');
    LEGEND_ALGEBRAIC(:,283) = strpad('Na_i3 in component inaca (mM3)');
    LEGEND_CONSTANTS(:,367) = strpad('Na_o3 in component inaca (mM3)');
    LEGEND_ALGEBRAIC(:,284) = strpad('Na_ss3 in component inaca (mM3)');
    LEGEND_CONSTANTS(:,140) = strpad('eta in component inaca (dimensionless)');
    LEGEND_ALGEBRAIC(:,285) = strpad('exp1 in component inaca (dimensionless)');
    LEGEND_ALGEBRAIC(:,286) = strpad('exp2 in component inaca (dimensionless)');
    LEGEND_ALGEBRAIC(:,287) = strpad('inaca_INaCaSR_denom1 in component inaca (dimensionless)');
    LEGEND_ALGEBRAIC(:,288) = strpad('inaca_INaCaSR_denom2 in component inaca (dimensionless)');
    LEGEND_ALGEBRAIC(:,289) = strpad('inaca_INaCaSR_denom3 in component inaca (mol4_per_m12)');
    LEGEND_ALGEBRAIC(:,290) = strpad('inaca_INaCaSR_denom4 in component inaca (mol4_per_m12)');
    LEGEND_ALGEBRAIC(:,291) = strpad('inaca_INaCaSR_num in component inaca (A_mol4_per_m14_times_1e_minus_2)');
    LEGEND_ALGEBRAIC(:,293) = strpad('inaca_INaCa_denom1 in component inaca (dimensionless)');
    LEGEND_ALGEBRAIC(:,294) = strpad('inaca_INaCa_denom2 in component inaca (dimensionless)');
    LEGEND_ALGEBRAIC(:,295) = strpad('inaca_INaCa_denom3 in component inaca (mol4_per_m12)');
    LEGEND_ALGEBRAIC(:,296) = strpad('inaca_INaCa_denom4 in component inaca (mol4_per_m12)');
    LEGEND_ALGEBRAIC(:,297) = strpad('inaca_INaCa_num in component inaca (A_mol4_per_m14_times_1e_minus_2)');
    LEGEND_CONSTANTS(:,141) = strpad('kSat in component inaca (dimensionless)');
    LEGEND_CONSTANTS(:,142) = strpad('vMax in component inaca (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,304) = strpad('INaK in component inak (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,302) = strpad('INaK_np in component inak (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,303) = strpad('INaK_p in component inak (uA_per_cm2)');
    LEGEND_CONSTANTS(:,143) = strpad('Ka_inak in component inak (uM)');
    LEGEND_CONSTANTS(:,144) = strpad('Kp_inak in component inak (uM)');
    LEGEND_STATES(:,116) = strpad('f_inak in component inak (dimensionless)');
    LEGEND_ALGEBRAIC(:,300) = strpad('fhat in component inak (dimensionless)');
    LEGEND_CONSTANTS(:,145) = strpad('ibar in component inak (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,299) = strpad('inak_fhat_val in component inak (dimensionless)');
    LEGEND_CONSTANTS(:,146) = strpad('ka_inak in component inak (hertz)');
    LEGEND_CONSTANTS(:,147) = strpad('km_ko in component inak (mM)');
    LEGEND_CONSTANTS(:,148) = strpad('km_np in component inak (mM)');
    LEGEND_CONSTANTS(:,149) = strpad('km_p in component inak (mM)');
    LEGEND_CONSTANTS(:,150) = strpad('kp_inak in component inak (hertz)');
    LEGEND_ALGEBRAIC(:,301) = strpad('phi in component inak (uA_per_cm2)');
    LEGEND_CONSTANTS(:,243) = strpad('pk in component inak (dimensionless)');
    LEGEND_ALGEBRAIC(:,364) = strpad('INaL in component inal (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,362) = strpad('INaL_camk in component inal (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,363) = strpad('INaL_np in component inal (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,361) = strpad('conductance in component inal (mV)');
    LEGEND_STATES(:,117) = strpad('h in component inal (dimensionless)');
    LEGEND_ALGEBRAIC(:,26) = strpad('h_inf in component inal (dimensionless)');
    LEGEND_ALGEBRAIC(:,27) = strpad('inal_m_alpha in component inal (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,53) = strpad('inal_m_beta in component inal (mS_per_uF)');
    LEGEND_STATES(:,118) = strpad('m in component inal (dimensionless)');
    LEGEND_CONSTANTS(:,151) = strpad('tau_h in component inal (ms)');
    LEGEND_CONSTANTS(:,152) = strpad('IpCa_bar in component ipca (uA_per_cm2)');
    LEGEND_CONSTANTS(:,153) = strpad('Km_pCa in component ipca (mM)');
    LEGEND_ALGEBRAIC(:,316) = strpad('Ileak_ryr in component irel (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,308) = strpad('Ileak_ryr_np in component irel (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,310) = strpad('Ileak_ryr_p in component irel (mM_per_ms)');
    LEGEND_STATES(:,119) = strpad('Irel_np in component irel (mM_per_ms)');
    LEGEND_STATES(:,120) = strpad('Irel_p in component irel (mM_per_ms)');
    LEGEND_CONSTANTS(:,154) = strpad('Km_ryr_leak_np in component irel (mM)');
    LEGEND_CONSTANTS(:,155) = strpad('Km_ryr_leak_p in component irel (mM)');
    LEGEND_ALGEBRAIC(:,256) = strpad('alpha_np in component irel (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,262) = strpad('alpha_p in component irel (mM_per_ms)');
    LEGEND_CONSTANTS(:,244) = strpad('beta_0 in component irel (ms)');
    LEGEND_ALGEBRAIC(:,253) = strpad('beta_np in component irel (ms)');
    LEGEND_ALGEBRAIC(:,259) = strpad('beta_p in component irel (ms)');
    LEGEND_ALGEBRAIC(:,314) = strpad('fhat in component irel (dimensionless)');
    LEGEND_CONSTANTS(:,399) = strpad('irel_fhat_ratio in component irel (dimensionless)');
    LEGEND_ALGEBRAIC(:,312) = strpad('irel_fhat_val in component irel (dimensionless)');
    LEGEND_ALGEBRAIC(:,272) = strpad('irel_inf_np in component irel (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,273) = strpad('irel_inf_p in component irel (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,266) = strpad('irel_tau_np in component irel (ms)');
    LEGEND_ALGEBRAIC(:,268) = strpad('irel_tau_p in component irel (ms)');
    LEGEND_CONSTANTS(:,156) = strpad('k_ryr_leak_np in component irel (mS_per_uF)');
    LEGEND_CONSTANTS(:,157) = strpad('k_ryr_leak_p in component irel (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,264) = strpad('x in component irel (dimensionless)');
    LEGEND_ALGEBRAIC(:,270) = strpad('y in component irel (dimensionless)');
    LEGEND_CONSTANTS(:,158) = strpad('Gbar in component ito (mS_per_cm2)');
    LEGEND_ALGEBRAIC(:,348) = strpad('ITo in component ito (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,346) = strpad('ITo_camk in component ito (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,347) = strpad('ITo_np in component ito (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,326) = strpad('R in component ito (dimensionless)');
    LEGEND_ALGEBRAIC(:,28) = strpad('a_inf in component ito (dimensionless)');
    LEGEND_STATES(:,121) = strpad('a_np in component ito (dimensionless)');
    LEGEND_ALGEBRAIC(:,78) = strpad('a_tau in component ito (ms)');
    LEGEND_ALGEBRAIC(:,29) = strpad('alph_if in component ito (dimensionless)');
    LEGEND_ALGEBRAIC(:,55) = strpad('alph_is in component ito (dimensionless)');
    LEGEND_ALGEBRAIC(:,67) = strpad('beta_i in component ito (mS_per_uF)');
    LEGEND_STATES(:,122) = strpad('if_camk in component ito (dimensionless)');
    LEGEND_STATES(:,123) = strpad('if_np in component ito (dimensionless)');
    LEGEND_STATES(:,124) = strpad('is_camk in component ito (dimensionless)');
    LEGEND_STATES(:,125) = strpad('is_np in component ito (dimensionless)');
    LEGEND_ALGEBRAIC(:,54) = strpad('ito_a_np_alpha in component ito (dimensionless)');
    LEGEND_ALGEBRAIC(:,66) = strpad('ito_a_np_beta in component ito (dimensionless)');
    LEGEND_ALGEBRAIC(:,79) = strpad('ito_if_camk_alpha in component ito (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,80) = strpad('ito_if_np_alpha in component ito (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,81) = strpad('ito_is_camk_alpha in component ito (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,82) = strpad('ito_is_np_alpha in component ito (mS_per_uF)');
    LEGEND_ALGEBRAIC(:,345) = strpad('x in component ito (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,309) = strpad('Imax in component iup (mM_per_ms)');
    LEGEND_CONSTANTS(:,159) = strpad('Ka_plb in component iup (uM)');
    LEGEND_CONSTANTS(:,377) = strpad('Km_both in component iup (mM)');
    LEGEND_CONSTANTS(:,370) = strpad('Km_camk in component iup (mM)');
    LEGEND_CONSTANTS(:,160) = strpad('Km_np in component iup (mM)');
    LEGEND_CONSTANTS(:,375) = strpad('Km_pka in component iup (mM)');
    LEGEND_ALGEBRAIC(:,323) = strpad('Km_up in component iup (mM)');
    LEGEND_CONSTANTS(:,161) = strpad('Kp_plb in component iup (uM)');
    LEGEND_ALGEBRAIC(:,307) = strpad('f_SERCA2a in component iup (dimensionless)');
    LEGEND_ALGEBRAIC(:,315) = strpad('f_both in component iup (dimensionless)');
    LEGEND_ALGEBRAIC(:,317) = strpad('f_camk_only in component iup (dimensionless)');
    LEGEND_ALGEBRAIC(:,322) = strpad('f_np in component iup (dimensionless)');
    LEGEND_ALGEBRAIC(:,313) = strpad('f_pka in component iup (dimensionless)');
    LEGEND_ALGEBRAIC(:,319) = strpad('f_pka_only in component iup (dimensionless)');
    LEGEND_STATES(:,126) = strpad('f_plb in component iup (dimensionless)');
    LEGEND_ALGEBRAIC(:,311) = strpad('iup_f_pka_val in component iup (dimensionless)');
    LEGEND_CONSTANTS(:,162) = strpad('iupmax in component iup (mM_per_ms)');
    LEGEND_CONSTANTS(:,380) = strpad('iupmaxCAMK in component iup (mM_per_ms)');
    LEGEND_CONSTANTS(:,163) = strpad('ka_plb in component iup (hertz)');
    LEGEND_CONSTANTS(:,164) = strpad('kp_plb in component iup (hertz)');
    LEGEND_ALGEBRAIC(:,325) = strpad('leak in component iup (mM_per_ms)');
    LEGEND_CONSTANTS(:,165) = strpad('nsrmax in component iup (mM)');
    LEGEND_ALGEBRAIC(:,327) = strpad('uptake in component iup (mM_per_ms)');
    LEGEND_ALGEBRAIC(:,365) = strpad('IK_tot in component potassium (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,367) = strpad('INa_tot in component sodium (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,368) = strpad('i_ion in component membrane (uA_per_cm2)');
    LEGEND_ALGEBRAIC(:,369) = strpad('i_stim in component stimulus (uA_per_cm2)');
    LEGEND_CONSTANTS(:,166) = strpad('PNaK in component nernst (dimensionless)');
    LEGEND_CONSTANTS(:,239) = strpad('RTF in component phys (mV)');
    LEGEND_STATES(:,127) = strpad('K in component potassium (mM)');
    LEGEND_CONSTANTS(:,167) = strpad('KPDEp in component pde (uM)');
    LEGEND_CONSTANTS(:,168) = strpad('KmIbmxPde2 in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,169) = strpad('KmIbmxPde3 in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,170) = strpad('KmIbmxPde4 in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,171) = strpad('KmPDE2 in component pde (uM)');
    LEGEND_CONSTANTS(:,172) = strpad('KmPDE3 in component pde (uM)');
    LEGEND_CONSTANTS(:,173) = strpad('KmPDE4 in component pde (uM)');
    LEGEND_CONSTANTS(:,348) = strpad('PDE2_cav in component pde (uM)');
    LEGEND_CONSTANTS(:,349) = strpad('PDE2_cyt in component pde (uM)');
    LEGEND_CONSTANTS(:,350) = strpad('PDE2_eca in component pde (uM)');
    LEGEND_CONSTANTS(:,174) = strpad('PDE2_tot in component pde (uM)');
    LEGEND_STATES(:,128) = strpad('PDE3_P_cav in component pde (uM)');
    LEGEND_STATES(:,129) = strpad('PDE3_P_cyt in component pde (uM)');
    LEGEND_CONSTANTS(:,378) = strpad('PDE3_cav in component pde (uM)');
    LEGEND_CONSTANTS(:,379) = strpad('PDE3_cyt in component pde (uM)');
    LEGEND_CONSTANTS(:,364) = strpad('PDE3_tot in component pde (uM)');
    LEGEND_STATES(:,130) = strpad('PDE4_P_cav in component pde (uM)');
    LEGEND_STATES(:,131) = strpad('PDE4_P_cyt in component pde (uM)');
    LEGEND_STATES(:,132) = strpad('PDE4_P_eca in component pde (uM)');
    LEGEND_CONSTANTS(:,371) = strpad('PDE4_cav in component pde (uM)');
    LEGEND_CONSTANTS(:,372) = strpad('PDE4_cyt in component pde (uM)');
    LEGEND_CONSTANTS(:,373) = strpad('PDE4_eca in component pde (uM)');
    LEGEND_CONSTANTS(:,366) = strpad('PDE4_tot in component pde (uM)');
    LEGEND_CONSTANTS(:,175) = strpad('delta_k_pde34 in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,176) = strpad('f_pde2_cav in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,334) = strpad('f_pde2_cyt in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,177) = strpad('f_pde2_eca in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,335) = strpad('f_pde2_part in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,368) = strpad('f_pde3_cav in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,374) = strpad('f_pde3_cyt in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,178) = strpad('f_pde4_cav in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,340) = strpad('f_pde4_cyt in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,344) = strpad('f_pde4_eca in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,179) = strpad('f_pde4_part in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,180) = strpad('f_pde_part in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,181) = strpad('ff_pde3_cyt in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,182) = strpad('h_ibmx_pde2 in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,183) = strpad('h_ibmx_pde3 in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,184) = strpad('h_ibmx_pde4 in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,185) = strpad('ibmx in component pde (uM)');
    LEGEND_CONSTANTS(:,343) = strpad('ibmx2 in component pde (uM)');
    LEGEND_CONSTANTS(:,376) = strpad('ibmx3 in component pde (uM)');
    LEGEND_CONSTANTS(:,369) = strpad('ibmx4 in component pde (uM)');
    LEGEND_CONSTANTS(:,339) = strpad('ibmx_h2 in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,351) = strpad('ibmx_h3 in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,355) = strpad('ibmx_h4 in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,186) = strpad('kPDE2 in component pde (hertz)');
    LEGEND_CONSTANTS(:,187) = strpad('kPDE3 in component pde (hertz)');
    LEGEND_CONSTANTS(:,188) = strpad('kPDE4 in component pde (hertz)');
    LEGEND_CONSTANTS(:,245) = strpad('kbPDEp in component pde (hertz)');
    LEGEND_CONSTANTS(:,189) = strpad('kfPDEp in component pde (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,360) = strpad('pde_PDE3_tot_alpha in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,362) = strpad('pde_PDE3_tot_beta in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,190) = strpad('r_pde34_frac in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,358) = strpad('r_pde3_cyt in component pde (dimensionless)');
    LEGEND_CONSTANTS(:,191) = strpad('R in component phys (mJ_per_mol_per_K)');
    LEGEND_CONSTANTS(:,192) = strpad('T in component phys (kelvin)');
    LEGEND_CONSTANTS(:,246) = strpad('K_pki in component pka (uM)');
    LEGEND_CONSTANTS(:,336) = strpad('PKA_cyt in component pka (uM)');
    LEGEND_CONSTANTS(:,193) = strpad('PKA_tot in component pka (uM)');
    LEGEND_CONSTANTS(:,345) = strpad('PKI_cav in component pka (uM)');
    LEGEND_CONSTANTS(:,356) = strpad('PKI_cyt in component pka (uM)');
    LEGEND_CONSTANTS(:,352) = strpad('PKI_eca in component pka (uM)');
    LEGEND_CONSTANTS(:,337) = strpad('PKI_tot in component pka (uM)');
    LEGEND_CONSTANTS(:,265) = strpad('b_pki in component pka (hertz)');
    LEGEND_CONSTANTS(:,194) = strpad('f_cav in component pka (dimensionless)');
    LEGEND_CONSTANTS(:,328) = strpad('f_cyt in component pka (dimensionless)');
    LEGEND_CONSTANTS(:,195) = strpad('f_eca in component pka (dimensionless)');
    LEGEND_CONSTANTS(:,196) = strpad('f_pki in component pka (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,341) = strpad('f_pki_cav in component pka (dimensionless)');
    LEGEND_CONSTANTS(:,353) = strpad('f_pki_cyt in component pka (dimensionless)');
    LEGEND_CONSTANTS(:,346) = strpad('f_pki_eca in component pka (dimensionless)');
    LEGEND_STATES(:,133) = strpad('A2R in component pka_cav (uM)');
    LEGEND_STATES(:,134) = strpad('A2RC in component pka_cav (uM)');
    LEGEND_STATES(:,135) = strpad('ARC in component pka_cav (uM)');
    LEGEND_CONSTANTS(:,197) = strpad('K1 in component pka_cav (uM)');
    LEGEND_CONSTANTS(:,198) = strpad('K2 in component pka_cav (uM)');
    LEGEND_CONSTANTS(:,199) = strpad('K3 in component pka_cav (m3_per_mol_times_1e3)');
    LEGEND_STATES(:,136) = strpad('PKIC in component pka_cav (uM)');
    LEGEND_ALGEBRAIC(:,141) = strpad('RCf in component pka_cav (uM)');
    LEGEND_CONSTANTS(:,247) = strpad('b1 in component pka_cav (hertz)');
    LEGEND_CONSTANTS(:,248) = strpad('b2 in component pka_cav (hertz)');
    LEGEND_CONSTANTS(:,249) = strpad('b3 in component pka_cav (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,200) = strpad('f1 in component pka_cav (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,201) = strpad('f2 in component pka_cav (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,202) = strpad('f3 in component pka_cav (hertz)');
    LEGEND_STATES(:,137) = strpad('A2R in component pka_cyt (uM)');
    LEGEND_STATES(:,138) = strpad('A2RC in component pka_cyt (uM)');
    LEGEND_STATES(:,139) = strpad('ARC in component pka_cyt (uM)');
    LEGEND_CONSTANTS(:,203) = strpad('K1 in component pka_cyt (uM)');
    LEGEND_CONSTANTS(:,204) = strpad('K2 in component pka_cyt (uM)');
    LEGEND_CONSTANTS(:,205) = strpad('K3 in component pka_cyt (m3_per_mol_times_1e3)');
    LEGEND_STATES(:,140) = strpad('PKIC in component pka_cyt (uM)');
    LEGEND_ALGEBRAIC(:,151) = strpad('RCf in component pka_cyt (uM)');
    LEGEND_CONSTANTS(:,266) = strpad('b1 in component pka_cyt (hertz)');
    LEGEND_CONSTANTS(:,267) = strpad('b2 in component pka_cyt (hertz)');
    LEGEND_CONSTANTS(:,268) = strpad('b3 in component pka_cyt (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,250) = strpad('f1 in component pka_cyt (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,251) = strpad('f2 in component pka_cyt (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,252) = strpad('f3 in component pka_cyt (hertz)');
    LEGEND_STATES(:,141) = strpad('A2R in component pka_eca (uM)');
    LEGEND_STATES(:,142) = strpad('A2RC in component pka_eca (uM)');
    LEGEND_STATES(:,143) = strpad('ARC in component pka_eca (uM)');
    LEGEND_CONSTANTS(:,253) = strpad('K1 in component pka_eca (uM)');
    LEGEND_CONSTANTS(:,254) = strpad('K2 in component pka_eca (uM)');
    LEGEND_CONSTANTS(:,255) = strpad('K3 in component pka_eca (m3_per_mol_times_1e3)');
    LEGEND_STATES(:,144) = strpad('PKIC in component pka_eca (uM)');
    LEGEND_ALGEBRAIC(:,131) = strpad('RCf in component pka_eca (uM)');
    LEGEND_CONSTANTS(:,277) = strpad('b1 in component pka_eca (hertz)');
    LEGEND_CONSTANTS(:,278) = strpad('b2 in component pka_eca (hertz)');
    LEGEND_CONSTANTS(:,279) = strpad('b3 in component pka_eca (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,269) = strpad('f1 in component pka_eca (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,270) = strpad('f2 in component pka_eca (per_mM_per_ms)');
    LEGEND_CONSTANTS(:,271) = strpad('f3 in component pka_eca (hertz)');
    LEGEND_CONSTANTS(:,407) = strpad('potassium_K_r1 in component potassium (mol_per_m_per_s_per_A_times_1e5)');
    LEGEND_CONSTANTS(:,206) = strpad('K in component pp1 (uM)');
    LEGEND_CONSTANTS(:,207) = strpad('Kdp in component pp1 (uM)');
    LEGEND_CONSTANTS(:,208) = strpad('Kp in component pp1 (uM)');
    LEGEND_CONSTANTS(:,209) = strpad('PP1_cyt in component pp1 (uM)');
    LEGEND_ALGEBRAIC(:,30) = strpad('di in component pp1 (uM)');
    LEGEND_CONSTANTS(:,210) = strpad('f in component pp1 (dimensionless)');
    LEGEND_STATES(:,145) = strpad('inhib1_p in component pp1 (uM)');
    LEGEND_CONSTANTS(:,256) = strpad('inhib1_tot in component pp1 (uM)');
    LEGEND_CONSTANTS(:,211) = strpad('kdp in component pp1 (hertz)');
    LEGEND_CONSTANTS(:,212) = strpad('kp in component pp1 (hertz)');
    LEGEND_ALGEBRAIC(:,199) = strpad('pp1_PP1f_cyt_sum in component pp1 (uM)');
    LEGEND_ALGEBRAIC(:,366) = strpad('INa_cyt in component sodium (uA_per_cm2)');
    LEGEND_CONSTANTS(:,408) = strpad('sodium_Na_r1 in component sodium (mol_per_m_per_s_per_A_times_1e5)');
    LEGEND_CONSTANTS(:,409) = strpad('sodium_Na_r2 in component sodium (dimensionless)');
    LEGEND_CONSTANTS(:,410) = strpad('sodium_Na_sr_r1 in component sodium (mol_per_m_per_s_per_A_times_1e5)');
    LEGEND_CONSTANTS(:,257) = strpad('amplitude in component stimulus (uA_per_cm2)');
    LEGEND_CONSTANTS(:,213) = strpad('duration in component stimulus (ms)');
    LEGEND_CONSTANTS(:,214) = strpad('offset in component stimulus (ms)');
    LEGEND_CONSTANTS(:,215) = strpad('period in component stimulus (ms)');
    LEGEND_RATES(:,5) = strpad('d/dt ICaLp in component akap_sig (uM)');
    LEGEND_RATES(:,6) = strpad('d/dt RyRp in component akap_sig (uM)');
    LEGEND_RATES(:,8) = strpad('d/dt Gi_aGDP in component beta_cav (uM)');
    LEGEND_RATES(:,9) = strpad('d/dt Gi_aGTP in component beta_cav (uM)');
    LEGEND_RATES(:,1) = strpad('d/dt Gi_bg in component beta_cav (uM)');
    LEGEND_RATES(:,10) = strpad('d/dt Gs_aGDP in component beta_cav (uM)');
    LEGEND_RATES(:,2) = strpad('d/dt Gs_aGTP in component beta_cav (uM)');
    LEGEND_RATES(:,11) = strpad('d/dt Gs_bg in component beta_cav (uM)');
    LEGEND_RATES(:,12) = strpad('d/dt Rb1_grk_tot in component beta_cav (uM)');
    LEGEND_RATES(:,13) = strpad('d/dt Rb1_pka_tot in component beta_cav (uM)');
    LEGEND_RATES(:,14) = strpad('d/dt Rb2_grk_tot in component beta_cav (uM)');
    LEGEND_RATES(:,15) = strpad('d/dt Rb2_pka_tot in component beta_cav (uM)');
    LEGEND_RATES(:,16) = strpad('d/dt Gs_aGDP in component beta_cyt (uM)');
    LEGEND_RATES(:,3) = strpad('d/dt Gs_aGTP in component beta_cyt (uM)');
    LEGEND_RATES(:,17) = strpad('d/dt Gs_bg in component beta_cyt (uM)');
    LEGEND_RATES(:,18) = strpad('d/dt Rb1_grk_tot in component beta_cyt (uM)');
    LEGEND_RATES(:,19) = strpad('d/dt Rb1_pka_tot in component beta_cyt (uM)');
    LEGEND_RATES(:,21) = strpad('d/dt Gi_aGDP in component beta_eca (uM)');
    LEGEND_RATES(:,22) = strpad('d/dt Gi_aGTP in component beta_eca (uM)');
    LEGEND_RATES(:,23) = strpad('d/dt Gi_bg in component beta_eca (uM)');
    LEGEND_RATES(:,24) = strpad('d/dt Gs_aGDP in component beta_eca (uM)');
    LEGEND_RATES(:,4) = strpad('d/dt Gs_aGTP in component beta_eca (uM)');
    LEGEND_RATES(:,25) = strpad('d/dt Gs_bg in component beta_eca (uM)');
    LEGEND_RATES(:,26) = strpad('d/dt Rb1_grk_tot in component beta_eca (uM)');
    LEGEND_RATES(:,27) = strpad('d/dt Rb1_pka_tot in component beta_eca (uM)');
    LEGEND_RATES(:,28) = strpad('d/dt Rb2_grk_tot in component beta_eca (uM)');
    LEGEND_RATES(:,29) = strpad('d/dt Rb2_pka_tot in component beta_eca (uM)');
    LEGEND_RATES(:,31) = strpad('d/dt Ca_nsr in component calcium (mM)');
    LEGEND_RATES(:,32) = strpad('d/dt f_tni in component calcium (dimensionless)');
    LEGEND_RATES(:,33) = strpad('d/dt uCa in component calcium (mM)');
    LEGEND_RATES(:,34) = strpad('d/dt uCa_CaL in component calcium (mM)');
    LEGEND_RATES(:,35) = strpad('d/dt uCa_jsr in component calcium (mM)');
    LEGEND_RATES(:,36) = strpad('d/dt uCa_sr in component calcium (mM)');
    LEGEND_RATES(:,37) = strpad('d/dt f_ical in component camk (dimensionless)');
    LEGEND_RATES(:,38) = strpad('d/dt f_ik1 in component camk (dimensionless)');
    LEGEND_RATES(:,39) = strpad('d/dt f_ina in component camk (dimensionless)');
    LEGEND_RATES(:,40) = strpad('d/dt f_ito in component camk (dimensionless)');
    LEGEND_RATES(:,41) = strpad('d/dt f_plb in component camk (dimensionless)');
    LEGEND_RATES(:,42) = strpad('d/dt f_ryr in component camk (dimensionless)');
    LEGEND_RATES(:,43) = strpad('d/dt trap in component camk (dimensionless)');
    LEGEND_RATES(:,44) = strpad('d/dt cAMP_cav in component camp (uM)');
    LEGEND_RATES(:,45) = strpad('d/dt cAMP_cyt in component camp (uM)');
    LEGEND_RATES(:,46) = strpad('d/dt cAMP_eca in component camp (uM)');
    LEGEND_RATES(:,47) = strpad('d/dt Cl in component chloride (mM)');
    LEGEND_RATES(:,48) = strpad('d/dt Cl_sr in component chloride (mM)');
    LEGEND_RATES(:,52) = strpad('d/dt C in component ical_camk (dimensionless)');
    LEGEND_RATES(:,53) = strpad('d/dt CI in component ical_camk (dimensionless)');
    LEGEND_RATES(:,54) = strpad('d/dt CIs in component ical_camk (dimensionless)');
    LEGEND_RATES(:,55) = strpad('d/dt Cs in component ical_camk (dimensionless)');
    LEGEND_RATES(:,56) = strpad('d/dt O in component ical_camk (dimensionless)');
    LEGEND_RATES(:,57) = strpad('d/dt OI in component ical_camk (dimensionless)');
    LEGEND_RATES(:,58) = strpad('d/dt OIs in component ical_camk (dimensionless)');
    LEGEND_RATES(:,59) = strpad('d/dt Os in component ical_camk (dimensionless)');
    LEGEND_RATES(:,60) = strpad('d/dt C in component ical_np (dimensionless)');
    LEGEND_RATES(:,61) = strpad('d/dt CI in component ical_np (dimensionless)');
    LEGEND_RATES(:,62) = strpad('d/dt CIs in component ical_np (dimensionless)');
    LEGEND_RATES(:,63) = strpad('d/dt Cs in component ical_np (dimensionless)');
    LEGEND_RATES(:,64) = strpad('d/dt O in component ical_np (dimensionless)');
    LEGEND_RATES(:,65) = strpad('d/dt OI in component ical_np (dimensionless)');
    LEGEND_RATES(:,66) = strpad('d/dt OIs in component ical_np (dimensionless)');
    LEGEND_RATES(:,67) = strpad('d/dt Os in component ical_np (dimensionless)');
    LEGEND_RATES(:,68) = strpad('d/dt i2 in component iclca (dimensionless)');
    LEGEND_RATES(:,69) = strpad('d/dt ac in component ikr (dimensionless)');
    LEGEND_RATES(:,74) = strpad('d/dt C1 in component iks_np (dimensionless)');
    LEGEND_RATES(:,75) = strpad('d/dt C10 in component iks_np (dimensionless)');
    LEGEND_RATES(:,76) = strpad('d/dt C11 in component iks_np (dimensionless)');
    LEGEND_RATES(:,77) = strpad('d/dt C12 in component iks_np (dimensionless)');
    LEGEND_RATES(:,78) = strpad('d/dt C13 in component iks_np (dimensionless)');
    LEGEND_RATES(:,79) = strpad('d/dt C14 in component iks_np (dimensionless)');
    LEGEND_RATES(:,80) = strpad('d/dt C15 in component iks_np (dimensionless)');
    LEGEND_RATES(:,81) = strpad('d/dt C2 in component iks_np (dimensionless)');
    LEGEND_RATES(:,82) = strpad('d/dt C3 in component iks_np (dimensionless)');
    LEGEND_RATES(:,83) = strpad('d/dt C4 in component iks_np (dimensionless)');
    LEGEND_RATES(:,84) = strpad('d/dt C5 in component iks_np (dimensionless)');
    LEGEND_RATES(:,85) = strpad('d/dt C6 in component iks_np (dimensionless)');
    LEGEND_RATES(:,86) = strpad('d/dt C7 in component iks_np (dimensionless)');
    LEGEND_RATES(:,87) = strpad('d/dt C8 in component iks_np (dimensionless)');
    LEGEND_RATES(:,88) = strpad('d/dt C9 in component iks_np (dimensionless)');
    LEGEND_RATES(:,70) = strpad('d/dt O1 in component iks_np (dimensionless)');
    LEGEND_RATES(:,71) = strpad('d/dt O2 in component iks_np (dimensionless)');
    LEGEND_RATES(:,89) = strpad('d/dt C1 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,90) = strpad('d/dt C10 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,91) = strpad('d/dt C11 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,92) = strpad('d/dt C12 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,93) = strpad('d/dt C13 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,94) = strpad('d/dt C14 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,95) = strpad('d/dt C15 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,96) = strpad('d/dt C2 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,97) = strpad('d/dt C3 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,98) = strpad('d/dt C4 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,99) = strpad('d/dt C5 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,100) = strpad('d/dt C6 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,101) = strpad('d/dt C7 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,102) = strpad('d/dt C8 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,103) = strpad('d/dt C9 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,72) = strpad('d/dt O1 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,73) = strpad('d/dt O2 in component iks_pka (dimensionless)');
    LEGEND_RATES(:,104) = strpad('d/dt IKsp in component iks_sig (uM)');
    LEGEND_RATES(:,105) = strpad('d/dt f_ikur in component ikur (dimensionless)');
    LEGEND_RATES(:,106) = strpad('d/dt f_ina in component ina (dimensionless)');
    LEGEND_RATES(:,107) = strpad('d/dt h in component ina_camk (dimensionless)');
    LEGEND_RATES(:,108) = strpad('d/dt j in component ina_camk (dimensionless)');
    LEGEND_RATES(:,109) = strpad('d/dt m in component ina_camk (dimensionless)');
    LEGEND_RATES(:,110) = strpad('d/dt h in component ina_np (dimensionless)');
    LEGEND_RATES(:,111) = strpad('d/dt j in component ina_np (dimensionless)');
    LEGEND_RATES(:,112) = strpad('d/dt m in component ina_np (dimensionless)');
    LEGEND_RATES(:,113) = strpad('d/dt h in component ina_pka (dimensionless)');
    LEGEND_RATES(:,114) = strpad('d/dt j in component ina_pka (dimensionless)');
    LEGEND_RATES(:,115) = strpad('d/dt m in component ina_pka (dimensionless)');
    LEGEND_RATES(:,116) = strpad('d/dt f_inak in component inak (dimensionless)');
    LEGEND_RATES(:,117) = strpad('d/dt h in component inal (dimensionless)');
    LEGEND_RATES(:,118) = strpad('d/dt m in component inal (dimensionless)');
    LEGEND_RATES(:,119) = strpad('d/dt Irel_np in component irel (mM_per_ms)');
    LEGEND_RATES(:,120) = strpad('d/dt Irel_p in component irel (mM_per_ms)');
    LEGEND_RATES(:,121) = strpad('d/dt a_np in component ito (dimensionless)');
    LEGEND_RATES(:,122) = strpad('d/dt if_camk in component ito (dimensionless)');
    LEGEND_RATES(:,123) = strpad('d/dt if_np in component ito (dimensionless)');
    LEGEND_RATES(:,124) = strpad('d/dt is_camk in component ito (dimensionless)');
    LEGEND_RATES(:,125) = strpad('d/dt is_np in component ito (dimensionless)');
    LEGEND_RATES(:,126) = strpad('d/dt f_plb in component iup (dimensionless)');
    LEGEND_RATES(:,51) = strpad('d/dt V in component membrane (mV)');
    LEGEND_RATES(:,128) = strpad('d/dt PDE3_P_cav in component pde (uM)');
    LEGEND_RATES(:,129) = strpad('d/dt PDE3_P_cyt in component pde (uM)');
    LEGEND_RATES(:,130) = strpad('d/dt PDE4_P_cav in component pde (uM)');
    LEGEND_RATES(:,131) = strpad('d/dt PDE4_P_cyt in component pde (uM)');
    LEGEND_RATES(:,132) = strpad('d/dt PDE4_P_eca in component pde (uM)');
    LEGEND_RATES(:,133) = strpad('d/dt A2R in component pka_cav (uM)');
    LEGEND_RATES(:,134) = strpad('d/dt A2RC in component pka_cav (uM)');
    LEGEND_RATES(:,135) = strpad('d/dt ARC in component pka_cav (uM)');
    LEGEND_RATES(:,7) = strpad('d/dt C in component pka_cav (uM)');
    LEGEND_RATES(:,136) = strpad('d/dt PKIC in component pka_cav (uM)');
    LEGEND_RATES(:,137) = strpad('d/dt A2R in component pka_cyt (uM)');
    LEGEND_RATES(:,138) = strpad('d/dt A2RC in component pka_cyt (uM)');
    LEGEND_RATES(:,139) = strpad('d/dt ARC in component pka_cyt (uM)');
    LEGEND_RATES(:,20) = strpad('d/dt C in component pka_cyt (uM)');
    LEGEND_RATES(:,140) = strpad('d/dt PKIC in component pka_cyt (uM)');
    LEGEND_RATES(:,141) = strpad('d/dt A2R in component pka_eca (uM)');
    LEGEND_RATES(:,142) = strpad('d/dt A2RC in component pka_eca (uM)');
    LEGEND_RATES(:,143) = strpad('d/dt ARC in component pka_eca (uM)');
    LEGEND_RATES(:,30) = strpad('d/dt C in component pka_eca (uM)');
    LEGEND_RATES(:,144) = strpad('d/dt PKIC in component pka_eca (uM)');
    LEGEND_RATES(:,127) = strpad('d/dt K in component potassium (mM)');
    LEGEND_RATES(:,145) = strpad('d/dt inhib1_p in component pp1 (uM)');
    LEGEND_RATES(:,49) = strpad('d/dt Na in component sodium (mM)');
    LEGEND_RATES(:,50) = strpad('d/dt Na_sr in component sodium (mM)');
    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) = 5000.0;
    CONSTANTS(:,2) = 315.0;
    CONSTANTS(:,3) = 0.0465;
    CONSTANTS(:,4) = 0.031544;
    CONSTANTS(:,5) = 0.0852;
    CONSTANTS(:,6) = 0.4824;
    CONSTANTS(:,7) = 3.3757;
    CONSTANTS(:,8) = 41.32;
    CONSTANTS(:,9) = 0.03135;
    CONSTANTS(:,10) = 0.037696;
    STATES(:,1) = 2.09911481235842013e-3;
    STATES(:,2) = 6.85041638458664965e-3;
    STATES(:,3) = 7.31420577213055985e-4;
    STATES(:,4) = 1.84627603007976003e-2;
    CONSTANTS(:,11) = 0.16479;
    CONSTANTS(:,12) = 0.087459;
    CONSTANTS(:,13) = 1.0043;
    CONSTANTS(:,14) = 1.3574;
    CONSTANTS(:,15) = 0.6623;
    CONSTANTS(:,16) = 0.8569;
    CONSTANTS(:,17) = 0.025;
    CONSTANTS(:,18) = 0.025;
    STATES(:,5) = 6.73713947839316954e-4;
    CONSTANTS(:,19) = 1.27019999999999993e-6;
    CONSTANTS(:,20) = 6.62979999999999944e-5;
    CONSTANTS(:,21) = 0.01;
    CONSTANTS(:,22) = 0.0063064;
    CONSTANTS(:,23) = 0.043003;
    CONSTANTS(:,24) = 0.01;
    CONSTANTS(:,25) = 0.0001;
    CONSTANTS(:,26) = 0.0001;
    CONSTANTS(:,27) = 0.01;
    CONSTANTS(:,28) = 0.01;
    CONSTANTS(:,29) = 0.25;
    CONSTANTS(:,30) = 0.125;
    CONSTANTS(:,31) = 0.125;
    STATES(:,6) = 4.10693810508170991e-3;
    CONSTANTS(:,32) = 5.10090000000000044e-4;
    CONSTANTS(:,33) = 0.0025548;
    CONSTANTS(:,34) = 0.0006903;
    CONSTANTS(:,35) = 0.0038257;
    STATES(:,7) = 3.26565916584702978e-02;
    CONSTANTS(:,36) = 0.5;
    CONSTANTS(:,37) = 0.85;
    CONSTANTS(:,38) = 0.0011071;
    CONSTANTS(:,39) = 0.5664;
    CONSTANTS(:,40) = 0.081161;
    CONSTANTS(:,41) = 0.48744;
    CONSTANTS(:,42) = 0.85;
    CONSTANTS(:,43) = 4.0;
    CONSTANTS(:,44) = 4.9054;
    CONSTANTS(:,45) = 0.05;
    CONSTANTS(:,46) = 0.25945;
    CONSTANTS(:,47) = 2.449;
    CONSTANTS(:,48) = 0.062;
    CONSTANTS(:,49) = 0.567;
    CONSTANTS(:,50) = 1.6655;
    CONSTANTS(:,51) = 1.8463;
    CONSTANTS(:,52) = 0.1;
    CONSTANTS(:,53) = 0.012;
    CONSTANTS(:,54) = 1.053;
    CONSTANTS(:,55) = 1.053;
    CONSTANTS(:,56) = 0.8;
    CONSTANTS(:,57) = 1210.0;
    CONSTANTS(:,58) = 0.35;
    CONSTANTS(:,59) = 1.0;
    STATES(:,8) = 5.02792845976641014e-4;
    STATES(:,9) = 1.59632196638178009e-3;
    STATES(:,10) = 6.07316088556675987e-4;
    STATES(:,11) = 7.45773247314215036e-3;
    STATES(:,12) = 2.49592854373432000e-10;
    STATES(:,13) = 1.49041813757830998e-2;
    STATES(:,14) = 8.91799633266019011e-10;
    STATES(:,15) = 2.75455839709412009e-2;
    CONSTANTS(:,60) = 0.0;
    CONSTANTS(:,61) = 1.0;
    CONSTANTS(:,62) = 1.0;
    STATES(:,16) = 4.19991861054322011e-4;
    STATES(:,17) = 1.15141243826746994e-3;
    STATES(:,18) = 7.07824478944670999e-11;
    STATES(:,19) = 9.44463350378085993e-3;
    STATES(:,20) = 3.62113356111495976e-01;
    CONSTANTS(:,63) = 1.0;
    STATES(:,21) = 3.41341142614041016e-4;
    STATES(:,22) = 3.64315164237569004e-4;
    STATES(:,23) = 7.05656306851923029e-4;
    STATES(:,24) = 6.39038440072506948e-4;
    STATES(:,25) = 1.91017987408719017e-2;
    STATES(:,26) = 1.18055788874765002e-9;
    STATES(:,27) = 2.03016833596287999e-1;
    STATES(:,28) = 1.13428924662652000e-10;
    STATES(:,29) = 1.10248953370551007e-2;
    CONSTANTS(:,64) = 1.0;
    STATES(:,30) = 5.67249910261072965e-01;
    STATES(:,31) = 1.191;
    CONSTANTS(:,65) = 2.71430000000000008e-5;
    CONSTANTS(:,66) = 0.26714;
    CONSTANTS(:,67) = 1.0;
    CONSTANTS(:,68) = 1.124;
    CONSTANTS(:,69) = 0.0087;
    CONSTANTS(:,70) = 0.047;
    CONSTANTS(:,71) = 0.00087;
    CONSTANTS(:,72) = 0.05;
    CONSTANTS(:,73) = 10.0;
    CONSTANTS(:,74) = 0.8;
    STATES(:,32) = 6.73518785672381992e-1;
    CONSTANTS(:,75) = 0.10408;
    CONSTANTS(:,76) = 0.00238;
    CONSTANTS(:,77) = 0.052633;
    CONSTANTS(:,78) = 0.0005;
    CONSTANTS(:,79) = 0.07;
    STATES(:,33) = 0.013394;
    STATES(:,34) = 0.023413;
    STATES(:,35) = 6.8659;
    STATES(:,36) = 0.023413;
    CONSTANTS(:,80) = 0.05;
    CONSTANTS(:,81) = 0.25;
    CONSTANTS(:,82) = 0.0015;
    CONSTANTS(:,83) = 0.1;
    CONSTANTS(:,84) = 0.05;
    CONSTANTS(:,85) = 0.00068;
    STATES(:,37) = 0.0;
    STATES(:,38) = 0.0;
    STATES(:,39) = 0.0;
    STATES(:,40) = 0.0;
    STATES(:,41) = 0.0;
    STATES(:,42) = 0.0;
    CONSTANTS(:,86) = 100000.0;
    CONSTANTS(:,87) = 10000.0;
    STATES(:,43) = 0.0017546;
    STATES(:,44) = 3.47102959606005013e-1;
    STATES(:,45) = 4.74081735738210996e-1;
    STATES(:,46) = 9.62359241535767040e+00;
    CONSTANTS(:,88) = 96487.0;
    CONSTANTS(:,89) = 0.01;
    CONSTANTS(:,90) = 3.14159265358979312e+00;
    CONSTANTS(:,91) = 0.0011;
    STATES(:,47) = 20.273;
    STATES(:,48) = 20.273;
    CONSTANTS(:,92) = 1.77e-5;
    CONSTANTS(:,93) = 87.8251;
    CONSTANTS(:,94) = 2.46108000000000016e-5;
    STATES(:,49) = 6.8909;
    STATES(:,50) = 6.8909;
    CONSTANTS(:,95) = 0.2;
    CONSTANTS(:,96) = 0.02;
    CONSTANTS(:,97) = 75.0;
    CONSTANTS(:,98) = 1.8;
    CONSTANTS(:,99) = 100.0;
    CONSTANTS(:,100) = 5.4;
    CONSTANTS(:,101) = 140.0;
    STATES(:,51) = -87.491;
    CONSTANTS(:,102) = 1.995e-07;
    STATES(:,52) = 1.0;
    STATES(:,53) = 0.0;
    STATES(:,54) = 0.0;
    STATES(:,55) = 0.0;
    STATES(:,56) = 0.0;
    STATES(:,57) = 0.0;
    STATES(:,58) = 0.0;
    STATES(:,59) = 0.0;
    CONSTANTS(:,103) = 1.0;
    CONSTANTS(:,104) = 1e-06;
    STATES(:,60) = 1.0;
    STATES(:,61) = 0.0;
    STATES(:,62) = 0.0;
    STATES(:,63) = 0.0;
    STATES(:,64) = 0.0;
    STATES(:,65) = 0.0;
    STATES(:,66) = 0.0;
    STATES(:,67) = 0.0;
    CONSTANTS(:,105) = 1.0;
    CONSTANTS(:,106) = 1e-06;
    CONSTANTS(:,107) = 0.000225;
    CONSTANTS(:,108) = 9e-07;
    STATES(:,68) = 0.99604;
    CONSTANTS(:,109) = 0.4;
    CONSTANTS(:,110) = 8.0;
    STATES(:,69) = 1.23059999999999995e-08;
    CONSTANTS(:,111) = 0.025;
    STATES(:,70) = 9.37220000000000071e-16;
    STATES(:,71) = 1.65950000000000014e-17;
    STATES(:,72) = 1.12010000000000000e-15;
    STATES(:,73) = 1.66129999999999997e-18;
    STATES(:,74) = 0.91141;
    STATES(:,75) = 5.36959999999999959e-07;
    STATES(:,76) = 2.48610000000000001e-08;
    STATES(:,77) = 2.87759999999999997e-10;
    STATES(:,78) = 1.12169999999999999e-10;
    STATES(:,79) = 2.59670000000000003e-12;
    STATES(:,80) = 8.78740000000000076e-15;
    STATES(:,81) = 0.084395;
    STATES(:,82) = 0.0029306;
    STATES(:,83) = 4.52285000000000024e-05;
    STATES(:,84) = 2.61750000000000024e-07;
    STATES(:,85) = 0.0011424;
    STATES(:,86) = 7.93370000000000029e-05;
    STATES(:,87) = 1.83659999999999992e-06;
    STATES(:,88) = 1.41719999999999995e-08;
    CONSTANTS(:,112) = 0.0027304;
    STATES(:,89) = 0.95624;
    STATES(:,90) = 3.19559999999999984e-07;
    STATES(:,91) = 7.039e-09;
    STATES(:,92) = 3.87629999999999971e-11;
    STATES(:,93) = 5.02769999999999999e-11;
    STATES(:,94) = 5.53740000000000021e-13;
    STATES(:,95) = 2.96639999999999984e-15;
    STATES(:,96) = 0.042127;
    STATES(:,97) = 6.95969999999999965e-04;
    STATES(:,98) = 5.11010000000000042e-06;
    STATES(:,99) = 1.407e-08;
    STATES(:,100) = 9.02690000000000046e-04;
    STATES(:,101) = 2.98259999999999987e-05;
    STATES(:,102) = 3.285e-07;
    STATES(:,103) = 1.206e-09;
    CONSTANTS(:,113) = 0.0046171;
    STATES(:,104) = 7.65988420110534033e-04;
    CONSTANTS(:,114) = 0.01;
    CONSTANTS(:,115) = 9.97940000000000003e-05;
    CONSTANTS(:,116) = 1.11470000000000002e-04;
    CONSTANTS(:,117) = 0.0001;
    CONSTANTS(:,118) = 0.01;
    CONSTANTS(:,119) = 0.025;
    CONSTANTS(:,120) = 0.16305;
    CONSTANTS(:,121) = 1.0542;
    CONSTANTS(:,122) = 0.27623;
    CONSTANTS(:,123) = 0.002331;
    STATES(:,105) = 5.89379755147717982e-02;
    CONSTANTS(:,124) = 0.00384;
    CONSTANTS(:,125) = 0.069537;
    CONSTANTS(:,126) = 0.317;
    CONSTANTS(:,127) = 0.10988;
    CONSTANTS(:,128) = 7.8605;
    STATES(:,106) = 2.39479458960527997e-01;
    STATES(:,107) = 0.83805;
    STATES(:,108) = 0.99281;
    STATES(:,109) = 6.81269999999999988e-04;
    STATES(:,110) = 0.0068172;
    STATES(:,111) = 0.99709;
    STATES(:,112) = 0.90163;
    STATES(:,113) = 0.001236;
    STATES(:,114) = 0.99123;
    STATES(:,115) = 0.79472;
    CONSTANTS(:,129) = 0.01368;
    CONSTANTS(:,130) = 0.052811;
    CONSTANTS(:,131) = 3.25;
    CONSTANTS(:,132) = 3.7;
    CONSTANTS(:,133) = 4.9;
    CONSTANTS(:,134) = 3.2e-09;
    CONSTANTS(:,135) = 0.000125;
    CONSTANTS(:,136) = 0.0036;
    CONSTANTS(:,137) = 1.3;
    CONSTANTS(:,138) = 12.3;
    CONSTANTS(:,139) = 87.5;
    CONSTANTS(:,140) = 0.27;
    CONSTANTS(:,141) = 0.32;
    CONSTANTS(:,142) = 4.5;
    CONSTANTS(:,143) = 0.0011001;
    CONSTANTS(:,144) = 5.7392;
    STATES(:,116) = 1.26345311579565994e-01;
    CONSTANTS(:,145) = 1.4;
    CONSTANTS(:,146) = 0.015265;
    CONSTANTS(:,147) = 1.5;
    CONSTANTS(:,148) = 2.6;
    CONSTANTS(:,149) = 1.846;
    CONSTANTS(:,150) = 0.092455;
    STATES(:,117) = 0.36003;
    STATES(:,118) = 0.0007053;
    CONSTANTS(:,151) = 600.0;
    CONSTANTS(:,152) = 0.0575;
    CONSTANTS(:,153) = 0.0005;
    STATES(:,119) = 3.66750000000000000e-09;
    STATES(:,120) = 7.30739999999999981e-09;
    CONSTANTS(:,154) = 20.0;
    CONSTANTS(:,155) = 1.1;
    CONSTANTS(:,156) = 0.000175;
    CONSTANTS(:,157) = 0.0005;
    CONSTANTS(:,158) = 0.4975;
    STATES(:,121) = 1.76869999999999985e-05;
    STATES(:,122) = 1.0;
    STATES(:,123) = 0.99798;
    STATES(:,124) = 1.0;
    STATES(:,125) = 0.98747;
    CONSTANTS(:,159) = 9.88539999999999992e-04;
    CONSTANTS(:,160) = 0.00092;
    CONSTANTS(:,161) = 0.80737;
    STATES(:,126) = 5.92167467082830967e-01;
    CONSTANTS(:,162) = 0.004375;
    CONSTANTS(:,163) = 0.11348;
    CONSTANTS(:,164) = 0.48302;
    CONSTANTS(:,165) = 15.0;
    CONSTANTS(:,166) = 0.01833;
    STATES(:,127) = 145.62;
    CONSTANTS(:,167) = 0.52218;
    CONSTANTS(:,168) = 21.58;
    CONSTANTS(:,169) = 2.642;
    CONSTANTS(:,170) = 11.89;
    CONSTANTS(:,171) = 50.0;
    CONSTANTS(:,172) = 0.8;
    CONSTANTS(:,173) = 1.4;
    CONSTANTS(:,174) = 0.029268;
    STATES(:,128) = 2.36821659448036986e-02;
    STATES(:,129) = 1.28402905095187994e-02;
    STATES(:,130) = 6.37363047239019025e-03;
    STATES(:,131) = 9.17039986149184062e-03;
    STATES(:,132) = 4.29171113639321980e-05;
    CONSTANTS(:,175) = 3.0;
    CONSTANTS(:,176) = 0.16957;
    CONSTANTS(:,177) = 2.12570000000000006e-04;
    CONSTANTS(:,178) = 0.12481;
    CONSTANTS(:,179) = 0.125;
    CONSTANTS(:,180) = 0.2;
    CONSTANTS(:,181) = 0.35;
    CONSTANTS(:,182) = 1.167;
    CONSTANTS(:,183) = 0.7629;
    CONSTANTS(:,184) = 0.9024;
    CONSTANTS(:,185) = 0.0;
    CONSTANTS(:,186) = 20.0;
    CONSTANTS(:,187) = 2.5;
    CONSTANTS(:,188) = 4.0;
    CONSTANTS(:,189) = 0.0196;
    CONSTANTS(:,190) = 3.71;
    CONSTANTS(:,191) = 8314.0;
    CONSTANTS(:,192) = 310.0;
    CONSTANTS(:,193) = 0.5;
    CONSTANTS(:,194) = 0.0388;
    CONSTANTS(:,195) = 0.1;
    CONSTANTS(:,196) = 50.0;
    STATES(:,133) = 2.25475702283052998e-01;
    STATES(:,134) = 2.76490711096605019e-03;
    STATES(:,135) = 9.04820284659604013e-02;
    CONSTANTS(:,197) = 2.4984;
    CONSTANTS(:,198) = 11.359;
    CONSTANTS(:,199) = 0.3755;
    STATES(:,136) = 1.92819110624504991e-01;
    CONSTANTS(:,200) = 100.0;
    CONSTANTS(:,201) = 100.0;
    CONSTANTS(:,202) = 100.0;
    STATES(:,137) = 4.89063888619455989e-01;
    STATES(:,138) = 6.64997605558790977e-02;
    STATES(:,139) = 6.46928309115710060e-02;
    CONSTANTS(:,203) = 0.1088;
    CONSTANTS(:,204) = 0.4612;
    CONSTANTS(:,205) = 0.3755;
    STATES(:,140) = 1.26950532507959013e-01;
    STATES(:,141) = 8.17161796756963987e-01;
    STATES(:,142) = 1.74057375932567010e-01;
    STATES(:,143) = 2.05444874210056000e-01;
    STATES(:,144) = 2.49911886495889995e-01;
    CONSTANTS(:,206) = 0.001;
    CONSTANTS(:,207) = 1.95259999999999991e-05;
    CONSTANTS(:,208) = 0.001469;
    CONSTANTS(:,209) = 0.2;
    CONSTANTS(:,210) = 0.3;
    STATES(:,145) = 2.82662056977524001e-02;
    CONSTANTS(:,211) = 0.0035731;
    CONSTANTS(:,212) = 0.010145;
    CONSTANTS(:,213) = 0.5;
    CONSTANTS(:,214) = 100.0;
    CONSTANTS(:,215) = 1000.0;
    CONSTANTS(:,216) = 1.00000 - CONSTANTS(:,37);
    CONSTANTS(:,217) = (1.00000 - CONSTANTS(:,38)) - CONSTANTS(:,39);
    CONSTANTS(:,218) =  CONSTANTS(:,58).*0.000983300;
    CONSTANTS(:,219) =  CONSTANTS(:,58).*0.00133000;
    CONSTANTS(:,220) = CONSTANTS(:,56);
    CONSTANTS(:,221) =  CONSTANTS(:,58).*0.00650000;
    CONSTANTS(:,222) = CONSTANTS(:,57);
    CONSTANTS(:,223) = ( (CONSTANTS(:,52)+CONSTANTS(:,60)).*(CONSTANTS(:,55)+CONSTANTS(:,60)))./CONSTANTS(:,55);
    CONSTANTS(:,224) =  ( ( CONSTANTS(:,49).*CONSTANTS(:,54)).*(CONSTANTS(:,48)+CONSTANTS(:,60))).*(CONSTANTS(:,53)+CONSTANTS(:,60));
    CONSTANTS(:,225) = ( (CONSTANTS(:,48)+CONSTANTS(:,60)).*(CONSTANTS(:,49)+CONSTANTS(:,60)))./CONSTANTS(:,49);
    CONSTANTS(:,226) = ( (CONSTANTS(:,52)+CONSTANTS(:,60)).*(CONSTANTS(:,55)+CONSTANTS(:,60)))./CONSTANTS(:,55);
    CONSTANTS(:,227) =  ( ( CONSTANTS(:,49).*CONSTANTS(:,54)).*(CONSTANTS(:,48)+CONSTANTS(:,60))).*(CONSTANTS(:,53)+CONSTANTS(:,60));
    CONSTANTS(:,228) = CONSTANTS(:,1)./(CONSTANTS(:,2)+CONSTANTS(:,1));
    CONSTANTS(:,229) = CONSTANTS(:,70)+CONSTANTS(:,68);
    CONSTANTS(:,230) =  1.50000.*CONSTANTS(:,78);
    CONSTANTS(:,231) =  CONSTANTS(:,71).*CONSTANTS(:,69);
    CONSTANTS(:,232) = CONSTANTS(:,87);
    CONSTANTS(:,233) = CONSTANTS(:,86);
    CONSTANTS(:,234) = CONSTANTS(:,86);
    CONSTANTS(:,235) = CONSTANTS(:,86);
    CONSTANTS(:,236) =  7.50000e-14.*1.00000e+06;
    CONSTANTS(:,237) =  5.00000e-15.*1.00000e+06;
    CONSTANTS(:,238) =  9.00000e-15.*1.00000e+06;
    CONSTANTS(:,239) = ( CONSTANTS(:,191).*CONSTANTS(:,192))./CONSTANTS(:,88);
    CONSTANTS(:,240) =  0.500000.*power((CONSTANTS(:,100)./5.40000), 1.0 ./ 2);
    CONSTANTS(:,241) =  0.0138542.*power((CONSTANTS(:,100)./5.40000), 1.0 ./ 2);
    CONSTANTS(:,242) =  ( 2.15000.*8.25000).*1.10000;
    CONSTANTS(:,243) = CONSTANTS(:,100)./(CONSTANTS(:,100)+CONSTANTS(:,147));
    CONSTANTS(:,244) =  0.666700.*4.75000;
    CONSTANTS(:,245) =  CONSTANTS(:,167).*CONSTANTS(:,189);
    CONSTANTS(:,246) = 0.0100000./50.0000;
    CONSTANTS(:,247) =  CONSTANTS(:,200).*CONSTANTS(:,197);
    CONSTANTS(:,248) =  CONSTANTS(:,201).*CONSTANTS(:,198);
    CONSTANTS(:,249) =  CONSTANTS(:,202).*CONSTANTS(:,199);
    CONSTANTS(:,250) = CONSTANTS(:,200);
    CONSTANTS(:,251) = CONSTANTS(:,201);
    CONSTANTS(:,252) = CONSTANTS(:,202);
    CONSTANTS(:,253) = CONSTANTS(:,197);
    CONSTANTS(:,254) = CONSTANTS(:,198);
    CONSTANTS(:,255) = CONSTANTS(:,199);
    CONSTANTS(:,256) =  (CONSTANTS(:,210)./(1.00000 - CONSTANTS(:,210))).*CONSTANTS(:,206)+ CONSTANTS(:,210).*CONSTANTS(:,209);
    CONSTANTS(:,257) =  - 80.0000;
    CONSTANTS(:,258) =  0.156290.*CONSTANTS(:,221);
    CONSTANTS(:,259) =  ( ( ( CONSTANTS(:,47).*CONSTANTS(:,48)).*CONSTANTS(:,54)).*(CONSTANTS(:,53)+CONSTANTS(:,60))).*(CONSTANTS(:,49)+CONSTANTS(:,60));
    CONSTANTS(:,260) =  ( ( ( CONSTANTS(:,47).*CONSTANTS(:,48)).*CONSTANTS(:,54)).*(CONSTANTS(:,53)+CONSTANTS(:,60))).*(CONSTANTS(:,49)+CONSTANTS(:,60));
    CONSTANTS(:,261) = 1.00000./(1.00000+0.350000);
    CONSTANTS(:,262) = CONSTANTS(:,71)+CONSTANTS(:,69);
    CONSTANTS(:,263) = ( CONSTANTS(:,70).*CONSTANTS(:,69)+ CONSTANTS(:,68).*CONSTANTS(:,71))+CONSTANTS(:,231);
    CONSTANTS(:,264) = 1.00000./CONSTANTS(:,239);
    CONSTANTS(:,265) =  CONSTANTS(:,196).*CONSTANTS(:,246);
    CONSTANTS(:,266) =  CONSTANTS(:,250).*CONSTANTS(:,203);
    CONSTANTS(:,267) =  CONSTANTS(:,251).*CONSTANTS(:,204);
    CONSTANTS(:,268) =  CONSTANTS(:,252).*CONSTANTS(:,205);
    CONSTANTS(:,269) = CONSTANTS(:,200);
    CONSTANTS(:,270) = CONSTANTS(:,201);
    CONSTANTS(:,271) = CONSTANTS(:,202);
    CONSTANTS(:,272) =  ( ( ( CONSTANTS(:,51).*CONSTANTS(:,53)).*CONSTANTS(:,49)).*(CONSTANTS(:,48)+CONSTANTS(:,60))).*(CONSTANTS(:,54)+CONSTANTS(:,60));
    CONSTANTS(:,273) =  ( ( ( CONSTANTS(:,51).*CONSTANTS(:,53)).*CONSTANTS(:,49)).*(CONSTANTS(:,48)+CONSTANTS(:,60))).*(CONSTANTS(:,54)+CONSTANTS(:,60));
    CONSTANTS(:,274) = 1.00000+(CONSTANTS(:,17) - CONSTANTS(:,18))./CONSTANTS(:,25);
    CONSTANTS(:,275) = CONSTANTS(:,229)+CONSTANTS(:,262);
    CONSTANTS(:,276) =  CONSTANTS(:,88).*CONSTANTS(:,264);
    CONSTANTS(:,277) =  CONSTANTS(:,269).*CONSTANTS(:,253);
    CONSTANTS(:,278) =  CONSTANTS(:,270).*CONSTANTS(:,254);
    CONSTANTS(:,279) =  CONSTANTS(:,271).*CONSTANTS(:,255);
    CONSTANTS(:,280) =  ( ( ( ( CONSTANTS(:,47).*CONSTANTS(:,51)).*CONSTANTS(:,48)).*CONSTANTS(:,53)).*(CONSTANTS(:,49)+CONSTANTS(:,60))).*(CONSTANTS(:,54)+CONSTANTS(:,60));
    CONSTANTS(:,281) =  ( ( ( ( CONSTANTS(:,47).*CONSTANTS(:,51)).*CONSTANTS(:,48)).*CONSTANTS(:,53)).*(CONSTANTS(:,49)+CONSTANTS(:,60))).*(CONSTANTS(:,54)+CONSTANTS(:,60));
    CONSTANTS(:,282) =  (CONSTANTS(:,25)./2.00000).*(power((power(CONSTANTS(:,274), 2.00000)+( 4.00000.*CONSTANTS(:,18))./CONSTANTS(:,25)), 1.0 ./ 2) - CONSTANTS(:,274));
    CONSTANTS(:,283) = (((CONSTANTS(:,17)+CONSTANTS(:,30))+CONSTANTS(:,21))+CONSTANTS(:,24)) - CONSTANTS(:,29);
    CONSTANTS(:,284) = (( CONSTANTS(:,17).*CONSTANTS(:,24)+ CONSTANTS(:,30).*CONSTANTS(:,21))+ CONSTANTS(:,21).*CONSTANTS(:,24)) -  CONSTANTS(:,29).*(CONSTANTS(:,21)+CONSTANTS(:,24));
    CONSTANTS(:,285) =  ( CONSTANTS(:,29).*CONSTANTS(:,21)).*CONSTANTS(:,24);
    CONSTANTS(:,286) = ((( ( - CONSTANTS(:,285)./27.0000).*power(CONSTANTS(:,283), 3.00000) - ( ( ( CONSTANTS(:,283).*CONSTANTS(:,283)).*CONSTANTS(:,284)).*CONSTANTS(:,284))./108.000)+( ( CONSTANTS(:,283).*CONSTANTS(:,284)).*CONSTANTS(:,285))./6.00000)+power(CONSTANTS(:,284), 3.00000)./27.0000)+( CONSTANTS(:,285).*CONSTANTS(:,285))./4.00000;
    CONSTANTS(:,287) = piecewise({CONSTANTS(:,286)<0.00000, power( - CONSTANTS(:,286), 1.0 ./ 2) }, 0.00000);
    CONSTANTS(:,288) = ((piecewise({CONSTANTS(:,286)>0.00000, power(CONSTANTS(:,286), 1.0 ./ 2) }, 0.00000)+CONSTANTS(:,285)./2.00000)+( CONSTANTS(:,283).*CONSTANTS(:,284))./6.00000) - power(CONSTANTS(:,283), 3.00000)./27.0000;
    CONSTANTS(:,289) = atan(CONSTANTS(:,287)./CONSTANTS(:,288))./3.00000;
    CONSTANTS(:,290) = power( CONSTANTS(:,288).*CONSTANTS(:,288)+ CONSTANTS(:,287).*CONSTANTS(:,287), 1.00000./6.00000);
    CONSTANTS(:,291) = (CONSTANTS(:,284)./3.00000 - ( CONSTANTS(:,283).*CONSTANTS(:,283))./9.00000)./( CONSTANTS(:,290).*CONSTANTS(:,290));
    CONSTANTS(:,292) =  ( CONSTANTS(:,290).*cos(CONSTANTS(:,289))).*(1.00000 - CONSTANTS(:,291)) - CONSTANTS(:,283)./3.00000;
    CONSTANTS(:,293) = 1.00000+(CONSTANTS(:,30) - CONSTANTS(:,31))./CONSTANTS(:,26);
    CONSTANTS(:,294) =  (CONSTANTS(:,26)./2.00000).*(power((power(CONSTANTS(:,293), 2.00000)+( 4.00000.*CONSTANTS(:,31))./CONSTANTS(:,26)), 1.0 ./ 2) - CONSTANTS(:,293));
    CONSTANTS(:,295) =  0.850000.*0.0250000;
    CONSTANTS(:,296) =  224.000.*CONSTANTS(:,295);
    CONSTANTS(:,297) =  3.00000.*CONSTANTS(:,295);
    CONSTANTS(:,298) =  0.150000.*0.0250000;
    CONSTANTS(:,299) = (1.00000 - CONSTANTS(:,40)) - CONSTANTS(:,41);
    CONSTANTS(:,300) = 1.00000 - CONSTANTS(:,42);
    CONSTANTS(:,301) =  ( ( 2.00000.*CONSTANTS(:,90)).*CONSTANTS(:,91)).*(CONSTANTS(:,91)+CONSTANTS(:,89));
    CONSTANTS(:,302) =  2.00000.*CONSTANTS(:,301);
    CONSTANTS(:,303) = CONSTANTS(:,302)./CONSTANTS(:,88);
    CONSTANTS(:,304) =  ( ( ( 1000.00.*CONSTANTS(:,90)).*CONSTANTS(:,91)).*CONSTANTS(:,91)).*CONSTANTS(:,89);
    CONSTANTS(:,305) =  CONSTANTS(:,304).*0.00200000;
    CONSTANTS(:,306) = CONSTANTS(:,303)./( 2.00000.*CONSTANTS(:,305));
    CONSTANTS(:,307) =  0.0200000.*CONSTANTS(:,304);
    CONSTANTS(:,308) =  CONSTANTS(:,304).*0.678000;
    CONSTANTS(:,309) = CONSTANTS(:,303)./( 2.00000.*CONSTANTS(:,308));
    CONSTANTS(:,310) =  0.0400000.*CONSTANTS(:,304);
    CONSTANTS(:,311) =  CONSTANTS(:,304).*0.00480000;
    CONSTANTS(:,312) =  CONSTANTS(:,304).*0.0552000;
    CONSTANTS(:,313) = CONSTANTS(:,311)./CONSTANTS(:,312);
    CONSTANTS(:,314) = CONSTANTS(:,312)./CONSTANTS(:,308);
    CONSTANTS(:,315) =  CONSTANTS(:,304).*0.0200000;
    CONSTANTS(:,316) = CONSTANTS(:,315)./CONSTANTS(:,305);
    CONSTANTS(:,317) =  - CONSTANTS(:,303)./CONSTANTS(:,315);
    CONSTANTS(:,318) =  - CONSTANTS(:,311)./CONSTANTS(:,315);
    CONSTANTS(:,319) = CONSTANTS(:,315)./CONSTANTS(:,308);
    CONSTANTS(:,320) = CONSTANTS(:,304)./CONSTANTS(:,307);
    CONSTANTS(:,321) =  ( ( CONSTANTS(:,12).*CONSTANTS(:,261)).*CONSTANTS(:,297)).*CONSTANTS(:,320);
    CONSTANTS(:,322) = CONSTANTS(:,304)./CONSTANTS(:,308);
    CONSTANTS(:,323) =  ( CONSTANTS(:,40).*CONSTANTS(:,295)).*CONSTANTS(:,320);
    CONSTANTS(:,324) =  ( CONSTANTS(:,42).*CONSTANTS(:,298)).*CONSTANTS(:,320);
    CONSTANTS(:,325) =  ( ( (1.00000 - CONSTANTS(:,11)).*(1.00000 - CONSTANTS(:,261))).*CONSTANTS(:,297)).*CONSTANTS(:,322);
    CONSTANTS(:,326) =  ( CONSTANTS(:,299).*CONSTANTS(:,295)).*CONSTANTS(:,322);
    CONSTANTS(:,327) = CONSTANTS(:,304)./CONSTANTS(:,310);
    CONSTANTS(:,328) = (1.00000 - CONSTANTS(:,194)) - CONSTANTS(:,195);
    CONSTANTS(:,329) =  ( ( (1.00000 - CONSTANTS(:,12)).*CONSTANTS(:,261)).*CONSTANTS(:,297)).*CONSTANTS(:,322);
    CONSTANTS(:,330) =  ( ( CONSTANTS(:,11).*(1.00000 - CONSTANTS(:,261))).*CONSTANTS(:,297)).*CONSTANTS(:,327);
    CONSTANTS(:,331) =  ( CONSTANTS(:,41).*CONSTANTS(:,295)).*CONSTANTS(:,327);
    CONSTANTS(:,332) =  ( CONSTANTS(:,300).*CONSTANTS(:,298)).*CONSTANTS(:,327);
    CONSTANTS(:,333) = CONSTANTS(:,303)./CONSTANTS(:,308);
    CONSTANTS(:,334) = (1.00000 - CONSTANTS(:,176)) - CONSTANTS(:,177);
    CONSTANTS(:,335) = CONSTANTS(:,176)+CONSTANTS(:,177);
    CONSTANTS(:,336) =  ( CONSTANTS(:,328).*CONSTANTS(:,193)).*CONSTANTS(:,322);
    CONSTANTS(:,337) =  0.200000.*CONSTANTS(:,193);
    CONSTANTS(:,338) = CONSTANTS(:,315)./CONSTANTS(:,308);
    CONSTANTS(:,339) = power( CONSTANTS(:,185).*1.00000, CONSTANTS(:,182));
    CONSTANTS(:,340) = 1.00000 - CONSTANTS(:,179);
    CONSTANTS(:,341) = CONSTANTS(:,194);
    CONSTANTS(:,342) = CONSTANTS(:,303)./CONSTANTS(:,315);
    CONSTANTS(:,343) =  (1.00000 - CONSTANTS(:,339)./(CONSTANTS(:,168)+CONSTANTS(:,339))).*CONSTANTS(:,174);
    CONSTANTS(:,344) = CONSTANTS(:,179) - CONSTANTS(:,178);
    CONSTANTS(:,345) =  ( CONSTANTS(:,341).*CONSTANTS(:,337)).*CONSTANTS(:,320);
    CONSTANTS(:,346) = CONSTANTS(:,195);
    CONSTANTS(:,347) = power(87.8251, 4.00000);
    CONSTANTS(:,348) =  ( CONSTANTS(:,343).*CONSTANTS(:,176)).*CONSTANTS(:,320);
    CONSTANTS(:,349) =  ( CONSTANTS(:,343).*CONSTANTS(:,334)).*CONSTANTS(:,322);
    CONSTANTS(:,350) =  ( CONSTANTS(:,343).*CONSTANTS(:,177)).*CONSTANTS(:,327);
    CONSTANTS(:,351) = power( CONSTANTS(:,185).*1.00000, CONSTANTS(:,183));
    CONSTANTS(:,352) =  ( CONSTANTS(:,346).*CONSTANTS(:,337)).*CONSTANTS(:,327);
    CONSTANTS(:,353) = (1.00000 - CONSTANTS(:,341)) - CONSTANTS(:,346);
    CONSTANTS(:,354) = 1.00000+(CONSTANTS(:,119) - CONSTANTS(:,111))./CONSTANTS(:,117);
    CONSTANTS(:,355) = power( CONSTANTS(:,185).*1.00000, CONSTANTS(:,184));
    CONSTANTS(:,356) =  ( CONSTANTS(:,353).*CONSTANTS(:,337)).*CONSTANTS(:,322);
    CONSTANTS(:,357) =  (CONSTANTS(:,117)./2.00000).*(power((power(CONSTANTS(:,354), 2.00000)+( 4.00000.*CONSTANTS(:,111))./CONSTANTS(:,117)), 1.0 ./ 2) - CONSTANTS(:,354));
    CONSTANTS(:,358) = CONSTANTS(:,181)./(1.00000 - CONSTANTS(:,181));
    CONSTANTS(:,359) = 1.00000+(CONSTANTS(:,119) - CONSTANTS(:,83))./CONSTANTS(:,114);
    CONSTANTS(:,360) =  CONSTANTS(:,358).*( CONSTANTS(:,179).*(((1.00000+CONSTANTS(:,190)) -  CONSTANTS(:,190).*CONSTANTS(:,335)) - CONSTANTS(:,180))+ CONSTANTS(:,335).*(CONSTANTS(:,180) - 1.00000))+ ( CONSTANTS(:,190).*CONSTANTS(:,179)).*(CONSTANTS(:,180) - CONSTANTS(:,335));
    CONSTANTS(:,361) =  (CONSTANTS(:,114)./2.00000).*(power((power(CONSTANTS(:,359), 2.00000)+( 4.00000.*CONSTANTS(:,83))./CONSTANTS(:,114)), 1.0 ./ 2) - CONSTANTS(:,359));
    CONSTANTS(:,362) =  CONSTANTS(:,179).*((1.00000+CONSTANTS(:,190))+ CONSTANTS(:,180).*(CONSTANTS(:,358) - CONSTANTS(:,190))) -  CONSTANTS(:,180).*(1.00000+CONSTANTS(:,358));
    CONSTANTS(:,363) = power(CONSTANTS(:,138), 3.00000);
    CONSTANTS(:,364) =  (CONSTANTS(:,360)./CONSTANTS(:,362)).*CONSTANTS(:,174);
    CONSTANTS(:,365) = power(CONSTANTS(:,139), 3.00000);
    CONSTANTS(:,366) = ( (CONSTANTS(:,180) - CONSTANTS(:,335)).*CONSTANTS(:,174)+ CONSTANTS(:,180).*CONSTANTS(:,364))./( (1.00000+CONSTANTS(:,190)).*CONSTANTS(:,179) - CONSTANTS(:,180));
    CONSTANTS(:,367) = power(CONSTANTS(:,101), 3.00000);
    CONSTANTS(:,368) = ( ( CONSTANTS(:,190).*CONSTANTS(:,179)).*CONSTANTS(:,366))./CONSTANTS(:,364);
    CONSTANTS(:,369) =  (1.00000 - CONSTANTS(:,355)./(CONSTANTS(:,170)+CONSTANTS(:,355))).*CONSTANTS(:,366);
    CONSTANTS(:,370) = CONSTANTS(:,160) - 0.000170000;
    CONSTANTS(:,371) =  ( CONSTANTS(:,369).*CONSTANTS(:,178)).*CONSTANTS(:,320);
    CONSTANTS(:,372) =  ( CONSTANTS(:,369).*CONSTANTS(:,340)).*CONSTANTS(:,322);
    CONSTANTS(:,373) =  ( CONSTANTS(:,369).*CONSTANTS(:,344)).*CONSTANTS(:,327);
    CONSTANTS(:,374) = 1.00000 - CONSTANTS(:,368);
    CONSTANTS(:,375) =  CONSTANTS(:,160).*(1.00000 - 0.460000);
    CONSTANTS(:,376) =  (1.00000 - CONSTANTS(:,351)./(CONSTANTS(:,169)+CONSTANTS(:,351))).*CONSTANTS(:,364);
    CONSTANTS(:,377) = CONSTANTS(:,375);
    CONSTANTS(:,378) =  ( CONSTANTS(:,376).*CONSTANTS(:,368)).*CONSTANTS(:,320);
    CONSTANTS(:,379) =  ( CONSTANTS(:,376).*CONSTANTS(:,374)).*CONSTANTS(:,322);
    CONSTANTS(:,380) =  3.25000.*CONSTANTS(:,162);
    CONSTANTS(:,381) =  ( CONSTANTS(:,194).*CONSTANTS(:,193)).*CONSTANTS(:,320);
    CONSTANTS(:,382) = (((CONSTANTS(:,17)+CONSTANTS(:,30))+CONSTANTS(:,27))+CONSTANTS(:,28)) - CONSTANTS(:,381);
    CONSTANTS(:,383) = (( CONSTANTS(:,17).*CONSTANTS(:,28)+ CONSTANTS(:,30).*CONSTANTS(:,27))+ CONSTANTS(:,27).*CONSTANTS(:,28)) -  CONSTANTS(:,381).*(CONSTANTS(:,27)+CONSTANTS(:,28));
    CONSTANTS(:,384) =  ( CONSTANTS(:,381).*CONSTANTS(:,27)).*CONSTANTS(:,28);
    CONSTANTS(:,385) = ((( ( - CONSTANTS(:,384)./27.0000).*power(CONSTANTS(:,382), 3.00000) - ( ( ( CONSTANTS(:,382).*CONSTANTS(:,382)).*CONSTANTS(:,383)).*CONSTANTS(:,383))./108.000)+( ( CONSTANTS(:,382).*CONSTANTS(:,383)).*CONSTANTS(:,384))./6.00000)+power(CONSTANTS(:,383), 3.00000)./27.0000)+( CONSTANTS(:,384).*CONSTANTS(:,384))./4.00000;
    CONSTANTS(:,386) = piecewise({CONSTANTS(:,385)<0.00000, power( - CONSTANTS(:,385), 1.0 ./ 2) }, 0.00000);
    CONSTANTS(:,387) = ((piecewise({CONSTANTS(:,385)>0.00000, power(CONSTANTS(:,385), 1.0 ./ 2) }, 0.00000)+CONSTANTS(:,384)./2.00000)+( CONSTANTS(:,382).*CONSTANTS(:,383))./6.00000) - power(CONSTANTS(:,382), 3.00000)./27.0000;
    CONSTANTS(:,388) = atan(CONSTANTS(:,386)./CONSTANTS(:,387))./3.00000;
    CONSTANTS(:,389) = power( CONSTANTS(:,387).*CONSTANTS(:,387)+ CONSTANTS(:,386).*CONSTANTS(:,386), 1.00000./6.00000);
    CONSTANTS(:,390) = (CONSTANTS(:,383)./3.00000 - ( CONSTANTS(:,382).*CONSTANTS(:,382))./9.00000)./( CONSTANTS(:,389).*CONSTANTS(:,389));
    CONSTANTS(:,391) =  ( CONSTANTS(:,389).*cos(CONSTANTS(:,388))).*(1.00000 - CONSTANTS(:,390)) - CONSTANTS(:,382)./3.00000;
    CONSTANTS(:,392) = ((CONSTANTS(:,17) - CONSTANTS(:,18))+CONSTANTS(:,282))./( (CONSTANTS(:,292)./CONSTANTS(:,21)+1.00000).*(CONSTANTS(:,391)./CONSTANTS(:,27)+1.00000));
    CONSTANTS(:,393) = ( ( CONSTANTS(:,282).*CONSTANTS(:,392)).*CONSTANTS(:,391))./( CONSTANTS(:,25).*CONSTANTS(:,27));
    CONSTANTS(:,394) = ( CONSTANTS(:,393).*CONSTANTS(:,292))./CONSTANTS(:,21);
    CONSTANTS(:,395) = ((CONSTANTS(:,30) - CONSTANTS(:,31))+CONSTANTS(:,294))./( (CONSTANTS(:,292)./CONSTANTS(:,24)+1.00000).*(CONSTANTS(:,391)./CONSTANTS(:,28)+1.00000));
    CONSTANTS(:,396) = ( ( CONSTANTS(:,294).*CONSTANTS(:,395)).*CONSTANTS(:,391))./( CONSTANTS(:,26).*CONSTANTS(:,28));
    CONSTANTS(:,397) = ( CONSTANTS(:,396).*CONSTANTS(:,292))./CONSTANTS(:,24);
    CONSTANTS(:,398) = 0.0269000+CONSTANTS(:,393)./CONSTANTS(:,18);
    CONSTANTS(:,399) = 0.0329000+CONSTANTS(:,396)./CONSTANTS(:,31);
    CONSTANTS(:,400) =  ( CONSTANTS(:,195).*CONSTANTS(:,193)).*CONSTANTS(:,327);
    CONSTANTS(:,401) = 1.00000+(CONSTANTS(:,119) - CONSTANTS(:,400))./CONSTANTS(:,118);
    CONSTANTS(:,402) =  (CONSTANTS(:,118)./2.00000).*(power((power(CONSTANTS(:,401), 2.00000)+( 4.00000.*CONSTANTS(:,400))./CONSTANTS(:,118)), 1.0 ./ 2) - CONSTANTS(:,401));
    CONSTANTS(:,403) = ((CONSTANTS(:,119) - CONSTANTS(:,111))+CONSTANTS(:,357))./( (1.00000+CONSTANTS(:,361)./CONSTANTS(:,114)).*(1.00000+CONSTANTS(:,402)./CONSTANTS(:,118)));
    CONSTANTS(:,404) = ( ( CONSTANTS(:,357).*CONSTANTS(:,403)).*CONSTANTS(:,402))./( CONSTANTS(:,117).*CONSTANTS(:,118));
    CONSTANTS(:,405) = 0.0306000+CONSTANTS(:,404)./CONSTANTS(:,111);
    CONSTANTS(:,406) = ( CONSTANTS(:,404).*CONSTANTS(:,361))./CONSTANTS(:,114);
    CONSTANTS(:,407) =  - CONSTANTS(:,303)./CONSTANTS(:,308);
    CONSTANTS(:,408) =  - CONSTANTS(:,303)./CONSTANTS(:,308);
    CONSTANTS(:,409) = CONSTANTS(:,315)./CONSTANTS(:,308);
    CONSTANTS(:,410) = ( 3.00000.*CONSTANTS(:,303))./CONSTANTS(:,315);
    if (isempty(STATES)), warning('Initial values for states not set');, end
end

function [RATES, ALGEBRAIC] = computeRates(VOI, STATES, CONSTANTS)
    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
    RATES(:,8) =  0.00100000.*( CONSTANTS(:,220).*STATES(:,9) -  ( CONSTANTS(:,222).*STATES(:,1)).*STATES(:,8));
    RATES(:,10) =  0.00100000.*( CONSTANTS(:,56).*STATES(:,2) -  ( CONSTANTS(:,57).*STATES(:,11)).*STATES(:,10));
    RATES(:,16) =  0.00100000.*( CONSTANTS(:,56).*STATES(:,3) -  ( CONSTANTS(:,57).*STATES(:,17)).*STATES(:,16));
    RATES(:,21) =  0.00100000.*( CONSTANTS(:,220).*STATES(:,22) -  ( CONSTANTS(:,222).*STATES(:,23)).*STATES(:,21));
    RATES(:,24) =  0.00100000.*( CONSTANTS(:,56).*STATES(:,4) -  ( CONSTANTS(:,57).*STATES(:,25)).*STATES(:,24));
    RATES(:,32) =  0.00100000.*(( ( CONSTANTS(:,75).*STATES(:,20)).*(1.00000 - STATES(:,32)))./(CONSTANTS(:,65)+ (1.00000 - STATES(:,32)).*1.00000) - ( ( CONSTANTS(:,77).*CONSTANTS(:,67)).*STATES(:,32))./(CONSTANTS(:,66)+ STATES(:,32).*1.00000));
    RATES(:,105) =  0.00100000.*(( ( CONSTANTS(:,125).*STATES(:,30)).*(1.00000 - STATES(:,105)))./(CONSTANTS(:,122)+ (1.00000 - STATES(:,105)).*1.00000) - ( ( CONSTANTS(:,126).*CONSTANTS(:,83)).*STATES(:,105))./(CONSTANTS(:,123)+ STATES(:,105).*1.00000));
    RATES(:,106) =  0.00100000.*(( ( CONSTANTS(:,129).*STATES(:,7)).*(1.00000 - STATES(:,106)))./(CONSTANTS(:,127)+ (1.00000 - STATES(:,106)).*1.00000) - ( ( CONSTANTS(:,130).*CONSTANTS(:,29)).*STATES(:,106))./(CONSTANTS(:,128)+ STATES(:,106).*1.00000));
    RATES(:,116) =  0.00100000.*(( ( CONSTANTS(:,146).*STATES(:,7)).*(1.00000 - STATES(:,116)))./(CONSTANTS(:,143)+ (1.00000 - STATES(:,116)).*1.00000) - ( ( CONSTANTS(:,150).*CONSTANTS(:,29)).*STATES(:,116))./(CONSTANTS(:,144)+ STATES(:,116).*1.00000));
    RATES(:,128) =  0.00100000.*( ( CONSTANTS(:,189).*STATES(:,7)).*(CONSTANTS(:,378) - STATES(:,128)) -  CONSTANTS(:,245).*STATES(:,128));
    RATES(:,129) =  0.00100000.*( ( CONSTANTS(:,189).*STATES(:,20)).*(CONSTANTS(:,379) - STATES(:,129)) -  CONSTANTS(:,245).*STATES(:,129));
    RATES(:,130) =  0.00100000.*( ( CONSTANTS(:,189).*STATES(:,7)).*(CONSTANTS(:,371) - STATES(:,130)) -  CONSTANTS(:,245).*STATES(:,130));
    RATES(:,131) =  0.00100000.*( ( CONSTANTS(:,189).*STATES(:,20)).*(CONSTANTS(:,372) - STATES(:,131)) -  CONSTANTS(:,245).*STATES(:,131));
    RATES(:,132) =  0.00100000.*( ( CONSTANTS(:,189).*STATES(:,30)).*(CONSTANTS(:,373) - STATES(:,132)) -  CONSTANTS(:,245).*STATES(:,132));
    RATES(:,133) =  0.00100000.*( CONSTANTS(:,202).*STATES(:,134) -  ( CONSTANTS(:,249).*STATES(:,133)).*STATES(:,7));
    RATES(:,134) =  0.00100000.*(( ( CONSTANTS(:,201).*STATES(:,135)).*STATES(:,44) -  (CONSTANTS(:,248)+CONSTANTS(:,202)).*STATES(:,134))+ ( CONSTANTS(:,249).*STATES(:,133)).*STATES(:,7));
    RATES(:,7) =  0.00100000.*((( CONSTANTS(:,202).*STATES(:,134) -  ( CONSTANTS(:,249).*STATES(:,133)).*STATES(:,7))+ CONSTANTS(:,265).*STATES(:,136)) -  ( CONSTANTS(:,196).*(CONSTANTS(:,345) - STATES(:,136))).*STATES(:,7));
    RATES(:,136) =  0.00100000.*( ( CONSTANTS(:,196).*(CONSTANTS(:,345) - STATES(:,136))).*STATES(:,7) -  CONSTANTS(:,265).*STATES(:,136));
    RATES(:,137) =  0.00100000.*( CONSTANTS(:,252).*STATES(:,138) -  ( CONSTANTS(:,268).*STATES(:,137)).*STATES(:,20));
    RATES(:,138) =  0.00100000.*(( ( CONSTANTS(:,251).*STATES(:,139)).*STATES(:,45) -  (CONSTANTS(:,267)+CONSTANTS(:,252)).*STATES(:,138))+ ( CONSTANTS(:,268).*STATES(:,137)).*STATES(:,20));
    RATES(:,20) =  0.00100000.*((( CONSTANTS(:,252).*STATES(:,138) -  ( CONSTANTS(:,268).*STATES(:,137)).*STATES(:,20))+ CONSTANTS(:,265).*STATES(:,140)) -  ( CONSTANTS(:,196).*(CONSTANTS(:,356) - STATES(:,140))).*STATES(:,20));
    RATES(:,140) =  0.00100000.*( ( CONSTANTS(:,196).*(CONSTANTS(:,356) - STATES(:,140))).*STATES(:,20) -  CONSTANTS(:,265).*STATES(:,140));
    RATES(:,141) =  0.00100000.*( CONSTANTS(:,271).*STATES(:,142) -  ( CONSTANTS(:,279).*STATES(:,141)).*STATES(:,30));
    RATES(:,142) =  0.00100000.*(( ( CONSTANTS(:,270).*STATES(:,143)).*STATES(:,46) -  (CONSTANTS(:,278)+CONSTANTS(:,271)).*STATES(:,142))+ ( CONSTANTS(:,279).*STATES(:,141)).*STATES(:,30));
    RATES(:,30) =  0.00100000.*((( CONSTANTS(:,271).*STATES(:,142) -  ( CONSTANTS(:,279).*STATES(:,141)).*STATES(:,30))+ CONSTANTS(:,265).*STATES(:,144)) -  ( CONSTANTS(:,196).*(CONSTANTS(:,352) - STATES(:,144))).*STATES(:,30));
    RATES(:,144) =  0.00100000.*( ( CONSTANTS(:,196).*(CONSTANTS(:,352) - STATES(:,144))).*STATES(:,30) -  CONSTANTS(:,265).*STATES(:,144));
    ALGEBRAIC(:,4) = CONSTANTS(:,394) - STATES(:,5);
    RATES(:,5) =  0.00100000.*(( ( CONSTANTS(:,32).*STATES(:,7)).*ALGEBRAIC(:,4))./(CONSTANTS(:,19)+ALGEBRAIC(:,4)) - ( ( CONSTANTS(:,34).*CONSTANTS(:,29)).*STATES(:,5))./(CONSTANTS(:,22)+STATES(:,5)));
    ALGEBRAIC(:,5) = CONSTANTS(:,397) - STATES(:,6);
    RATES(:,6) =  0.00100000.*(( ( CONSTANTS(:,33).*STATES(:,7)).*ALGEBRAIC(:,5))./(CONSTANTS(:,20)+ALGEBRAIC(:,5)) - ( ( CONSTANTS(:,35).*CONSTANTS(:,29)).*STATES(:,6))./(CONSTANTS(:,23)+STATES(:,6)));
    ALGEBRAIC(:,16) = CONSTANTS(:,406) - STATES(:,104);
    RATES(:,104) =  0.00100000.*(( ( CONSTANTS(:,120).*STATES(:,30)).*ALGEBRAIC(:,16))./(CONSTANTS(:,115)+ALGEBRAIC(:,16)) - ( ( CONSTANTS(:,121).*CONSTANTS(:,83)).*STATES(:,104))./(CONSTANTS(:,116)+STATES(:,104)));
    ALGEBRAIC(:,26) = 1.00000./(1.00000+exp((STATES(:,51)+91.0000)./6.10000));
    RATES(:,117) = (ALGEBRAIC(:,26) - STATES(:,117))./CONSTANTS(:,151);
    ALGEBRAIC(:,30) = CONSTANTS(:,256) - STATES(:,145);
    RATES(:,145) =  0.00100000.*(( ( CONSTANTS(:,212).*STATES(:,20)).*ALGEBRAIC(:,30))./(CONSTANTS(:,208)+ALGEBRAIC(:,30)) - ( ( CONSTANTS(:,211).*CONSTANTS(:,67)).*STATES(:,145))./(CONSTANTS(:,207)+STATES(:,145)));
    ALGEBRAIC(:,34) = (CONSTANTS(:,323) - STATES(:,13)) - STATES(:,12);
    RATES(:,13) =  0.00100000.*( ( CONSTANTS(:,221).*STATES(:,7)).*ALGEBRAIC(:,34) -  CONSTANTS(:,258).*STATES(:,13));
    ALGEBRAIC(:,36) = (CONSTANTS(:,326) - STATES(:,19)) - STATES(:,18);
    RATES(:,19) =  0.00100000.*( ( CONSTANTS(:,221).*STATES(:,20)).*ALGEBRAIC(:,36) -  CONSTANTS(:,258).*STATES(:,19));
    ALGEBRAIC(:,37) = (CONSTANTS(:,331) - STATES(:,27)) - STATES(:,26);
    RATES(:,27) =  0.00100000.*( ( CONSTANTS(:,221).*STATES(:,30)).*ALGEBRAIC(:,37) -  CONSTANTS(:,258).*STATES(:,27));
    ALGEBRAIC(:,12) = 0.0250000./(1.00000+exp((STATES(:,51)+58.0000)./5.00000));
    ALGEBRAIC(:,40) = 0.200000./(1.00000+exp((STATES(:,51)+19.0000)./ - 9.00000));
    RATES(:,68) = (ALGEBRAIC(:,12)./(ALGEBRAIC(:,12)+ALGEBRAIC(:,40)) - STATES(:,68))./CONSTANTS(:,110);
    ALGEBRAIC(:,13) = 1.00000./(( 0.000600000.*(STATES(:,51) - 1.73840))./(1.00000 - exp(  - 0.136000.*(STATES(:,51) - 1.73840))) - ( 0.000300000.*(STATES(:,51)+38.3608))./(1.00000 - exp( 0.152200.*(STATES(:,51)+38.3608))));
    ALGEBRAIC(:,41) = 1.00000./(1.00000+exp((STATES(:,51)+10.0850)./ - 4.25000));
    RATES(:,69) = (ALGEBRAIC(:,41) - STATES(:,69))./ALGEBRAIC(:,13);
    ALGEBRAIC(:,14) = 0.00739900./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51) - 0.0311960))./ - 0.800190));
    ALGEBRAIC(:,42) = 0.00569920./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51) - 0.0415200))./1.34890));
    RATES(:,74) =  ALGEBRAIC(:,42).*STATES(:,81) -  STATES(:,74).*( 4.00000.*ALGEBRAIC(:,14));
    ALGEBRAIC(:,15) = 0.00994150./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51) - 0.0448090))./ - 0.581720));
    ALGEBRAIC(:,43) = 0.00332010./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51) - 0.0942170))./0.953640));
    RATES(:,89) =  ALGEBRAIC(:,43).*STATES(:,96) -  STATES(:,89).*( 4.00000.*ALGEBRAIC(:,15));
    ALGEBRAIC(:,17) = piecewise({STATES(:,51)+CONSTANTS(:,131)>= - 40.0000, 0.00000 },  0.135000.*exp(((87.0000+STATES(:,51))+CONSTANTS(:,131))./ - 6.80000));
    ALGEBRAIC(:,44) = piecewise({STATES(:,51)+CONSTANTS(:,131)>= - 40.0000, 1.00000./( 0.130000.*(1.00000+exp(((STATES(:,51)+CONSTANTS(:,131))+27.4034)./ - 11.1000))) },  3.56000.*exp( 0.0790000.*((STATES(:,51)+CONSTANTS(:,131))+7.00000))+ 310000..*exp( 0.350000.*((STATES(:,51)+CONSTANTS(:,131))+7.00000)));
    RATES(:,107) =  ALGEBRAIC(:,17).*(1.00000 - STATES(:,107)) -  ALGEBRAIC(:,44).*STATES(:,107);
    ALGEBRAIC(:,18) = piecewise({STATES(:,51)+CONSTANTS(:,131)>= - 40.0000, 0.00000 }, ( (  - 127140..*exp( 0.244400.*(STATES(:,51)+CONSTANTS(:,131)))+  - 6.94800e-05.*exp(  - 0.0439100.*(STATES(:,51)+CONSTANTS(:,131)))).*((STATES(:,51)+CONSTANTS(:,131))+37.7800))./(1.00000+exp( 0.311000.*((STATES(:,51)+CONSTANTS(:,131))+79.2300))));
    ALGEBRAIC(:,45) = piecewise({STATES(:,51)+CONSTANTS(:,131)>= - 40.0000, ( 0.300000.*exp(  - 2.53500e-07.*(STATES(:,51)+CONSTANTS(:,131))))./(1.00000+exp(  - 0.100000.*((STATES(:,51)+CONSTANTS(:,131))+32.0000))) }, ( 0.121200.*exp(  - 0.0105200.*(STATES(:,51)+CONSTANTS(:,131))))./(1.00000+exp(  - 0.137800.*((STATES(:,51)+CONSTANTS(:,131))+40.1400))));
    RATES(:,108) =  ALGEBRAIC(:,18).*(1.00000 - STATES(:,108)) -  ALGEBRAIC(:,45).*STATES(:,108);
    ALGEBRAIC(:,19) = ( 0.320000.*(STATES(:,51)+58.4729))./(1.00000 - exp(  - 0.100000.*(STATES(:,51)+58.4729)));
    ALGEBRAIC(:,46) =  0.0800000.*exp((13.7299 - STATES(:,51))./11.0000);
    RATES(:,109) =  ALGEBRAIC(:,19).*(1.00000 - STATES(:,109)) -  ALGEBRAIC(:,46).*STATES(:,109);
    ALGEBRAIC(:,20) = piecewise({STATES(:,51)>= - 40.0000, 0.00000 },  0.135000.*exp((87.0000+STATES(:,51))./ - 6.80000));
    ALGEBRAIC(:,47) = piecewise({STATES(:,51)>= - 40.0000, 1.00000./( 0.130000.*(1.00000+exp((STATES(:,51)+27.4034)./ - 11.1000))) },  3.56000.*exp( 0.0790000.*(STATES(:,51)+7.00000))+ 310000..*exp( 0.350000.*(STATES(:,51)+7.00000)));
    RATES(:,110) =  ALGEBRAIC(:,20).*(1.00000 - STATES(:,110)) -  ALGEBRAIC(:,47).*STATES(:,110);
    ALGEBRAIC(:,21) = piecewise({STATES(:,51)>= - 40.0000, 0.00000 }, ( (  - 127140..*exp( 0.244400.*STATES(:,51)) -  6.94800e-05.*exp(  - 0.0439100.*STATES(:,51))).*(STATES(:,51)+37.7800))./(1.00000+exp( 0.311000.*(STATES(:,51)+79.2300))));
    ALGEBRAIC(:,48) = piecewise({STATES(:,51)>= - 40.0000, ( 0.300000.*exp(  - 2.53500e-07.*STATES(:,51)))./(1.00000+exp(  - 0.100000.*(STATES(:,51)+32.0000))) }, ( 0.121200.*exp(  - 0.0105200.*STATES(:,51)))./(1.00000+exp(  - 0.137800.*(STATES(:,51)+40.1400))));
    RATES(:,111) =  ALGEBRAIC(:,21).*(1.00000 - STATES(:,111)) -  ALGEBRAIC(:,48).*STATES(:,111);
    ALGEBRAIC(:,22) = ( 0.320000.*(STATES(:,51)+58.4729))./(1.00000 - exp(  - 0.100000.*(STATES(:,51)+58.4729)));
    ALGEBRAIC(:,49) =  0.0800000.*exp((13.7299 - STATES(:,51))./11.0000);
    RATES(:,112) =  ALGEBRAIC(:,22).*(1.00000 - STATES(:,112)) -  ALGEBRAIC(:,49).*STATES(:,112);
    ALGEBRAIC(:,23) = piecewise({STATES(:,51)>= - 40.0000, 0.00000 },  0.135000.*exp(((87.0000+STATES(:,51))+CONSTANTS(:,133))./ - 6.80000));
    ALGEBRAIC(:,50) = piecewise({STATES(:,51)>= - 40.0000, (1.00000./0.130000)./(1.00000+exp(((STATES(:,51)+CONSTANTS(:,133))+27.4034)./ - 11.1000)) },  3.56000.*exp( 0.0790000.*((STATES(:,51)+CONSTANTS(:,133))+7.00000))+ 310000..*exp( 0.350000.*((STATES(:,51)+CONSTANTS(:,133))+7.00000)));
    RATES(:,113) =  ALGEBRAIC(:,23).*(1.00000 - STATES(:,113)) -  ALGEBRAIC(:,50).*STATES(:,113);
    ALGEBRAIC(:,24) = piecewise({STATES(:,51)>= - 40.0000, 0.00000 }, ( (  - 127140..*exp( 0.244400.*(STATES(:,51)+CONSTANTS(:,133))) -  6.94800e-05.*exp(  - 0.0439100.*(STATES(:,51)+CONSTANTS(:,133)))).*((STATES(:,51)+CONSTANTS(:,133))+37.7800))./(1.00000+exp( 0.311000.*((STATES(:,51)+CONSTANTS(:,133))+79.2300))));
    ALGEBRAIC(:,51) = piecewise({STATES(:,51)>= - 40.0000, ( 0.300000.*exp(  - 2.53500e-07.*(STATES(:,51)+CONSTANTS(:,133))))./(1.00000+exp(  - 0.100000.*((STATES(:,51)+CONSTANTS(:,133))+32.0000))) }, ( 0.121200.*exp(  - 0.0105200.*(STATES(:,51)+CONSTANTS(:,133))))./(1.00000+exp(  - 0.137800.*((STATES(:,51)+CONSTANTS(:,133))+40.1400))));
    RATES(:,114) =  ALGEBRAIC(:,24).*(1.00000 - STATES(:,114)) -  ALGEBRAIC(:,51).*STATES(:,114);
    ALGEBRAIC(:,25) = ( 0.320000.*((STATES(:,51)+CONSTANTS(:,132))+58.4729))./(1.00000 - exp(  - 0.100000.*((STATES(:,51)+CONSTANTS(:,132))+58.4729)));
    ALGEBRAIC(:,52) =  0.0800000.*exp(((STATES(:,51)+CONSTANTS(:,132)) - 13.7299)./ - 11.0000);
    RATES(:,115) =  ALGEBRAIC(:,25).*(1.00000 - STATES(:,115)) -  ALGEBRAIC(:,52).*STATES(:,115);
    ALGEBRAIC(:,27) = ( 0.320000.*(STATES(:,51)+47.1300))./(1.00000 - exp(  - 0.100000.*(STATES(:,51)+47.1300)));
    ALGEBRAIC(:,53) =  0.0800000.*exp(STATES(:,51)./ - 11.0000);
    RATES(:,118) =  ALGEBRAIC(:,27).*(1.00000 - STATES(:,118)) -  ALGEBRAIC(:,53).*STATES(:,118);
    ALGEBRAIC(:,58) = (CONSTANTS(:,324) - STATES(:,15)) - STATES(:,14);
    RATES(:,15) =  0.00100000.*( ( CONSTANTS(:,221).*STATES(:,7)).*ALGEBRAIC(:,58) -  CONSTANTS(:,258).*STATES(:,15));
    ALGEBRAIC(:,61) = (CONSTANTS(:,332) - STATES(:,29)) - STATES(:,28);
    RATES(:,29) =  0.00100000.*( ( CONSTANTS(:,221).*STATES(:,30)).*ALGEBRAIC(:,61) -  CONSTANTS(:,258).*STATES(:,29));
    ALGEBRAIC(:,28) = 1.00000./(1.00000+exp((STATES(:,51)+9.43700)./ - 7.13300));
    ALGEBRAIC(:,54) = 1.00000./(1.00000+exp((STATES(:,51) - 18.4099)./ - 29.3814));
    ALGEBRAIC(:,66) = 1.00000./(1.00000+exp((STATES(:,51)+100.000)./29.3814));
    ALGEBRAIC(:,78) = 1.00000./(ALGEBRAIC(:,54)./1.20890+ 3.50000.*ALGEBRAIC(:,66));
    RATES(:,121) = (ALGEBRAIC(:,28) - STATES(:,121))./ALGEBRAIC(:,78);
    ALGEBRAIC(:,67) = ((1.00000./(1.00000+exp((STATES(:,51)+19.0000)./ - 9.00000)))./0.500000)./9.79530;
    ALGEBRAIC(:,29) = 1.00000./(1.00000+exp((STATES(:,51)+58.0000)./5.00000));
    ALGEBRAIC(:,79) =  0.0479600.*ALGEBRAIC(:,29);
    RATES(:,122) =  ALGEBRAIC(:,79).*(1.00000 - STATES(:,122)) -  ALGEBRAIC(:,67).*STATES(:,122);
    ALGEBRAIC(:,80) =  0.0214400.*ALGEBRAIC(:,29);
    RATES(:,123) =  ALGEBRAIC(:,80).*(1.00000 - STATES(:,123)) -  ALGEBRAIC(:,67).*STATES(:,123);
    ALGEBRAIC(:,55) = (1.00000./(1.00000+exp((STATES(:,51)+60.0000)./5.00000)))./250.000;
    ALGEBRAIC(:,81) =  2.46000.*ALGEBRAIC(:,55);
    RATES(:,124) =  ALGEBRAIC(:,81).*(1.00000 - STATES(:,124)) -  ALGEBRAIC(:,67).*STATES(:,124);
    ALGEBRAIC(:,82) =  0.560340.*ALGEBRAIC(:,55);
    RATES(:,125) =  ALGEBRAIC(:,82).*(1.00000 - STATES(:,125)) -  ALGEBRAIC(:,67).*STATES(:,125);
    ALGEBRAIC(:,64) =  0.0906540.*exp( (  - 0.111570.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,92) = 0.388390./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51)+0.150190))./ - 0.606930));
    RATES(:,75) = ( ALGEBRAIC(:,42).*STATES(:,76)+ ALGEBRAIC(:,92).*STATES(:,86)) -  STATES(:,75).*( 2.00000.*ALGEBRAIC(:,14)+ 2.00000.*ALGEBRAIC(:,64));
    RATES(:,76) = ((( ( 2.00000.*ALGEBRAIC(:,14)).*STATES(:,75)+ ( 2.00000.*ALGEBRAIC(:,42)).*STATES(:,77))+ ( 2.00000.*ALGEBRAIC(:,92)).*STATES(:,87))+ ( 3.00000.*ALGEBRAIC(:,64)).*STATES(:,78)) -  STATES(:,76).*(((ALGEBRAIC(:,14)+ALGEBRAIC(:,42))+ALGEBRAIC(:,92))+ 2.00000.*ALGEBRAIC(:,64));
    RATES(:,77) = (( ALGEBRAIC(:,14).*STATES(:,76)+ ( 3.00000.*ALGEBRAIC(:,92)).*STATES(:,88))+ ( 3.00000.*ALGEBRAIC(:,64)).*STATES(:,79)) -  STATES(:,77).*(( 2.00000.*ALGEBRAIC(:,42)+ 2.00000.*ALGEBRAIC(:,92))+ 2.00000.*ALGEBRAIC(:,64));
    RATES(:,78) = ( ALGEBRAIC(:,42).*STATES(:,79)+ ALGEBRAIC(:,92).*STATES(:,76)) -  STATES(:,78).*(ALGEBRAIC(:,14)+ 3.00000.*ALGEBRAIC(:,64));
    RATES(:,79) = (( ALGEBRAIC(:,14).*STATES(:,78)+ ( 2.00000.*ALGEBRAIC(:,92)).*STATES(:,77))+ ( 4.00000.*ALGEBRAIC(:,64)).*STATES(:,80)) -  STATES(:,79).*((ALGEBRAIC(:,42)+ALGEBRAIC(:,92))+ 3.00000.*ALGEBRAIC(:,64));
    ALGEBRAIC(:,76) = 0.00311240+(0.0283300 - 0.00311240)./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51)+0.0516600))./1.55220));
    RATES(:,80) = ( ALGEBRAIC(:,92).*STATES(:,79) -  STATES(:,80).*( 4.00000.*ALGEBRAIC(:,64)+CONSTANTS(:,112)))+ ALGEBRAIC(:,76).*STATES(:,70);
    RATES(:,81) = (( ( 4.00000.*ALGEBRAIC(:,14)).*STATES(:,74)+ ( 2.00000.*ALGEBRAIC(:,42)).*STATES(:,82))+ ALGEBRAIC(:,64).*STATES(:,85)) -  STATES(:,81).*(( 3.00000.*ALGEBRAIC(:,14)+ALGEBRAIC(:,42))+ALGEBRAIC(:,92));
    RATES(:,82) = (( ( 3.00000.*ALGEBRAIC(:,14)).*STATES(:,81)+ ( 3.00000.*ALGEBRAIC(:,42)).*STATES(:,83))+ ALGEBRAIC(:,64).*STATES(:,86)) -  STATES(:,82).*(( 2.00000.*ALGEBRAIC(:,14)+ 2.00000.*ALGEBRAIC(:,42))+ 2.00000.*ALGEBRAIC(:,92));
    RATES(:,83) = (( ( 2.00000.*ALGEBRAIC(:,14)).*STATES(:,82)+ ( 4.00000.*ALGEBRAIC(:,42)).*STATES(:,84))+ ALGEBRAIC(:,64).*STATES(:,87)) -  STATES(:,83).*((ALGEBRAIC(:,14)+ 3.00000.*ALGEBRAIC(:,42))+ 3.00000.*ALGEBRAIC(:,92));
    RATES(:,84) = ( ALGEBRAIC(:,14).*STATES(:,83)+ ALGEBRAIC(:,64).*STATES(:,88)) -  STATES(:,84).*( 4.00000.*ALGEBRAIC(:,42)+ 4.00000.*ALGEBRAIC(:,92));
    RATES(:,85) = ( ALGEBRAIC(:,42).*STATES(:,86)+ ALGEBRAIC(:,92).*STATES(:,81)) -  STATES(:,85).*( 3.00000.*ALGEBRAIC(:,14)+ALGEBRAIC(:,64));
    RATES(:,86) = ((( ( 3.00000.*ALGEBRAIC(:,14)).*STATES(:,85)+ ( 2.00000.*ALGEBRAIC(:,42)).*STATES(:,87))+ ( 2.00000.*ALGEBRAIC(:,92)).*STATES(:,82))+ ( 2.00000.*ALGEBRAIC(:,64)).*STATES(:,75)) -  STATES(:,86).*((( 2.00000.*ALGEBRAIC(:,14)+ALGEBRAIC(:,42))+ALGEBRAIC(:,92))+ALGEBRAIC(:,64));
    RATES(:,87) = ((( ( 2.00000.*ALGEBRAIC(:,14)).*STATES(:,86)+ ( 3.00000.*ALGEBRAIC(:,42)).*STATES(:,88))+ ( 3.00000.*ALGEBRAIC(:,92)).*STATES(:,83))+ ( 2.00000.*ALGEBRAIC(:,64)).*STATES(:,76)) -  STATES(:,87).*(((ALGEBRAIC(:,14)+ 2.00000.*ALGEBRAIC(:,42))+ 2.00000.*ALGEBRAIC(:,92))+ALGEBRAIC(:,64));
    RATES(:,88) = (( ALGEBRAIC(:,14).*STATES(:,87)+ ( 4.00000.*ALGEBRAIC(:,92)).*STATES(:,84))+ ( 2.00000.*ALGEBRAIC(:,64)).*STATES(:,77)) -  STATES(:,88).*(( 3.00000.*ALGEBRAIC(:,42)+ 3.00000.*ALGEBRAIC(:,92))+ALGEBRAIC(:,64));
    ALGEBRAIC(:,65) =  0.0657000.*exp( (  - 0.118990.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,94) = 0.563560./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51)+0.179860))./ - 0.583810));
    RATES(:,90) = ( ALGEBRAIC(:,43).*STATES(:,91)+ ALGEBRAIC(:,94).*STATES(:,101)) -  STATES(:,90).*( 2.00000.*ALGEBRAIC(:,15)+ 2.00000.*ALGEBRAIC(:,65));
    RATES(:,91) = ((( ( 2.00000.*ALGEBRAIC(:,15)).*STATES(:,90)+ ( 2.00000.*ALGEBRAIC(:,43)).*STATES(:,92))+ ( 2.00000.*ALGEBRAIC(:,94)).*STATES(:,102))+ ( 3.00000.*ALGEBRAIC(:,65)).*STATES(:,93)) -  STATES(:,91).*(((ALGEBRAIC(:,15)+ALGEBRAIC(:,43))+ALGEBRAIC(:,94))+ 2.00000.*ALGEBRAIC(:,65));
    RATES(:,92) = (( ALGEBRAIC(:,15).*STATES(:,91)+ ( 3.00000.*ALGEBRAIC(:,94)).*STATES(:,103))+ ( 3.00000.*ALGEBRAIC(:,65)).*STATES(:,94)) -  STATES(:,92).*(( 2.00000.*ALGEBRAIC(:,43)+ 2.00000.*ALGEBRAIC(:,94))+ 2.00000.*ALGEBRAIC(:,65));
    RATES(:,93) = ( ALGEBRAIC(:,43).*STATES(:,94)+ ALGEBRAIC(:,94).*STATES(:,91)) -  STATES(:,93).*(ALGEBRAIC(:,15)+ 3.00000.*ALGEBRAIC(:,65));
    RATES(:,94) = (( ALGEBRAIC(:,15).*STATES(:,93)+ ( 2.00000.*ALGEBRAIC(:,94)).*STATES(:,92))+ ( 4.00000.*ALGEBRAIC(:,65)).*STATES(:,95)) -  STATES(:,94).*((ALGEBRAIC(:,43)+ALGEBRAIC(:,94))+ 3.00000.*ALGEBRAIC(:,65));
    ALGEBRAIC(:,77) = 0.000385250+(0.0124060 - 0.000385250)./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51)+0.0641180))./0.779920));
    RATES(:,95) = ( ALGEBRAIC(:,94).*STATES(:,94) -  STATES(:,95).*( 4.00000.*ALGEBRAIC(:,65)+CONSTANTS(:,113)))+ ALGEBRAIC(:,77).*STATES(:,72);
    RATES(:,96) = (( ( 4.00000.*ALGEBRAIC(:,15)).*STATES(:,89)+ ( 2.00000.*ALGEBRAIC(:,43)).*STATES(:,97))+ ALGEBRAIC(:,65).*STATES(:,100)) -  STATES(:,96).*(( 3.00000.*ALGEBRAIC(:,15)+ALGEBRAIC(:,43))+ALGEBRAIC(:,94));
    RATES(:,97) = (( ( 3.00000.*ALGEBRAIC(:,15)).*STATES(:,96)+ ( 3.00000.*ALGEBRAIC(:,43)).*STATES(:,98))+ ALGEBRAIC(:,65).*STATES(:,101)) -  STATES(:,97).*(( 2.00000.*ALGEBRAIC(:,15)+ 2.00000.*ALGEBRAIC(:,43))+ 2.00000.*ALGEBRAIC(:,94));
    RATES(:,98) = (( ( 2.00000.*ALGEBRAIC(:,15)).*STATES(:,97)+ ( 4.00000.*ALGEBRAIC(:,43)).*STATES(:,99))+ ALGEBRAIC(:,65).*STATES(:,102)) -  STATES(:,98).*((ALGEBRAIC(:,15)+ 3.00000.*ALGEBRAIC(:,43))+ 3.00000.*ALGEBRAIC(:,94));
    RATES(:,99) = ( ALGEBRAIC(:,15).*STATES(:,98)+ ALGEBRAIC(:,65).*STATES(:,103)) -  STATES(:,99).*( 4.00000.*ALGEBRAIC(:,43)+ 4.00000.*ALGEBRAIC(:,94));
    RATES(:,100) = ( ALGEBRAIC(:,43).*STATES(:,101)+ ALGEBRAIC(:,94).*STATES(:,96)) -  STATES(:,100).*( 3.00000.*ALGEBRAIC(:,15)+ALGEBRAIC(:,65));
    RATES(:,101) = ((( ( 3.00000.*ALGEBRAIC(:,15)).*STATES(:,100)+ ( 2.00000.*ALGEBRAIC(:,43)).*STATES(:,102))+ ( 2.00000.*ALGEBRAIC(:,94)).*STATES(:,97))+ ( 2.00000.*ALGEBRAIC(:,65)).*STATES(:,90)) -  STATES(:,101).*((( 2.00000.*ALGEBRAIC(:,15)+ALGEBRAIC(:,43))+ALGEBRAIC(:,94))+ALGEBRAIC(:,65));
    RATES(:,102) = ((( ( 2.00000.*ALGEBRAIC(:,15)).*STATES(:,101)+ ( 3.00000.*ALGEBRAIC(:,43)).*STATES(:,103))+ ( 3.00000.*ALGEBRAIC(:,94)).*STATES(:,98))+ ( 2.00000.*ALGEBRAIC(:,65)).*STATES(:,91)) -  STATES(:,102).*(((ALGEBRAIC(:,15)+ 2.00000.*ALGEBRAIC(:,43))+ 2.00000.*ALGEBRAIC(:,94))+ALGEBRAIC(:,65));
    RATES(:,103) = (( ALGEBRAIC(:,15).*STATES(:,102)+ ( 4.00000.*ALGEBRAIC(:,94)).*STATES(:,99))+ ( 2.00000.*ALGEBRAIC(:,65)).*STATES(:,92)) -  STATES(:,103).*(( 3.00000.*ALGEBRAIC(:,43)+ 3.00000.*ALGEBRAIC(:,94))+ALGEBRAIC(:,65));
    ALGEBRAIC(:,93) =  0.000441980.*exp( (  - 1.20220.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,104) =  0.000401730.*exp( ( 0.000208730.*STATES(:,51)).*CONSTANTS(:,264));
    RATES(:,70) = (  - (ALGEBRAIC(:,76)+ALGEBRAIC(:,104)).*STATES(:,70)+ ALGEBRAIC(:,93).*STATES(:,71))+ CONSTANTS(:,112).*STATES(:,80);
    RATES(:,71) =  ALGEBRAIC(:,104).*STATES(:,70) -  ALGEBRAIC(:,93).*STATES(:,71);
    ALGEBRAIC(:,95) =  0.000237300.*exp( (  - 1.97420.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,105) =  0.000226520.*exp( ( 0.000246900.*STATES(:,51)).*CONSTANTS(:,264));
    RATES(:,72) = (  - (ALGEBRAIC(:,77)+ALGEBRAIC(:,105)).*STATES(:,72)+ ALGEBRAIC(:,95).*STATES(:,73))+ CONSTANTS(:,113).*STATES(:,95);
    RATES(:,73) =  ALGEBRAIC(:,105).*STATES(:,72) -  ALGEBRAIC(:,95).*STATES(:,73);
    ALGEBRAIC(:,6) = ( ( CONSTANTS(:,37).*CONSTANTS(:,36)).*CONSTANTS(:,320) - STATES(:,9)) - STATES(:,8);
    ALGEBRAIC(:,35) = ( ALGEBRAIC(:,6).*(CONSTANTS(:,60)+CONSTANTS(:,52)) -  STATES(:,15).*(CONSTANTS(:,52)+CONSTANTS(:,60)))+ ( CONSTANTS(:,50).*CONSTANTS(:,52)).*(1.00000+CONSTANTS(:,60)./CONSTANTS(:,55));
    ALGEBRAIC(:,59) =  (  - STATES(:,15).*CONSTANTS(:,50)).*CONSTANTS(:,52);
    ALGEBRAIC(:,71) = ( - ALGEBRAIC(:,35)+power(( ALGEBRAIC(:,35).*ALGEBRAIC(:,35) -  ( 4.00000.*CONSTANTS(:,223)).*ALGEBRAIC(:,59)), 1.0 ./ 2))./( 2.00000.*CONSTANTS(:,223));
    ALGEBRAIC(:,87) = ALGEBRAIC(:,6)./(1.00000+ (ALGEBRAIC(:,71)./CONSTANTS(:,50)).*(1.00000+CONSTANTS(:,60)./CONSTANTS(:,52)));
    ALGEBRAIC(:,99) = ( ALGEBRAIC(:,71).*ALGEBRAIC(:,87))./CONSTANTS(:,50);
    ALGEBRAIC(:,109) = ( ALGEBRAIC(:,99).*CONSTANTS(:,60))./CONSTANTS(:,52);
    RATES(:,9) =  0.00100000.*(( CONSTANTS(:,45).*ALGEBRAIC(:,99)+ CONSTANTS(:,43).*ALGEBRAIC(:,109)) -  CONSTANTS(:,220).*STATES(:,9));
    RATES(:,1) =  0.00100000.*(( CONSTANTS(:,45).*ALGEBRAIC(:,99)+ CONSTANTS(:,43).*ALGEBRAIC(:,109)) -  ( CONSTANTS(:,222).*STATES(:,1)).*STATES(:,8));
    ALGEBRAIC(:,9) = ( ( CONSTANTS(:,216).*CONSTANTS(:,36)).*CONSTANTS(:,327) - STATES(:,22)) - STATES(:,21);
    ALGEBRAIC(:,38) = ( ALGEBRAIC(:,9).*(CONSTANTS(:,60)+CONSTANTS(:,52)) -  STATES(:,29).*(CONSTANTS(:,52)+CONSTANTS(:,60)))+ ( CONSTANTS(:,50).*CONSTANTS(:,52)).*(1.00000+CONSTANTS(:,60)./CONSTANTS(:,55));
    ALGEBRAIC(:,62) =  (  - STATES(:,29).*CONSTANTS(:,50)).*CONSTANTS(:,52);
    ALGEBRAIC(:,74) = ( - ALGEBRAIC(:,38)+power(( ALGEBRAIC(:,38).*ALGEBRAIC(:,38) -  ( 4.00000.*CONSTANTS(:,226)).*ALGEBRAIC(:,62)), 1.0 ./ 2))./( 2.00000.*CONSTANTS(:,226));
    ALGEBRAIC(:,90) = ALGEBRAIC(:,9)./(1.00000+ (ALGEBRAIC(:,74)./CONSTANTS(:,50)).*(1.00000+CONSTANTS(:,60)./CONSTANTS(:,52)));
    ALGEBRAIC(:,102) = ( ALGEBRAIC(:,74).*ALGEBRAIC(:,90))./CONSTANTS(:,50);
    ALGEBRAIC(:,112) =  (CONSTANTS(:,60)./CONSTANTS(:,52)).*ALGEBRAIC(:,102);
    RATES(:,22) =  0.00100000.*(( CONSTANTS(:,45).*ALGEBRAIC(:,102)+ CONSTANTS(:,43).*ALGEBRAIC(:,112)) -  CONSTANTS(:,220).*STATES(:,22));
    RATES(:,23) =  0.00100000.*(( CONSTANTS(:,45).*ALGEBRAIC(:,102)+ CONSTANTS(:,43).*ALGEBRAIC(:,112)) -  ( CONSTANTS(:,222).*STATES(:,23)).*STATES(:,21));
    ALGEBRAIC(:,8) = ( ( CONSTANTS(:,217).*CONSTANTS(:,296)).*CONSTANTS(:,322) - STATES(:,3)) - STATES(:,16);
    ALGEBRAIC(:,60) = ( ALGEBRAIC(:,8).*(CONSTANTS(:,48)+CONSTANTS(:,60)) -  ALGEBRAIC(:,36).*(CONSTANTS(:,48)+CONSTANTS(:,60)))+ ( CONSTANTS(:,47).*CONSTANTS(:,48)).*(1.00000+CONSTANTS(:,60)./CONSTANTS(:,49));
    ALGEBRAIC(:,72) =  (  - ALGEBRAIC(:,36).*CONSTANTS(:,48)).*CONSTANTS(:,47);
    ALGEBRAIC(:,88) = ( - ALGEBRAIC(:,60)+power(( ALGEBRAIC(:,60).*ALGEBRAIC(:,60) -  ( 4.00000.*CONSTANTS(:,225)).*ALGEBRAIC(:,72)), 1.0 ./ 2))./( 2.00000.*CONSTANTS(:,225));
    ALGEBRAIC(:,100) = ALGEBRAIC(:,8)./(1.00000+ (ALGEBRAIC(:,88)./CONSTANTS(:,47)).*(1.00000+CONSTANTS(:,60)./CONSTANTS(:,48)));
    ALGEBRAIC(:,111) = ( ( CONSTANTS(:,60).*ALGEBRAIC(:,88)).*ALGEBRAIC(:,100))./( CONSTANTS(:,47).*CONSTANTS(:,48));
    ALGEBRAIC(:,120) = ( ALGEBRAIC(:,100).*ALGEBRAIC(:,88))./CONSTANTS(:,47);
    RATES(:,3) =  0.00100000.*(( CONSTANTS(:,46).*ALGEBRAIC(:,120)+ CONSTANTS(:,44).*ALGEBRAIC(:,111)) -  CONSTANTS(:,56).*STATES(:,3));
    RATES(:,17) =  0.00100000.*(( CONSTANTS(:,46).*ALGEBRAIC(:,120)+ CONSTANTS(:,44).*ALGEBRAIC(:,111)) -  ( CONSTANTS(:,57).*STATES(:,17)).*STATES(:,16));
    ALGEBRAIC(:,119) = ( CONSTANTS(:,60).*ALGEBRAIC(:,88))./CONSTANTS(:,49);
    RATES(:,18) =  0.00100000.*( ( CONSTANTS(:,219).*CONSTANTS(:,62)).*(ALGEBRAIC(:,119)+ALGEBRAIC(:,111)) -  CONSTANTS(:,218).*STATES(:,18));
    ALGEBRAIC(:,131) = ((CONSTANTS(:,400) - STATES(:,143)) - STATES(:,142)) - STATES(:,141);
    RATES(:,143) =  0.00100000.*((( ( CONSTANTS(:,269).*ALGEBRAIC(:,131)).*STATES(:,46) -  CONSTANTS(:,277).*STATES(:,143)) -  ( CONSTANTS(:,270).*STATES(:,143)).*STATES(:,46))+ CONSTANTS(:,278).*STATES(:,142));
    ALGEBRAIC(:,2) = power( STATES(:,4).*1.00000, CONSTANTS(:,13));
    ALGEBRAIC(:,32) =  CONSTANTS(:,7).*(CONSTANTS(:,9)+ALGEBRAIC(:,2)./(CONSTANTS(:,4)+ALGEBRAIC(:,2)));
    ALGEBRAIC(:,68) =  ( ALGEBRAIC(:,32).*CONSTANTS(:,330)).*CONSTANTS(:,228);
    ALGEBRAIC(:,84) = ( CONSTANTS(:,237).*(STATES(:,44) - STATES(:,46)))./CONSTANTS(:,310);
    ALGEBRAIC(:,97) = ( CONSTANTS(:,238).*(STATES(:,46) - STATES(:,45)))./CONSTANTS(:,310);
    ALGEBRAIC(:,108) = ( CONSTANTS(:,350).*CONSTANTS(:,186))./(1.00000+CONSTANTS(:,171)./STATES(:,46));
    ALGEBRAIC(:,117) = ( (CONSTANTS(:,373)+ (CONSTANTS(:,175) - 1.00000).*STATES(:,132)).*CONSTANTS(:,188))./(1.00000+CONSTANTS(:,173)./STATES(:,46));
    ALGEBRAIC(:,125) = ALGEBRAIC(:,108)+ALGEBRAIC(:,117);
    ALGEBRAIC(:,135) = (( (  - CONSTANTS(:,269).*ALGEBRAIC(:,131)).*STATES(:,46)+ CONSTANTS(:,277).*STATES(:,143)) -  ( CONSTANTS(:,270).*STATES(:,143)).*STATES(:,46))+ CONSTANTS(:,278).*STATES(:,142);
    RATES(:,46) =  0.00100000.*((((ALGEBRAIC(:,135)+ALGEBRAIC(:,68)) - ALGEBRAIC(:,125))+ALGEBRAIC(:,84)) - ALGEBRAIC(:,97));
    ALGEBRAIC(:,141) = ((CONSTANTS(:,381) - STATES(:,135)) - STATES(:,134)) - STATES(:,133);
    RATES(:,135) =  0.00100000.*((( ( CONSTANTS(:,200).*ALGEBRAIC(:,141)).*STATES(:,44) -  CONSTANTS(:,247).*STATES(:,135)) -  ( CONSTANTS(:,201).*STATES(:,135)).*STATES(:,44))+ CONSTANTS(:,248).*STATES(:,134));
    ALGEBRAIC(:,3) = power( STATES(:,2).*1.00000, CONSTANTS(:,14));
    ALGEBRAIC(:,33) = power( STATES(:,2).*1.00000, CONSTANTS(:,15));
    ALGEBRAIC(:,57) =  ( CONSTANTS(:,8).*(CONSTANTS(:,10)+ALGEBRAIC(:,3)./(CONSTANTS(:,5)+ALGEBRAIC(:,3)))).*(1.00000 - ( (1.00000 - ( CONSTANTS(:,16).*ALGEBRAIC(:,33))./(CONSTANTS(:,6)+ALGEBRAIC(:,33))).*STATES(:,1))./(CONSTANTS(:,3)+STATES(:,1)));
    ALGEBRAIC(:,83) =  ( ALGEBRAIC(:,57).*CONSTANTS(:,321)).*CONSTANTS(:,228);
    ALGEBRAIC(:,96) = ( CONSTANTS(:,237).*(STATES(:,44) - STATES(:,46)))./CONSTANTS(:,307);
    ALGEBRAIC(:,106) = ( CONSTANTS(:,236).*(STATES(:,44) - STATES(:,45)))./CONSTANTS(:,307);
    ALGEBRAIC(:,115) = ( CONSTANTS(:,348).*CONSTANTS(:,186))./(1.00000+CONSTANTS(:,171)./STATES(:,44));
    ALGEBRAIC(:,123) = ( (CONSTANTS(:,378)+ (CONSTANTS(:,175) - 1.00000).*STATES(:,128)).*CONSTANTS(:,187))./(1.00000+CONSTANTS(:,172)./STATES(:,44));
    ALGEBRAIC(:,129) = ( (CONSTANTS(:,371)+ (CONSTANTS(:,175) - 1.00000).*STATES(:,130)).*CONSTANTS(:,188))./(1.00000+CONSTANTS(:,173)./STATES(:,44));
    ALGEBRAIC(:,136) = (ALGEBRAIC(:,115)+ALGEBRAIC(:,123))+ALGEBRAIC(:,129);
    ALGEBRAIC(:,146) = (( (  - CONSTANTS(:,200).*ALGEBRAIC(:,141)).*STATES(:,44)+ CONSTANTS(:,247).*STATES(:,135)) -  ( CONSTANTS(:,201).*STATES(:,135)).*STATES(:,44))+ CONSTANTS(:,248).*STATES(:,134);
    RATES(:,44) =  0.00100000.*((((ALGEBRAIC(:,146)+ALGEBRAIC(:,83)) - ALGEBRAIC(:,136)) - ALGEBRAIC(:,96)) - ALGEBRAIC(:,106));
    ALGEBRAIC(:,151) = ((CONSTANTS(:,336) - STATES(:,139)) - STATES(:,138)) - STATES(:,137);
    RATES(:,139) =  0.00100000.*((( ( CONSTANTS(:,250).*ALGEBRAIC(:,151)).*STATES(:,45) -  CONSTANTS(:,266).*STATES(:,139)) -  ( CONSTANTS(:,251).*STATES(:,139)).*STATES(:,45))+ CONSTANTS(:,267).*STATES(:,138));
    ALGEBRAIC(:,1) = power( STATES(:,3).*1.00000, CONSTANTS(:,13));
    ALGEBRAIC(:,56) =  CONSTANTS(:,7).*(CONSTANTS(:,9)+ALGEBRAIC(:,1)./(CONSTANTS(:,4)+ALGEBRAIC(:,1)));
    ALGEBRAIC(:,69) =  ( ALGEBRAIC(:,56).*CONSTANTS(:,325)).*CONSTANTS(:,228);
    ALGEBRAIC(:,31) = power( STATES(:,3).*1.00000, CONSTANTS(:,14));
    ALGEBRAIC(:,85) =  CONSTANTS(:,8).*(CONSTANTS(:,10)+ALGEBRAIC(:,31)./(CONSTANTS(:,5)+ALGEBRAIC(:,31)));
    ALGEBRAIC(:,107) =  ( ALGEBRAIC(:,85).*CONSTANTS(:,329)).*CONSTANTS(:,228);
    ALGEBRAIC(:,116) = ( CONSTANTS(:,236).*(STATES(:,44) - STATES(:,45)))./CONSTANTS(:,308);
    ALGEBRAIC(:,124) = ( CONSTANTS(:,238).*(STATES(:,46) - STATES(:,45)))./CONSTANTS(:,308);
    ALGEBRAIC(:,130) = ( CONSTANTS(:,349).*CONSTANTS(:,186))./(1.00000+CONSTANTS(:,171)./STATES(:,45));
    ALGEBRAIC(:,137) = ( (CONSTANTS(:,379)+ (CONSTANTS(:,175) - 1.00000).*STATES(:,129)).*CONSTANTS(:,187))./(1.00000+CONSTANTS(:,172)./STATES(:,45));
    ALGEBRAIC(:,142) = ( (CONSTANTS(:,372)+ (CONSTANTS(:,175) - 1.00000).*STATES(:,131)).*CONSTANTS(:,188))./(1.00000+CONSTANTS(:,173)./STATES(:,45));
    ALGEBRAIC(:,147) = (ALGEBRAIC(:,130)+ALGEBRAIC(:,137))+ALGEBRAIC(:,142);
    ALGEBRAIC(:,155) = (( (  - CONSTANTS(:,250).*ALGEBRAIC(:,151)).*STATES(:,45)+ CONSTANTS(:,266).*STATES(:,139)) -  ( CONSTANTS(:,251).*STATES(:,139)).*STATES(:,45))+ CONSTANTS(:,267).*STATES(:,138);
    RATES(:,45) =  0.00100000.*(((((ALGEBRAIC(:,155)+ALGEBRAIC(:,69))+ALGEBRAIC(:,107)) - ALGEBRAIC(:,147))+ALGEBRAIC(:,116))+ALGEBRAIC(:,124));
    ALGEBRAIC(:,7) = ( ( CONSTANTS(:,38).*CONSTANTS(:,296)).*CONSTANTS(:,320) - STATES(:,2)) - STATES(:,10);
    ALGEBRAIC(:,70) = (((CONSTANTS(:,259)+CONSTANTS(:,272))./CONSTANTS(:,224)+ALGEBRAIC(:,34))+ALGEBRAIC(:,58)) - ALGEBRAIC(:,7);
    ALGEBRAIC(:,86) = (( CONSTANTS(:,272).*(ALGEBRAIC(:,34) - ALGEBRAIC(:,7))+ CONSTANTS(:,259).*(ALGEBRAIC(:,58) - ALGEBRAIC(:,7)))+CONSTANTS(:,280))./CONSTANTS(:,224);
    ALGEBRAIC(:,98) = ( ALGEBRAIC(:,7).*CONSTANTS(:,280))./CONSTANTS(:,224);
    ALGEBRAIC(:,110) = ((( ( - ALGEBRAIC(:,98)./27.0000).*power(ALGEBRAIC(:,70), 3.00000) - ( ( ( ALGEBRAIC(:,70).*ALGEBRAIC(:,70)).*ALGEBRAIC(:,86)).*ALGEBRAIC(:,86))./108.000)+( ( ALGEBRAIC(:,70).*ALGEBRAIC(:,86)).*ALGEBRAIC(:,98))./6.00000)+power(ALGEBRAIC(:,86), 3.00000)./27.0000)+( ALGEBRAIC(:,98).*ALGEBRAIC(:,98))./4.00000;
    ALGEBRAIC(:,118) = piecewise({ALGEBRAIC(:,110)<0.00000, power( - ALGEBRAIC(:,110), 1.0 ./ 2) }, 0.00000);
    ALGEBRAIC(:,126) = ((piecewise({ALGEBRAIC(:,110)>0.00000, power(ALGEBRAIC(:,110), 1.0 ./ 2) }, 0.00000)+ALGEBRAIC(:,98)./2.00000)+( ALGEBRAIC(:,70).*ALGEBRAIC(:,86))./6.00000) - power(ALGEBRAIC(:,70), 3.00000)./27.0000;
    ALGEBRAIC(:,132) = atan(ALGEBRAIC(:,118)./ALGEBRAIC(:,126))./3.00000;
    ALGEBRAIC(:,138) = power( ALGEBRAIC(:,126).*ALGEBRAIC(:,126)+ ALGEBRAIC(:,118).*ALGEBRAIC(:,118), 1.00000./6.00000);
    ALGEBRAIC(:,143) = (ALGEBRAIC(:,86)./3.00000 - ( ALGEBRAIC(:,70).*ALGEBRAIC(:,70))./9.00000)./( ALGEBRAIC(:,138).*ALGEBRAIC(:,138));
    ALGEBRAIC(:,148) =  ( ALGEBRAIC(:,138).* sin(ALGEBRAIC(:,132))).*(1.00000+ALGEBRAIC(:,143));
    ALGEBRAIC(:,152) =  ( ALGEBRAIC(:,138).*cos(ALGEBRAIC(:,132))).*(1.00000 - ALGEBRAIC(:,143)) - ALGEBRAIC(:,70)./3.00000;
    ALGEBRAIC(:,157) = power(( ALGEBRAIC(:,152).*ALGEBRAIC(:,152)+ ALGEBRAIC(:,148).*ALGEBRAIC(:,148)), 1.0 ./ 2);
    ALGEBRAIC(:,161) = ALGEBRAIC(:,34)./((1.00000+CONSTANTS(:,60)./CONSTANTS(:,49))+( ALGEBRAIC(:,157).*(CONSTANTS(:,48)+CONSTANTS(:,60)))./( CONSTANTS(:,47).*CONSTANTS(:,48)));
    ALGEBRAIC(:,165) = ( CONSTANTS(:,60).*ALGEBRAIC(:,161))./CONSTANTS(:,49);
    ALGEBRAIC(:,169) = ( ( CONSTANTS(:,60).*ALGEBRAIC(:,161)).*ALGEBRAIC(:,157))./( CONSTANTS(:,47).*CONSTANTS(:,48));
    RATES(:,12) =  0.00100000.*( ( CONSTANTS(:,219).*CONSTANTS(:,59)).*(ALGEBRAIC(:,165)+ALGEBRAIC(:,169)) -  CONSTANTS(:,218).*STATES(:,12));
    ALGEBRAIC(:,10) = ( ( CONSTANTS(:,39).*CONSTANTS(:,296)).*CONSTANTS(:,327) - STATES(:,4)) - STATES(:,24);
    ALGEBRAIC(:,73) = (((CONSTANTS(:,260)+CONSTANTS(:,273))./CONSTANTS(:,227)+ALGEBRAIC(:,37))+ALGEBRAIC(:,61)) - ALGEBRAIC(:,10);
    ALGEBRAIC(:,89) = (( CONSTANTS(:,273).*(ALGEBRAIC(:,37) - ALGEBRAIC(:,10))+ CONSTANTS(:,260).*(ALGEBRAIC(:,61) - ALGEBRAIC(:,10)))+CONSTANTS(:,281))./CONSTANTS(:,227);
    ALGEBRAIC(:,101) = ( ALGEBRAIC(:,10).*CONSTANTS(:,281))./CONSTANTS(:,227);
    ALGEBRAIC(:,113) = ((( ( - ALGEBRAIC(:,101)./27.0000).*power(ALGEBRAIC(:,73), 3.00000) - ( ( ( ALGEBRAIC(:,73).*ALGEBRAIC(:,73)).*ALGEBRAIC(:,89)).*ALGEBRAIC(:,89))./108.000)+( ( ALGEBRAIC(:,73).*ALGEBRAIC(:,89)).*ALGEBRAIC(:,101))./6.00000)+power(ALGEBRAIC(:,89), 3.00000)./27.0000)+( ALGEBRAIC(:,101).*ALGEBRAIC(:,101))./4.00000;
    ALGEBRAIC(:,121) = piecewise({ALGEBRAIC(:,113)<0.00000, power( - ALGEBRAIC(:,113), 1.0 ./ 2) }, 0.00000);
    ALGEBRAIC(:,127) = ((piecewise({ALGEBRAIC(:,113)>0.00000, power(ALGEBRAIC(:,113), 1.0 ./ 2) }, 0.00000)+ALGEBRAIC(:,101)./2.00000)+( ALGEBRAIC(:,73).*ALGEBRAIC(:,89))./6.00000) - power(ALGEBRAIC(:,73), 3.00000)./27.0000;
    ALGEBRAIC(:,133) = atan(ALGEBRAIC(:,121)./ALGEBRAIC(:,127))./3.00000;
    ALGEBRAIC(:,139) = power( ALGEBRAIC(:,127).*ALGEBRAIC(:,127)+ ALGEBRAIC(:,121).*ALGEBRAIC(:,121), 1.00000./6.00000);
    ALGEBRAIC(:,144) = (ALGEBRAIC(:,89)./3.00000 - ( ALGEBRAIC(:,73).*ALGEBRAIC(:,73))./9.00000)./( ALGEBRAIC(:,139).*ALGEBRAIC(:,139));
    ALGEBRAIC(:,149) =  ( ALGEBRAIC(:,139).* sin(ALGEBRAIC(:,133))).*(1.00000+ALGEBRAIC(:,144));
    ALGEBRAIC(:,153) =  ( ALGEBRAIC(:,139).*cos(ALGEBRAIC(:,133))).*(1.00000 - ALGEBRAIC(:,144)) - ALGEBRAIC(:,73)./3.00000;
    ALGEBRAIC(:,158) = power(( ALGEBRAIC(:,153).*ALGEBRAIC(:,153)+ ALGEBRAIC(:,149).*ALGEBRAIC(:,149)), 1.0 ./ 2);
    ALGEBRAIC(:,162) = ALGEBRAIC(:,37)./((1.00000+CONSTANTS(:,60)./CONSTANTS(:,49))+( ALGEBRAIC(:,158).*(CONSTANTS(:,48)+CONSTANTS(:,60)))./( CONSTANTS(:,47).*CONSTANTS(:,48)));
    ALGEBRAIC(:,166) = ( CONSTANTS(:,60).*ALGEBRAIC(:,162))./CONSTANTS(:,49);
    ALGEBRAIC(:,170) = ( ( CONSTANTS(:,60).*ALGEBRAIC(:,162)).*ALGEBRAIC(:,158))./( CONSTANTS(:,47).*CONSTANTS(:,48));
    RATES(:,26) =  0.00100000.*( ( CONSTANTS(:,219).*CONSTANTS(:,63)).*(ALGEBRAIC(:,166)+ALGEBRAIC(:,170)) -  CONSTANTS(:,218).*STATES(:,26));
    ALGEBRAIC(:,177) = ALGEBRAIC(:,58)./((1.00000+CONSTANTS(:,60)./CONSTANTS(:,54))+( ALGEBRAIC(:,157).*(CONSTANTS(:,53)+CONSTANTS(:,60)))./( CONSTANTS(:,51).*CONSTANTS(:,53)));
    ALGEBRAIC(:,181) = ( CONSTANTS(:,60).*ALGEBRAIC(:,177))./CONSTANTS(:,54);
    ALGEBRAIC(:,185) = ( ( CONSTANTS(:,60).*ALGEBRAIC(:,177)).*ALGEBRAIC(:,157))./( CONSTANTS(:,51).*CONSTANTS(:,53));
    RATES(:,14) =  0.00100000.*( ( CONSTANTS(:,219).*CONSTANTS(:,59)).*(ALGEBRAIC(:,181)+ALGEBRAIC(:,185)) -  CONSTANTS(:,218).*STATES(:,14));
    ALGEBRAIC(:,178) = ALGEBRAIC(:,61)./((1.00000+CONSTANTS(:,60)./CONSTANTS(:,54))+( ALGEBRAIC(:,158).*(CONSTANTS(:,53)+CONSTANTS(:,60)))./( CONSTANTS(:,51).*CONSTANTS(:,53)));
    ALGEBRAIC(:,182) = ( CONSTANTS(:,60).*ALGEBRAIC(:,178))./CONSTANTS(:,54);
    ALGEBRAIC(:,186) = ( ( CONSTANTS(:,60).*ALGEBRAIC(:,178)).*ALGEBRAIC(:,158))./( CONSTANTS(:,51).*CONSTANTS(:,53));
    RATES(:,28) =  0.00100000.*( ( CONSTANTS(:,219).*CONSTANTS(:,63)).*(ALGEBRAIC(:,182)+ALGEBRAIC(:,186)) -  CONSTANTS(:,218).*STATES(:,28));
    ALGEBRAIC(:,189) = ALGEBRAIC(:,169)+ CONSTANTS(:,61).*ALGEBRAIC(:,185);
    ALGEBRAIC(:,173) = ( ALGEBRAIC(:,161).*ALGEBRAIC(:,157))./CONSTANTS(:,47);
    ALGEBRAIC(:,193) = ( ALGEBRAIC(:,177).*ALGEBRAIC(:,157))./CONSTANTS(:,51);
    ALGEBRAIC(:,197) = ALGEBRAIC(:,173)+ CONSTANTS(:,61).*ALGEBRAIC(:,193);
    RATES(:,2) =  0.00100000.*(( CONSTANTS(:,46).*ALGEBRAIC(:,197)+ CONSTANTS(:,44).*ALGEBRAIC(:,189)) -  CONSTANTS(:,56).*STATES(:,2));
    RATES(:,11) =  0.00100000.*(( CONSTANTS(:,46).*ALGEBRAIC(:,197)+ CONSTANTS(:,44).*ALGEBRAIC(:,189)) -  ( CONSTANTS(:,57).*STATES(:,11)).*STATES(:,10));
    ALGEBRAIC(:,190) = ALGEBRAIC(:,170)+ CONSTANTS(:,64).*ALGEBRAIC(:,186);
    ALGEBRAIC(:,174) = ( ALGEBRAIC(:,162).*ALGEBRAIC(:,158))./CONSTANTS(:,47);
    ALGEBRAIC(:,194) = ( ALGEBRAIC(:,178).*ALGEBRAIC(:,158))./CONSTANTS(:,51);
    ALGEBRAIC(:,198) = ALGEBRAIC(:,174)+ CONSTANTS(:,64).*ALGEBRAIC(:,194);
    RATES(:,4) =  0.00100000.*(( CONSTANTS(:,46).*ALGEBRAIC(:,198)+ CONSTANTS(:,44).*ALGEBRAIC(:,190)) -  CONSTANTS(:,56).*STATES(:,4));
    RATES(:,25) =  0.00100000.*(( CONSTANTS(:,46).*ALGEBRAIC(:,198)+ CONSTANTS(:,44).*ALGEBRAIC(:,190)) -  ( CONSTANTS(:,57).*STATES(:,25)).*STATES(:,24));
    ALGEBRAIC(:,134) = CONSTANTS(:,275) - STATES(:,36);
    ALGEBRAIC(:,140) = CONSTANTS(:,263) -  STATES(:,36).*CONSTANTS(:,262);
    ALGEBRAIC(:,145) =   - CONSTANTS(:,231).*STATES(:,36);
    ALGEBRAIC(:,150) =  - ALGEBRAIC(:,134)./3.00000+ ( (2.00000./3.00000).*power(( ALGEBRAIC(:,134).*ALGEBRAIC(:,134) -  3.00000.*ALGEBRAIC(:,140)), 1.0 ./ 2)).*cos(acos((( ( 9.00000.*ALGEBRAIC(:,134)).*ALGEBRAIC(:,140) -  ( ( 2.00000.*ALGEBRAIC(:,134)).*ALGEBRAIC(:,134)).*ALGEBRAIC(:,134)) -  27.0000.*ALGEBRAIC(:,145))./( 2.00000.*power( ALGEBRAIC(:,134).*ALGEBRAIC(:,134) -  3.00000.*ALGEBRAIC(:,140), 1.50000)))./3.00000);
    ALGEBRAIC(:,191) = ( CONSTANTS(:,80).*(1.00000 - STATES(:,43)))./(1.00000+CONSTANTS(:,82)./ALGEBRAIC(:,150));
    ALGEBRAIC(:,195) = ALGEBRAIC(:,191)+STATES(:,43);
    ALGEBRAIC(:,200) = ALGEBRAIC(:,195)./(ALGEBRAIC(:,195)+CONSTANTS(:,81));
    RATES(:,37) = (ALGEBRAIC(:,200) - STATES(:,37))./CONSTANTS(:,232);
    RATES(:,38) = (ALGEBRAIC(:,200) - STATES(:,38))./CONSTANTS(:,233);
    RATES(:,39) = (ALGEBRAIC(:,200) - STATES(:,39))./CONSTANTS(:,234);
    RATES(:,40) = (ALGEBRAIC(:,200) - STATES(:,40))./CONSTANTS(:,235);
    RATES(:,41) = (ALGEBRAIC(:,200) - STATES(:,41))./CONSTANTS(:,86);
    ALGEBRAIC(:,201) = 1.00000./(1.00000+power(CONSTANTS(:,81)./ALGEBRAIC(:,195), 2.00000));
    RATES(:,42) = (ALGEBRAIC(:,201) - STATES(:,42))./CONSTANTS(:,87);
    ALGEBRAIC(:,199) = (CONSTANTS(:,206) - CONSTANTS(:,209))+STATES(:,145);
    ALGEBRAIC(:,204) =  0.500000.*(power((power(ALGEBRAIC(:,199), 2.00000)+ ( 4.00000.*CONSTANTS(:,206)).*CONSTANTS(:,209)), 1.0 ./ 2) - ALGEBRAIC(:,199));
    RATES(:,126) =  0.00100000.*(( ( CONSTANTS(:,163).*STATES(:,20)).*(1.00000 - STATES(:,126)))./(CONSTANTS(:,159)+ (1.00000 - STATES(:,126)).*1.00000) - ( ( CONSTANTS(:,164).*ALGEBRAIC(:,204)).*STATES(:,126))./(CONSTANTS(:,161)+ STATES(:,126).*1.00000));
    ALGEBRAIC(:,207) = (CONSTANTS(:,29)./CONSTANTS(:,320)+CONSTANTS(:,83)./CONSTANTS(:,327))+ALGEBRAIC(:,204)./CONSTANTS(:,322);
    RATES(:,43) =  ( CONSTANTS(:,84).*ALGEBRAIC(:,191)).*ALGEBRAIC(:,195) -  ( CONSTANTS(:,85).*STATES(:,43)).*(0.100000+( 0.900000.*ALGEBRAIC(:,207))./0.137100);
    ALGEBRAIC(:,156) = 1.00000./( (1.00000+exp((4.79800+STATES(:,51))./ - 7.56990)).*(1.00000+exp((25.0000+STATES(:,51))./ - 5.00000)));
    ALGEBRAIC(:,196) = 0.590000+( 0.800000.*exp( 0.0520000.*(STATES(:,51)+13.0000)))./(1.00000+exp( 0.132000.*(STATES(:,51)+13.0000)));
    ALGEBRAIC(:,203) = ALGEBRAIC(:,156)./ALGEBRAIC(:,196);
    ALGEBRAIC(:,206) = (1.00000 - ALGEBRAIC(:,156))./ALGEBRAIC(:,196);
    ALGEBRAIC(:,180) = 1.00000+power(0.00200000./ALGEBRAIC(:,150), 4.00000);
    ALGEBRAIC(:,184) = 6.00000./ALGEBRAIC(:,180);
    ALGEBRAIC(:,164) = 1.00000./(1.00000+exp((29.9790+STATES(:,51))./3.17750));
    ALGEBRAIC(:,172) = (0.100000+ALGEBRAIC(:,164))./1.10000;
    ALGEBRAIC(:,215) = 1.00000./( ( 70.0000.*(1.00000 -  0.500000.*STATES(:,37))).*(1.00000+exp((STATES(:,51)+49.1000)./10.3490)));
    ALGEBRAIC(:,217) = 1.00000./(1.00000+exp((STATES(:,51)+0.213000)./ - 10.8070));
    ALGEBRAIC(:,222) = 1.00000./(ALGEBRAIC(:,215)+ALGEBRAIC(:,217)./38.4940);
    ALGEBRAIC(:,225) = ALGEBRAIC(:,172)./ALGEBRAIC(:,222);
    ALGEBRAIC(:,234) = (1.00000 - ALGEBRAIC(:,172))./ALGEBRAIC(:,222);
    RATES(:,52) = ((  - ((ALGEBRAIC(:,203)+ALGEBRAIC(:,184))+ALGEBRAIC(:,234)).*STATES(:,52)+ ALGEBRAIC(:,206).*STATES(:,56))+ CONSTANTS(:,103).*STATES(:,55))+ ALGEBRAIC(:,225).*STATES(:,53);
    RATES(:,56) = ((  - ((ALGEBRAIC(:,206)+ALGEBRAIC(:,184))+ALGEBRAIC(:,234)).*STATES(:,56)+ ALGEBRAIC(:,203).*STATES(:,52))+ CONSTANTS(:,103).*STATES(:,59))+ ALGEBRAIC(:,225).*STATES(:,57);
    ALGEBRAIC(:,168) = (0.000100000+ALGEBRAIC(:,164))./1.00010;
    ALGEBRAIC(:,160) =  0.100000.*STATES(:,37);
    ALGEBRAIC(:,176) = 1.00000+power(0.0100000./ALGEBRAIC(:,150), 10.0000);
    ALGEBRAIC(:,188) = (32.5000 - (18.0000 - ALGEBRAIC(:,160))./ALGEBRAIC(:,180)) - 10.0000./ALGEBRAIC(:,176);
    ALGEBRAIC(:,219) = 1.00000./(ALGEBRAIC(:,215)+ALGEBRAIC(:,217)./ALGEBRAIC(:,188));
    ALGEBRAIC(:,228) = ALGEBRAIC(:,168)./ALGEBRAIC(:,219);
    ALGEBRAIC(:,240) = (1.00000 - ALGEBRAIC(:,168))./ALGEBRAIC(:,219);
    RATES(:,55) = ((  - ((ALGEBRAIC(:,203)+CONSTANTS(:,103))+ALGEBRAIC(:,240)).*STATES(:,55)+ ALGEBRAIC(:,184).*STATES(:,52))+ ALGEBRAIC(:,206).*STATES(:,59))+ ALGEBRAIC(:,228).*STATES(:,54);
    RATES(:,59) = ((  - ((ALGEBRAIC(:,206)+CONSTANTS(:,103))+ALGEBRAIC(:,240)).*STATES(:,59)+ ALGEBRAIC(:,184).*STATES(:,56))+ ALGEBRAIC(:,203).*STATES(:,55))+ ALGEBRAIC(:,228).*STATES(:,58);
    ALGEBRAIC(:,231) = piecewise({abs(ALGEBRAIC(:,228))<1.00000e-12, 1.00000e-12 }, ALGEBRAIC(:,228));
    ALGEBRAIC(:,237) = piecewise({abs(ALGEBRAIC(:,234))<1.00000e-12, 1.00000e-12 }, ALGEBRAIC(:,234));
    ALGEBRAIC(:,243) = ( CONSTANTS(:,104).*( ( ALGEBRAIC(:,225).*ALGEBRAIC(:,240)).*ALGEBRAIC(:,184)))./( ( ALGEBRAIC(:,237).*ALGEBRAIC(:,231)).*CONSTANTS(:,103));
    RATES(:,53) = ((  - ((ALGEBRAIC(:,203)+ALGEBRAIC(:,243))+ALGEBRAIC(:,225)).*STATES(:,53)+ ALGEBRAIC(:,234).*STATES(:,52))+ CONSTANTS(:,104).*STATES(:,54))+ ALGEBRAIC(:,206).*STATES(:,57);
    RATES(:,54) = ((  - ((ALGEBRAIC(:,203)+CONSTANTS(:,104))+ALGEBRAIC(:,228)).*STATES(:,54)+ ALGEBRAIC(:,240).*STATES(:,55))+ ALGEBRAIC(:,243).*STATES(:,53))+ ALGEBRAIC(:,206).*STATES(:,58);
    RATES(:,57) = ((  - ((ALGEBRAIC(:,206)+ALGEBRAIC(:,243))+ALGEBRAIC(:,225)).*STATES(:,57)+ ALGEBRAIC(:,234).*STATES(:,56))+ CONSTANTS(:,104).*STATES(:,58))+ ALGEBRAIC(:,203).*STATES(:,53);
    RATES(:,58) = ((  - ((ALGEBRAIC(:,206)+CONSTANTS(:,104))+ALGEBRAIC(:,228)).*STATES(:,58)+ ALGEBRAIC(:,240).*STATES(:,59))+ ALGEBRAIC(:,243).*STATES(:,57))+ ALGEBRAIC(:,203).*STATES(:,54);
    ALGEBRAIC(:,63) = CONSTANTS(:,275) - STATES(:,34);
    ALGEBRAIC(:,75) = CONSTANTS(:,263) -  STATES(:,34).*CONSTANTS(:,262);
    ALGEBRAIC(:,91) =   - CONSTANTS(:,231).*STATES(:,34);
    ALGEBRAIC(:,103) =  - ALGEBRAIC(:,63)./3.00000+ ( (2.00000./3.00000).*power(( ALGEBRAIC(:,63).*ALGEBRAIC(:,63) -  3.00000.*ALGEBRAIC(:,75)), 1.0 ./ 2)).*cos(acos((( ( 9.00000.*ALGEBRAIC(:,63)).*ALGEBRAIC(:,75) -  ( ( 2.00000.*ALGEBRAIC(:,63)).*ALGEBRAIC(:,63)).*ALGEBRAIC(:,63)) -  27.0000.*ALGEBRAIC(:,91))./( 2.00000.*power( ALGEBRAIC(:,63).*ALGEBRAIC(:,63) -  3.00000.*ALGEBRAIC(:,75), 1.50000)))./3.00000);
    ALGEBRAIC(:,210) = (ALGEBRAIC(:,150) - ALGEBRAIC(:,103))./CONSTANTS(:,96);
    ALGEBRAIC(:,11) = (STATES(:,5)+CONSTANTS(:,393))./CONSTANTS(:,18);
    ALGEBRAIC(:,221) = (ALGEBRAIC(:,11) - CONSTANTS(:,398))./(0.927300 - CONSTANTS(:,398));
    ALGEBRAIC(:,224) = piecewise({ALGEBRAIC(:,221)<0.00000, 0.00000 }, ALGEBRAIC(:,221));
    ALGEBRAIC(:,227) =  0.000257900.*(1.00000+ 0.100000.*STATES(:,37));
    ALGEBRAIC(:,230) = exp( ( 2.00000.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,233) = ( ( ( ( ALGEBRAIC(:,227).*4.00000).*STATES(:,51)).*CONSTANTS(:,276)).*( ALGEBRAIC(:,150).*ALGEBRAIC(:,230) -  0.341000.*CONSTANTS(:,98)))./(ALGEBRAIC(:,230) - 1.00000);
    ALGEBRAIC(:,236) =  ALGEBRAIC(:,233).*(STATES(:,56)+STATES(:,59));
    ALGEBRAIC(:,239) =  0.000155200.*(1.00000+ 0.400000.*STATES(:,37));
    ALGEBRAIC(:,242) = exp( ( 2.00000.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,245) = ( ( ( ( ALGEBRAIC(:,239).*4.00000).*STATES(:,51)).*CONSTANTS(:,276)).*( ALGEBRAIC(:,150).*ALGEBRAIC(:,242) -  0.341000.*CONSTANTS(:,98)))./(ALGEBRAIC(:,242) - 1.00000);
    ALGEBRAIC(:,247) =  ALGEBRAIC(:,245).*(STATES(:,64)+STATES(:,67));
    ALGEBRAIC(:,249) =  (1.00000 - ALGEBRAIC(:,224)).*ALGEBRAIC(:,247)+ ALGEBRAIC(:,224).*ALGEBRAIC(:,236);
    RATES(:,34) =   - CONSTANTS(:,306).*ALGEBRAIC(:,249)+ CONSTANTS(:,316).*ALGEBRAIC(:,210);
    ALGEBRAIC(:,192) = 1.00000./( (1.00000+exp((13.5600 - STATES(:,51))./9.45000)).*(1.00000+exp((25.0000+STATES(:,51))./ - 5.00000)));
    ALGEBRAIC(:,209) = ALGEBRAIC(:,192)./ALGEBRAIC(:,196);
    ALGEBRAIC(:,211) = (1.00000 - ALGEBRAIC(:,192))./ALGEBRAIC(:,196);
    ALGEBRAIC(:,235) = 1.00000+power(0.00110000./ALGEBRAIC(:,150), 4.00000);
    ALGEBRAIC(:,238) = 14.9186./ALGEBRAIC(:,235);
    ALGEBRAIC(:,220) = 1.00000./(1.00000+exp((17.5000+STATES(:,51))./3.00000));
    ALGEBRAIC(:,226) = (0.247400+ALGEBRAIC(:,220))./1.24740;
    ALGEBRAIC(:,229) = 1.00000./(ALGEBRAIC(:,215)+ALGEBRAIC(:,217)./26.5530);
    ALGEBRAIC(:,246) = ALGEBRAIC(:,226)./ALGEBRAIC(:,229);
    ALGEBRAIC(:,252) = (1.00000 - ALGEBRAIC(:,226))./ALGEBRAIC(:,229);
    RATES(:,60) = ((  - ((ALGEBRAIC(:,209)+ALGEBRAIC(:,238))+ALGEBRAIC(:,252)).*STATES(:,60)+ ALGEBRAIC(:,211).*STATES(:,64))+ CONSTANTS(:,105).*STATES(:,63))+ ALGEBRAIC(:,246).*STATES(:,61);
    RATES(:,64) = ((  - ((ALGEBRAIC(:,211)+ALGEBRAIC(:,238))+ALGEBRAIC(:,252)).*STATES(:,64)+ ALGEBRAIC(:,209).*STATES(:,60))+ CONSTANTS(:,105).*STATES(:,67))+ ALGEBRAIC(:,246).*STATES(:,65);
    ALGEBRAIC(:,223) = (0.00100000+ALGEBRAIC(:,220))./1.00100;
    ALGEBRAIC(:,213) =  5.00000.*STATES(:,37);
    ALGEBRAIC(:,232) = 1.00000+power(0.0120000./ALGEBRAIC(:,150), 10.0000);
    ALGEBRAIC(:,241) = (13.8250 - (6.38360 - ALGEBRAIC(:,213))./ALGEBRAIC(:,235)) - 3.36960./ALGEBRAIC(:,232);
    ALGEBRAIC(:,244) = 1.00000./(ALGEBRAIC(:,215)+ALGEBRAIC(:,217)./ALGEBRAIC(:,241));
    ALGEBRAIC(:,248) = ALGEBRAIC(:,223)./ALGEBRAIC(:,244);
    ALGEBRAIC(:,258) = (1.00000 - ALGEBRAIC(:,223))./ALGEBRAIC(:,244);
    RATES(:,63) = ((  - ((ALGEBRAIC(:,209)+CONSTANTS(:,105))+ALGEBRAIC(:,258)).*STATES(:,63)+ ALGEBRAIC(:,238).*STATES(:,60))+ ALGEBRAIC(:,211).*STATES(:,67))+ ALGEBRAIC(:,248).*STATES(:,62);
    RATES(:,67) = ((  - ((ALGEBRAIC(:,211)+CONSTANTS(:,105))+ALGEBRAIC(:,258)).*STATES(:,67)+ ALGEBRAIC(:,238).*STATES(:,64))+ ALGEBRAIC(:,209).*STATES(:,63))+ ALGEBRAIC(:,248).*STATES(:,66);
    ALGEBRAIC(:,250) = piecewise({abs(ALGEBRAIC(:,248))<1.00000e-12, 1.00000e-12 }, ALGEBRAIC(:,248));
    ALGEBRAIC(:,255) = piecewise({abs(ALGEBRAIC(:,252))<1.00000e-12, 1.00000e-12 }, ALGEBRAIC(:,252));
    ALGEBRAIC(:,261) = ( CONSTANTS(:,106).*( ( ALGEBRAIC(:,246).*ALGEBRAIC(:,258)).*ALGEBRAIC(:,238)))./( ( ALGEBRAIC(:,255).*ALGEBRAIC(:,250)).*CONSTANTS(:,105));
    RATES(:,61) = ((  - ((ALGEBRAIC(:,209)+ALGEBRAIC(:,261))+ALGEBRAIC(:,246)).*STATES(:,61)+ ALGEBRAIC(:,252).*STATES(:,60))+ CONSTANTS(:,106).*STATES(:,62))+ ALGEBRAIC(:,211).*STATES(:,65);
    RATES(:,62) = ((  - ((ALGEBRAIC(:,209)+CONSTANTS(:,106))+ALGEBRAIC(:,248)).*STATES(:,62)+ ALGEBRAIC(:,258).*STATES(:,63))+ ALGEBRAIC(:,261).*STATES(:,61))+ ALGEBRAIC(:,211).*STATES(:,66);
    RATES(:,65) = ((  - ((ALGEBRAIC(:,211)+ALGEBRAIC(:,261))+ALGEBRAIC(:,246)).*STATES(:,65)+ ALGEBRAIC(:,252).*STATES(:,64))+ CONSTANTS(:,106).*STATES(:,66))+ ALGEBRAIC(:,209).*STATES(:,61);
    RATES(:,66) = ((  - ((ALGEBRAIC(:,211)+CONSTANTS(:,106))+ALGEBRAIC(:,248)).*STATES(:,66)+ ALGEBRAIC(:,258).*STATES(:,67))+ ALGEBRAIC(:,261).*STATES(:,65))+ ALGEBRAIC(:,209).*STATES(:,62);
    ALGEBRAIC(:,253) =  CONSTANTS(:,244).*(1.00000+ 2.00000.*STATES(:,42));
    ALGEBRAIC(:,256) =  0.112500.*ALGEBRAIC(:,253);
    ALGEBRAIC(:,114) = (CONSTANTS(:,73)+CONSTANTS(:,74)) - STATES(:,35);
    ALGEBRAIC(:,122) =  STATES(:,35).*CONSTANTS(:,74);
    ALGEBRAIC(:,128) = (power(( ALGEBRAIC(:,114).*ALGEBRAIC(:,114)+ 4.00000.*ALGEBRAIC(:,122)), 1.0 ./ 2) - ALGEBRAIC(:,114))./2.00000;
    ALGEBRAIC(:,270) = ( ALGEBRAIC(:,249).*1.00000)./(1.00000+power(1.00000./ALGEBRAIC(:,128), 8.00000));
    ALGEBRAIC(:,272) =  ALGEBRAIC(:,256).*ALGEBRAIC(:,270);
    ALGEBRAIC(:,264) = 1.00000+0.0123000./ALGEBRAIC(:,128);
    ALGEBRAIC(:,266) = ALGEBRAIC(:,253)./ALGEBRAIC(:,264);
    RATES(:,119) =  - (ALGEBRAIC(:,272)+STATES(:,119))./ALGEBRAIC(:,266);
    ALGEBRAIC(:,259) =  CONSTANTS(:,244).*(1.00000+ 0.00000.*STATES(:,42));
    ALGEBRAIC(:,262) =  0.112500.*ALGEBRAIC(:,259);
    ALGEBRAIC(:,273) =  ( 1.99250.*ALGEBRAIC(:,262)).*ALGEBRAIC(:,270);
    ALGEBRAIC(:,268) = ( 0.535700.*ALGEBRAIC(:,259))./ALGEBRAIC(:,264);
    RATES(:,120) =  - (ALGEBRAIC(:,273)+STATES(:,120))./ALGEBRAIC(:,268);
    ALGEBRAIC(:,287) = 1.00000+power(CONSTANTS(:,135)./ALGEBRAIC(:,150), 2.00000);
    ALGEBRAIC(:,286) = exp( ( (CONSTANTS(:,140) - 1.00000).*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,288) = 1.00000+ CONSTANTS(:,141).*ALGEBRAIC(:,286);
    ALGEBRAIC(:,284) = power(STATES(:,50), 3.00000);
    ALGEBRAIC(:,289) = ( CONSTANTS(:,137).*ALGEBRAIC(:,284)+ CONSTANTS(:,365).*ALGEBRAIC(:,150))+ ( CONSTANTS(:,363).*CONSTANTS(:,98)).*(1.00000+ALGEBRAIC(:,150)./CONSTANTS(:,136));
    ALGEBRAIC(:,290) = ( ( CONSTANTS(:,136).*CONSTANTS(:,367)).*(1.00000+ALGEBRAIC(:,284)./CONSTANTS(:,363))+ ALGEBRAIC(:,284).*CONSTANTS(:,98))+ CONSTANTS(:,367).*ALGEBRAIC(:,150);
    ALGEBRAIC(:,285) = exp( ( CONSTANTS(:,140).*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,291) =  ( 0.200000.*CONSTANTS(:,142)).*( ( ALGEBRAIC(:,284).*CONSTANTS(:,98)).*ALGEBRAIC(:,285) -  ( CONSTANTS(:,367).*ALGEBRAIC(:,150)).*ALGEBRAIC(:,286));
    ALGEBRAIC(:,292) = ALGEBRAIC(:,291)./( ( ALGEBRAIC(:,287).*ALGEBRAIC(:,288)).*(ALGEBRAIC(:,289)+ALGEBRAIC(:,290)));
    ALGEBRAIC(:,208) = (STATES(:,50) - STATES(:,49))./CONSTANTS(:,95);
    RATES(:,50) =  - ( CONSTANTS(:,410).*ALGEBRAIC(:,292)+ALGEBRAIC(:,208));
    ALGEBRAIC(:,39) = (STATES(:,6)+CONSTANTS(:,396))./CONSTANTS(:,31);
    ALGEBRAIC(:,312) = (ALGEBRAIC(:,39) - CONSTANTS(:,399))./(0.958600 - CONSTANTS(:,399));
    ALGEBRAIC(:,314) = piecewise({ALGEBRAIC(:,312)<0.00000, 0.00000 }, ALGEBRAIC(:,312));
    ALGEBRAIC(:,318) =  (1.00000 - ALGEBRAIC(:,314)).*STATES(:,119)+ ALGEBRAIC(:,314).*STATES(:,120);
    ALGEBRAIC(:,308) =  ( CONSTANTS(:,156).*exp(ALGEBRAIC(:,128)./CONSTANTS(:,154))).*(ALGEBRAIC(:,128) - ALGEBRAIC(:,150));
    ALGEBRAIC(:,310) =  ( CONSTANTS(:,157).*exp(ALGEBRAIC(:,128)./CONSTANTS(:,155))).*(ALGEBRAIC(:,128) - ALGEBRAIC(:,150));
    ALGEBRAIC(:,316) =  (1.00000 - ALGEBRAIC(:,314)).*ALGEBRAIC(:,308)+ ALGEBRAIC(:,314).*ALGEBRAIC(:,310);
    ALGEBRAIC(:,320) = ALGEBRAIC(:,316)+ALGEBRAIC(:,318);
    ALGEBRAIC(:,212) = (STATES(:,31) - ALGEBRAIC(:,128))./CONSTANTS(:,97);
    RATES(:,35) = ALGEBRAIC(:,212) - ALGEBRAIC(:,320);
    ALGEBRAIC(:,154) = (STATES(:,32) - 0.673519)./(0.999180 - 0.673519);
    ALGEBRAIC(:,159) = piecewise({ALGEBRAIC(:,154)<0.00000, 0.00000 }, ALGEBRAIC(:,154));
    ALGEBRAIC(:,163) =  (1.00000 - ALGEBRAIC(:,159)).*CONSTANTS(:,78)+ ALGEBRAIC(:,159).*CONSTANTS(:,230);
    ALGEBRAIC(:,175) = ALGEBRAIC(:,163)+CONSTANTS(:,76);
    ALGEBRAIC(:,179) = ((ALGEBRAIC(:,175) - STATES(:,33))+CONSTANTS(:,72))+CONSTANTS(:,79);
    ALGEBRAIC(:,167) =  ALGEBRAIC(:,163).*CONSTANTS(:,76);
    ALGEBRAIC(:,183) = ((ALGEBRAIC(:,167) -  STATES(:,33).*ALGEBRAIC(:,175))+ CONSTANTS(:,79).*CONSTANTS(:,76))+ CONSTANTS(:,72).*ALGEBRAIC(:,163);
    ALGEBRAIC(:,171) =   - ALGEBRAIC(:,167).*STATES(:,33);
    ALGEBRAIC(:,187) =  - ALGEBRAIC(:,179)./3.00000+ ( (2.00000./3.00000).*power(( ALGEBRAIC(:,179).*ALGEBRAIC(:,179) -  3.00000.*ALGEBRAIC(:,183)), 1.0 ./ 2)).*cos(acos((( ( 9.00000.*ALGEBRAIC(:,179)).*ALGEBRAIC(:,183) -  ( ( 2.00000.*ALGEBRAIC(:,179)).*ALGEBRAIC(:,179)).*ALGEBRAIC(:,179)) -  27.0000.*ALGEBRAIC(:,171))./( 2.00000.*power( ALGEBRAIC(:,179).*ALGEBRAIC(:,179) -  3.00000.*ALGEBRAIC(:,183), 1.50000)))./3.00000);
    ALGEBRAIC(:,202) = (ALGEBRAIC(:,150) - ALGEBRAIC(:,187))./CONSTANTS(:,95);
    RATES(:,36) =  - ((( CONSTANTS(:,317).*ALGEBRAIC(:,292)+ CONSTANTS(:,318).*ALGEBRAIC(:,320))+ALGEBRAIC(:,202))+ALGEBRAIC(:,210));
    ALGEBRAIC(:,251) = exp( STATES(:,51).*CONSTANTS(:,264));
    ALGEBRAIC(:,254) = ( ( ( CONSTANTS(:,108).*STATES(:,51)).*CONSTANTS(:,276)).*(STATES(:,47) -  CONSTANTS(:,99).*ALGEBRAIC(:,251)))./(1.00000 - ALGEBRAIC(:,251));
    ALGEBRAIC(:,321) = 1.00000 - 1.00000./(1.00000+power(ALGEBRAIC(:,318)./CONSTANTS(:,109), 2.00000));
    ALGEBRAIC(:,324) =  ( ALGEBRAIC(:,254).*ALGEBRAIC(:,321)).*STATES(:,68);
    ALGEBRAIC(:,205) = (STATES(:,48) - STATES(:,47))./CONSTANTS(:,95);
    RATES(:,48) =  CONSTANTS(:,342).*ALGEBRAIC(:,324) - ALGEBRAIC(:,205);
    ALGEBRAIC(:,307) = 1.00000./(1.00000+power(0.0300000./ALGEBRAIC(:,195), 2.00000));
    ALGEBRAIC(:,309) =  (1.00000 - ALGEBRAIC(:,307)).*CONSTANTS(:,162)+ ALGEBRAIC(:,307).*CONSTANTS(:,380);
    ALGEBRAIC(:,325) = ( ALGEBRAIC(:,309).*STATES(:,31))./CONSTANTS(:,165);
    ALGEBRAIC(:,311) = (STATES(:,126) - 0.659100)./(0.994500 - 0.659100);
    ALGEBRAIC(:,313) = piecewise({ALGEBRAIC(:,311)<0.00000, 0.00000 }, ALGEBRAIC(:,311));
    ALGEBRAIC(:,315) =  ALGEBRAIC(:,313).*STATES(:,41);
    ALGEBRAIC(:,317) = STATES(:,41) - ALGEBRAIC(:,315);
    ALGEBRAIC(:,319) = ALGEBRAIC(:,313) - ALGEBRAIC(:,315);
    ALGEBRAIC(:,322) = ((1.00000 - ALGEBRAIC(:,319)) - ALGEBRAIC(:,317)) - ALGEBRAIC(:,315);
    ALGEBRAIC(:,323) = (( ALGEBRAIC(:,322).*CONSTANTS(:,160)+ ALGEBRAIC(:,319).*CONSTANTS(:,375))+ ALGEBRAIC(:,317).*CONSTANTS(:,370))+ ALGEBRAIC(:,315).*CONSTANTS(:,377);
    ALGEBRAIC(:,327) = ( ALGEBRAIC(:,309).*ALGEBRAIC(:,187))./(ALGEBRAIC(:,187)+ALGEBRAIC(:,323));
    ALGEBRAIC(:,329) = ALGEBRAIC(:,327) - ALGEBRAIC(:,325);
    RATES(:,31) = ALGEBRAIC(:,329) -  CONSTANTS(:,313).*ALGEBRAIC(:,212);
    ALGEBRAIC(:,214) =  ( 2.00000.*STATES(:,51)).*CONSTANTS(:,264);
    ALGEBRAIC(:,216) = exp(ALGEBRAIC(:,214));
    ALGEBRAIC(:,218) = ( ( ( ( CONSTANTS(:,102).*2.00000).*CONSTANTS(:,88)).*ALGEBRAIC(:,214)).*( ALGEBRAIC(:,187).*ALGEBRAIC(:,216) -  0.341000.*CONSTANTS(:,98)))./(ALGEBRAIC(:,216) - 1.00000);
    ALGEBRAIC(:,293) = 1.00000+power(CONSTANTS(:,135)./ALGEBRAIC(:,187), 2.00000);
    ALGEBRAIC(:,294) = 1.00000+ CONSTANTS(:,141).*ALGEBRAIC(:,286);
    ALGEBRAIC(:,283) = power(STATES(:,49), 3.00000);
    ALGEBRAIC(:,295) = ( CONSTANTS(:,137).*ALGEBRAIC(:,283)+ CONSTANTS(:,365).*ALGEBRAIC(:,187))+ ( CONSTANTS(:,363).*CONSTANTS(:,98)).*(1.00000+ALGEBRAIC(:,187)./CONSTANTS(:,136));
    ALGEBRAIC(:,296) = ( ( CONSTANTS(:,136).*CONSTANTS(:,367)).*(1.00000+ALGEBRAIC(:,283)./CONSTANTS(:,363))+ ALGEBRAIC(:,283).*CONSTANTS(:,98))+ CONSTANTS(:,367).*ALGEBRAIC(:,187);
    ALGEBRAIC(:,297) =  ( 0.800000.*CONSTANTS(:,142)).*( ( ALGEBRAIC(:,283).*CONSTANTS(:,98)).*ALGEBRAIC(:,285) -  ( CONSTANTS(:,367).*ALGEBRAIC(:,187)).*ALGEBRAIC(:,286));
    ALGEBRAIC(:,298) = ALGEBRAIC(:,297)./( ( ALGEBRAIC(:,293).*ALGEBRAIC(:,294)).*(ALGEBRAIC(:,295)+ALGEBRAIC(:,296)));
    ALGEBRAIC(:,305) = ( CONSTANTS(:,152).*ALGEBRAIC(:,187))./(CONSTANTS(:,153)+ALGEBRAIC(:,187));
    RATES(:,33) = (  - CONSTANTS(:,309).*((ALGEBRAIC(:,218)+ALGEBRAIC(:,305)) -  2.00000.*ALGEBRAIC(:,298)) -  CONSTANTS(:,314).*ALGEBRAIC(:,329))+ CONSTANTS(:,319).*ALGEBRAIC(:,202);
    ALGEBRAIC(:,328) =   - CONSTANTS(:,239).*log(CONSTANTS(:,99)./STATES(:,47));
    ALGEBRAIC(:,332) =  CONSTANTS(:,239).*log(CONSTANTS(:,100)./STATES(:,127));
    ALGEBRAIC(:,333) = ALGEBRAIC(:,332) - ALGEBRAIC(:,328);
    ALGEBRAIC(:,334) = ( CONSTANTS(:,92).*ALGEBRAIC(:,333))./(ALGEBRAIC(:,333)+CONSTANTS(:,93));
    ALGEBRAIC(:,353) =  CONSTANTS(:,239).*log(CONSTANTS(:,101)./STATES(:,49));
    ALGEBRAIC(:,354) = power(ALGEBRAIC(:,353) - ALGEBRAIC(:,328), 4.00000);
    ALGEBRAIC(:,355) = ( CONSTANTS(:,94).*ALGEBRAIC(:,354))./(ALGEBRAIC(:,354)+CONSTANTS(:,347));
    ALGEBRAIC(:,330) =  CONSTANTS(:,107).*(STATES(:,51) - ALGEBRAIC(:,328));
    RATES(:,47) = (( CONSTANTS(:,333).*ALGEBRAIC(:,330)+ALGEBRAIC(:,355))+ALGEBRAIC(:,334))+ CONSTANTS(:,338).*ALGEBRAIC(:,205);
    ALGEBRAIC(:,356) =  ( ( ( CONSTANTS(:,242).*power(STATES(:,115), 3.00000)).*STATES(:,107)).*STATES(:,108)).*(STATES(:,51) - ALGEBRAIC(:,353));
    ALGEBRAIC(:,357) =  ( ( ( CONSTANTS(:,242).*power(STATES(:,109), 3.00000)).*STATES(:,107)).*STATES(:,108)).*(STATES(:,51) - ALGEBRAIC(:,353));
    ALGEBRAIC(:,358) =  ( ( ( CONSTANTS(:,242).*power(STATES(:,112), 3.00000)).*STATES(:,110)).*STATES(:,111)).*(STATES(:,51) - ALGEBRAIC(:,353));
    ALGEBRAIC(:,359) =  ( ( ( ( CONSTANTS(:,242).*power(STATES(:,115), 3.00000)).*STATES(:,113)).*STATES(:,114)).*(STATES(:,51) - ALGEBRAIC(:,353))).*1.25000;
    ALGEBRAIC(:,274) = (STATES(:,106) - 0.239480)./(0.950143 - 0.239480);
    ALGEBRAIC(:,275) = piecewise({ALGEBRAIC(:,274)<0.00000, 0.00000 }, ALGEBRAIC(:,274));
    ALGEBRAIC(:,276) =  ALGEBRAIC(:,275).*STATES(:,39);
    ALGEBRAIC(:,277) = STATES(:,39) - ALGEBRAIC(:,276);
    ALGEBRAIC(:,278) = ALGEBRAIC(:,275) - ALGEBRAIC(:,276);
    ALGEBRAIC(:,279) = ((1.00000 - ALGEBRAIC(:,278)) - ALGEBRAIC(:,277)) - ALGEBRAIC(:,276);
    ALGEBRAIC(:,360) = (( ALGEBRAIC(:,279).*ALGEBRAIC(:,358)+ ALGEBRAIC(:,278).*ALGEBRAIC(:,359))+ ALGEBRAIC(:,277).*ALGEBRAIC(:,357))+ ALGEBRAIC(:,276).*ALGEBRAIC(:,356);
    ALGEBRAIC(:,280) =  STATES(:,51).*CONSTANTS(:,264);
    ALGEBRAIC(:,281) = exp(ALGEBRAIC(:,280));
    ALGEBRAIC(:,282) = ( ( ( CONSTANTS(:,134).*CONSTANTS(:,88)).*ALGEBRAIC(:,280)).*( STATES(:,49).*ALGEBRAIC(:,281) - CONSTANTS(:,101)))./(ALGEBRAIC(:,281) - 1.00000);
    ALGEBRAIC(:,301) = ( CONSTANTS(:,145).*CONSTANTS(:,243))./(1.00000+exp(  - (STATES(:,51)+92.0000).*CONSTANTS(:,264)));
    ALGEBRAIC(:,302) =  ALGEBRAIC(:,301).*power(STATES(:,49)./(STATES(:,49)+CONSTANTS(:,148)), 3.00000);
    ALGEBRAIC(:,303) =  ALGEBRAIC(:,301).*power(STATES(:,49)./(STATES(:,49)+CONSTANTS(:,149)), 3.00000);
    ALGEBRAIC(:,299) = (STATES(:,116) - 0.126345)./(0.998014 - 0.126345);
    ALGEBRAIC(:,300) = piecewise({ALGEBRAIC(:,299)<0.00000, 0.00000 }, ALGEBRAIC(:,299));
    ALGEBRAIC(:,304) =  (1.00000 - ALGEBRAIC(:,300)).*ALGEBRAIC(:,302)+ ALGEBRAIC(:,300).*ALGEBRAIC(:,303);
    ALGEBRAIC(:,361) =  ( power(STATES(:,118), 3.00000).*STATES(:,117)).*(STATES(:,51) - ALGEBRAIC(:,353));
    ALGEBRAIC(:,362) =  0.0160000.*ALGEBRAIC(:,361);
    ALGEBRAIC(:,363) =  0.00650000.*ALGEBRAIC(:,361);
    ALGEBRAIC(:,364) =  (1.00000 - STATES(:,39)).*ALGEBRAIC(:,363)+ STATES(:,39).*ALGEBRAIC(:,362);
    ALGEBRAIC(:,366) = (((ALGEBRAIC(:,360)+ALGEBRAIC(:,282))+ALGEBRAIC(:,364))+ ALGEBRAIC(:,304).*3.00000)+ ALGEBRAIC(:,298).*3.00000;
    RATES(:,49) = ( CONSTANTS(:,408).*ALGEBRAIC(:,366)+ CONSTANTS(:,409).*ALGEBRAIC(:,208))+ALGEBRAIC(:,355);
    ALGEBRAIC(:,306) = (((ALGEBRAIC(:,249)+ALGEBRAIC(:,218))+ALGEBRAIC(:,305)) -  ALGEBRAIC(:,298).*2.00000) -  ALGEBRAIC(:,292).*2.00000;
    ALGEBRAIC(:,331) = ALGEBRAIC(:,330)+ALGEBRAIC(:,324);
    ALGEBRAIC(:,335) = STATES(:,51) - ALGEBRAIC(:,332);
    ALGEBRAIC(:,336) = 1.02000./(1.00000+exp( 0.238500.*(ALGEBRAIC(:,335) - 59.2150)));
    ALGEBRAIC(:,337) = ( 0.491240.*exp( 0.0803200.*(ALGEBRAIC(:,335)+5.47600))+exp( 0.0617500.*(ALGEBRAIC(:,335) - 594.310)))./(1.00000+exp(  - 0.514300.*(ALGEBRAIC(:,335)+4.75300)));
    ALGEBRAIC(:,338) =  ( CONSTANTS(:,240).*(ALGEBRAIC(:,336)./(ALGEBRAIC(:,336)+ALGEBRAIC(:,337)))).*ALGEBRAIC(:,335);
    ALGEBRAIC(:,339) =  ALGEBRAIC(:,338).*1.20000;
    ALGEBRAIC(:,340) =  (1.00000 - STATES(:,38)).*ALGEBRAIC(:,338)+ STATES(:,38).*ALGEBRAIC(:,339);
    ALGEBRAIC(:,257) = 1.00000./(1.00000+exp((STATES(:,51)+10.0000)./15.4000));
    ALGEBRAIC(:,341) =  ( ( CONSTANTS(:,241).*STATES(:,69)).*ALGEBRAIC(:,257)).*(STATES(:,51) - ALGEBRAIC(:,332));
    ALGEBRAIC(:,349) =  CONSTANTS(:,239).*log((CONSTANTS(:,100)+ CONSTANTS(:,166).*CONSTANTS(:,101))./(STATES(:,127)+ CONSTANTS(:,166).*STATES(:,49)));
    ALGEBRAIC(:,260) =  0.195610.*(1.00000+0.600000./(1.00000+power(3.80000e-05./ALGEBRAIC(:,187), 1.40000)));
    ALGEBRAIC(:,350) =  ( ALGEBRAIC(:,260).*(STATES(:,70)+STATES(:,71))).*(STATES(:,51) - ALGEBRAIC(:,349));
    ALGEBRAIC(:,351) =  ( ALGEBRAIC(:,260).*(STATES(:,72)+STATES(:,73))).*(STATES(:,51) - ALGEBRAIC(:,349));
    ALGEBRAIC(:,263) = (STATES(:,104)+CONSTANTS(:,404))./CONSTANTS(:,111);
    ALGEBRAIC(:,265) = (ALGEBRAIC(:,263) - CONSTANTS(:,405))./(0.785000 - CONSTANTS(:,405));
    ALGEBRAIC(:,267) = piecewise({ALGEBRAIC(:,265)<0.00000, 0.00000 }, ALGEBRAIC(:,265));
    ALGEBRAIC(:,352) =  ALGEBRAIC(:,267).*ALGEBRAIC(:,351)+ (1.00000 - ALGEBRAIC(:,267)).*ALGEBRAIC(:,350);
    ALGEBRAIC(:,342) = ( CONSTANTS(:,124).*(STATES(:,51) - ALGEBRAIC(:,332)))./(1.00000+exp((15.0000 - STATES(:,51))./17.0000));
    ALGEBRAIC(:,343) =  (( CONSTANTS(:,124).*(STATES(:,51) - ALGEBRAIC(:,332)))./(1.00000+exp((36.0000 - STATES(:,51))./17.0000))).*3.62000;
    ALGEBRAIC(:,269) = (STATES(:,105) - 0.0589380)./(0.393747 - 0.0589380);
    ALGEBRAIC(:,271) = piecewise({ALGEBRAIC(:,269)<0.00000, 0.00000 }, ALGEBRAIC(:,269));
    ALGEBRAIC(:,344) =  (1.00000 - ALGEBRAIC(:,271)).*ALGEBRAIC(:,342)+ ALGEBRAIC(:,271).*ALGEBRAIC(:,343);
    ALGEBRAIC(:,326) = exp(STATES(:,51)./550.000);
    ALGEBRAIC(:,345) =  ( ( CONSTANTS(:,158).*power(STATES(:,121), 3.00000)).*ALGEBRAIC(:,326)).*(STATES(:,51) - ALGEBRAIC(:,332));
    ALGEBRAIC(:,346) =  ALGEBRAIC(:,345).*( 0.735600.*STATES(:,122)+ 0.264400.*STATES(:,124));
    ALGEBRAIC(:,347) =  ALGEBRAIC(:,345).*( 0.735600.*STATES(:,123)+ 0.264400.*STATES(:,125));
    ALGEBRAIC(:,348) =  (1.00000 - STATES(:,40)).*ALGEBRAIC(:,347)+ STATES(:,40).*ALGEBRAIC(:,346);
    ALGEBRAIC(:,365) = ((((ALGEBRAIC(:,340)+ALGEBRAIC(:,341))+ALGEBRAIC(:,352))+ALGEBRAIC(:,344))+ALGEBRAIC(:,348)) -  2.00000.*ALGEBRAIC(:,304);
    ALGEBRAIC(:,367) = ALGEBRAIC(:,366)+ ALGEBRAIC(:,292).*3.00000;
    ALGEBRAIC(:,368) = ((ALGEBRAIC(:,367)+ALGEBRAIC(:,365))+ALGEBRAIC(:,306))+ALGEBRAIC(:,331);
    ALGEBRAIC(:,369) =  piecewise({(VOI - CONSTANTS(:,214)) -  CONSTANTS(:,215).*floor((VOI - CONSTANTS(:,214))./CONSTANTS(:,215))<CONSTANTS(:,213), 1.00000 }, 0.00000).*CONSTANTS(:,257);
    RATES(:,51) =  - (ALGEBRAIC(:,368)+ALGEBRAIC(:,369))./1.00000;
    RATES(:,127) =  CONSTANTS(:,407).*(ALGEBRAIC(:,365)+ALGEBRAIC(:,369))+ALGEBRAIC(:,334);
   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(:,4) = CONSTANTS(:,394) - STATES(:,5);
    ALGEBRAIC(:,5) = CONSTANTS(:,397) - STATES(:,6);
    ALGEBRAIC(:,16) = CONSTANTS(:,406) - STATES(:,104);
    ALGEBRAIC(:,26) = 1.00000./(1.00000+exp((STATES(:,51)+91.0000)./6.10000));
    ALGEBRAIC(:,30) = CONSTANTS(:,256) - STATES(:,145);
    ALGEBRAIC(:,34) = (CONSTANTS(:,323) - STATES(:,13)) - STATES(:,12);
    ALGEBRAIC(:,36) = (CONSTANTS(:,326) - STATES(:,19)) - STATES(:,18);
    ALGEBRAIC(:,37) = (CONSTANTS(:,331) - STATES(:,27)) - STATES(:,26);
    ALGEBRAIC(:,12) = 0.0250000./(1.00000+exp((STATES(:,51)+58.0000)./5.00000));
    ALGEBRAIC(:,40) = 0.200000./(1.00000+exp((STATES(:,51)+19.0000)./ - 9.00000));
    ALGEBRAIC(:,13) = 1.00000./(( 0.000600000.*(STATES(:,51) - 1.73840))./(1.00000 - exp(  - 0.136000.*(STATES(:,51) - 1.73840))) - ( 0.000300000.*(STATES(:,51)+38.3608))./(1.00000 - exp( 0.152200.*(STATES(:,51)+38.3608))));
    ALGEBRAIC(:,41) = 1.00000./(1.00000+exp((STATES(:,51)+10.0850)./ - 4.25000));
    ALGEBRAIC(:,14) = 0.00739900./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51) - 0.0311960))./ - 0.800190));
    ALGEBRAIC(:,42) = 0.00569920./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51) - 0.0415200))./1.34890));
    ALGEBRAIC(:,15) = 0.00994150./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51) - 0.0448090))./ - 0.581720));
    ALGEBRAIC(:,43) = 0.00332010./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51) - 0.0942170))./0.953640));
    ALGEBRAIC(:,17) = piecewise({STATES(:,51)+CONSTANTS(:,131)>= - 40.0000, 0.00000 },  0.135000.*exp(((87.0000+STATES(:,51))+CONSTANTS(:,131))./ - 6.80000));
    ALGEBRAIC(:,44) = piecewise({STATES(:,51)+CONSTANTS(:,131)>= - 40.0000, 1.00000./( 0.130000.*(1.00000+exp(((STATES(:,51)+CONSTANTS(:,131))+27.4034)./ - 11.1000))) },  3.56000.*exp( 0.0790000.*((STATES(:,51)+CONSTANTS(:,131))+7.00000))+ 310000..*exp( 0.350000.*((STATES(:,51)+CONSTANTS(:,131))+7.00000)));
    ALGEBRAIC(:,18) = piecewise({STATES(:,51)+CONSTANTS(:,131)>= - 40.0000, 0.00000 }, ( (  - 127140..*exp( 0.244400.*(STATES(:,51)+CONSTANTS(:,131)))+  - 6.94800e-05.*exp(  - 0.0439100.*(STATES(:,51)+CONSTANTS(:,131)))).*((STATES(:,51)+CONSTANTS(:,131))+37.7800))./(1.00000+exp( 0.311000.*((STATES(:,51)+CONSTANTS(:,131))+79.2300))));
    ALGEBRAIC(:,45) = piecewise({STATES(:,51)+CONSTANTS(:,131)>= - 40.0000, ( 0.300000.*exp(  - 2.53500e-07.*(STATES(:,51)+CONSTANTS(:,131))))./(1.00000+exp(  - 0.100000.*((STATES(:,51)+CONSTANTS(:,131))+32.0000))) }, ( 0.121200.*exp(  - 0.0105200.*(STATES(:,51)+CONSTANTS(:,131))))./(1.00000+exp(  - 0.137800.*((STATES(:,51)+CONSTANTS(:,131))+40.1400))));
    ALGEBRAIC(:,19) = ( 0.320000.*(STATES(:,51)+58.4729))./(1.00000 - exp(  - 0.100000.*(STATES(:,51)+58.4729)));
    ALGEBRAIC(:,46) =  0.0800000.*exp((13.7299 - STATES(:,51))./11.0000);
    ALGEBRAIC(:,20) = piecewise({STATES(:,51)>= - 40.0000, 0.00000 },  0.135000.*exp((87.0000+STATES(:,51))./ - 6.80000));
    ALGEBRAIC(:,47) = piecewise({STATES(:,51)>= - 40.0000, 1.00000./( 0.130000.*(1.00000+exp((STATES(:,51)+27.4034)./ - 11.1000))) },  3.56000.*exp( 0.0790000.*(STATES(:,51)+7.00000))+ 310000..*exp( 0.350000.*(STATES(:,51)+7.00000)));
    ALGEBRAIC(:,21) = piecewise({STATES(:,51)>= - 40.0000, 0.00000 }, ( (  - 127140..*exp( 0.244400.*STATES(:,51)) -  6.94800e-05.*exp(  - 0.0439100.*STATES(:,51))).*(STATES(:,51)+37.7800))./(1.00000+exp( 0.311000.*(STATES(:,51)+79.2300))));
    ALGEBRAIC(:,48) = piecewise({STATES(:,51)>= - 40.0000, ( 0.300000.*exp(  - 2.53500e-07.*STATES(:,51)))./(1.00000+exp(  - 0.100000.*(STATES(:,51)+32.0000))) }, ( 0.121200.*exp(  - 0.0105200.*STATES(:,51)))./(1.00000+exp(  - 0.137800.*(STATES(:,51)+40.1400))));
    ALGEBRAIC(:,22) = ( 0.320000.*(STATES(:,51)+58.4729))./(1.00000 - exp(  - 0.100000.*(STATES(:,51)+58.4729)));
    ALGEBRAIC(:,49) =  0.0800000.*exp((13.7299 - STATES(:,51))./11.0000);
    ALGEBRAIC(:,23) = piecewise({STATES(:,51)>= - 40.0000, 0.00000 },  0.135000.*exp(((87.0000+STATES(:,51))+CONSTANTS(:,133))./ - 6.80000));
    ALGEBRAIC(:,50) = piecewise({STATES(:,51)>= - 40.0000, (1.00000./0.130000)./(1.00000+exp(((STATES(:,51)+CONSTANTS(:,133))+27.4034)./ - 11.1000)) },  3.56000.*exp( 0.0790000.*((STATES(:,51)+CONSTANTS(:,133))+7.00000))+ 310000..*exp( 0.350000.*((STATES(:,51)+CONSTANTS(:,133))+7.00000)));
    ALGEBRAIC(:,24) = piecewise({STATES(:,51)>= - 40.0000, 0.00000 }, ( (  - 127140..*exp( 0.244400.*(STATES(:,51)+CONSTANTS(:,133))) -  6.94800e-05.*exp(  - 0.0439100.*(STATES(:,51)+CONSTANTS(:,133)))).*((STATES(:,51)+CONSTANTS(:,133))+37.7800))./(1.00000+exp( 0.311000.*((STATES(:,51)+CONSTANTS(:,133))+79.2300))));
    ALGEBRAIC(:,51) = piecewise({STATES(:,51)>= - 40.0000, ( 0.300000.*exp(  - 2.53500e-07.*(STATES(:,51)+CONSTANTS(:,133))))./(1.00000+exp(  - 0.100000.*((STATES(:,51)+CONSTANTS(:,133))+32.0000))) }, ( 0.121200.*exp(  - 0.0105200.*(STATES(:,51)+CONSTANTS(:,133))))./(1.00000+exp(  - 0.137800.*((STATES(:,51)+CONSTANTS(:,133))+40.1400))));
    ALGEBRAIC(:,25) = ( 0.320000.*((STATES(:,51)+CONSTANTS(:,132))+58.4729))./(1.00000 - exp(  - 0.100000.*((STATES(:,51)+CONSTANTS(:,132))+58.4729)));
    ALGEBRAIC(:,52) =  0.0800000.*exp(((STATES(:,51)+CONSTANTS(:,132)) - 13.7299)./ - 11.0000);
    ALGEBRAIC(:,27) = ( 0.320000.*(STATES(:,51)+47.1300))./(1.00000 - exp(  - 0.100000.*(STATES(:,51)+47.1300)));
    ALGEBRAIC(:,53) =  0.0800000.*exp(STATES(:,51)./ - 11.0000);
    ALGEBRAIC(:,58) = (CONSTANTS(:,324) - STATES(:,15)) - STATES(:,14);
    ALGEBRAIC(:,61) = (CONSTANTS(:,332) - STATES(:,29)) - STATES(:,28);
    ALGEBRAIC(:,28) = 1.00000./(1.00000+exp((STATES(:,51)+9.43700)./ - 7.13300));
    ALGEBRAIC(:,54) = 1.00000./(1.00000+exp((STATES(:,51) - 18.4099)./ - 29.3814));
    ALGEBRAIC(:,66) = 1.00000./(1.00000+exp((STATES(:,51)+100.000)./29.3814));
    ALGEBRAIC(:,78) = 1.00000./(ALGEBRAIC(:,54)./1.20890+ 3.50000.*ALGEBRAIC(:,66));
    ALGEBRAIC(:,67) = ((1.00000./(1.00000+exp((STATES(:,51)+19.0000)./ - 9.00000)))./0.500000)./9.79530;
    ALGEBRAIC(:,29) = 1.00000./(1.00000+exp((STATES(:,51)+58.0000)./5.00000));
    ALGEBRAIC(:,79) =  0.0479600.*ALGEBRAIC(:,29);
    ALGEBRAIC(:,80) =  0.0214400.*ALGEBRAIC(:,29);
    ALGEBRAIC(:,55) = (1.00000./(1.00000+exp((STATES(:,51)+60.0000)./5.00000)))./250.000;
    ALGEBRAIC(:,81) =  2.46000.*ALGEBRAIC(:,55);
    ALGEBRAIC(:,82) =  0.560340.*ALGEBRAIC(:,55);
    ALGEBRAIC(:,64) =  0.0906540.*exp( (  - 0.111570.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,92) = 0.388390./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51)+0.150190))./ - 0.606930));
    ALGEBRAIC(:,76) = 0.00311240+(0.0283300 - 0.00311240)./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51)+0.0516600))./1.55220));
    ALGEBRAIC(:,65) =  0.0657000.*exp( (  - 0.118990.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,94) = 0.563560./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51)+0.179860))./ - 0.583810));
    ALGEBRAIC(:,77) = 0.000385250+(0.0124060 - 0.000385250)./(1.00000+exp(( CONSTANTS(:,264).*(STATES(:,51)+0.0641180))./0.779920));
    ALGEBRAIC(:,93) =  0.000441980.*exp( (  - 1.20220.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,104) =  0.000401730.*exp( ( 0.000208730.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,95) =  0.000237300.*exp( (  - 1.97420.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,105) =  0.000226520.*exp( ( 0.000246900.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,6) = ( ( CONSTANTS(:,37).*CONSTANTS(:,36)).*CONSTANTS(:,320) - STATES(:,9)) - STATES(:,8);
    ALGEBRAIC(:,35) = ( ALGEBRAIC(:,6).*(CONSTANTS(:,60)+CONSTANTS(:,52)) -  STATES(:,15).*(CONSTANTS(:,52)+CONSTANTS(:,60)))+ ( CONSTANTS(:,50).*CONSTANTS(:,52)).*(1.00000+CONSTANTS(:,60)./CONSTANTS(:,55));
    ALGEBRAIC(:,59) =  (  - STATES(:,15).*CONSTANTS(:,50)).*CONSTANTS(:,52);
    ALGEBRAIC(:,71) = ( - ALGEBRAIC(:,35)+power(( ALGEBRAIC(:,35).*ALGEBRAIC(:,35) -  ( 4.00000.*CONSTANTS(:,223)).*ALGEBRAIC(:,59)), 1.0 ./ 2))./( 2.00000.*CONSTANTS(:,223));
    ALGEBRAIC(:,87) = ALGEBRAIC(:,6)./(1.00000+ (ALGEBRAIC(:,71)./CONSTANTS(:,50)).*(1.00000+CONSTANTS(:,60)./CONSTANTS(:,52)));
    ALGEBRAIC(:,99) = ( ALGEBRAIC(:,71).*ALGEBRAIC(:,87))./CONSTANTS(:,50);
    ALGEBRAIC(:,109) = ( ALGEBRAIC(:,99).*CONSTANTS(:,60))./CONSTANTS(:,52);
    ALGEBRAIC(:,9) = ( ( CONSTANTS(:,216).*CONSTANTS(:,36)).*CONSTANTS(:,327) - STATES(:,22)) - STATES(:,21);
    ALGEBRAIC(:,38) = ( ALGEBRAIC(:,9).*(CONSTANTS(:,60)+CONSTANTS(:,52)) -  STATES(:,29).*(CONSTANTS(:,52)+CONSTANTS(:,60)))+ ( CONSTANTS(:,50).*CONSTANTS(:,52)).*(1.00000+CONSTANTS(:,60)./CONSTANTS(:,55));
    ALGEBRAIC(:,62) =  (  - STATES(:,29).*CONSTANTS(:,50)).*CONSTANTS(:,52);
    ALGEBRAIC(:,74) = ( - ALGEBRAIC(:,38)+power(( ALGEBRAIC(:,38).*ALGEBRAIC(:,38) -  ( 4.00000.*CONSTANTS(:,226)).*ALGEBRAIC(:,62)), 1.0 ./ 2))./( 2.00000.*CONSTANTS(:,226));
    ALGEBRAIC(:,90) = ALGEBRAIC(:,9)./(1.00000+ (ALGEBRAIC(:,74)./CONSTANTS(:,50)).*(1.00000+CONSTANTS(:,60)./CONSTANTS(:,52)));
    ALGEBRAIC(:,102) = ( ALGEBRAIC(:,74).*ALGEBRAIC(:,90))./CONSTANTS(:,50);
    ALGEBRAIC(:,112) =  (CONSTANTS(:,60)./CONSTANTS(:,52)).*ALGEBRAIC(:,102);
    ALGEBRAIC(:,8) = ( ( CONSTANTS(:,217).*CONSTANTS(:,296)).*CONSTANTS(:,322) - STATES(:,3)) - STATES(:,16);
    ALGEBRAIC(:,60) = ( ALGEBRAIC(:,8).*(CONSTANTS(:,48)+CONSTANTS(:,60)) -  ALGEBRAIC(:,36).*(CONSTANTS(:,48)+CONSTANTS(:,60)))+ ( CONSTANTS(:,47).*CONSTANTS(:,48)).*(1.00000+CONSTANTS(:,60)./CONSTANTS(:,49));
    ALGEBRAIC(:,72) =  (  - ALGEBRAIC(:,36).*CONSTANTS(:,48)).*CONSTANTS(:,47);
    ALGEBRAIC(:,88) = ( - ALGEBRAIC(:,60)+power(( ALGEBRAIC(:,60).*ALGEBRAIC(:,60) -  ( 4.00000.*CONSTANTS(:,225)).*ALGEBRAIC(:,72)), 1.0 ./ 2))./( 2.00000.*CONSTANTS(:,225));
    ALGEBRAIC(:,100) = ALGEBRAIC(:,8)./(1.00000+ (ALGEBRAIC(:,88)./CONSTANTS(:,47)).*(1.00000+CONSTANTS(:,60)./CONSTANTS(:,48)));
    ALGEBRAIC(:,111) = ( ( CONSTANTS(:,60).*ALGEBRAIC(:,88)).*ALGEBRAIC(:,100))./( CONSTANTS(:,47).*CONSTANTS(:,48));
    ALGEBRAIC(:,120) = ( ALGEBRAIC(:,100).*ALGEBRAIC(:,88))./CONSTANTS(:,47);
    ALGEBRAIC(:,119) = ( CONSTANTS(:,60).*ALGEBRAIC(:,88))./CONSTANTS(:,49);
    ALGEBRAIC(:,131) = ((CONSTANTS(:,400) - STATES(:,143)) - STATES(:,142)) - STATES(:,141);
    ALGEBRAIC(:,2) = power( STATES(:,4).*1.00000, CONSTANTS(:,13));
    ALGEBRAIC(:,32) =  CONSTANTS(:,7).*(CONSTANTS(:,9)+ALGEBRAIC(:,2)./(CONSTANTS(:,4)+ALGEBRAIC(:,2)));
    ALGEBRAIC(:,68) =  ( ALGEBRAIC(:,32).*CONSTANTS(:,330)).*CONSTANTS(:,228);
    ALGEBRAIC(:,84) = ( CONSTANTS(:,237).*(STATES(:,44) - STATES(:,46)))./CONSTANTS(:,310);
    ALGEBRAIC(:,97) = ( CONSTANTS(:,238).*(STATES(:,46) - STATES(:,45)))./CONSTANTS(:,310);
    ALGEBRAIC(:,108) = ( CONSTANTS(:,350).*CONSTANTS(:,186))./(1.00000+CONSTANTS(:,171)./STATES(:,46));
    ALGEBRAIC(:,117) = ( (CONSTANTS(:,373)+ (CONSTANTS(:,175) - 1.00000).*STATES(:,132)).*CONSTANTS(:,188))./(1.00000+CONSTANTS(:,173)./STATES(:,46));
    ALGEBRAIC(:,125) = ALGEBRAIC(:,108)+ALGEBRAIC(:,117);
    ALGEBRAIC(:,135) = (( (  - CONSTANTS(:,269).*ALGEBRAIC(:,131)).*STATES(:,46)+ CONSTANTS(:,277).*STATES(:,143)) -  ( CONSTANTS(:,270).*STATES(:,143)).*STATES(:,46))+ CONSTANTS(:,278).*STATES(:,142);
    ALGEBRAIC(:,141) = ((CONSTANTS(:,381) - STATES(:,135)) - STATES(:,134)) - STATES(:,133);
    ALGEBRAIC(:,3) = power( STATES(:,2).*1.00000, CONSTANTS(:,14));
    ALGEBRAIC(:,33) = power( STATES(:,2).*1.00000, CONSTANTS(:,15));
    ALGEBRAIC(:,57) =  ( CONSTANTS(:,8).*(CONSTANTS(:,10)+ALGEBRAIC(:,3)./(CONSTANTS(:,5)+ALGEBRAIC(:,3)))).*(1.00000 - ( (1.00000 - ( CONSTANTS(:,16).*ALGEBRAIC(:,33))./(CONSTANTS(:,6)+ALGEBRAIC(:,33))).*STATES(:,1))./(CONSTANTS(:,3)+STATES(:,1)));
    ALGEBRAIC(:,83) =  ( ALGEBRAIC(:,57).*CONSTANTS(:,321)).*CONSTANTS(:,228);
    ALGEBRAIC(:,96) = ( CONSTANTS(:,237).*(STATES(:,44) - STATES(:,46)))./CONSTANTS(:,307);
    ALGEBRAIC(:,106) = ( CONSTANTS(:,236).*(STATES(:,44) - STATES(:,45)))./CONSTANTS(:,307);
    ALGEBRAIC(:,115) = ( CONSTANTS(:,348).*CONSTANTS(:,186))./(1.00000+CONSTANTS(:,171)./STATES(:,44));
    ALGEBRAIC(:,123) = ( (CONSTANTS(:,378)+ (CONSTANTS(:,175) - 1.00000).*STATES(:,128)).*CONSTANTS(:,187))./(1.00000+CONSTANTS(:,172)./STATES(:,44));
    ALGEBRAIC(:,129) = ( (CONSTANTS(:,371)+ (CONSTANTS(:,175) - 1.00000).*STATES(:,130)).*CONSTANTS(:,188))./(1.00000+CONSTANTS(:,173)./STATES(:,44));
    ALGEBRAIC(:,136) = (ALGEBRAIC(:,115)+ALGEBRAIC(:,123))+ALGEBRAIC(:,129);
    ALGEBRAIC(:,146) = (( (  - CONSTANTS(:,200).*ALGEBRAIC(:,141)).*STATES(:,44)+ CONSTANTS(:,247).*STATES(:,135)) -  ( CONSTANTS(:,201).*STATES(:,135)).*STATES(:,44))+ CONSTANTS(:,248).*STATES(:,134);
    ALGEBRAIC(:,151) = ((CONSTANTS(:,336) - STATES(:,139)) - STATES(:,138)) - STATES(:,137);
    ALGEBRAIC(:,1) = power( STATES(:,3).*1.00000, CONSTANTS(:,13));
    ALGEBRAIC(:,56) =  CONSTANTS(:,7).*(CONSTANTS(:,9)+ALGEBRAIC(:,1)./(CONSTANTS(:,4)+ALGEBRAIC(:,1)));
    ALGEBRAIC(:,69) =  ( ALGEBRAIC(:,56).*CONSTANTS(:,325)).*CONSTANTS(:,228);
    ALGEBRAIC(:,31) = power( STATES(:,3).*1.00000, CONSTANTS(:,14));
    ALGEBRAIC(:,85) =  CONSTANTS(:,8).*(CONSTANTS(:,10)+ALGEBRAIC(:,31)./(CONSTANTS(:,5)+ALGEBRAIC(:,31)));
    ALGEBRAIC(:,107) =  ( ALGEBRAIC(:,85).*CONSTANTS(:,329)).*CONSTANTS(:,228);
    ALGEBRAIC(:,116) = ( CONSTANTS(:,236).*(STATES(:,44) - STATES(:,45)))./CONSTANTS(:,308);
    ALGEBRAIC(:,124) = ( CONSTANTS(:,238).*(STATES(:,46) - STATES(:,45)))./CONSTANTS(:,308);
    ALGEBRAIC(:,130) = ( CONSTANTS(:,349).*CONSTANTS(:,186))./(1.00000+CONSTANTS(:,171)./STATES(:,45));
    ALGEBRAIC(:,137) = ( (CONSTANTS(:,379)+ (CONSTANTS(:,175) - 1.00000).*STATES(:,129)).*CONSTANTS(:,187))./(1.00000+CONSTANTS(:,172)./STATES(:,45));
    ALGEBRAIC(:,142) = ( (CONSTANTS(:,372)+ (CONSTANTS(:,175) - 1.00000).*STATES(:,131)).*CONSTANTS(:,188))./(1.00000+CONSTANTS(:,173)./STATES(:,45));
    ALGEBRAIC(:,147) = (ALGEBRAIC(:,130)+ALGEBRAIC(:,137))+ALGEBRAIC(:,142);
    ALGEBRAIC(:,155) = (( (  - CONSTANTS(:,250).*ALGEBRAIC(:,151)).*STATES(:,45)+ CONSTANTS(:,266).*STATES(:,139)) -  ( CONSTANTS(:,251).*STATES(:,139)).*STATES(:,45))+ CONSTANTS(:,267).*STATES(:,138);
    ALGEBRAIC(:,7) = ( ( CONSTANTS(:,38).*CONSTANTS(:,296)).*CONSTANTS(:,320) - STATES(:,2)) - STATES(:,10);
    ALGEBRAIC(:,70) = (((CONSTANTS(:,259)+CONSTANTS(:,272))./CONSTANTS(:,224)+ALGEBRAIC(:,34))+ALGEBRAIC(:,58)) - ALGEBRAIC(:,7);
    ALGEBRAIC(:,86) = (( CONSTANTS(:,272).*(ALGEBRAIC(:,34) - ALGEBRAIC(:,7))+ CONSTANTS(:,259).*(ALGEBRAIC(:,58) - ALGEBRAIC(:,7)))+CONSTANTS(:,280))./CONSTANTS(:,224);
    ALGEBRAIC(:,98) = ( ALGEBRAIC(:,7).*CONSTANTS(:,280))./CONSTANTS(:,224);
    ALGEBRAIC(:,110) = ((( ( - ALGEBRAIC(:,98)./27.0000).*power(ALGEBRAIC(:,70), 3.00000) - ( ( ( ALGEBRAIC(:,70).*ALGEBRAIC(:,70)).*ALGEBRAIC(:,86)).*ALGEBRAIC(:,86))./108.000)+( ( ALGEBRAIC(:,70).*ALGEBRAIC(:,86)).*ALGEBRAIC(:,98))./6.00000)+power(ALGEBRAIC(:,86), 3.00000)./27.0000)+( ALGEBRAIC(:,98).*ALGEBRAIC(:,98))./4.00000;
    ALGEBRAIC(:,118) = piecewise({ALGEBRAIC(:,110)<0.00000, power( - ALGEBRAIC(:,110), 1.0 ./ 2) }, 0.00000);
    ALGEBRAIC(:,126) = ((piecewise({ALGEBRAIC(:,110)>0.00000, power(ALGEBRAIC(:,110), 1.0 ./ 2) }, 0.00000)+ALGEBRAIC(:,98)./2.00000)+( ALGEBRAIC(:,70).*ALGEBRAIC(:,86))./6.00000) - power(ALGEBRAIC(:,70), 3.00000)./27.0000;
    ALGEBRAIC(:,132) = atan(ALGEBRAIC(:,118)./ALGEBRAIC(:,126))./3.00000;
    ALGEBRAIC(:,138) = power( ALGEBRAIC(:,126).*ALGEBRAIC(:,126)+ ALGEBRAIC(:,118).*ALGEBRAIC(:,118), 1.00000./6.00000);
    ALGEBRAIC(:,143) = (ALGEBRAIC(:,86)./3.00000 - ( ALGEBRAIC(:,70).*ALGEBRAIC(:,70))./9.00000)./( ALGEBRAIC(:,138).*ALGEBRAIC(:,138));
    ALGEBRAIC(:,148) =  ( ALGEBRAIC(:,138).* sin(ALGEBRAIC(:,132))).*(1.00000+ALGEBRAIC(:,143));
    ALGEBRAIC(:,152) =  ( ALGEBRAIC(:,138).*cos(ALGEBRAIC(:,132))).*(1.00000 - ALGEBRAIC(:,143)) - ALGEBRAIC(:,70)./3.00000;
    ALGEBRAIC(:,157) = power(( ALGEBRAIC(:,152).*ALGEBRAIC(:,152)+ ALGEBRAIC(:,148).*ALGEBRAIC(:,148)), 1.0 ./ 2);
    ALGEBRAIC(:,161) = ALGEBRAIC(:,34)./((1.00000+CONSTANTS(:,60)./CONSTANTS(:,49))+( ALGEBRAIC(:,157).*(CONSTANTS(:,48)+CONSTANTS(:,60)))./( CONSTANTS(:,47).*CONSTANTS(:,48)));
    ALGEBRAIC(:,165) = ( CONSTANTS(:,60).*ALGEBRAIC(:,161))./CONSTANTS(:,49);
    ALGEBRAIC(:,169) = ( ( CONSTANTS(:,60).*ALGEBRAIC(:,161)).*ALGEBRAIC(:,157))./( CONSTANTS(:,47).*CONSTANTS(:,48));
    ALGEBRAIC(:,10) = ( ( CONSTANTS(:,39).*CONSTANTS(:,296)).*CONSTANTS(:,327) - STATES(:,4)) - STATES(:,24);
    ALGEBRAIC(:,73) = (((CONSTANTS(:,260)+CONSTANTS(:,273))./CONSTANTS(:,227)+ALGEBRAIC(:,37))+ALGEBRAIC(:,61)) - ALGEBRAIC(:,10);
    ALGEBRAIC(:,89) = (( CONSTANTS(:,273).*(ALGEBRAIC(:,37) - ALGEBRAIC(:,10))+ CONSTANTS(:,260).*(ALGEBRAIC(:,61) - ALGEBRAIC(:,10)))+CONSTANTS(:,281))./CONSTANTS(:,227);
    ALGEBRAIC(:,101) = ( ALGEBRAIC(:,10).*CONSTANTS(:,281))./CONSTANTS(:,227);
    ALGEBRAIC(:,113) = ((( ( - ALGEBRAIC(:,101)./27.0000).*power(ALGEBRAIC(:,73), 3.00000) - ( ( ( ALGEBRAIC(:,73).*ALGEBRAIC(:,73)).*ALGEBRAIC(:,89)).*ALGEBRAIC(:,89))./108.000)+( ( ALGEBRAIC(:,73).*ALGEBRAIC(:,89)).*ALGEBRAIC(:,101))./6.00000)+power(ALGEBRAIC(:,89), 3.00000)./27.0000)+( ALGEBRAIC(:,101).*ALGEBRAIC(:,101))./4.00000;
    ALGEBRAIC(:,121) = piecewise({ALGEBRAIC(:,113)<0.00000, power( - ALGEBRAIC(:,113), 1.0 ./ 2) }, 0.00000);
    ALGEBRAIC(:,127) = ((piecewise({ALGEBRAIC(:,113)>0.00000, power(ALGEBRAIC(:,113), 1.0 ./ 2) }, 0.00000)+ALGEBRAIC(:,101)./2.00000)+( ALGEBRAIC(:,73).*ALGEBRAIC(:,89))./6.00000) - power(ALGEBRAIC(:,73), 3.00000)./27.0000;
    ALGEBRAIC(:,133) = atan(ALGEBRAIC(:,121)./ALGEBRAIC(:,127))./3.00000;
    ALGEBRAIC(:,139) = power( ALGEBRAIC(:,127).*ALGEBRAIC(:,127)+ ALGEBRAIC(:,121).*ALGEBRAIC(:,121), 1.00000./6.00000);
    ALGEBRAIC(:,144) = (ALGEBRAIC(:,89)./3.00000 - ( ALGEBRAIC(:,73).*ALGEBRAIC(:,73))./9.00000)./( ALGEBRAIC(:,139).*ALGEBRAIC(:,139));
    ALGEBRAIC(:,149) =  ( ALGEBRAIC(:,139).* sin(ALGEBRAIC(:,133))).*(1.00000+ALGEBRAIC(:,144));
    ALGEBRAIC(:,153) =  ( ALGEBRAIC(:,139).*cos(ALGEBRAIC(:,133))).*(1.00000 - ALGEBRAIC(:,144)) - ALGEBRAIC(:,73)./3.00000;
    ALGEBRAIC(:,158) = power(( ALGEBRAIC(:,153).*ALGEBRAIC(:,153)+ ALGEBRAIC(:,149).*ALGEBRAIC(:,149)), 1.0 ./ 2);
    ALGEBRAIC(:,162) = ALGEBRAIC(:,37)./((1.00000+CONSTANTS(:,60)./CONSTANTS(:,49))+( ALGEBRAIC(:,158).*(CONSTANTS(:,48)+CONSTANTS(:,60)))./( CONSTANTS(:,47).*CONSTANTS(:,48)));
    ALGEBRAIC(:,166) = ( CONSTANTS(:,60).*ALGEBRAIC(:,162))./CONSTANTS(:,49);
    ALGEBRAIC(:,170) = ( ( CONSTANTS(:,60).*ALGEBRAIC(:,162)).*ALGEBRAIC(:,158))./( CONSTANTS(:,47).*CONSTANTS(:,48));
    ALGEBRAIC(:,177) = ALGEBRAIC(:,58)./((1.00000+CONSTANTS(:,60)./CONSTANTS(:,54))+( ALGEBRAIC(:,157).*(CONSTANTS(:,53)+CONSTANTS(:,60)))./( CONSTANTS(:,51).*CONSTANTS(:,53)));
    ALGEBRAIC(:,181) = ( CONSTANTS(:,60).*ALGEBRAIC(:,177))./CONSTANTS(:,54);
    ALGEBRAIC(:,185) = ( ( CONSTANTS(:,60).*ALGEBRAIC(:,177)).*ALGEBRAIC(:,157))./( CONSTANTS(:,51).*CONSTANTS(:,53));
    ALGEBRAIC(:,178) = ALGEBRAIC(:,61)./((1.00000+CONSTANTS(:,60)./CONSTANTS(:,54))+( ALGEBRAIC(:,158).*(CONSTANTS(:,53)+CONSTANTS(:,60)))./( CONSTANTS(:,51).*CONSTANTS(:,53)));
    ALGEBRAIC(:,182) = ( CONSTANTS(:,60).*ALGEBRAIC(:,178))./CONSTANTS(:,54);
    ALGEBRAIC(:,186) = ( ( CONSTANTS(:,60).*ALGEBRAIC(:,178)).*ALGEBRAIC(:,158))./( CONSTANTS(:,51).*CONSTANTS(:,53));
    ALGEBRAIC(:,189) = ALGEBRAIC(:,169)+ CONSTANTS(:,61).*ALGEBRAIC(:,185);
    ALGEBRAIC(:,173) = ( ALGEBRAIC(:,161).*ALGEBRAIC(:,157))./CONSTANTS(:,47);
    ALGEBRAIC(:,193) = ( ALGEBRAIC(:,177).*ALGEBRAIC(:,157))./CONSTANTS(:,51);
    ALGEBRAIC(:,197) = ALGEBRAIC(:,173)+ CONSTANTS(:,61).*ALGEBRAIC(:,193);
    ALGEBRAIC(:,190) = ALGEBRAIC(:,170)+ CONSTANTS(:,64).*ALGEBRAIC(:,186);
    ALGEBRAIC(:,174) = ( ALGEBRAIC(:,162).*ALGEBRAIC(:,158))./CONSTANTS(:,47);
    ALGEBRAIC(:,194) = ( ALGEBRAIC(:,178).*ALGEBRAIC(:,158))./CONSTANTS(:,51);
    ALGEBRAIC(:,198) = ALGEBRAIC(:,174)+ CONSTANTS(:,64).*ALGEBRAIC(:,194);
    ALGEBRAIC(:,134) = CONSTANTS(:,275) - STATES(:,36);
    ALGEBRAIC(:,140) = CONSTANTS(:,263) -  STATES(:,36).*CONSTANTS(:,262);
    ALGEBRAIC(:,145) =   - CONSTANTS(:,231).*STATES(:,36);
    ALGEBRAIC(:,150) =  - ALGEBRAIC(:,134)./3.00000+ ( (2.00000./3.00000).*power(( ALGEBRAIC(:,134).*ALGEBRAIC(:,134) -  3.00000.*ALGEBRAIC(:,140)), 1.0 ./ 2)).*cos(acos((( ( 9.00000.*ALGEBRAIC(:,134)).*ALGEBRAIC(:,140) -  ( ( 2.00000.*ALGEBRAIC(:,134)).*ALGEBRAIC(:,134)).*ALGEBRAIC(:,134)) -  27.0000.*ALGEBRAIC(:,145))./( 2.00000.*power( ALGEBRAIC(:,134).*ALGEBRAIC(:,134) -  3.00000.*ALGEBRAIC(:,140), 1.50000)))./3.00000);
    ALGEBRAIC(:,191) = ( CONSTANTS(:,80).*(1.00000 - STATES(:,43)))./(1.00000+CONSTANTS(:,82)./ALGEBRAIC(:,150));
    ALGEBRAIC(:,195) = ALGEBRAIC(:,191)+STATES(:,43);
    ALGEBRAIC(:,200) = ALGEBRAIC(:,195)./(ALGEBRAIC(:,195)+CONSTANTS(:,81));
    ALGEBRAIC(:,201) = 1.00000./(1.00000+power(CONSTANTS(:,81)./ALGEBRAIC(:,195), 2.00000));
    ALGEBRAIC(:,199) = (CONSTANTS(:,206) - CONSTANTS(:,209))+STATES(:,145);
    ALGEBRAIC(:,204) =  0.500000.*(power((power(ALGEBRAIC(:,199), 2.00000)+ ( 4.00000.*CONSTANTS(:,206)).*CONSTANTS(:,209)), 1.0 ./ 2) - ALGEBRAIC(:,199));
    ALGEBRAIC(:,207) = (CONSTANTS(:,29)./CONSTANTS(:,320)+CONSTANTS(:,83)./CONSTANTS(:,327))+ALGEBRAIC(:,204)./CONSTANTS(:,322);
    ALGEBRAIC(:,156) = 1.00000./( (1.00000+exp((4.79800+STATES(:,51))./ - 7.56990)).*(1.00000+exp((25.0000+STATES(:,51))./ - 5.00000)));
    ALGEBRAIC(:,196) = 0.590000+( 0.800000.*exp( 0.0520000.*(STATES(:,51)+13.0000)))./(1.00000+exp( 0.132000.*(STATES(:,51)+13.0000)));
    ALGEBRAIC(:,203) = ALGEBRAIC(:,156)./ALGEBRAIC(:,196);
    ALGEBRAIC(:,206) = (1.00000 - ALGEBRAIC(:,156))./ALGEBRAIC(:,196);
    ALGEBRAIC(:,180) = 1.00000+power(0.00200000./ALGEBRAIC(:,150), 4.00000);
    ALGEBRAIC(:,184) = 6.00000./ALGEBRAIC(:,180);
    ALGEBRAIC(:,164) = 1.00000./(1.00000+exp((29.9790+STATES(:,51))./3.17750));
    ALGEBRAIC(:,172) = (0.100000+ALGEBRAIC(:,164))./1.10000;
    ALGEBRAIC(:,215) = 1.00000./( ( 70.0000.*(1.00000 -  0.500000.*STATES(:,37))).*(1.00000+exp((STATES(:,51)+49.1000)./10.3490)));
    ALGEBRAIC(:,217) = 1.00000./(1.00000+exp((STATES(:,51)+0.213000)./ - 10.8070));
    ALGEBRAIC(:,222) = 1.00000./(ALGEBRAIC(:,215)+ALGEBRAIC(:,217)./38.4940);
    ALGEBRAIC(:,225) = ALGEBRAIC(:,172)./ALGEBRAIC(:,222);
    ALGEBRAIC(:,234) = (1.00000 - ALGEBRAIC(:,172))./ALGEBRAIC(:,222);
    ALGEBRAIC(:,168) = (0.000100000+ALGEBRAIC(:,164))./1.00010;
    ALGEBRAIC(:,160) =  0.100000.*STATES(:,37);
    ALGEBRAIC(:,176) = 1.00000+power(0.0100000./ALGEBRAIC(:,150), 10.0000);
    ALGEBRAIC(:,188) = (32.5000 - (18.0000 - ALGEBRAIC(:,160))./ALGEBRAIC(:,180)) - 10.0000./ALGEBRAIC(:,176);
    ALGEBRAIC(:,219) = 1.00000./(ALGEBRAIC(:,215)+ALGEBRAIC(:,217)./ALGEBRAIC(:,188));
    ALGEBRAIC(:,228) = ALGEBRAIC(:,168)./ALGEBRAIC(:,219);
    ALGEBRAIC(:,240) = (1.00000 - ALGEBRAIC(:,168))./ALGEBRAIC(:,219);
    ALGEBRAIC(:,231) = piecewise({abs(ALGEBRAIC(:,228))<1.00000e-12, 1.00000e-12 }, ALGEBRAIC(:,228));
    ALGEBRAIC(:,237) = piecewise({abs(ALGEBRAIC(:,234))<1.00000e-12, 1.00000e-12 }, ALGEBRAIC(:,234));
    ALGEBRAIC(:,243) = ( CONSTANTS(:,104).*( ( ALGEBRAIC(:,225).*ALGEBRAIC(:,240)).*ALGEBRAIC(:,184)))./( ( ALGEBRAIC(:,237).*ALGEBRAIC(:,231)).*CONSTANTS(:,103));
    ALGEBRAIC(:,63) = CONSTANTS(:,275) - STATES(:,34);
    ALGEBRAIC(:,75) = CONSTANTS(:,263) -  STATES(:,34).*CONSTANTS(:,262);
    ALGEBRAIC(:,91) =   - CONSTANTS(:,231).*STATES(:,34);
    ALGEBRAIC(:,103) =  - ALGEBRAIC(:,63)./3.00000+ ( (2.00000./3.00000).*power(( ALGEBRAIC(:,63).*ALGEBRAIC(:,63) -  3.00000.*ALGEBRAIC(:,75)), 1.0 ./ 2)).*cos(acos((( ( 9.00000.*ALGEBRAIC(:,63)).*ALGEBRAIC(:,75) -  ( ( 2.00000.*ALGEBRAIC(:,63)).*ALGEBRAIC(:,63)).*ALGEBRAIC(:,63)) -  27.0000.*ALGEBRAIC(:,91))./( 2.00000.*power( ALGEBRAIC(:,63).*ALGEBRAIC(:,63) -  3.00000.*ALGEBRAIC(:,75), 1.50000)))./3.00000);
    ALGEBRAIC(:,210) = (ALGEBRAIC(:,150) - ALGEBRAIC(:,103))./CONSTANTS(:,96);
    ALGEBRAIC(:,11) = (STATES(:,5)+CONSTANTS(:,393))./CONSTANTS(:,18);
    ALGEBRAIC(:,221) = (ALGEBRAIC(:,11) - CONSTANTS(:,398))./(0.927300 - CONSTANTS(:,398));
    ALGEBRAIC(:,224) = piecewise({ALGEBRAIC(:,221)<0.00000, 0.00000 }, ALGEBRAIC(:,221));
    ALGEBRAIC(:,227) =  0.000257900.*(1.00000+ 0.100000.*STATES(:,37));
    ALGEBRAIC(:,230) = exp( ( 2.00000.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,233) = ( ( ( ( ALGEBRAIC(:,227).*4.00000).*STATES(:,51)).*CONSTANTS(:,276)).*( ALGEBRAIC(:,150).*ALGEBRAIC(:,230) -  0.341000.*CONSTANTS(:,98)))./(ALGEBRAIC(:,230) - 1.00000);
    ALGEBRAIC(:,236) =  ALGEBRAIC(:,233).*(STATES(:,56)+STATES(:,59));
    ALGEBRAIC(:,239) =  0.000155200.*(1.00000+ 0.400000.*STATES(:,37));
    ALGEBRAIC(:,242) = exp( ( 2.00000.*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,245) = ( ( ( ( ALGEBRAIC(:,239).*4.00000).*STATES(:,51)).*CONSTANTS(:,276)).*( ALGEBRAIC(:,150).*ALGEBRAIC(:,242) -  0.341000.*CONSTANTS(:,98)))./(ALGEBRAIC(:,242) - 1.00000);
    ALGEBRAIC(:,247) =  ALGEBRAIC(:,245).*(STATES(:,64)+STATES(:,67));
    ALGEBRAIC(:,249) =  (1.00000 - ALGEBRAIC(:,224)).*ALGEBRAIC(:,247)+ ALGEBRAIC(:,224).*ALGEBRAIC(:,236);
    ALGEBRAIC(:,192) = 1.00000./( (1.00000+exp((13.5600 - STATES(:,51))./9.45000)).*(1.00000+exp((25.0000+STATES(:,51))./ - 5.00000)));
    ALGEBRAIC(:,209) = ALGEBRAIC(:,192)./ALGEBRAIC(:,196);
    ALGEBRAIC(:,211) = (1.00000 - ALGEBRAIC(:,192))./ALGEBRAIC(:,196);
    ALGEBRAIC(:,235) = 1.00000+power(0.00110000./ALGEBRAIC(:,150), 4.00000);
    ALGEBRAIC(:,238) = 14.9186./ALGEBRAIC(:,235);
    ALGEBRAIC(:,220) = 1.00000./(1.00000+exp((17.5000+STATES(:,51))./3.00000));
    ALGEBRAIC(:,226) = (0.247400+ALGEBRAIC(:,220))./1.24740;
    ALGEBRAIC(:,229) = 1.00000./(ALGEBRAIC(:,215)+ALGEBRAIC(:,217)./26.5530);
    ALGEBRAIC(:,246) = ALGEBRAIC(:,226)./ALGEBRAIC(:,229);
    ALGEBRAIC(:,252) = (1.00000 - ALGEBRAIC(:,226))./ALGEBRAIC(:,229);
    ALGEBRAIC(:,223) = (0.00100000+ALGEBRAIC(:,220))./1.00100;
    ALGEBRAIC(:,213) =  5.00000.*STATES(:,37);
    ALGEBRAIC(:,232) = 1.00000+power(0.0120000./ALGEBRAIC(:,150), 10.0000);
    ALGEBRAIC(:,241) = (13.8250 - (6.38360 - ALGEBRAIC(:,213))./ALGEBRAIC(:,235)) - 3.36960./ALGEBRAIC(:,232);
    ALGEBRAIC(:,244) = 1.00000./(ALGEBRAIC(:,215)+ALGEBRAIC(:,217)./ALGEBRAIC(:,241));
    ALGEBRAIC(:,248) = ALGEBRAIC(:,223)./ALGEBRAIC(:,244);
    ALGEBRAIC(:,258) = (1.00000 - ALGEBRAIC(:,223))./ALGEBRAIC(:,244);
    ALGEBRAIC(:,250) = piecewise({abs(ALGEBRAIC(:,248))<1.00000e-12, 1.00000e-12 }, ALGEBRAIC(:,248));
    ALGEBRAIC(:,255) = piecewise({abs(ALGEBRAIC(:,252))<1.00000e-12, 1.00000e-12 }, ALGEBRAIC(:,252));
    ALGEBRAIC(:,261) = ( CONSTANTS(:,106).*( ( ALGEBRAIC(:,246).*ALGEBRAIC(:,258)).*ALGEBRAIC(:,238)))./( ( ALGEBRAIC(:,255).*ALGEBRAIC(:,250)).*CONSTANTS(:,105));
    ALGEBRAIC(:,253) =  CONSTANTS(:,244).*(1.00000+ 2.00000.*STATES(:,42));
    ALGEBRAIC(:,256) =  0.112500.*ALGEBRAIC(:,253);
    ALGEBRAIC(:,114) = (CONSTANTS(:,73)+CONSTANTS(:,74)) - STATES(:,35);
    ALGEBRAIC(:,122) =  STATES(:,35).*CONSTANTS(:,74);
    ALGEBRAIC(:,128) = (power(( ALGEBRAIC(:,114).*ALGEBRAIC(:,114)+ 4.00000.*ALGEBRAIC(:,122)), 1.0 ./ 2) - ALGEBRAIC(:,114))./2.00000;
    ALGEBRAIC(:,270) = ( ALGEBRAIC(:,249).*1.00000)./(1.00000+power(1.00000./ALGEBRAIC(:,128), 8.00000));
    ALGEBRAIC(:,272) =  ALGEBRAIC(:,256).*ALGEBRAIC(:,270);
    ALGEBRAIC(:,264) = 1.00000+0.0123000./ALGEBRAIC(:,128);
    ALGEBRAIC(:,266) = ALGEBRAIC(:,253)./ALGEBRAIC(:,264);
    ALGEBRAIC(:,259) =  CONSTANTS(:,244).*(1.00000+ 0.00000.*STATES(:,42));
    ALGEBRAIC(:,262) =  0.112500.*ALGEBRAIC(:,259);
    ALGEBRAIC(:,273) =  ( 1.99250.*ALGEBRAIC(:,262)).*ALGEBRAIC(:,270);
    ALGEBRAIC(:,268) = ( 0.535700.*ALGEBRAIC(:,259))./ALGEBRAIC(:,264);
    ALGEBRAIC(:,287) = 1.00000+power(CONSTANTS(:,135)./ALGEBRAIC(:,150), 2.00000);
    ALGEBRAIC(:,286) = exp( ( (CONSTANTS(:,140) - 1.00000).*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,288) = 1.00000+ CONSTANTS(:,141).*ALGEBRAIC(:,286);
    ALGEBRAIC(:,284) = power(STATES(:,50), 3.00000);
    ALGEBRAIC(:,289) = ( CONSTANTS(:,137).*ALGEBRAIC(:,284)+ CONSTANTS(:,365).*ALGEBRAIC(:,150))+ ( CONSTANTS(:,363).*CONSTANTS(:,98)).*(1.00000+ALGEBRAIC(:,150)./CONSTANTS(:,136));
    ALGEBRAIC(:,290) = ( ( CONSTANTS(:,136).*CONSTANTS(:,367)).*(1.00000+ALGEBRAIC(:,284)./CONSTANTS(:,363))+ ALGEBRAIC(:,284).*CONSTANTS(:,98))+ CONSTANTS(:,367).*ALGEBRAIC(:,150);
    ALGEBRAIC(:,285) = exp( ( CONSTANTS(:,140).*STATES(:,51)).*CONSTANTS(:,264));
    ALGEBRAIC(:,291) =  ( 0.200000.*CONSTANTS(:,142)).*( ( ALGEBRAIC(:,284).*CONSTANTS(:,98)).*ALGEBRAIC(:,285) -  ( CONSTANTS(:,367).*ALGEBRAIC(:,150)).*ALGEBRAIC(:,286));
    ALGEBRAIC(:,292) = ALGEBRAIC(:,291)./( ( ALGEBRAIC(:,287).*ALGEBRAIC(:,288)).*(ALGEBRAIC(:,289)+ALGEBRAIC(:,290)));
    ALGEBRAIC(:,208) = (STATES(:,50) - STATES(:,49))./CONSTANTS(:,95);
    ALGEBRAIC(:,39) = (STATES(:,6)+CONSTANTS(:,396))./CONSTANTS(:,31);
    ALGEBRAIC(:,312) = (ALGEBRAIC(:,39) - CONSTANTS(:,399))./(0.958600 - CONSTANTS(:,399));
    ALGEBRAIC(:,314) = piecewise({ALGEBRAIC(:,312)<0.00000, 0.00000 }, ALGEBRAIC(:,312));
    ALGEBRAIC(:,318) =  (1.00000 - ALGEBRAIC(:,314)).*STATES(:,119)+ ALGEBRAIC(:,314).*STATES(:,120);
    ALGEBRAIC(:,308) =  ( CONSTANTS(:,156).*exp(ALGEBRAIC(:,128)./CONSTANTS(:,154))).*(ALGEBRAIC(:,128) - ALGEBRAIC(:,150));
    ALGEBRAIC(:,310) =  ( CONSTANTS(:,157).*exp(ALGEBRAIC(:,128)./CONSTANTS(:,155))).*(ALGEBRAIC(:,128) - ALGEBRAIC(:,150));
    ALGEBRAIC(:,316) =  (1.00000 - ALGEBRAIC(:,314)).*ALGEBRAIC(:,308)+ ALGEBRAIC(:,314).*ALGEBRAIC(:,310);
    ALGEBRAIC(:,320) = ALGEBRAIC(:,316)+ALGEBRAIC(:,318);
    ALGEBRAIC(:,212) = (STATES(:,31) - ALGEBRAIC(:,128))./CONSTANTS(:,97);
    ALGEBRAIC(:,154) = (STATES(:,32) - 0.673519)./(0.999180 - 0.673519);
    ALGEBRAIC(:,159) = piecewise({ALGEBRAIC(:,154)<0.00000, 0.00000 }, ALGEBRAIC(:,154));
    ALGEBRAIC(:,163) =  (1.00000 - ALGEBRAIC(:,159)).*CONSTANTS(:,78)+ ALGEBRAIC(:,159).*CONSTANTS(:,230);
    ALGEBRAIC(:,175) = ALGEBRAIC(:,163)+CONSTANTS(:,76);
    ALGEBRAIC(:,179) = ((ALGEBRAIC(:,175) - STATES(:,33))+CONSTANTS(:,72))+CONSTANTS(:,79);
    ALGEBRAIC(:,167) =  ALGEBRAIC(:,163).*CONSTANTS(:,76);
    ALGEBRAIC(:,183) = ((ALGEBRAIC(:,167) -  STATES(:,33).*ALGEBRAIC(:,175))+ CONSTANTS(:,79).*CONSTANTS(:,76))+ CONSTANTS(:,72).*ALGEBRAIC(:,163);
    ALGEBRAIC(:,171) =   - ALGEBRAIC(:,167).*STATES(:,33);
    ALGEBRAIC(:,187) =  - ALGEBRAIC(:,179)./3.00000+ ( (2.00000./3.00000).*power(( ALGEBRAIC(:,179).*ALGEBRAIC(:,179) -  3.00000.*ALGEBRAIC(:,183)), 1.0 ./ 2)).*cos(acos((( ( 9.00000.*ALGEBRAIC(:,179)).*ALGEBRAIC(:,183) -  ( ( 2.00000.*ALGEBRAIC(:,179)).*ALGEBRAIC(:,179)).*ALGEBRAIC(:,179)) -  27.0000.*ALGEBRAIC(:,171))./( 2.00000.*power( ALGEBRAIC(:,179).*ALGEBRAIC(:,179) -  3.00000.*ALGEBRAIC(:,183), 1.50000)))./3.00000);
    ALGEBRAIC(:,202) = (ALGEBRAIC(:,150) - ALGEBRAIC(:,187))./CONSTANTS(:,95);
    ALGEBRAIC(:,251) = exp( STATES(:,51).*CONSTANTS(:,264));
    ALGEBRAIC(:,254) = ( ( ( CONSTANTS(:,108).*STATES(:,51)).*CONSTANTS(:,276)).*(STATES(:,47) -  CONSTANTS(:,99).*ALGEBRAIC(:,251)))./(1.00000 - ALGEBRAIC(:,251));
    ALGEBRAIC(:,321) = 1.00000 - 1.00000./(1.00000+power(ALGEBRAIC(:,318)./CONSTANTS(:,109), 2.00000));
    ALGEBRAIC(:,324) =  ( ALGEBRAIC(:,254).*ALGEBRAIC(:,321)).*STATES(:,68);
    ALGEBRAIC(:,205) = (STATES(:,48) - STATES(:,47))./CONSTANTS(:,95);
    ALGEBRAIC(:,307) = 1.00000./(1.00000+power(0.0300000./ALGEBRAIC(:,195), 2.00000));
    ALGEBRAIC(:,309) =  (1.00000 - ALGEBRAIC(:,307)).*CONSTANTS(:,162)+ ALGEBRAIC(:,307).*CONSTANTS(:,380);
    ALGEBRAIC(:,325) = ( ALGEBRAIC(:,309).*STATES(:,31))./CONSTANTS(:,165);
    ALGEBRAIC(:,311) = (STATES(:,126) - 0.659100)./(0.994500 - 0.659100);
    ALGEBRAIC(:,313) = piecewise({ALGEBRAIC(:,311)<0.00000, 0.00000 }, ALGEBRAIC(:,311));
    ALGEBRAIC(:,315) =  ALGEBRAIC(:,313).*STATES(:,41);
    ALGEBRAIC(:,317) = STATES(:,41) - ALGEBRAIC(:,315);
    ALGEBRAIC(:,319) = ALGEBRAIC(:,313) - ALGEBRAIC(:,315);
    ALGEBRAIC(:,322) = ((1.00000 - ALGEBRAIC(:,319)) - ALGEBRAIC(:,317)) - ALGEBRAIC(:,315);
    ALGEBRAIC(:,323) = (( ALGEBRAIC(:,322).*CONSTANTS(:,160)+ ALGEBRAIC(:,319).*CONSTANTS(:,375))+ ALGEBRAIC(:,317).*CONSTANTS(:,370))+ ALGEBRAIC(:,315).*CONSTANTS(:,377);
    ALGEBRAIC(:,327) = ( ALGEBRAIC(:,309).*ALGEBRAIC(:,187))./(ALGEBRAIC(:,187)+ALGEBRAIC(:,323));
    ALGEBRAIC(:,329) = ALGEBRAIC(:,327) - ALGEBRAIC(:,325);
    ALGEBRAIC(:,214) =  ( 2.00000.*STATES(:,51)).*CONSTANTS(:,264);
    ALGEBRAIC(:,216) = exp(ALGEBRAIC(:,214));
    ALGEBRAIC(:,218) = ( ( ( ( CONSTANTS(:,102).*2.00000).*CONSTANTS(:,88)).*ALGEBRAIC(:,214)).*( ALGEBRAIC(:,187).*ALGEBRAIC(:,216) -  0.341000.*CONSTANTS(:,98)))./(ALGEBRAIC(:,216) - 1.00000);
    ALGEBRAIC(:,293) = 1.00000+power(CONSTANTS(:,135)./ALGEBRAIC(:,187), 2.00000);
    ALGEBRAIC(:,294) = 1.00000+ CONSTANTS(:,141).*ALGEBRAIC(:,286);
    ALGEBRAIC(:,283) = power(STATES(:,49), 3.00000);
    ALGEBRAIC(:,295) = ( CONSTANTS(:,137).*ALGEBRAIC(:,283)+ CONSTANTS(:,365).*ALGEBRAIC(:,187))+ ( CONSTANTS(:,363).*CONSTANTS(:,98)).*(1.00000+ALGEBRAIC(:,187)./CONSTANTS(:,136));
    ALGEBRAIC(:,296) = ( ( CONSTANTS(:,136).*CONSTANTS(:,367)).*(1.00000+ALGEBRAIC(:,283)./CONSTANTS(:,363))+ ALGEBRAIC(:,283).*CONSTANTS(:,98))+ CONSTANTS(:,367).*ALGEBRAIC(:,187);
    ALGEBRAIC(:,297) =  ( 0.800000.*CONSTANTS(:,142)).*( ( ALGEBRAIC(:,283).*CONSTANTS(:,98)).*ALGEBRAIC(:,285) -  ( CONSTANTS(:,367).*ALGEBRAIC(:,187)).*ALGEBRAIC(:,286));
    ALGEBRAIC(:,298) = ALGEBRAIC(:,297)./( ( ALGEBRAIC(:,293).*ALGEBRAIC(:,294)).*(ALGEBRAIC(:,295)+ALGEBRAIC(:,296)));
    ALGEBRAIC(:,305) = ( CONSTANTS(:,152).*ALGEBRAIC(:,187))./(CONSTANTS(:,153)+ALGEBRAIC(:,187));
    ALGEBRAIC(:,328) =   - CONSTANTS(:,239).*log(CONSTANTS(:,99)./STATES(:,47));
    ALGEBRAIC(:,332) =  CONSTANTS(:,239).*log(CONSTANTS(:,100)./STATES(:,127));
    ALGEBRAIC(:,333) = ALGEBRAIC(:,332) - ALGEBRAIC(:,328);
    ALGEBRAIC(:,334) = ( CONSTANTS(:,92).*ALGEBRAIC(:,333))./(ALGEBRAIC(:,333)+CONSTANTS(:,93));
    ALGEBRAIC(:,353) =  CONSTANTS(:,239).*log(CONSTANTS(:,101)./STATES(:,49));
    ALGEBRAIC(:,354) = power(ALGEBRAIC(:,353) - ALGEBRAIC(:,328), 4.00000);
    ALGEBRAIC(:,355) = ( CONSTANTS(:,94).*ALGEBRAIC(:,354))./(ALGEBRAIC(:,354)+CONSTANTS(:,347));
    ALGEBRAIC(:,330) =  CONSTANTS(:,107).*(STATES(:,51) - ALGEBRAIC(:,328));
    ALGEBRAIC(:,356) =  ( ( ( CONSTANTS(:,242).*power(STATES(:,115), 3.00000)).*STATES(:,107)).*STATES(:,108)).*(STATES(:,51) - ALGEBRAIC(:,353));
    ALGEBRAIC(:,357) =  ( ( ( CONSTANTS(:,242).*power(STATES(:,109), 3.00000)).*STATES(:,107)).*STATES(:,108)).*(STATES(:,51) - ALGEBRAIC(:,353));
    ALGEBRAIC(:,358) =  ( ( ( CONSTANTS(:,242).*power(STATES(:,112), 3.00000)).*STATES(:,110)).*STATES(:,111)).*(STATES(:,51) - ALGEBRAIC(:,353));
    ALGEBRAIC(:,359) =  ( ( ( ( CONSTANTS(:,242).*power(STATES(:,115), 3.00000)).*STATES(:,113)).*STATES(:,114)).*(STATES(:,51) - ALGEBRAIC(:,353))).*1.25000;
    ALGEBRAIC(:,274) = (STATES(:,106) - 0.239480)./(0.950143 - 0.239480);
    ALGEBRAIC(:,275) = piecewise({ALGEBRAIC(:,274)<0.00000, 0.00000 }, ALGEBRAIC(:,274));
    ALGEBRAIC(:,276) =  ALGEBRAIC(:,275).*STATES(:,39);
    ALGEBRAIC(:,277) = STATES(:,39) - ALGEBRAIC(:,276);
    ALGEBRAIC(:,278) = ALGEBRAIC(:,275) - ALGEBRAIC(:,276);
    ALGEBRAIC(:,279) = ((1.00000 - ALGEBRAIC(:,278)) - ALGEBRAIC(:,277)) - ALGEBRAIC(:,276);
    ALGEBRAIC(:,360) = (( ALGEBRAIC(:,279).*ALGEBRAIC(:,358)+ ALGEBRAIC(:,278).*ALGEBRAIC(:,359))+ ALGEBRAIC(:,277).*ALGEBRAIC(:,357))+ ALGEBRAIC(:,276).*ALGEBRAIC(:,356);
    ALGEBRAIC(:,280) =  STATES(:,51).*CONSTANTS(:,264);
    ALGEBRAIC(:,281) = exp(ALGEBRAIC(:,280));
    ALGEBRAIC(:,282) = ( ( ( CONSTANTS(:,134).*CONSTANTS(:,88)).*ALGEBRAIC(:,280)).*( STATES(:,49).*ALGEBRAIC(:,281) - CONSTANTS(:,101)))./(ALGEBRAIC(:,281) - 1.00000);
    ALGEBRAIC(:,301) = ( CONSTANTS(:,145).*CONSTANTS(:,243))./(1.00000+exp(  - (STATES(:,51)+92.0000).*CONSTANTS(:,264)));
    ALGEBRAIC(:,302) =  ALGEBRAIC(:,301).*power(STATES(:,49)./(STATES(:,49)+CONSTANTS(:,148)), 3.00000);
    ALGEBRAIC(:,303) =  ALGEBRAIC(:,301).*power(STATES(:,49)./(STATES(:,49)+CONSTANTS(:,149)), 3.00000);
    ALGEBRAIC(:,299) = (STATES(:,116) - 0.126345)./(0.998014 - 0.126345);
    ALGEBRAIC(:,300) = piecewise({ALGEBRAIC(:,299)<0.00000, 0.00000 }, ALGEBRAIC(:,299));
    ALGEBRAIC(:,304) =  (1.00000 - ALGEBRAIC(:,300)).*ALGEBRAIC(:,302)+ ALGEBRAIC(:,300).*ALGEBRAIC(:,303);
    ALGEBRAIC(:,361) =  ( power(STATES(:,118), 3.00000).*STATES(:,117)).*(STATES(:,51) - ALGEBRAIC(:,353));
    ALGEBRAIC(:,362) =  0.0160000.*ALGEBRAIC(:,361);
    ALGEBRAIC(:,363) =  0.00650000.*ALGEBRAIC(:,361);
    ALGEBRAIC(:,364) =  (1.00000 - STATES(:,39)).*ALGEBRAIC(:,363)+ STATES(:,39).*ALGEBRAIC(:,362);
    ALGEBRAIC(:,366) = (((ALGEBRAIC(:,360)+ALGEBRAIC(:,282))+ALGEBRAIC(:,364))+ ALGEBRAIC(:,304).*3.00000)+ ALGEBRAIC(:,298).*3.00000;
    ALGEBRAIC(:,306) = (((ALGEBRAIC(:,249)+ALGEBRAIC(:,218))+ALGEBRAIC(:,305)) -  ALGEBRAIC(:,298).*2.00000) -  ALGEBRAIC(:,292).*2.00000;
    ALGEBRAIC(:,331) = ALGEBRAIC(:,330)+ALGEBRAIC(:,324);
    ALGEBRAIC(:,335) = STATES(:,51) - ALGEBRAIC(:,332);
    ALGEBRAIC(:,336) = 1.02000./(1.00000+exp( 0.238500.*(ALGEBRAIC(:,335) - 59.2150)));
    ALGEBRAIC(:,337) = ( 0.491240.*exp( 0.0803200.*(ALGEBRAIC(:,335)+5.47600))+exp( 0.0617500.*(ALGEBRAIC(:,335) - 594.310)))./(1.00000+exp(  - 0.514300.*(ALGEBRAIC(:,335)+4.75300)));
    ALGEBRAIC(:,338) =  ( CONSTANTS(:,240).*(ALGEBRAIC(:,336)./(ALGEBRAIC(:,336)+ALGEBRAIC(:,337)))).*ALGEBRAIC(:,335);
    ALGEBRAIC(:,339) =  ALGEBRAIC(:,338).*1.20000;
    ALGEBRAIC(:,340) =  (1.00000 - STATES(:,38)).*ALGEBRAIC(:,338)+ STATES(:,38).*ALGEBRAIC(:,339);
    ALGEBRAIC(:,257) = 1.00000./(1.00000+exp((STATES(:,51)+10.0000)./15.4000));
    ALGEBRAIC(:,341) =  ( ( CONSTANTS(:,241).*STATES(:,69)).*ALGEBRAIC(:,257)).*(STATES(:,51) - ALGEBRAIC(:,332));
    ALGEBRAIC(:,349) =  CONSTANTS(:,239).*log((CONSTANTS(:,100)+ CONSTANTS(:,166).*CONSTANTS(:,101))./(STATES(:,127)+ CONSTANTS(:,166).*STATES(:,49)));
    ALGEBRAIC(:,260) =  0.195610.*(1.00000+0.600000./(1.00000+power(3.80000e-05./ALGEBRAIC(:,187), 1.40000)));
    ALGEBRAIC(:,350) =  ( ALGEBRAIC(:,260).*(STATES(:,70)+STATES(:,71))).*(STATES(:,51) - ALGEBRAIC(:,349));
    ALGEBRAIC(:,351) =  ( ALGEBRAIC(:,260).*(STATES(:,72)+STATES(:,73))).*(STATES(:,51) - ALGEBRAIC(:,349));
    ALGEBRAIC(:,263) = (STATES(:,104)+CONSTANTS(:,404))./CONSTANTS(:,111);
    ALGEBRAIC(:,265) = (ALGEBRAIC(:,263) - CONSTANTS(:,405))./(0.785000 - CONSTANTS(:,405));
    ALGEBRAIC(:,267) = piecewise({ALGEBRAIC(:,265)<0.00000, 0.00000 }, ALGEBRAIC(:,265));
    ALGEBRAIC(:,352) =  ALGEBRAIC(:,267).*ALGEBRAIC(:,351)+ (1.00000 - ALGEBRAIC(:,267)).*ALGEBRAIC(:,350);
    ALGEBRAIC(:,342) = ( CONSTANTS(:,124).*(STATES(:,51) - ALGEBRAIC(:,332)))./(1.00000+exp((15.0000 - STATES(:,51))./17.0000));
    ALGEBRAIC(:,343) =  (( CONSTANTS(:,124).*(STATES(:,51) - ALGEBRAIC(:,332)))./(1.00000+exp((36.0000 - STATES(:,51))./17.0000))).*3.62000;
    ALGEBRAIC(:,269) = (STATES(:,105) - 0.0589380)./(0.393747 - 0.0589380);
    ALGEBRAIC(:,271) = piecewise({ALGEBRAIC(:,269)<0.00000, 0.00000 }, ALGEBRAIC(:,269));
    ALGEBRAIC(:,344) =  (1.00000 - ALGEBRAIC(:,271)).*ALGEBRAIC(:,342)+ ALGEBRAIC(:,271).*ALGEBRAIC(:,343);
    ALGEBRAIC(:,326) = exp(STATES(:,51)./550.000);
    ALGEBRAIC(:,345) =  ( ( CONSTANTS(:,158).*power(STATES(:,121), 3.00000)).*ALGEBRAIC(:,326)).*(STATES(:,51) - ALGEBRAIC(:,332));
    ALGEBRAIC(:,346) =  ALGEBRAIC(:,345).*( 0.735600.*STATES(:,122)+ 0.264400.*STATES(:,124));
    ALGEBRAIC(:,347) =  ALGEBRAIC(:,345).*( 0.735600.*STATES(:,123)+ 0.264400.*STATES(:,125));
    ALGEBRAIC(:,348) =  (1.00000 - STATES(:,40)).*ALGEBRAIC(:,347)+ STATES(:,40).*ALGEBRAIC(:,346);
    ALGEBRAIC(:,365) = ((((ALGEBRAIC(:,340)+ALGEBRAIC(:,341))+ALGEBRAIC(:,352))+ALGEBRAIC(:,344))+ALGEBRAIC(:,348)) -  2.00000.*ALGEBRAIC(:,304);
    ALGEBRAIC(:,367) = ALGEBRAIC(:,366)+ ALGEBRAIC(:,292).*3.00000;
    ALGEBRAIC(:,368) = ((ALGEBRAIC(:,367)+ALGEBRAIC(:,365))+ALGEBRAIC(:,306))+ALGEBRAIC(:,331);
    ALGEBRAIC(:,369) =  piecewise({(VOI - CONSTANTS(:,214)) -  CONSTANTS(:,215).*floor((VOI - CONSTANTS(:,214))./CONSTANTS(:,215))<CONSTANTS(:,213), 1.00000 }, 0.00000).*CONSTANTS(:,257);
end

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

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