# 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 4 entries in each of the rate and state variable arrays. There are a total of 12 entries in the constant variable array. */ /* * VOI is time in component environment (day). * STATES[0] is A in component A (dimensionless). * CONSTANTS[0] is v_tilday in component A (first_order_rate_constant). * CONSTANTS[1] is f in component A (dimensionless). * CONSTANTS[2] is sigma1 in component A (first_order_rate_constant). * CONSTANTS[3] is b1 in component A (first_order_rate_constant). * CONSTANTS[4] is muA in component A (first_order_rate_constant). * STATES[1] is G in component G (dimensionless). * STATES[2] is R in component R (dimensionless). * CONSTANTS[5] is pi1 in component R (first_order_rate_constant). * CONSTANTS[6] is beta in component R (first_order_rate_constant). * CONSTANTS[7] is muR in component R (first_order_rate_constant). * STATES[3] is E in component E (dimensionless). * CONSTANTS[8] is lambdaE in component E (first_order_rate_constant). * CONSTANTS[9] is muE in component E (first_order_rate_constant). * CONSTANTS[10] is gamma in component G (first_order_rate_constant). * CONSTANTS[11] is muG in component G (first_order_rate_constant). * RATES[0] is d/dt A in component A (dimensionless). * RATES[2] is d/dt R in component R (dimensionless). * RATES[3] is d/dt E in component E (dimensionless). * RATES[1] is d/dt G in component G (dimensionless). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 1.0; CONSTANTS[0] = 0.0025; CONSTANTS[1] = 1e-4; CONSTANTS[2] = 3e-6; CONSTANTS[3] = 0.25; CONSTANTS[4] = 0.25; STATES[1] = 1e8; STATES[2] = 0.0; CONSTANTS[5] = 0.016; CONSTANTS[6] = 200.0; CONSTANTS[7] = 0.25; STATES[3] = 0.0; CONSTANTS[8] = 1000.0; CONSTANTS[9] = 0.25; CONSTANTS[10] = 2000.0; CONSTANTS[11] = 5.0; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = CONSTANTS[1]*CONSTANTS[0]*STATES[1] - ( ( CONSTANTS[2]*STATES[2]+CONSTANTS[3])*STATES[0]+ CONSTANTS[4]*STATES[0]); RATES[2] = ( CONSTANTS[5]*STATES[3]+CONSTANTS[6])*STATES[0] - CONSTANTS[7]*STATES[2]; RATES[3] = CONSTANTS[8]*STATES[0] - CONSTANTS[9]*STATES[3]; RATES[1] = CONSTANTS[10]*STATES[3] - ( CONSTANTS[0]*STATES[1]+ CONSTANTS[11]*STATES[1]); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }