/* There are a total of 1 entries in the algebraic variable array. There are a total of 3 entries in each of the rate and state variable arrays. There are a total of 10 entries in the constant variable array. */ /* * VOI is time in component environment (hour). * STATES[0] is M in component M (nanomolar). * CONSTANTS[0] is vs in component M (flux). * CONSTANTS[1] is vm in component M (flux). * CONSTANTS[2] is Km in component M (nanomolar). * CONSTANTS[3] is KI in component M (nanomolar). * CONSTANTS[4] is n in component M (dimensionless). * STATES[1] is FN in component FN (nanomolar). * STATES[2] is FC in component FC (nanomolar). * ALGEBRAIC[0] is Ft in component FC (nanomolar). * CONSTANTS[5] is ks in component FC (first_order_rate_constant). * CONSTANTS[6] is vd in component FC (flux). * CONSTANTS[7] is Kd in component FC (nanomolar). * CONSTANTS[8] is k1 in component parameters (first_order_rate_constant). * CONSTANTS[9] is k2 in component parameters (first_order_rate_constant). * RATES[0] is d/dt M in component M (nanomolar). * RATES[2] is d/dt FC in component FC (nanomolar). * RATES[1] is d/dt FN in component FN (nanomolar). * There are a total of 0 condition variables. */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 0.1; CONSTANTS[0] = 1.6; CONSTANTS[1] = 0.505; CONSTANTS[2] = 0.5; CONSTANTS[3] = 1.0; CONSTANTS[4] = 4.0; STATES[1] = 0.1; STATES[2] = 0.1; CONSTANTS[5] = 0.5; CONSTANTS[6] = 1.4; CONSTANTS[7] = 0.13; CONSTANTS[8] = 0.5; CONSTANTS[9] = 0.6; RATES[0] = 0.1001; RATES[2] = 0.1001; RATES[1] = 0.1001; } void computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { resid[0] = RATES[0] - CONSTANTS[0]*(pow(CONSTANTS[3], CONSTANTS[4])/(pow(CONSTANTS[3], CONSTANTS[4])+pow(STATES[1], CONSTANTS[4]))) - CONSTANTS[1]*(STATES[0]/(CONSTANTS[2]+STATES[0])); resid[1] = RATES[2] - ( CONSTANTS[5]*STATES[0]+ CONSTANTS[9]*STATES[1]) - ( CONSTANTS[6]*(STATES[2]/(CONSTANTS[7]+STATES[2]))+ CONSTANTS[8]*STATES[2]); resid[2] = RATES[1] - CONSTANTS[8]*STATES[2] - CONSTANTS[9]*STATES[1]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[0] = STATES[2]+STATES[1]; } void computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { } void getStateInformation(double* SI) { SI[0] = 1.0; SI[1] = 1.0; SI[2] = 1.0; } void computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { }