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 3 entries in each of the rate and state variable arrays.
C There are a total of 14 entries in the constant variable array.
C
C
C VOI is time in component environment (dimensionless).
C STATES(1) is x in component x (dimensionless).
C CONSTS(1) is a1 in component model_parameters (dimensionless).
C CONSTS(2) is k1 in component model_parameters (dimensionless).
C CONSTS(3) is b1 in component model_parameters (dimensionless).
C CONSTS(4) is kp in component model_parameters (dimensionless).
C STATES(2) is y in component y (dimensionless).
C CONSTS(5) is epsilon in component model_parameters (dimensionless).
C CONSTS(6) is a2 in component model_parameters (dimensionless).
C CONSTS(7) is a3 in component model_parameters (dimensionless).
C CONSTS(8) is k2 in component model_parameters (dimensionless).
C CONSTS(9) is b2 in component model_parameters (dimensionless).
C STATES(3) is z in component z (dimensionless).
C CONSTS(10) is delta in component model_parameters (dimensionless).
C CONSTS(11) is a4 in component model_parameters (dimensionless).
C CONSTS(12) is a5 in component model_parameters (dimensionless).
C CONSTS(13) is k3 in component model_parameters (dimensionless).
C CONSTS(14) is b3 in component model_parameters (dimensionless).
C RATES(1) is d/dt x in component x (dimensionless).
C RATES(2) 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) = 2.0
      CONSTS(1) = 0.05
      CONSTS(2) = 0.1
      CONSTS(3) = 0.1
      CONSTS(4) = 0.5
      STATES(2) = 1.0
      CONSTS(5) = 0.1
      CONSTS(6) = 0.009
      CONSTS(7) = 0.675
      CONSTS(8) = 0.5
      CONSTS(9) = 0.3
      STATES(3) = 0.15
      CONSTS(10) = 0.9
      CONSTS(11) = 0.01
      CONSTS(12) = 0.005
      CONSTS(13) = 0.025
      CONSTS(14) = 0.01
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = TERNRY(VOI.GE.0.00000.AND.VOI.LT.10000.0, CONSTS(1)/(CONSTS(2)+STATES(2)) -  CONSTS(3)*STATES(1), TERNRY(VOI.GE.10000.0.AND.VOI.LT.10360.0, (CONSTS(1)/(CONSTS(2)+STATES(2)) -  CONSTS(3)*STATES(1))+CONSTS(4), TERNRY(VOI.GE.10360.0.AND.VOI.LT.11440.0, CONSTS(1)/(CONSTS(2)+STATES(2)) -  CONSTS(3)*STATES(1), TERNRY(VOI.GE.11440.0.AND.VOI.LT.11800.0, (CONSTS(1)/(CONSTS(2)+STATES(2)) -  CONSTS(3)*STATES(1))+CONSTS(4), TERNRY(VOI.GE.11800.0.AND.VOI.LT.12880.0, CONSTS(1)/(CONSTS(2)+STATES(2)) -  CONSTS(3)*STATES(1), TERNRY(VOI.GE.12880.0.AND.VOI.LT.13240.0, (CONSTS(1)/(CONSTS(2)+STATES(2)) -  CONSTS(3)*STATES(1))+CONSTS(4), TERNRY(VOI.GE.13240.0.AND.VOI.LT.14320.0, CONSTS(1)/(CONSTS(2)+STATES(2)) -  CONSTS(3)*STATES(1), TERNRY(VOI.GE.14320.0.AND.VOI.LT.14680.0, (CONSTS(1)/(CONSTS(2)+STATES(2)) -  CONSTS(3)*STATES(1))+CONSTS(4), TERNRY(VOI.GE.14680.0.AND.VOI.LT.15760.0, CONSTS(1)/(CONSTS(2)+STATES(2)) -  CONSTS(3)*STATES(1), TERNRY(VOI.GE.15760.0.AND.VOI.LT.16120.0, (CONSTS(1)/(CONSTS(2)+STATES(2)) -  CONSTS(3)*STATES(1))+CONSTS(4), 0.0/0.0)
      RATES(2) =  CONSTS(5)*(( (CONSTS(6)+ CONSTS(7)*STATES(1))*STATES(2)*STATES(3))/(CONSTS(8)+STATES(1) ** 2.00000) -  CONSTS(9)*STATES(2))
      RATES(3) =  CONSTS(5)*CONSTS(10)*( CONSTS(11)*STATES(1) - (( CONSTS(12)*STATES(1)*STATES(3))/(CONSTS(13)+STATES(1))+ CONSTS(14)*STATES(3)))
      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