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 2 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 (second).
C CONSTS(1) is v0 in component parameters (micromolar_s).
C CONSTS(2) is v1 in component parameters (micromolar_s).
C ALGBRC(1) is v2 in component parameters (micromolar_s).
C ALGBRC(2) is v3 in component parameters (micromolar_s).
C ALGBRC(3) is beta in component beta_pulse (dimensionless).
C CONSTS(3) is VM2 in component parameters (micromolar_s).
C CONSTS(4) is VM3 in component parameters (micromolar_s).
C CONSTS(5) is KR in component parameters (micromolar).
C CONSTS(6) is KA in component parameters (micromolar).
C CONSTS(7) is kf in component parameters (per_second).
C CONSTS(8) is k in component parameters (per_second).
C CONSTS(9) is K2 in component parameters (micromolar).
C CONSTS(10) is n in component parameters (dimensionless).
C CONSTS(11) is m in component parameters (dimensionless).
C CONSTS(12) is p in component parameters (dimensionless).
C STATES(1) is Z in component cytosol (micromolar).
C STATES(2) is Y in component insensitive_pool (micromolar).
C CONSTS(13) is betaf in component beta_pulse (dimensionless).
C CONSTS(14) is tp in component beta_pulse (second).
C RATES(1) is d/dt Z in component cytosol (micromolar).
C RATES(2) is d/dt Y in component insensitive_pool (micromolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 1
      CONSTS(2) = 7.3
      CONSTS(3) = 65
      CONSTS(4) = 500
      CONSTS(5) = 2
      CONSTS(6) = 0.9
      CONSTS(7) = 1
      CONSTS(8) = 10
      CONSTS(9) = 1
      CONSTS(10) = 2
      CONSTS(11) = 2
      CONSTS(12) = 4
      STATES(1) = 0.1
      STATES(2) = 0.64
      CONSTS(13) = 0.96
      CONSTS(14) = 4
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = ( CONSTS(3)*STATES(1) ** CONSTS(10))/(CONSTS(9) ** CONSTS(10)+STATES(1) ** CONSTS(10))
      ALGBRC(2) =  CONSTS(4)*(STATES(2) ** CONSTS(11)/(CONSTS(5) ** CONSTS(11)+STATES(2) ** CONSTS(11)))*(STATES(1) ** CONSTS(12)/(CONSTS(6) ** CONSTS(12)+STATES(1) ** CONSTS(12)))
      RATES(2) = (ALGBRC(1) - ALGBRC(2)) -  CONSTS(7)*STATES(2)
      ALGBRC(3) = TERNRY(VOI.LT.CONSTS(14), 0.00000, TERNRY(VOI.GE.CONSTS(14),  CONSTS(13)*EXP( -0.200000*(VOI - CONSTS(14))), 0.0/0.0)
      RATES(1) = (((CONSTS(1)+ CONSTS(2)*ALGBRC(3)) - ALGBRC(1))+ALGBRC(2)+ CONSTS(7)*STATES(2)) -  CONSTS(8)*STATES(1)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = ( CONSTS(3)*STATES(1) ** CONSTS(10))/(CONSTS(9) ** CONSTS(10)+STATES(1) ** CONSTS(10))
      ALGBRC(2) =  CONSTS(4)*(STATES(2) ** CONSTS(11)/(CONSTS(5) ** CONSTS(11)+STATES(2) ** CONSTS(11)))*(STATES(1) ** CONSTS(12)/(CONSTS(6) ** CONSTS(12)+STATES(1) ** CONSTS(12)))
      ALGBRC(3) = TERNRY(VOI.LT.CONSTS(14), 0.00000, TERNRY(VOI.GE.CONSTS(14),  CONSTS(13)*EXP( -0.200000*(VOI - CONSTS(14))), 0.0/0.0)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END