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 12 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 19 entries in the constant variable array. C C C VOI is time in component environment (dimensionless). C STATES(1) is C in component C (dimensionless). C CONSTS(1) is gamma in component C (dimensionless). C ALGBRC(6) is Vs in component Vs (dimensionless). C ALGBRC(1) is V1 in component V1 (dimensionless). C ALGBRC(11) is V2 in component V2 (dimensionless). C ALGBRC(7) is Vd in component Vd (dimensionless). C STATES(2) is K in component K (dimensionless). C STATES(3) is RP in component RP (dimensionless). C ALGBRC(12) is V3 in component V3 (dimensionless). C ALGBRC(2) is V4 in component V4 (dimensionless). C ALGBRC(3) is E in component E (dimensionless). C CONSTS(2) is sigma in component E (dimensionless). C ALGBRC(4) is RE in component RE (dimensionless). C ALGBRC(8) is KP in component KP (dimensionless). C ALGBRC(9) is KPI in component KPI (dimensionless). C CONSTS(3) is thetaI in component KPI (dimensionless). C ALGBRC(10) is I in component I (dimensionless). C CONSTS(4) is lambda in component I (dimensionless). C CONSTS(5) is thetaE in component RE (dimensionless). C ALGBRC(5) is R in component R (dimensionless). C CONSTS(6) is VCs in component Vs (dimensionless). C CONSTS(7) is Vsm in component Vs (dimensionless). C CONSTS(8) is KsE in component Vs (dimensionless). C CONSTS(9) is V1m in component V1 (dimensionless). C CONSTS(10) is K1C in component V1 (dimensionless). C CONSTS(11) is K1 in component V1 (dimensionless). C CONSTS(12) is V2m in component V2 (dimensionless). C CONSTS(13) is K2 in component V2 (dimensionless). C CONSTS(14) is V3m in component V3 (dimensionless). C CONSTS(15) is K3 in component V3 (dimensionless). C CONSTS(16) is V4m in component V4 (dimensionless). C CONSTS(17) is K4 in component V4 (dimensionless). C CONSTS(18) is VdEm in component Vd (dimensionless). C CONSTS(19) is KdC in component Vd (dimensionless). C RATES(1) is d/dt C in component C (dimensionless). C RATES(2) is d/dt K in component K (dimensionless). C RATES(3) is d/dt RP in component RP (dimensionless). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 0.38 CONSTS(1) = 1.0 STATES(2) = 0.1 STATES(3) = 1.0 CONSTS(2) = 10 CONSTS(3) = 1.0 CONSTS(4) = 1.0 CONSTS(5) = 0.01 CONSTS(6) = 1.0 CONSTS(7) = 1.0 CONSTS(8) = 0.1 CONSTS(9) = 50.0 CONSTS(10) = 0.1 CONSTS(11) = 0.0001 CONSTS(12) = 40 CONSTS(13) = 0.0001 CONSTS(14) = 3000 CONSTS(15) = 0.0001 CONSTS(16) = 3.0 CONSTS(17) = 0.0001 CONSTS(18) = 1000.0 CONSTS(19) = 0.005 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) CALL minimize(minfunc_0, CONSTS, VARIABLES, <VAR>) ALGBRC(6) = CONSTS(6)+ CONSTS(7)*(ALGBRC(3)/(CONSTS(8)+ALGBRC(3))) ALGBRC(1) = CONSTS(9)*(STATES(1)/(CONSTS(10)+STATES(1)))*(STATES(2)/(CONSTS(11)+STATES(2))) CALL minimize(minfunc_1, CONSTS, VARIABLES, <VAR>) ALGBRC(11) = CONSTS(12)*(ALGBRC(8)/(CONSTS(13)+ALGBRC(8))) ALGBRC(7) = STATES(1)+ CONSTS(18)*ALGBRC(3)*(STATES(1)/(CONSTS(19)+STATES(1))) RATES(1) = (ALGBRC(6)+ CONSTS(1)*ALGBRC(11)) - ( CONSTS(1)*ALGBRC(1)+ALGBRC(7)) RATES(2) = ALGBRC(11) - ALGBRC(1) ALGBRC(12) = CONSTS(14)*ALGBRC(8)*(ALGBRC(4)/(CONSTS(15)+ALGBRC(4))) ALGBRC(2) = CONSTS(16)*(STATES(3)/(CONSTS(17)+STATES(3))) RATES(3) = ALGBRC(12) - ALGBRC(2) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(6) = CONSTS(6)+ CONSTS(7)*(ALGBRC(3)/(CONSTS(8)+ALGBRC(3))) ALGBRC(1) = CONSTS(9)*(STATES(1)/(CONSTS(10)+STATES(1)))*(STATES(2)/(CONSTS(11)+STATES(2))) ALGBRC(11) = CONSTS(12)*(ALGBRC(8)/(CONSTS(13)+ALGBRC(8))) ALGBRC(7) = STATES(1)+ CONSTS(18)*ALGBRC(3)*(STATES(1)/(CONSTS(19)+STATES(1))) ALGBRC(12) = CONSTS(14)*ALGBRC(8)*(ALGBRC(4)/(CONSTS(15)+ALGBRC(4))) ALGBRC(2) = CONSTS(16)*(STATES(3)/(CONSTS(17)+STATES(3))) RETURN END REAL FUNCTION minfunc_0(CONSTS, VARIABLES) REAL CONSTS(*), VARIABLES(*) minfunc_0[1] = abs(ALGBRC(3) - (1.00000 - CONSTS(2)*ALGBRC(4))) minfunc_0[2] = abs(ALGBRC(4) - CONSTS(5)*ALGBRC(5)*ALGBRC(3)) minfunc_0[3] = abs(ALGBRC(5) - (1.00000 - (STATES(3)+ALGBRC(4)))) RETURN END REAL FUNCTION minfunc_1(CONSTS, VARIABLES) REAL CONSTS(*), VARIABLES(*) minfunc_1[1] = abs(ALGBRC(8) - (1.00000 - (ALGBRC(9)+STATES(2)))) minfunc_1[2] = abs(ALGBRC(9) - CONSTS(3)*ALGBRC(8)*ALGBRC(10)) minfunc_1[3] = abs(ALGBRC(10) - (1.00000 - CONSTS(4)*ALGBRC(9))) RETURN END