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 0 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 12 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is x in component x (dimensionless).
C CONSTS(1) is r_1 in component x (rate).
C CONSTS(2) is r_2 in component x (rate).
C CONSTS(3) is c_1 in component x (rate).
C STATES(2) is z in component z (dimensionless).
C STATES(3) is y in component y (dimensionless).
C CONSTS(4) is r_3 in component y (rate).
C CONSTS(5) is r_4 in component y (rate).
C CONSTS(6) is c_2 in component y (rate).
C CONSTS(7) is epsilon in component model_constants (dimensionless).
C CONSTS(8) is r_5 in component z (rate).
C CONSTS(9) is r_6 in component z (rate).
C CONSTS(10) is r_7 in component z (rate).
C CONSTS(11) is z_hat in component z (dimensionless).
C CONSTS(12) is y_hat in component z (dimensionless).
C RATES(1) is d/dt x in component x (dimensionless).
C RATES(3) is d/dt y in component y (dimensionless).
C RATES(2) is d/dt z in component z (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 4.0
      CONSTS(1) = 0.2
      CONSTS(2) = 0.1
      CONSTS(3) = 0.1
      STATES(2) = 1.0
      STATES(3) = 0.0
      CONSTS(4) = 0.1
      CONSTS(5) = 0.1
      CONSTS(6) = 0.1
      CONSTS(7) = 0.1
      CONSTS(8) = 0.1
      CONSTS(9) = 0.1
      CONSTS(10) = 0.05
      CONSTS(11) = 2.0
      CONSTS(12) = 1.24
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) =  STATES(2)*( CONSTS(1)*STATES(3)+ - CONSTS(2)*STATES(1)+CONSTS(3))
      RATES(3) =  CONSTS(7)*((CONSTS(4)/STATES(2) -  CONSTS(5)*STATES(1))+CONSTS(6))
      RATES(2) = ( CONSTS(8)*(STATES(3) - CONSTS(12))*(CONSTS(11) - STATES(2))+ CONSTS(9)*STATES(2)*(CONSTS(11) - STATES(2))) -  CONSTS(10)*STATES(2)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RETURN
      END