/* There are a total of 0 entries in the algebraic variable array. There are a total of 5 entries in each of the rate and state variable arrays. There are a total of 4 entries in the constant variable array. */ /* * VOI is time in component environment (second). * STATES[0] is Ca in component Ca (micromolar). * CONSTANTS[0] is k1 in component reaction_constants (second_order_rate_constant). * CONSTANTS[1] is k1_ in component reaction_constants (first_order_rate_constant). * STATES[1] is Parv in component Parv (micromolar). * STATES[2] is CaParv in component CaParv (micromolar). * CONSTANTS[2] is k2 in component reaction_constants (second_order_rate_constant). * CONSTANTS[3] is k2_ in component reaction_constants (first_order_rate_constant). * STATES[3] is Mg in component Mg (micromolar). * STATES[4] is MgParv in component MgParv (micromolar). * RATES[0] is d/dt Ca in component Ca (micromolar). * RATES[1] is d/dt Parv in component Parv (micromolar). * RATES[2] is d/dt CaParv in component CaParv (micromolar). * RATES[3] is d/dt Mg in component Mg (micromolar). * RATES[4] is d/dt MgParv in component MgParv (micromolar). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 0.05; CONSTANTS[0] = 4.79E13; CONSTANTS[1] = 0.574; STATES[1] = 1500.0; STATES[2] = 0.01; CONSTANTS[2] = 39700E6; CONSTANTS[3] = 3.45; STATES[3] = 1000.0; STATES[4] = 0.01; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = CONSTANTS[1]*STATES[2] - CONSTANTS[0]*STATES[0]*STATES[1]; RATES[1] = ( CONSTANTS[1]*STATES[2]+ CONSTANTS[3]*STATES[4]) - ( CONSTANTS[0]*STATES[0]*STATES[1]+ CONSTANTS[2]*STATES[3]*STATES[1]); RATES[2] = CONSTANTS[0]*STATES[0]*STATES[1] - CONSTANTS[1]*STATES[2]; RATES[3] = CONSTANTS[3]*STATES[4] - CONSTANTS[2]*STATES[3]*STATES[1]; RATES[4] = CONSTANTS[2]*STATES[3]*STATES[1] - CONSTANTS[3]*STATES[4]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }