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 13 entries in the algebraic variable array.
C There are a total of 5 entries in each of the rate and state variable arrays.
C There are a total of 41 entries in the constant variable array.
C
C
C CONSTS(1) is t_ss in component Vstim_para (second).
C CONSTS(2) is V_actHolding in component Vstim_para (mV).
C CONSTS(3) is t_act in component Vstim_para (second).
C CONSTS(4) is V_actTest in component Vstim_para (mV).
C CONSTS(5) is t_intp in component Vstim_para (second).
C CONSTS(6) is np in component Vstim_para (dimensionless).
C CONSTS(7) is Nai in component control_para (mM).
C CONSTS(8) is Cai_init in component control_para (mM).
C CONSTS(9) is inhPump in component control_para (dimensionless).
C VOI is time in component time_s (second).
C ALGBRC(5) is V in component mPulse_protocol_s (mV).
C STATES(1) is Cai in component Cai (mM).
C ALGBRC(13) is J_VOCC in component J_VOCC (mM_per_s).
C ALGBRC(8) is J_CaPump in component J_CaPump (mM_per_s).
C ALGBRC(11) is J_NaCa in component J_NaCa (mM_per_s).
C ALGBRC(1) is stress in component CB4HM (dimensionless).
C ALGBRC(2) is phosphorylation in component CB4HM (dimensionless).
C CONSTS(10) is R in component constants (J_per_K_mol).
C CONSTS(11) is F in component constants (C_per_mmol).
C CONSTS(12) is T in component model_para (kelvin).
C CONSTS(13) is Nao in component model_para (mM).
C CONSTS(14) is Cao in component model_para (mM).
C CONSTS(15) is V_cell in component model_para (fm3).
C CONSTS(16) is V_Cahalf in component model_para (mV).
C CONSTS(17) is K_Cahalf in component model_para (mV).
C CONSTS(18) is g_mCa in component model_para (nS).
C CONSTS(19) is V_pmax in component model_para (mM_per_s).
C CONSTS(20) is n in component model_para (dimensionless).
C CONSTS(21) is K_ph in component model_para (mM).
C CONSTS(22) is K_NaCa in component model_para (mM).
C CONSTS(23) is G_NaCa in component model_para (mM_per_s_mV).
C CONSTS(24) is n_M in component model_para (dimensionless).
C CONSTS(25) is Ca_halfMLCK in component model_para (mM).
C CONSTS(26) is M_init in component initials (dimensionless).
C CONSTS(27) is Mp_init in component initials (dimensionless).
C CONSTS(28) is AM_init in component initials (dimensionless).
C CONSTS(29) is AMp_init in component initials (dimensionless).
C CONSTS(30) is K_7 in component model_para (per_s).
C CONSTS(31) is K_2 in component model_para (per_s).
C CONSTS(32) is K_3 in component model_para (per_s).
C CONSTS(33) is K_4 in component model_para (per_s).
C CONSTS(34) is K_5 in component model_para (per_s).
C ALGBRC(7) is rho_vCa in component J_VOCC (dimensionless).
C CONSTS(41) is stimPeriod in component mPulse_protocol_s (second).
C ALGBRC(3) is t in component mPulse_protocol_s (second).
C CONSTS(35) is Nai in component model_para (mM).
C CONSTS(36) is inhPump in component model_para (dimensionless).
C CONSTS(37) is Cai_init in component initials (mM).
C CONSTS(38) is z_Ca in component E_Ca (dimensionless).
C ALGBRC(9) is E in component Nernst_potential (mV).
C CONSTS(39) is z_Na in component E_Na (dimensionless).
C CONSTS(40) is E in component Nernst_potential (mV).
C ALGBRC(12) is I in component Ionic_currents (pA).
C ALGBRC(10) is V_mNaCa in component J_NaCa (mV).
C ALGBRC(6) is K_1 in component K_1 (per_s).
C ALGBRC(4) is norm in component CB4HM (dimensionless).
C STATES(2) is M in component CB4HM (dimensionless).
C STATES(3) is Mp in component CB4HM (dimensionless).
C STATES(4) is AM in component CB4HM (dimensionless).
C STATES(5) is AMp in component CB4HM (dimensionless).
C RATES(1) is d/dt Cai in component Cai (mM).
C RATES(2) is d/dt M in component CB4HM (dimensionless).
C RATES(3) is d/dt Mp in component CB4HM (dimensionless).
C RATES(4) is d/dt AM in component CB4HM (dimensionless).
C RATES(5) is d/dt AMp in component CB4HM (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 0
      CONSTS(2) = -80
      CONSTS(3) = 0.1
      CONSTS(4) = 0
      CONSTS(5) = 0.33
      CONSTS(6) = 10
      CONSTS(7) = 16.55
      CONSTS(8) = 0.1e-3
      CONSTS(9) = 1
      CONSTS(10) = 8.314
      CONSTS(11) = 96.48534
      CONSTS(12) = 310
      CONSTS(13) = 140
      CONSTS(14) = 2
      CONSTS(15) = 21
      CONSTS(16) = -27
      CONSTS(17) = 11
      CONSTS(18) = 0.046842
      CONSTS(19) = 5.1449e-4
      CONSTS(20) = 1.9015
      CONSTS(21) = 0.6e-3
      CONSTS(22) = 7e-3
      CONSTS(23) = 5.7297e-5
      CONSTS(24) = 8.7613
      CONSTS(25) = 256.98e-6
      CONSTS(26) = 1
      CONSTS(27) = 0
      CONSTS(28) = 0
      CONSTS(29) = 0
      CONSTS(30) = 0.0378
      CONSTS(31) = 1.2387
      CONSTS(32) = 0.1419
      CONSTS(33) = 0.035475
      CONSTS(34) = 1.2387
      CONSTS(35) = 2.9836
      CONSTS(36) = 1
      CONSTS(37) = 0.1e-6
      CONSTS(38) = 2
      CONSTS(39) = 1
      CONSTS(40) =  (( CONSTS(10)*CONSTS(12))/( CONSTS(39)*CONSTS(11)))*log(CONSTS(13)/CONSTS(7))
      CONSTS(41) = CONSTS(3)+CONSTS(5)
      STATES(1) = CONSTS(8)
      STATES(2) = CONSTS(26)
      STATES(3) = CONSTS(27)
      STATES(4) = CONSTS(28)
      STATES(5) = CONSTS(29)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(6) =  (STATES(1) ** CONSTS(24)/(CONSTS(25) ** CONSTS(24)+STATES(1) ** CONSTS(24)))*1.00000
      ALGBRC(4) = STATES(2)+STATES(3)+STATES(4)+STATES(5)
      RATES(2) = ( - ALGBRC(6)*STATES(2))/ALGBRC(4)+( CONSTS(31)*STATES(3))/ALGBRC(4)+( CONSTS(30)*STATES(4))/ALGBRC(4)
      RATES(3) = (( CONSTS(33)*STATES(5))/ALGBRC(4)+( ALGBRC(6)*STATES(2))/ALGBRC(4)) - ( (CONSTS(31)+CONSTS(32))*STATES(3))/ALGBRC(4)
      RATES(4) = ( CONSTS(34)*STATES(5))/ALGBRC(4) - ( (ALGBRC(6)+CONSTS(30))*STATES(4))/ALGBRC(4)
      RATES(5) = (( CONSTS(32)*STATES(3))/ALGBRC(4)+( ALGBRC(6)*STATES(4))/ALGBRC(4)) - ( (CONSTS(33)+CONSTS(34))*STATES(5))/ALGBRC(4)
      ALGBRC(3) = (VOI - CONSTS(1)) -  CONSTS(41)*INT((VOI - CONSTS(1))/CONSTS(41))
      ALGBRC(5) = TERNRY(VOI.LE.CONSTS(1), CONSTS(2), TERNRY(VOI.GT.CONSTS(1).AND.ALGBRC(3).LE.CONSTS(3).AND.VOI.LE.CONSTS(1)+ CONSTS(41)*CONSTS(6), CONSTS(4), CONSTS(2))
      ALGBRC(7) = 1.00000/(1.00000+EXP((CONSTS(16) - ALGBRC(5))/CONSTS(17)))
      ALGBRC(9) =  (( CONSTS(10)*CONSTS(12))/( CONSTS(38)*CONSTS(11)))*log(CONSTS(14)/STATES(1))
      ALGBRC(12) =  CONSTS(18)*ALGBRC(7)*(ALGBRC(5) - ALGBRC(9))
      ALGBRC(13) = - ALGBRC(12)/( 2.00000*CONSTS(15)*CONSTS(11))
      ALGBRC(8) = ( - CONSTS(19)*STATES(1) ** CONSTS(20))/(CONSTS(21) ** CONSTS(20)+STATES(1) ** CONSTS(20))
      ALGBRC(10) =  3.00000*CONSTS(40) -  2.00000*ALGBRC(9)
      ALGBRC(11) =  (( CONSTS(23)*STATES(1))/(STATES(1)+CONSTS(22)))*(ALGBRC(5) - ALGBRC(10))
      RATES(1) = ALGBRC(13)+ CONSTS(9)*ALGBRC(8)+ALGBRC(11)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(6) =  (STATES(1) ** CONSTS(24)/(CONSTS(25) ** CONSTS(24)+STATES(1) ** CONSTS(24)))*1.00000
      ALGBRC(4) = STATES(2)+STATES(3)+STATES(4)+STATES(5)
      ALGBRC(3) = (VOI - CONSTS(1)) -  CONSTS(41)*INT((VOI - CONSTS(1))/CONSTS(41))
      ALGBRC(5) = TERNRY(VOI.LE.CONSTS(1), CONSTS(2), TERNRY(VOI.GT.CONSTS(1).AND.ALGBRC(3).LE.CONSTS(3).AND.VOI.LE.CONSTS(1)+ CONSTS(41)*CONSTS(6), CONSTS(4), CONSTS(2))
      ALGBRC(7) = 1.00000/(1.00000+EXP((CONSTS(16) - ALGBRC(5))/CONSTS(17)))
      ALGBRC(9) =  (( CONSTS(10)*CONSTS(12))/( CONSTS(38)*CONSTS(11)))*log(CONSTS(14)/STATES(1))
      ALGBRC(12) =  CONSTS(18)*ALGBRC(7)*(ALGBRC(5) - ALGBRC(9))
      ALGBRC(13) = - ALGBRC(12)/( 2.00000*CONSTS(15)*CONSTS(11))
      ALGBRC(8) = ( - CONSTS(19)*STATES(1) ** CONSTS(20))/(CONSTS(21) ** CONSTS(20)+STATES(1) ** CONSTS(20))
      ALGBRC(10) =  3.00000*CONSTS(40) -  2.00000*ALGBRC(9)
      ALGBRC(11) =  (( CONSTS(23)*STATES(1))/(STATES(1)+CONSTS(22)))*(ALGBRC(5) - ALGBRC(10))
      ALGBRC(1) = STATES(5)+STATES(4)
      ALGBRC(2) = STATES(5)+STATES(3)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END