Generated Code
The following is f77 code generated by the CellML API from this CellML file. (Back to language selection)
The raw code is available.
C C There are a total of 4 entries in the algebraic variable array. C There are a total of 1 entries in each of the rate and state variable arrays. C There are a total of 17 entries in the constant variable array. C C C VOI is time in component environment (minute). C CONSTS(1) is CNA in component antidiuretic_hormone (monovalent_mEq_per_litre). C CONSTS(2) is PA1 in component antidiuretic_hormone (mmHg). C CONSTS(13) is ADHNA in component osmotic_control_of_ADH_secretion (dimensionless). C CONSTS(3) is CNR in component parameter_values (monovalent_mEq_per_litre). C CONSTS(12) is ADHNA1 in component osmotic_control_of_ADH_secretion (dimensionless). C CONSTS(15) is ADHPR in component pressure_control_of_ADH_secretion (dimensionless). C CONSTS(4) is ADHPUL in component parameter_values (mmHg). C CONSTS(5) is ADHPAM in component parameter_values (per_mmHg2). C CONSTS(14) is ADHPA in component pressure_control_of_ADH_secretion (mmHg). C CONSTS(17) is ADH in component total_ADH_secretion (dimensionless). C CONSTS(6) is ADHINF in component parameter_values (dimensionless). C CONSTS(16) is ADH1 in component total_ADH_secretion (dimensionless). C STATES(1) is ADHC in component ADH_in_blood (dimensionless). C CONSTS(7) is ADHTC in component parameter_values (minute). C ALGBRC(3) is ADHMV in component ADH_effect_on_nonrenal_vascular_resistance (dimensionless). C CONSTS(8) is ADHVUL in component parameter_values (dimensionless). C CONSTS(9) is ADHVLL in component parameter_values (dimensionless). C ALGBRC(1) is ADHMV1 in component ADH_effect_on_nonrenal_vascular_resistance (dimensionless). C ALGBRC(4) is ADHMK in component ADH_effect_on_kidney (dimensionless). C CONSTS(10) is ADHKLL in component parameter_values (dimensionless). C CONSTS(11) is ADHKUL in component parameter_values (dimensionless). C ALGBRC(2) is ADHMK1 in component ADH_effect_on_kidney (dimensionless). C RATES(1) is d/dt ADHC in component ADH_in_blood (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 142.035 CONSTS(2) = 103.525 CONSTS(3) = 139 CONSTS(4) = 85 CONSTS(5) = 0.3 CONSTS(6) = 0 STATES(1) = 1.0 CONSTS(7) = 15 CONSTS(8) = 2.5 CONSTS(9) = 0.93617 CONSTS(10) = 0.2 CONSTS(11) = 5 CONSTS(12) = (CONSTS(1) - CONSTS(3))/(142.000 - CONSTS(3)) CONSTS(13) = TERNRY(CONSTS(12).LT.0.00000, 0.00000, CONSTS(12)) CONSTS(14) = TERNRY(CONSTS(2).GT.CONSTS(4), CONSTS(4), CONSTS(2)) CONSTS(15) = CONSTS(4) - CONSTS(14) ** 2.00000*CONSTS(5) CONSTS(16) = CONSTS(13)+CONSTS(15)+CONSTS(6) CONSTS(17) = TERNRY(CONSTS(16).LT.0.00000, 0.00000, CONSTS(16)) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(1) = (CONSTS(17) - STATES(1))/CONSTS(7) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = CONSTS(8) - (CONSTS(8) - 1.00000)/( ((CONSTS(9) - 1.00000)/(CONSTS(9) - CONSTS(8)))*(STATES(1) - 1.00000)+1.00000) ALGBRC(2) = CONSTS(11) - (CONSTS(11) - 1.00000)/( ((CONSTS(10) - 1.00000)/(CONSTS(10) - CONSTS(11)))*(STATES(1) - 1.00000)+1.00000) ALGBRC(3) = TERNRY(ALGBRC(1).LT.CONSTS(9), CONSTS(9), ALGBRC(1)) ALGBRC(4) = TERNRY(ALGBRC(2).LT.CONSTS(10), CONSTS(10), ALGBRC(2)) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END