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 4 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 13 entries in the constant variable array.
C
C
C VOI is time in component environment (minute).
C STATES(1) is C in component C (micromolar).
C STATES(2) is X in component X (dimensionless).
C CONSTS(1) is kd in component model_parameters (first_order_rate_constant).
C CONSTS(2) is Kd in component model_parameters (micromolar).
C CONSTS(3) is vi in component model_parameters (flux).
C CONSTS(4) is vd in component model_parameters (flux).
C STATES(3) is M in component M (dimensionless).
C ALGBRC(1) is M_star in component M_star (dimensionless).
C ALGBRC(3) is V1 in component model_parameters (first_order_rate_constant).
C CONSTS(5) is V2 in component model_parameters (first_order_rate_constant).
C CONSTS(6) is K1 in component model_parameters (dimensionless).
C CONSTS(7) is K2 in component model_parameters (dimensionless).
C ALGBRC(2) is X_star in component X_star (dimensionless).
C ALGBRC(4) is V3 in component model_parameters (first_order_rate_constant).
C CONSTS(8) is V4 in component model_parameters (first_order_rate_constant).
C CONSTS(9) is K3 in component model_parameters (dimensionless).
C CONSTS(10) is K4 in component model_parameters (dimensionless).
C CONSTS(11) is Kc in component model_parameters (micromolar).
C CONSTS(12) is VM1 in component model_parameters (first_order_rate_constant).
C CONSTS(13) is VM3 in component model_parameters (first_order_rate_constant).
C RATES(1) is d/dt C in component C (micromolar).
C RATES(3) is d/dt M in component M (dimensionless).
C RATES(2) is d/dt X in component X (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 0.01
      STATES(2) = 0.01
      CONSTS(1) = 0.01
      CONSTS(2) = 0.02
      CONSTS(3) = 0.025
      CONSTS(4) = 0.25
      STATES(3) = 0.01
      CONSTS(5) = 1.5
      CONSTS(6) = 0.005
      CONSTS(7) = 0.005
      CONSTS(8) = 0.5
      CONSTS(9) = 0.005
      CONSTS(10) = 0.005
      CONSTS(11) = 0.5
      CONSTS(12) = 3
      CONSTS(13) = 1
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = (CONSTS(3) - ( CONSTS(4)*STATES(2)*STATES(1))/(CONSTS(2)+STATES(1))) -  CONSTS(1)*STATES(1)
      ALGBRC(1) = 1.00000 - STATES(3)
      ALGBRC(3) = ( CONSTS(12)*STATES(1))/(CONSTS(11)+STATES(1))
      RATES(3) = ( ALGBRC(3)*ALGBRC(1))/(CONSTS(6)+ALGBRC(1)) - ( CONSTS(5)*STATES(3))/(CONSTS(7)+STATES(3))
      ALGBRC(2) = 1.00000 - STATES(2)
      ALGBRC(4) =  STATES(3)*CONSTS(13)
      RATES(2) = ( ALGBRC(4)*ALGBRC(2))/(CONSTS(9)+ALGBRC(2)) - ( CONSTS(8)*STATES(2))/(CONSTS(10)+STATES(2))
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = 1.00000 - STATES(3)
      ALGBRC(3) = ( CONSTS(12)*STATES(1))/(CONSTS(11)+STATES(1))
      ALGBRC(2) = 1.00000 - STATES(2)
      ALGBRC(4) =  STATES(3)*CONSTS(13)
      RETURN
      END