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 2 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 12 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is a in component a (dimensionless).
C CONSTS(8) is alpha in component reaction_constants (dimensionless).
C CONSTS(9) is beta in component reaction_constants (dimensionless).
C ALGBRC(2) is KP in component reaction_constants (dimensionless).
C STATES(2) is g in component g (dimensionless).
C CONSTS(10) is gamma in component reaction_constants (dimensionless).
C CONSTS(11) is L in component reaction_constants (dimensionless).
C CONSTS(1) is k2 in component reaction_constants (dimensionless).
C CONSTS(2) is k3 in component reaction_constants (dimensionless).
C CONSTS(3) is k6 in component reaction_constants (dimensionless).
C CONSTS(4) is k7 in component reaction_constants (dimensionless).
C CONSTS(5) is k0 in component reaction_constants (dimensionless).
C CONSTS(6) is k4 in component reaction_constants (dimensionless).
C CONSTS(7) is km in component reaction_constants (dimensionless).
C CONSTS(12) is K in component reaction_constants (dimensionless).
C ALGBRC(1) is P in component reaction_constants (dimensionless).
C RATES(1) is d/dt a in component a (dimensionless).
C RATES(2) is d/dt g in component g (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 7.68E-8
      STATES(2) = 3.43E-8
      CONSTS(1) = 6.0E-4
      CONSTS(2) = 0.0000048
      CONSTS(3) = 0.000891
      CONSTS(4) = 0.006831
      CONSTS(5) = 8.7831E-11
      CONSTS(6) = 2.1E12
      CONSTS(7) = 6.9001E-14
      CONSTS(8) = CONSTS(2)/CONSTS(1)
      CONSTS(9) = CONSTS(3)/CONSTS(1)
      CONSTS(10) = CONSTS(4)/CONSTS(1)
      CONSTS(11) = ( CONSTS(7) ** 2.00000*CONSTS(6))/CONSTS(1) ** 3.00000 ** 0.500000
      CONSTS(12) = ( CONSTS(5) ** 2.00000*CONSTS(6))/CONSTS(1) ** 3.00000 ** 0.500000
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(2) = ( (1.00000 - CONSTS(8))*STATES(1)+ STATES(1)*STATES(2) ** 2.00000) - (CONSTS(11)+ CONSTS(10)*STATES(2))
      ALGBRC(1) = 0.735000+ 0.156300* sin(( 2.00000*3.14159*VOI)/( 24.0000*3600.00))+ 0.312700*ABS( sin(( 3.14159*VOI)/( 24.0000*3600.00)))
      ALGBRC(2) =  CONSTS(12)*ALGBRC(1)
      RATES(1) = ALGBRC(2) - ( (1.00000+CONSTS(8)+CONSTS(9))*STATES(1)+ STATES(1)*STATES(2) ** 2.00000)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = 0.735000+ 0.156300* sin(( 2.00000*3.14159*VOI)/( 24.0000*3600.00))+ 0.312700*ABS( sin(( 3.14159*VOI)/( 24.0000*3600.00)))
      ALGBRC(2) =  CONSTS(12)*ALGBRC(1)
      RETURN
      END