Generated Code
The following is c code generated by the CellML API from this CellML file. (Back to language selection)
The raw code is available.
/* There are a total of 0 entries in the algebraic variable array. There are a total of 12 entries in each of the rate and state variable arrays. There are a total of 38 entries in the constant variable array. */ /* * VOI is time in component environment (second). * STATES[0] is E in component E (millimolar). * CONSTANTS[0] is k23 in component reaction_constants (second_order_rate_constant). * CONSTANTS[1] is k24 in component reaction_constants (first_order_rate_constant). * CONSTANTS[2] is k17 in component reaction_constants (first_order_rate_constant). * CONSTANTS[3] is k18 in component reaction_constants (first_order_rate_constant). * CONSTANTS[4] is k1 in component reaction_constants (second_order_rate_constant). * CONSTANTS[5] is k2 in component reaction_constants (first_order_rate_constant). * CONSTANTS[6] is k3 in component reaction_constants (second_order_rate_constant). * CONSTANTS[7] is k4 in component reaction_constants (first_order_rate_constant). * STATES[1] is ED in component ED (millimolar). * STATES[2] is E_ in component E_ (millimolar). * STATES[3] is ENa in component ENa (millimolar). * STATES[4] is ECl in component ECl (millimolar). * CONSTANTS[8] is D in component reaction_constants (millimolar). * CONSTANTS[9] is Na in component reaction_constants (millimolar). * CONSTANTS[10] is Cl in component reaction_constants (millimolar). * CONSTANTS[11] is k29 in component reaction_constants (second_order_rate_constant). * CONSTANTS[12] is k30 in component reaction_constants (first_order_rate_constant). * CONSTANTS[13] is k11 in component reaction_constants (second_order_rate_constant). * CONSTANTS[14] is k12 in component reaction_constants (first_order_rate_constant). * CONSTANTS[15] is k9 in component reaction_constants (second_order_rate_constant). * CONSTANTS[16] is k10 in component reaction_constants (first_order_rate_constant). * STATES[5] is ED_ in component ED_ (millimolar). * STATES[6] is ENa_ in component ENa_ (millimolar). * STATES[7] is ECl_ in component ECl_ (millimolar). * CONSTANTS[17] is D_ in component reaction_constants (millimolar). * CONSTANTS[18] is Na_ in component reaction_constants (millimolar). * CONSTANTS[19] is Cl_ in component reaction_constants (millimolar). * CONSTANTS[20] is k21 in component reaction_constants (second_order_rate_constant). * CONSTANTS[21] is k22 in component reaction_constants (first_order_rate_constant). * STATES[8] is ENaD in component ENaD (millimolar). * CONSTANTS[22] is k27 in component reaction_constants (second_order_rate_constant). * CONSTANTS[23] is k28 in component reaction_constants (first_order_rate_constant). * STATES[9] is ENaD_ in component ENaD_ (millimolar). * CONSTANTS[24] is k25 in component reaction_constants (second_order_rate_constant). * CONSTANTS[25] is k26 in component reaction_constants (first_order_rate_constant). * CONSTANTS[26] is k31 in component reaction_constants (second_order_rate_constant). * CONSTANTS[27] is k32 in component reaction_constants (first_order_rate_constant). * CONSTANTS[28] is k5 in component reaction_constants (second_order_rate_constant). * CONSTANTS[29] is k6 in component reaction_constants (first_order_rate_constant). * STATES[10] is ENaCl in component ENaCl (millimolar). * CONSTANTS[30] is k13 in component reaction_constants (second_order_rate_constant). * CONSTANTS[31] is k14 in component reaction_constants (first_order_rate_constant). * STATES[11] is ENaCl_ in component ENaCl_ (millimolar). * CONSTANTS[32] is k7 in component reaction_constants (second_order_rate_constant). * CONSTANTS[33] is k8 in component reaction_constants (first_order_rate_constant). * CONSTANTS[34] is k15 in component reaction_constants (second_order_rate_constant). * CONSTANTS[35] is k16 in component reaction_constants (first_order_rate_constant). * CONSTANTS[36] is k19 in component reaction_constants (first_order_rate_constant). * CONSTANTS[37] is k20 in component reaction_constants (first_order_rate_constant). * RATES[0] is d/dt E in component E (millimolar). * RATES[2] is d/dt E_ in component E_ (millimolar). * RATES[1] is d/dt ED in component ED (millimolar). * RATES[5] is d/dt ED_ in component ED_ (millimolar). * RATES[8] is d/dt ENaD in component ENaD (millimolar). * RATES[9] is d/dt ENaD_ in component ENaD_ (millimolar). * RATES[3] is d/dt ENa in component ENa (millimolar). * RATES[6] is d/dt ENa_ in component ENa_ (millimolar). * RATES[4] is d/dt ECl in component ECl (millimolar). * RATES[7] is d/dt ECl_ in component ECl_ (millimolar). * RATES[10] is d/dt ENaCl in component ENaCl (millimolar). * RATES[11] is d/dt ENaCl_ in component ENaCl_ (millimolar). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 0.08333; CONSTANTS[0] = 1.0E5; CONSTANTS[1] = 3.192E1; CONSTANTS[2] = 4.587E5; CONSTANTS[3] = 1.0E5; CONSTANTS[4] = 1.0E5; CONSTANTS[5] = 4.183E5; CONSTANTS[6] = 1.0E5; CONSTANTS[7] = 4.928E6; STATES[1] = 0.08333; STATES[2] = 0.08333; STATES[3] = 0.08333; STATES[4] = 0.08333; CONSTANTS[8] = 1.0E-6; CONSTANTS[9] = 50.0; CONSTANTS[10] = 96.0; CONSTANTS[11] = 1.0E5; CONSTANTS[12] = 3.514E-1; CONSTANTS[13] = 1.0E5; CONSTANTS[14] = 4.982E6; CONSTANTS[15] = 1.0E5; CONSTANTS[16] = 4.183E5; STATES[5] = 0.08333; STATES[6] = 0.08333; STATES[7] = 0.08333; CONSTANTS[17] = 1.0E-6; CONSTANTS[18] = 10.0; CONSTANTS[19] = 40.0; CONSTANTS[20] = 1.0E5; CONSTANTS[21] = 4.183E5; STATES[8] = 0.08333; CONSTANTS[22] = 1.0E5; CONSTANTS[23] = 1.389E5; STATES[9] = 0.08333; CONSTANTS[24] = 1.0E5; CONSTANTS[25] = 3.192E1; CONSTANTS[26] = 1.0E5; CONSTANTS[27] = 1.166E-1; CONSTANTS[28] = 1.0E5; CONSTANTS[29] = 1.065E6; STATES[10] = 0.08333; CONSTANTS[30] = 1.0E5; CONSTANTS[31] = 1.065E6; STATES[11] = 0.08333; CONSTANTS[32] = 1.0E5; CONSTANTS[33] = 8.940E4; CONSTANTS[34] = 1.0E5; CONSTANTS[35] = 8.940E4; CONSTANTS[36] = 1.0E3; CONSTANTS[37] = 2.180E2; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = ( CONSTANTS[1]*STATES[1]+ CONSTANTS[3]*STATES[2]+ CONSTANTS[5]*STATES[3]+ CONSTANTS[7]*STATES[4]) - ( CONSTANTS[0]*CONSTANTS[8]*STATES[0]+ CONSTANTS[2]*STATES[0]+ CONSTANTS[4]*CONSTANTS[9]*STATES[0]+ CONSTANTS[6]*CONSTANTS[10]*STATES[0]); RATES[2] = ( CONSTANTS[12]*STATES[5]+ CONSTANTS[2]*STATES[0]+ CONSTANTS[16]*STATES[6]+ CONSTANTS[14]*STATES[7]) - ( CONSTANTS[11]*CONSTANTS[17]*STATES[2]+ CONSTANTS[3]*STATES[2]+ CONSTANTS[15]*CONSTANTS[18]*STATES[2]+ CONSTANTS[13]*CONSTANTS[19]*STATES[2]); RATES[1] = ( CONSTANTS[0]*STATES[0]*CONSTANTS[8]+ CONSTANTS[21]*STATES[8]) - ( CONSTANTS[1]*STATES[1]+ CONSTANTS[20]*CONSTANTS[9]*STATES[1]); RATES[5] = ( CONSTANTS[11]*STATES[2]*CONSTANTS[17]+ CONSTANTS[23]*STATES[9]) - ( CONSTANTS[12]*STATES[5]+ CONSTANTS[22]*CONSTANTS[18]*STATES[5]); RATES[8] = ( CONSTANTS[20]*CONSTANTS[9]*STATES[1]+ CONSTANTS[24]*CONSTANTS[8]*STATES[3]) - ( CONSTANTS[21]*STATES[8]+ CONSTANTS[25]*STATES[8]); RATES[9] = ( CONSTANTS[22]*CONSTANTS[18]*STATES[5]+ CONSTANTS[26]*CONSTANTS[17]*STATES[6]) - ( CONSTANTS[23]*STATES[9]+ CONSTANTS[27]*STATES[9]); RATES[3] = ( CONSTANTS[4]*CONSTANTS[9]*STATES[0]+ CONSTANTS[25]*STATES[8]+ CONSTANTS[29]*STATES[10]) - ( CONSTANTS[5]*STATES[3]+ CONSTANTS[28]*CONSTANTS[10]*STATES[3]+ CONSTANTS[24]*CONSTANTS[8]*STATES[3]); RATES[6] = ( CONSTANTS[15]*CONSTANTS[18]*STATES[2]+ CONSTANTS[27]*STATES[9]+ CONSTANTS[31]*STATES[11]) - ( CONSTANTS[16]*STATES[6]+ CONSTANTS[30]*CONSTANTS[19]*STATES[6]+ CONSTANTS[26]*CONSTANTS[17]*STATES[6]); RATES[4] = ( CONSTANTS[6]*CONSTANTS[10]*STATES[0]+ CONSTANTS[33]*STATES[10]) - ( CONSTANTS[32]*CONSTANTS[9]*STATES[4]+ CONSTANTS[7]*STATES[4]); RATES[7] = ( CONSTANTS[13]*CONSTANTS[19]*STATES[2]+ CONSTANTS[35]*STATES[11]) - ( CONSTANTS[34]*CONSTANTS[18]*STATES[7]+ CONSTANTS[14]*STATES[7]); RATES[10] = ( CONSTANTS[28]*CONSTANTS[10]*STATES[3]+ CONSTANTS[32]*CONSTANTS[9]*STATES[4]+ CONSTANTS[37]*STATES[11]) - ( CONSTANTS[29]*STATES[10]+ CONSTANTS[33]*STATES[10]+ CONSTANTS[36]*STATES[10]); RATES[11] = ( CONSTANTS[30]*CONSTANTS[19]*STATES[6]+ CONSTANTS[34]*CONSTANTS[18]*STATES[7]+ CONSTANTS[36]*STATES[10]) - ( CONSTANTS[31]*STATES[11]+ CONSTANTS[35]*STATES[11]+ CONSTANTS[37]*STATES[11]); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }