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 6 entries in the algebraic variable array.
C There are a total of 5 entries in each of the rate and state variable arrays.
C There are a total of 20 entries in the constant variable array.
C
C
C VOI is time in component environment (minute).
C STATES(1) is C in component C (dimensionless).
C ALGBRC(1) is Ctot in component C (dimensionless).
C CONSTS(1) is vi in component model_parameters (per_minute).
C CONSTS(2) is k1 in component model_parameters (per_minute).
C STATES(2) is X in component X (dimensionless).
C CONSTS(3) is K5 in component model_parameters (dimensionless).
C CONSTS(4) is kd in component model_parameters (per_minute).
C STATES(3) is Z in component Z (dimensionless).
C STATES(4) is M in component M (dimensionless).
C CONSTS(20) is M_ in component M (dimensionless).
C ALGBRC(2) is V1 in component model_parameters (per_minute).
C CONSTS(5) is K1 in component model_parameters (dimensionless).
C CONSTS(6) is V2 in component model_parameters (per_minute).
C CONSTS(7) is K2 in component model_parameters (dimensionless).
C ALGBRC(3) is X_ in component X (dimensionless).
C ALGBRC(5) is V3 in component model_parameters (per_minute).
C CONSTS(8) is K3 in component model_parameters (dimensionless).
C CONSTS(9) is V4 in component model_parameters (per_minute).
C CONSTS(10) is K4 in component model_parameters (dimensionless).
C STATES(5) is Y in component Y (dimensionless).
C ALGBRC(4) is Ytot in component Y (dimensionless).
C CONSTS(11) is vs in component model_parameters (per_minute).
C CONSTS(12) is d1 in component model_parameters (per_minute).
C CONSTS(13) is a1 in component model_parameters (per_minute).
C CONSTS(14) is a2 in component model_parameters (per_minute).
C CONSTS(15) is alpha in component model_parameters (dimensionless).
C ALGBRC(6) is BP in component BP (dimensionless).
C CONSTS(16) is Kd in component model_parameters (dimensionless).
C CONSTS(17) is K6 in component model_parameters (dimensionless).
C CONSTS(18) is V1_dash in component model_parameters (per_minute).
C CONSTS(19) is V3_dash in component model_parameters (per_minute).
C RATES(1) is d/dt C in component C (dimensionless).
C RATES(4) is d/dt M in component M (dimensionless).
C RATES(2) is d/dt X in component X (dimensionless).
C RATES(5) is d/dt Y in component Y (dimensionless).
C RATES(3) is d/dt Z in component Z (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 0.01
      CONSTS(1) = 0.1
      CONSTS(2) = 0.5
      STATES(2) = 0.01
      CONSTS(3) = 0.02
      CONSTS(4) = 0.02
      STATES(3) = 0.28
      STATES(4) = 0.01
      CONSTS(5) = 0.02
      CONSTS(6) = 0.25
      CONSTS(7) = 0.02
      CONSTS(8) = 0.1
      CONSTS(9) = 0.1
      CONSTS(10) = 0.1
      STATES(5) = 0.01
      CONSTS(11) = 0.1
      CONSTS(12) = 0.05
      CONSTS(13) = 1.5
      CONSTS(14) = 1.5
      CONSTS(15) = 0.1
      CONSTS(16) = 1
      CONSTS(17) = 0.3
      CONSTS(18) = 0.75
      CONSTS(19) = 0.3
      CONSTS(20) = - 1.00000
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = (CONSTS(1) - ( CONSTS(2)*STATES(2)*STATES(1))/(STATES(1)+CONSTS(3))) -  CONSTS(4)*STATES(1)
      RATES(5) = ((CONSTS(11) -  CONSTS(12)*STATES(5)) -  CONSTS(13)*STATES(1)*STATES(5))+ (CONSTS(14)+ CONSTS(15)*CONSTS(4))*STATES(3)
      RATES(3) =  CONSTS(13)*STATES(1)*STATES(5) -  (CONSTS(14)+ CONSTS(15)*CONSTS(4)+ CONSTS(15)*CONSTS(12))*STATES(3)
      ALGBRC(2) = ( STATES(1)*CONSTS(18))/(STATES(1)+CONSTS(17))
      RATES(4) = ( ALGBRC(2)*CONSTS(20))/(CONSTS(20)+CONSTS(5)) - ( CONSTS(6)*STATES(4))/(STATES(4)+CONSTS(7))
      ALGBRC(3) = 1.00000 - STATES(2)
      ALGBRC(5) =  STATES(4)*CONSTS(19)
      RATES(2) = ( ALGBRC(5)*ALGBRC(3))/(ALGBRC(3)+CONSTS(8)) - ( CONSTS(9)*STATES(2))/(STATES(2)+CONSTS(10))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = ( STATES(1)*CONSTS(18))/(STATES(1)+CONSTS(17))
      ALGBRC(3) = 1.00000 - STATES(2)
      ALGBRC(5) =  STATES(4)*CONSTS(19)
      ALGBRC(1) = STATES(1)+STATES(3)
      ALGBRC(4) = STATES(5)+STATES(3)
      ALGBRC(6) = 1.00000+( CONSTS(16)*ALGBRC(4))/STATES(1)+CONSTS(16) ** 2.00000
      RETURN
      END