/* There are a total of 2 entries in the algebraic variable array. There are a total of 1 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 (minute). * CONSTANTS[0] is PLA in component atrial_natriuretic_peptide (mmHg). * CONSTANTS[1] is PRA in component atrial_natriuretic_peptide (mmHg). * CONSTANTS[8] is ANP in component total_ANP_secreted (dimensionless). * CONSTANTS[6] is ANPL in component total_ANP_secreted (dimensionless). * CONSTANTS[7] is ANPR2 in component total_ANP_secreted (dimensionless). * CONSTANTS[9] is ANP1 in component ANP_into_circulation (dimensionless). * CONSTANTS[2] is ANPKNS in component parameter_values (dimensionless). * CONSTANTS[3] is ANPINF in component parameter_values (dimensionless). * STATES[0] is ANPC in component ANP_in_plasma (dimensionless). * CONSTANTS[4] is ANPTC in component parameter_values (minute). * ALGEBRAIC[1] is ANPX in component ANP_effect_on_renal_afferent_arteriolar_resistance (dimensionless). * CONSTANTS[5] is ANPXUL in component parameter_values (dimensionless). * ALGEBRAIC[0] is ANPX1 in component ANP_effect_on_renal_afferent_arteriolar_resistance (dimensionless). * RATES[0] is d/dt ANPC in component ANP_in_plasma (dimensionless). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { CONSTANTS[0] = 2; CONSTANTS[1] = 0.00852183; CONSTANTS[2] = 0; CONSTANTS[3] = 0; STATES[0] = 1.0; CONSTANTS[4] = 4; CONSTANTS[5] = 10; CONSTANTS[6] = ( (CONSTANTS[0] - 1.00000)*1.00000<0.00000 ? 0.00000 : (CONSTANTS[0] - 1.00000)*1.00000); CONSTANTS[7] = ( (CONSTANTS[1]+1.00000)*2.00000<0.00000 ? 0.00000 : (CONSTANTS[1]+1.00000)*2.00000); CONSTANTS[8] = (CONSTANTS[6]+CONSTANTS[7])/3.00000; CONSTANTS[9] = (CONSTANTS[2]>0.00000 ? CONSTANTS[2] : CONSTANTS[8]+CONSTANTS[3]); } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = (CONSTANTS[9] - STATES[0])/CONSTANTS[4]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { ALGEBRAIC[0] = CONSTANTS[5] - CONSTANTS[5]/( 0.555556*(1.00000+STATES[0])); ALGEBRAIC[1] = (ALGEBRAIC[0]<- 1.00000 ? - 1.00000 : ALGEBRAIC[0]); }