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 2 entries in the algebraic variable array. C There are a total of 9 entries in each of the rate and state variable arrays. C There are a total of 38 entries in the constant variable array. C C C CONSTS(1) is BW in component main (kilogram). C CONSTS(2) is Qcc in component main (litre_per_hr_kg). C CONSTS(3) is Qliv in component main (dimensionless). C CONSTS(4) is Qfat in component main (dimensionless). C CONSTS(5) is Qbrain in component main (dimensionless). C CONSTS(6) is Qslow in component main (dimensionless). C CONSTS(21) is Qc in component main (litre_per_hr). C CONSTS(29) is Ql in component main (litre_per_hr). C CONSTS(34) is Qf in component main (litre_per_hr). C CONSTS(36) is Qbr in component main (litre_per_hr). C CONSTS(37) is Qs in component main (litre_per_hr). C CONSTS(38) is Qr in component main (litre_per_hr). C CONSTS(7) is Vblood in component main (dimensionless). C CONSTS(8) is Vbrain in component main (dimensionless). C CONSTS(9) is Vliver in component main (dimensionless). C CONSTS(22) is Vfat in component main (dimensionless). C CONSTS(10) is Vslow in component main (dimensionless). C CONSTS(30) is Vrap in component main (dimensionless). C CONSTS(31) is Vf in component main (litre). C CONSTS(23) is Vs in component main (litre). C CONSTS(24) is Vl in component main (litre). C CONSTS(35) is Vr in component main (litre). C CONSTS(25) is Vbr in component main (litre). C CONSTS(26) is Vb in component main (litre). C CONSTS(32) is Vven in component main (litre). C CONSTS(33) is Vart in component main (litre). C CONSTS(11) is Pfat_bl in component main (dimensionless). C CONSTS(12) is Pslow_bl in component main (dimensionless). C CONSTS(13) is Pliv_bl in component main (dimensionless). C CONSTS(14) is Prapid_bl in component main (dimensionless). C CONSTS(15) is Pbrain_bl in component main (dimensionless). C CONSTS(16) is dose in component main (mg_per_kg). C CONSTS(17) is F in component main (dimensionless). C CONSTS(27) is D0 in component main (mg). C CONSTS(18) is Ka in component main (per_hr). C CONSTS(19) is Kfc in component main (per_hr). C CONSTS(28) is KF in component main (per_hr_kg). C VOI is t in component main (hr). C STATES(1) is A_fat in component main (mg). C STATES(2) is A_slow in component main (mg). C STATES(3) is A_liv in component main (mg). C STATES(4) is A_rapid in component main (mg). C STATES(5) is A_brain in component main (mg). C CONSTS(20) is A_blood in component main (mg). C STATES(6) is A_stomach in component main (mg). C STATES(7) is A_ven in component main (mg). C STATES(8) is A_art in component main (mg). C STATES(9) is A_liv_CL in component main (mg). C ALGBRC(1) is C_art in component main (mg_per_litre). C ALGBRC(2) is C_brain in component main (mg_per_litre). C RATES(7) is d/dt A_ven in component main (mg). C RATES(8) is d/dt A_art in component main (mg). C RATES(1) is d/dt A_fat in component main (mg). C RATES(2) is d/dt A_slow in component main (mg). C RATES(5) is d/dt A_brain in component main (mg). C RATES(4) is d/dt A_rapid in component main (mg). C RATES(6) is d/dt A_stomach in component main (mg). C RATES(3) is d/dt A_liv in component main (mg). C RATES(9) is d/dt A_liv_CL in component main (mg). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 0.1615 CONSTS(2) = 14 CONSTS(3) = 0.25 CONSTS(4) = 0.09 CONSTS(5) = 0.03 CONSTS(6) = 0.278 CONSTS(7) = 0.05 CONSTS(8) = 0.0116 CONSTS(9) = 0.04 CONSTS(10) = 0.63 CONSTS(11) = 186 CONSTS(12) = 3.4 CONSTS(13) = 6.1 CONSTS(14) = 6.1 CONSTS(15) = 3 CONSTS(16) = 60 CONSTS(17) = 0.8 CONSTS(18) = 0.1 CONSTS(19) = 6 STATES(1) = 0 STATES(2) = 0 STATES(3) = 0 STATES(4) = 0 STATES(5) = 0 CONSTS(20) = 0 STATES(7) = 0 STATES(8) = 0 STATES(9) = 0 CONSTS(21) = CONSTS(2)*CONSTS(1) ** 0.740000 CONSTS(22) = 0.0100000*( 20.0000*CONSTS(1)+1.66400) CONSTS(23) = CONSTS(10)*CONSTS(1) CONSTS(24) = CONSTS(9)*CONSTS(1) CONSTS(25) = CONSTS(8)*CONSTS(1) CONSTS(26) = CONSTS(7)*CONSTS(1) CONSTS(27) = CONSTS(17)*CONSTS(16)*CONSTS(1) CONSTS(28) = CONSTS(19)/CONSTS(1) ** 0.300000 CONSTS(29) = CONSTS(3)*CONSTS(21) CONSTS(30) = (((1.00000 - CONSTS(7)) - CONSTS(9)) - CONSTS(22)) - CONSTS(10) CONSTS(31) = CONSTS(22)*CONSTS(1) CONSTS(32) = 0.750000*CONSTS(26) CONSTS(33) = 0.250000*CONSTS(26) CONSTS(34) = CONSTS(4)*CONSTS(21) CONSTS(35) = CONSTS(30)*CONSTS(1) CONSTS(36) = CONSTS(5)*CONSTS(21) CONSTS(37) = CONSTS(6)*CONSTS(21) CONSTS(38) = (((CONSTS(21) - CONSTS(29)) - CONSTS(34)) - CONSTS(36)) - CONSTS(37) STATES(6) = CONSTS(27) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) RATES(7) = (( CONSTS(34)*STATES(1))/CONSTS(31))/CONSTS(11)+(( CONSTS(36)*STATES(5))/CONSTS(25))/CONSTS(15)+(( CONSTS(37)*STATES(2))/CONSTS(23))/CONSTS(12)+(( CONSTS(29)*STATES(3))/CONSTS(24))/CONSTS(13)+(( CONSTS(38)*STATES(4))/CONSTS(35))/CONSTS(14) RATES(1) = CONSTS(34)*(STATES(8)/CONSTS(26) - (STATES(1)/CONSTS(31))/CONSTS(11)) RATES(2) = CONSTS(37)*(STATES(8)/CONSTS(26) - (STATES(2)/CONSTS(23))/CONSTS(12)) RATES(5) = CONSTS(36)*(STATES(8)/CONSTS(26) - (STATES(5)/CONSTS(25))/CONSTS(15)) RATES(4) = CONSTS(38)*(STATES(8)/CONSTS(26) - (STATES(4)/CONSTS(35))/CONSTS(14)) RATES(6) = - CONSTS(18)*STATES(6) RATES(3) = ( CONSTS(29)*(STATES(8)/CONSTS(26) - (STATES(3)/CONSTS(24))/CONSTS(13)) - (( CONSTS(28)*CONSTS(24)*STATES(3))/CONSTS(24))/CONSTS(13))+ CONSTS(18)*STATES(6) RATES(9) = (( CONSTS(28)*CONSTS(24)*STATES(3))/CONSTS(24))/CONSTS(13) RATES(8) = RATES(7) - ( CONSTS(21)*STATES(8))/CONSTS(26) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = STATES(8)/CONSTS(26) ALGBRC(2) = STATES(5)/CONSTS(25) RETURN END