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 0 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 13 entries in the constant variable array.
C
C
C VOI is time in component environment (hour).
C STATES(1) is Y in component Y (dimensionless).
C CONSTS(1) is C1 in component model_parameters (dimensionless).
C CONSTS(2) is k1 in component model_parameters (first_order_rate_constant).
C STATES(2) is P in component P (dimensionless).
C CONSTS(3) is K in component model_parameters (dimensionless).
C CONSTS(4) is C in component model_parameters (dimensionless).
C CONSTS(5) is C2 in component model_parameters (dimensionless).
C CONSTS(6) is k2 in component model_parameters (first_order_rate_constant).
C CONSTS(7) is ky in component model_parameters (first_order_rate_constant).
C STATES(3) is X in component X (dimensionless).
C CONSTS(8) is k3 in component model_parameters (first_order_rate_constant).
C CONSTS(9) is k4 in component model_parameters (first_order_rate_constant).
C STATES(4) is Z in component Z (dimensionless).
C CONSTS(10) is C3 in component model_parameters (dimensionless).
C CONSTS(11) is k5 in component model_parameters (first_order_rate_constant).
C CONSTS(12) is K2 in component model_parameters (dimensionless).
C STATES(5) is IL6 in component IL6 (dimensionless).
C CONSTS(13) is k6 in component model_parameters (first_order_rate_constant).
C RATES(1) is d/dt Y in component Y (dimensionless).
C RATES(3) is d/dt X in component X (dimensionless).
C RATES(2) is d/dt P in component P (dimensionless).
C RATES(4) is d/dt Z in component Z (dimensionless).
C RATES(5) is d/dt IL6 in component IL6 (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 10.0
      CONSTS(1) = 1.0
      CONSTS(2) = 1.0
      STATES(2) = 10.0
      CONSTS(3) = 5.0
      CONSTS(4) = 50.0
      CONSTS(5) = 1.0
      CONSTS(6) = 1.3
      CONSTS(7) = 0.01
      STATES(3) = 500.0
      CONSTS(8) = 0.05
      CONSTS(9) = 0.9
      STATES(4) = 200.0
      CONSTS(10) = 1.0
      CONSTS(11) = 5.0
      CONSTS(12) = 2.0
      STATES(5) = 1.9
      CONSTS(13) = 0.02
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) =  CONSTS(2)*CONSTS(1)*(STATES(2)/(CONSTS(3)+STATES(2)))*CONSTS(4) - ( CONSTS(6)*CONSTS(5)*(1.00000 - STATES(2)/(CONSTS(3)+STATES(2)))*STATES(1)+ CONSTS(7)*STATES(1))
      RATES(3) =  CONSTS(6)*CONSTS(5)*(1.00000 - STATES(2)/(CONSTS(3)+STATES(2)))*STATES(1) -  CONSTS(8)*STATES(3)
      RATES(2) = TERNRY(VOI.GE.0.00000.AND.VOI.LT.6.00000, 10.0000 -  CONSTS(9)*STATES(2), TERNRY(VOI.GE.6.00000.AND.VOI.LT.12.0000, - ( CONSTS(9)*STATES(2)), TERNRY(VOI.GE.12.0000.AND.VOI.LT.18.0000, 10.0000 -  CONSTS(9)*STATES(2), TERNRY(VOI.GE.18.0000.AND.VOI.LT.24.0000, - ( CONSTS(9)*STATES(2)), TERNRY(VOI.GE.24.0000.AND.VOI.LT.30.0000, 10.0000 -  CONSTS(9)*STATES(2), TERNRY(VOI.GE.30.0000.AND.VOI.LT.36.0000, - ( CONSTS(9)*STATES(2)), TERNRY(VOI.GE.36.0000.AND.VOI.LT.42.0000, 10.0000 -  CONSTS(9)*STATES(2), TERNRY(VOI.GE.42.0000.AND.VOI.LT.48.0000, - ( CONSTS(9)*STATES(2)), TERNRY(VOI.GE.48.0000.AND.VOI.LT.54.0000, 10.0000 -  CONSTS(9)*STATES(2), TERNRY(VOI.GE.54.0000.AND.VOI.LT.60.0000, - ( CONSTS(9)*STATES(2)), TERNRY(VOI.GE.60.0000.AND.VOI.LT.66.0000, 10.0000 -  CONSTS(9)*STATES(2), TERNRY(VOI.GE.66.0000.AND.VOI.LT.72.0000, - ( CONSTS(9)*STATES(2)), TERNRY(VOI.GE.72.0000.AND.VOI.LT.78.0000, 10.0000 -  CONSTS(9)*STATES(2), TERNRY(VOI.GE.78.0000.AND.VOI.LT.84.0000, - ( CONSTS(9)*STATES(2)), TERNRY(VOI.GE.84.0000.AND.VOI.LT.90.0000, 10.0000 -  CONSTS(9)*STATES(2), TERNRY(VOI.GE.90.0000.AND.VOI.LT.96.0000, - ( CONSTS(9)*STATES(2)), 0.0/0.0)
      RATES(4) =  CONSTS(11)*CONSTS(10)*(STATES(5)/(CONSTS(12)+STATES(5))) -  CONSTS(13)*STATES(4)
      RATES(5) =  0.100000*STATES(3) -  10.0000*STATES(5)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END