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 1 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 12 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is P in component P (picomolar).
C CONSTS(1) is k1 in component model_parameters (second_order_rate_constant).
C CONSTS(2) is k1_ in component model_parameters (first_order_rate_constant).
C CONSTS(3) is k2 in component model_parameters (second_order_rate_constant).
C CONSTS(4) is k2_ in component model_parameters (first_order_rate_constant).
C CONSTS(5) is kcl in component model_parameters (first_order_rate_constant).
C CONSTS(12) is D in component model_parameters (flux).
C STATES(2) is Ca in component Ca (picomolar).
C STATES(3) is Ci in component Ci (picomolar).
C STATES(4) is Ra in component Ra (picomolar).
C STATES(5) is Ri in component Ri (picomolar).
C CONSTS(6) is k3 in component model_parameters (first_order_rate_constant).
C CONSTS(7) is k3_ in component model_parameters (first_order_rate_constant).
C CONSTS(8) is k4 in component model_parameters (first_order_rate_constant).
C CONSTS(9) is k4_ in component model_parameters (first_order_rate_constant).
C ALGBRC(1) is rho in component rho (dimensionless).
C CONSTS(10) is De in component model_parameters (flux).
C CONSTS(11) is Dd in component model_parameters (flux).
C RATES(1) is d/dt P in component P (picomolar).
C RATES(4) is d/dt Ra in component Ra (picomolar).
C RATES(5) is d/dt Ri in component Ri (picomolar).
C RATES(2) is d/dt Ca in component Ca (picomolar).
C RATES(3) is d/dt Ci in component Ci (picomolar).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 3
      CONSTS(1) = 1e-6
      CONSTS(2) = 1e-3
      CONSTS(3) = 1e-7
      CONSTS(4) = 1e-3
      CONSTS(5) = 5e-3
      STATES(2) = 4e-4
      STATES(3) = 0.05
      STATES(4) = 16.9
      STATES(5) = 1.7
      CONSTS(6) = 1e-3
      CONSTS(7) = 1e-4
      CONSTS(8) = 2e-3
      CONSTS(9) = 0.4
      CONSTS(10) = 0
      CONSTS(11) = 0.015
      CONSTS(12) = CONSTS(10)+CONSTS(11)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = ( CONSTS(2)*STATES(2)+ CONSTS(4)*STATES(3)+CONSTS(12)) - ( CONSTS(1)*STATES(4)*STATES(1)+ CONSTS(3)*STATES(5)*STATES(1)+ CONSTS(5)*STATES(1))
      RATES(4) = ( CONSTS(2)*STATES(2)+ CONSTS(6)*STATES(5)) - ( CONSTS(1)*STATES(4)*STATES(1)+ CONSTS(7)*STATES(4))
      RATES(5) = ( CONSTS(4)*STATES(3)+ CONSTS(7)*STATES(4)) - ( CONSTS(3)*STATES(5)*STATES(1)+ CONSTS(6)*STATES(5))
      RATES(2) = ( CONSTS(1)*STATES(4)*STATES(1)+ CONSTS(8)*STATES(3)) - ( CONSTS(2)*STATES(2)+ CONSTS(9)*STATES(2))
      RATES(3) = ( CONSTS(3)*STATES(5)*STATES(1)+ CONSTS(9)*STATES(2)) - ( CONSTS(4)*STATES(3)+ CONSTS(8)*STATES(3))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = (STATES(4)+STATES(2))/(STATES(4)+STATES(2)+STATES(5)+STATES(3))
      RETURN
      END