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 11 entries in each of the rate and state variable arrays. There are a total of 15 entries in the constant variable array. */ /* * VOI is t in component environment (s). * CONSTANTS[0] is kf8 in component PIPtoDAG (per_s). * CONSTANTS[1] is kf9 in component PIPtoDAG (per_s). * CONSTANTS[2] is km6 in component PIPtoDAG (um). * CONSTANTS[3] is Vmax6 in component PIPtoDAG (per_s). * CONSTANTS[4] is km7 in component PIPtoDAG (um). * CONSTANTS[5] is Vmax7 in component PIPtoDAG (per_s). * STATES[0] is PIP2 in component PIPtoDAG (um). * STATES[1] is DAG in component PIPtoDAG (um). * STATES[2] is IP3 in component PIPtoDAG (um). * STATES[3] is CaPLC in component PLC (um). * STATES[4] is CaGqPLC in component PLC (um). * STATES[5] is Inositol in component PIPtoDAG (um). * STATES[6] is PC in component PIPtoDAG (um). * CONSTANTS[6] is kf1 in component PLC (per_um_s). * CONSTANTS[7] is kb1 in component PLC (per_s). * CONSTANTS[8] is kf2 in component PLC (per_um_s). * CONSTANTS[9] is kb2 in component PLC (per_s). * CONSTANTS[10] is kf3 in component PLC (per_um_s). * CONSTANTS[11] is kb3 in component PLC (per_s). * CONSTANTS[12] is kf4 in component PLC (per_um_s). * CONSTANTS[13] is kb4 in component PLC (per_s). * CONSTANTS[14] is kf5 in component PLC (per_s). * STATES[7] is PLC in component PLC (um). * STATES[8] is Gq in component PLC (um). * STATES[9] is Ca in component PLC (um). * STATES[10] is GqPLC in component PLC (um). * RATES[0] is d/dt PIP2 in component PIPtoDAG (um). * RATES[1] is d/dt DAG in component PIPtoDAG (um). * RATES[2] is d/dt IP3 in component PIPtoDAG (um). * RATES[6] is d/dt PC in component PIPtoDAG (um). * RATES[5] is d/dt Inositol in component PIPtoDAG (um). * RATES[7] is d/dt PLC in component PLC (um). * RATES[8] is d/dt Gq in component PLC (um). * RATES[9] is d/dt Ca in component PLC (um). * RATES[10] is d/dt GqPLC in component PLC (um). * RATES[3] is d/dt CaPLC in component PLC (um). * RATES[4] is d/dt CaGqPLC in component PLC (um). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { CONSTANTS[0] = 0.15; CONSTANTS[1] = 2.5; CONSTANTS[2] = 5; CONSTANTS[3] = 48; CONSTANTS[4] = 19.84166667; CONSTANTS[5] = 10; STATES[0] = 10; STATES[1] = 0; STATES[2] = 0; STATES[3] = 0; STATES[4] = 0; STATES[5] = 0; STATES[6] = 0; CONSTANTS[6] = 0.000005; CONSTANTS[7] = 1; CONSTANTS[8] = 0.0000042; CONSTANTS[9] = 1; CONSTANTS[10] = 0.00005; CONSTANTS[11] = 1; CONSTANTS[12] = 0.0000042; CONSTANTS[13] = 1; CONSTANTS[14] = 0.0133; STATES[7] = 0.8; STATES[8] = 0.15; STATES[9] = 0.1; STATES[10] = 0; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = ( - STATES[3]*CONSTANTS[5]*STATES[0])/(CONSTANTS[4]+STATES[0]) - ( STATES[4]*CONSTANTS[3]*STATES[0])/(CONSTANTS[2]+STATES[0]); RATES[1] = ( STATES[3]*CONSTANTS[5]*STATES[0])/(CONSTANTS[4]+STATES[0]) - CONSTANTS[0]*STATES[1]; RATES[2] = ( STATES[4]*CONSTANTS[3]*STATES[0])/(CONSTANTS[2]+STATES[0]) - CONSTANTS[1]*STATES[2]; RATES[6] = CONSTANTS[0]*STATES[1]; RATES[5] = CONSTANTS[1]*STATES[2]; RATES[7] = (( - STATES[7]*STATES[9]*CONSTANTS[6]+ STATES[3]*CONSTANTS[7]) - STATES[7]*STATES[8]*CONSTANTS[8])+ STATES[10]*CONSTANTS[9]; RATES[8] = ( - STATES[7]*STATES[8]*CONSTANTS[8]+ STATES[10]*CONSTANTS[9]+ STATES[4]*CONSTANTS[13]) - STATES[3]*STATES[8]*CONSTANTS[12]; RATES[9] = (( - STATES[7]*STATES[9]*CONSTANTS[6]+ STATES[3]*CONSTANTS[7]) - STATES[9]*STATES[10]*CONSTANTS[10])+ STATES[4]*CONSTANTS[11]; RATES[10] = (( STATES[7]*STATES[8]*CONSTANTS[8] - STATES[10]*CONSTANTS[9]) - STATES[9]*STATES[10]*CONSTANTS[10])+ STATES[4]*CONSTANTS[11]; RATES[3] = (( STATES[7]*STATES[9]*CONSTANTS[6] - STATES[3]*CONSTANTS[7])+ STATES[4]*CONSTANTS[14]+ STATES[4]*CONSTANTS[13]) - STATES[3]*STATES[8]*CONSTANTS[12]; RATES[4] = ((( STATES[10]*STATES[9]*CONSTANTS[10] - STATES[4]*CONSTANTS[11])+ STATES[3]*STATES[8]*CONSTANTS[12]) - STATES[4]*CONSTANTS[13]) - STATES[4]*CONSTANTS[14]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }