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 9 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 ALGBRC(1) is ainf in component a (dimensionless).
C CONSTS(1) is w in component a (dimensionless).
C CONSTS(2) is ka in component a (dimensionless).
C CONSTS(3) is th0 in component a (dimensionless).
C CONSTS(4) is n in component a (dimensionless).
C CONSTS(5) is wi in component a (dimensionless).
C CONSTS(9) is noise in component a (dimensionless).
C STATES(2) is s in component s (dimensionless).
C ALGBRC(2) is sinf in component s (dimensionless).
C CONSTS(6) is taus in component s (second).
C CONSTS(7) is ks in component s (dimensionless).
C CONSTS(8) is ths in component s (dimensionless).
C RATES(1) is d/dt a in component a (dimensionless).
C RATES(2) is d/dt s in component s (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 0.1
      CONSTS(1) = 0.8
      CONSTS(2) = -0.05
      CONSTS(3) = 0.17
      CONSTS(4) = 0.01
      CONSTS(5) = 0
      STATES(2) = 0.3
      CONSTS(6) = 250
      CONSTS(7) = 0.05
      CONSTS(8) = 0.2
      CONSTS(9) =  CONSTS(4)*CONSTS(5)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = 1.00000/(1.00000+EXP(( CONSTS(1)*STATES(2)*STATES(1) - CONSTS(3))/CONSTS(2)))
      RATES(1) = ((ALGBRC(1) - STATES(1))+CONSTS(9))/1.00000
      ALGBRC(2) = 1.00000/(1.00000+EXP((STATES(1) - CONSTS(8))/CONSTS(7)))
      RATES(2) = (ALGBRC(2) - STATES(2))/CONSTS(6)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = 1.00000/(1.00000+EXP(( CONSTS(1)*STATES(2)*STATES(1) - CONSTS(3))/CONSTS(2)))
      ALGBRC(2) = 1.00000/(1.00000+EXP((STATES(1) - CONSTS(8))/CONSTS(7)))
      RETURN
      END