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 3 entries in the algebraic variable array.
C There are a total of 3 entries in each of the rate and state variable arrays.
C There are a total of 18 entries in the constant variable array.
C
C
C VOI is time in component environment (day).
C ALGBRC(3) is S in component population_pharmacodynamics_model (units).
C CONSTS(1) is S0 in component population_pharmacodynamics_model (units).
C CONSTS(2) is alpha in component population_pharmacodynamics_model (units_per_day).
C CONSTS(3) is epsilon in component population_pharmacodynamics_model (units).
C ALGBRC(1) is ADAS_Cog_p in component placebo_response_model (units).
C CONSTS(15) is PD_CeA in component drug_response_model (units).
C CONSTS(4) is beta_P in component placebo_response_model (units).
C CONSTS(16) is Keq_p in component placebo_response_model (per_day).
C CONSTS(17) is Kel_p in component placebo_response_model (per_day).
C CONSTS(5) is t_half_el_p in component placebo_response_model (day).
C CONSTS(6) is t_half_eq_p in component placebo_response_model (day).
C CONSTS(18) is CL in component pharmacokinetic_model (litre_per_day).
C CONSTS(7) is smk in component pharmacokinetic_model (dimensionless).
C CONSTS(8) is age in component pharmacokinetic_model (year).
C ALGBRC(2) is Sv in component drop_out_model (dimensionless).
C CONSTS(9) is beta_a in component drug_response_model (units_ml_per_ng).
C CONSTS(10) is CeA in component drug_response_model (ng_per_ml).
C STATES(1) is CC in component drug_clearance (mg_per_litre).
C STATES(2) is PC in component drug_clearance (mg_per_litre).
C CONSTS(11) is Vc in component drug_clearance (litre).
C CONSTS(12) is Vp in component drug_clearance (litre).
C STATES(3) is A_in in component drug_clearance (mg).
C CONSTS(13) is k_ab in component drug_clearance (per_day).
C CONSTS(14) is CL_ic in component drug_clearance (litre_per_day).
C RATES(1) is d/dt CC in component drug_clearance (mg_per_litre).
C RATES(2) is d/dt PC in component drug_clearance (mg_per_litre).
C RATES(3) is d/dt A_in in component drug_clearance (mg).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
CONSTS(1) = 30
CONSTS(2) = 0.0164
CONSTS(3) = 0.0
CONSTS(4) = -3
CONSTS(5) = 7
CONSTS(6) = 6
CONSTS(7) = 1
CONSTS(8) = 40
CONSTS(9) = -0.047
CONSTS(10) = 25
STATES(1) = 0
STATES(2) = 0
CONSTS(11) = 172
CONSTS(12) = 222
STATES(3) = 25
CONSTS(13) = 115.44
CONSTS(14) = 763.2
CONSTS(15) = CONSTS(9)*CONSTS(10)
CONSTS(16) = log(2.00000)/CONSTS(6)
CONSTS(17) = log(2.00000)/CONSTS(5)
CONSTS(18) = 2268.00*EXP( - 0.0135000*(CONSTS(8) - 40.0000))*CONSTS(7)
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
RATES(1) = ( CONSTS(13)*STATES(3) - ( CONSTS(18)*STATES(1)+ CONSTS(14)*(STATES(1) - STATES(2))))/CONSTS(11)
RATES(2) = ( CONSTS(14)*(STATES(1) - STATES(2)))/CONSTS(12)
RATES(3) = - 115.440*STATES(3)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = (( CONSTS(4)*CONSTS(16))/(CONSTS(16) - CONSTS(17)))*(EXP( - CONSTS(17)*VOI) - EXP( - CONSTS(16)*VOI))
ALGBRC(2) = EXP( - 0.00145000*VOI)
ALGBRC(3) = CONSTS(1)+ CONSTS(2)*VOI+ALGBRC(1)+CONSTS(15)+CONSTS(3)
RETURN
END
