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 17 entries in the constant variable array.
C
C
C VOI is time in component environment (hour).
C ALGBRC(1) is Qv in component v (per_second).
C STATES(1) is Vv in component v (mV).
C CONSTS(1) is tau_v in component v (second).
C CONSTS(2) is v_vm in component v (mV_second).
C ALGBRC(2) is Qm in component m (per_second).
C CONSTS(3) is Qmax in component model_parameters (per_second).
C ALGBRC(4) is D in component D (mV).
C CONSTS(4) is theta in component model_parameters (mV).
C CONSTS(5) is sigma in component model_parameters (mV).
C CONSTS(17) is Qa in component a (per_second).
C CONSTS(15) is Va in component a (mV).
C CONSTS(6) is Vao in component a (mV).
C STATES(2) is Vm in component m (mV).
C CONSTS(7) is tau_m in component m (second).
C CONSTS(8) is v_mv in component m (mV_second).
C CONSTS(9) is v_maQao in component m (mV).
C STATES(3) is H in component H (nM).
C CONSTS(10) is chi in component H (hour).
C CONSTS(11) is mu in component H (nM_second).
C ALGBRC(3) is C in component D (dimensionless).
C CONSTS(12) is c0 in component D (dimensionless).
C CONSTS(16) is omega in component D (per_hour).
C CONSTS(13) is v_vc in component D (mV).
C CONSTS(14) is v_vh in component D (mV_per_nM).
C RATES(1) is d/dt Vv in component v (mV).
C RATES(2) is d/dt Vm in component m (mV).
C RATES(3) is d/dt H in component H (nM).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 0.0
      CONSTS(1) = 10.0
      CONSTS(2) = -1.9
      CONSTS(3) = 100.0
      CONSTS(4) = 10.0
      CONSTS(5) = 3.0
      CONSTS(6) = 1.0
      STATES(2) = 0.0
      CONSTS(7) = 10.0
      CONSTS(8) = -1.9
      CONSTS(9) = 1.0
      STATES(3) = 15.0
      CONSTS(10) = 10.8
      CONSTS(11) = 3.6
      CONSTS(12) = 1.0
      CONSTS(13) = -6.3
      CONSTS(14) = 0.19
      CONSTS(15) = CONSTS(6)
      CONSTS(16) = ( 2.00000* 3.14159265358979)/24.0000
      CONSTS(17) = CONSTS(3)/(1.00000+EXP(- (CONSTS(15) - CONSTS(4))/CONSTS(5)))
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = CONSTS(3)/(1.00000+EXP(- (STATES(1) - CONSTS(4))/CONSTS(5)))
      RATES(2) = ((CONSTS(9)+ CONSTS(8)*ALGBRC(1)) - STATES(2))/(CONSTS(7)/3600.00)
      ALGBRC(2) = CONSTS(3)/(1.00000+EXP(- (STATES(2) - CONSTS(4))/CONSTS(5)))
      RATES(3) = ( CONSTS(11)*ALGBRC(2) - STATES(3))/CONSTS(10)
      ALGBRC(3) = CONSTS(12)+cos( CONSTS(16)*VOI)
      ALGBRC(4) =  CONSTS(13)*ALGBRC(3)+ CONSTS(14)*STATES(3)
      RATES(1) = (( CONSTS(2)*ALGBRC(2)+ALGBRC(4)) - STATES(1))/(CONSTS(1)/3600.00)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = CONSTS(3)/(1.00000+EXP(- (STATES(1) - CONSTS(4))/CONSTS(5)))
      ALGBRC(2) = CONSTS(3)/(1.00000+EXP(- (STATES(2) - CONSTS(4))/CONSTS(5)))
      ALGBRC(3) = CONSTS(12)+cos( CONSTS(16)*VOI)
      ALGBRC(4) =  CONSTS(13)*ALGBRC(3)+ CONSTS(14)*STATES(3)
      RETURN
      END