# 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 5 entries in each of the rate and state variable arrays. There are a total of 15 entries in the constant variable array. */ /* * VOI is time in component environment (second). * STATES[0] is x in component x (dimensionless). * CONSTANTS[0] is r1 in component x (rate). * CONSTANTS[1] is r2 in component x (rate). * CONSTANTS[2] is c1 in component x (rate). * STATES[1] is z in component z (dimensionless). * STATES[2] is y in component y (dimensionless). * CONSTANTS[3] is r3 in component y (rate). * CONSTANTS[4] is r4 in component y (rate). * CONSTANTS[5] is c2 in component y (rate). * CONSTANTS[6] is c3 in component y (rate). * CONSTANTS[7] is epsilon in component model_constants (dimensionless). * STATES[3] is u in component u (dimensionless). * CONSTANTS[8] is r5 in component z (rate). * CONSTANTS[9] is r6 in component z (rate). * CONSTANTS[10] is r7 in component z (rate). * CONSTANTS[11] is z_ in component z (dimensionless). * CONSTANTS[12] is y_ in component z (dimensionless). * CONSTANTS[13] is delta in component z (dimensionless). * CONSTANTS[14] is omega in component u (rate). * STATES[4] is v in component u (dimensionless). * RATES[0] is d/dt x in component x (dimensionless). * RATES[2] is d/dt y in component y (dimensionless). * RATES[1] is d/dt z in component z (dimensionless). * RATES[3] is d/dt u in component u (dimensionless). * RATES[4] is d/dt v in component u (dimensionless). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 5; CONSTANTS[0] = 0.15; CONSTANTS[1] = 0.12; CONSTANTS[2] = 0.1; STATES[1] = 1; STATES[2] = 0; CONSTANTS[3] = 0.05; CONSTANTS[4] = 0.03; CONSTANTS[5] = 0.1; CONSTANTS[6] = 0.005; CONSTANTS[7] = 0.1; STATES[3] = 1; CONSTANTS[8] = 0.09; CONSTANTS[9] = 0.1; CONSTANTS[10] = 0.05; CONSTANTS[11] = 1.01; CONSTANTS[12] = 1.08; CONSTANTS[13] = 0.01; CONSTANTS[14] = 0.05; STATES[4] = 0; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = STATES[1]*( CONSTANTS[0]*STATES[2]+ - CONSTANTS[1]*STATES[0]+CONSTANTS[2]); RATES[2] = CONSTANTS[7]*(CONSTANTS[3]/STATES[1]+ - CONSTANTS[4]*STATES[0]+CONSTANTS[5]+ CONSTANTS[6]*STATES[3]); RATES[1] = CONSTANTS[7]*CONSTANTS[13]*(( CONSTANTS[8]*(STATES[2] - CONSTANTS[12])*(CONSTANTS[11] - STATES[1])+ CONSTANTS[9]*STATES[1]*(CONSTANTS[11] - STATES[1])) - CONSTANTS[10]*STATES[1]); RATES[3] = - CONSTANTS[14]*STATES[4]; RATES[4] = CONSTANTS[14]*STATES[3]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }