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 31 entries in the algebraic variable array.
C There are a total of 12 entries in each of the rate and state variable arrays.
C There are a total of 32 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C ALGBRC(1) is q_L_B1_init in component environment (fmol).
C CONSTS(1) is q_R_B1_init in component environment (fmol).
C CONSTS(2) is q_Gs_init in component environment (fmol).
C CONSTS(3) is q_LR_B1_init in component environment (fmol).
C CONSTS(4) is q_LR_B1Gs_init in component environment (fmol).
C CONSTS(5) is q_B1d_init in component environment (fmol).
C CONSTS(6) is q_BARK_init in component environment (fmol).
C CONSTS(7) is q_LR_B1_BARK_init in component environment (fmol).
C CONSTS(8) is q_LR_B1Gs_BARK_init in component environment (fmol).
C CONSTS(9) is q_B1p_init in component environment (fmol).
C CONSTS(10) is q_PKACI_init in component environment (fmol).
C CONSTS(11) is q_R_PKACI_init in component environment (fmol).
C ALGBRC(3) is q_L_B1 in component environment (fmol).
C ALGBRC(2) is q_R_B1 in component environment (fmol).
C ALGBRC(5) is q_Gs in component environment (fmol).
C ALGBRC(7) is q_LR_B1 in component environment (fmol).
C ALGBRC(9) is q_LR_B1Gs in component environment (fmol).
C ALGBRC(11) is q_B1d in component environment (fmol).
C ALGBRC(13) is q_BARK in component environment (fmol).
C ALGBRC(15) is q_LR_B1_BARK in component environment (fmol).
C ALGBRC(18) is q_LR_B1Gs_BARK in component environment (fmol).
C ALGBRC(4) is q_B1p in component environment (fmol).
C ALGBRC(6) is q_PKACI in component environment (fmol).
C ALGBRC(8) is q_R_PKACI in component environment (fmol).
C STATES(1) is q_L_B1 in component B1AR (fmol).
C STATES(2) is q_R_B1 in component B1AR (fmol).
C STATES(3) is q_Gs in component B1AR (fmol).
C STATES(4) is q_LR_B1 in component B1AR (fmol).
C STATES(5) is q_LR_B1Gs in component B1AR (fmol).
C STATES(6) is q_B1d in component B1AR (fmol).
C STATES(7) is q_BARK in component B1AR (fmol).
C STATES(8) is q_LR_B1_BARK in component B1AR (fmol).
C STATES(9) is q_LR_B1Gs_BARK in component B1AR (fmol).
C STATES(10) is q_B1p in component B1AR (fmol).
C STATES(11) is q_PKACI in component B1AR (fmol).
C STATES(12) is q_R_PKACI in component B1AR (fmol).
C CONSTS(12) is kappa_B11 in component B1AR_parameters (fmol_per_sec).
C CONSTS(13) is kappa_B12 in component B1AR_parameters (fmol_per_sec).
C CONSTS(14) is kappa_B21 in component B1AR_parameters (fmol_per_sec).
C CONSTS(15) is kappa_B22 in component B1AR_parameters (fmol_per_sec).
C CONSTS(16) is kappa_P1 in component B1AR_parameters (fmol_per_sec).
C CONSTS(17) is kappa_P2 in component B1AR_parameters (fmol_per_sec).
C CONSTS(18) is K_L_B1 in component B1AR_parameters (per_fmol).
C CONSTS(19) is K_R_B1 in component B1AR_parameters (per_fmol).
C CONSTS(20) is K_Gs in component B1AR_parameters (per_fmol).
C CONSTS(21) is K_LR_B1 in component B1AR_parameters (per_fmol).
C CONSTS(22) is K_LR_B1Gs in component B1AR_parameters (per_fmol).
C CONSTS(23) is K_B1d in component B1AR_parameters (per_fmol).
C CONSTS(24) is K_BARK in component B1AR_parameters (per_fmol).
C CONSTS(25) is K_LR_B1_BARK in component B1AR_parameters (per_fmol).
C CONSTS(26) is K_LR_B1Gs_BARK in component B1AR_parameters (per_fmol).
C CONSTS(27) is K_B1p in component B1AR_parameters (per_fmol).
C CONSTS(28) is K_PKACI in component B1AR_parameters (per_fmol).
C CONSTS(29) is K_R_PKACI in component B1AR_parameters (per_fmol).
C CONSTS(30) is R in component constants (J_per_K_per_mol).
C CONSTS(31) is T in component constants (kelvin).
C ALGBRC(28) is vB11 in component B1AR (fmol_per_sec).
C ALGBRC(29) is vB12 in component B1AR (fmol_per_sec).
C ALGBRC(30) is vB21 in component B1AR (fmol_per_sec).
C ALGBRC(31) is vB22 in component B1AR (fmol_per_sec).
C ALGBRC(17) is vP1 in component B1AR (fmol_per_sec).
C ALGBRC(19) is vP2 in component B1AR (fmol_per_sec).
C ALGBRC(20) is mu_L_B1 in component B1AR (J_per_mol).
C ALGBRC(10) is mu_R_B1 in component B1AR (J_per_mol).
C ALGBRC(21) is mu_Gs in component B1AR (J_per_mol).
C ALGBRC(22) is mu_LR_B1 in component B1AR (J_per_mol).
C ALGBRC(23) is mu_LR_B1Gs in component B1AR (J_per_mol).
C ALGBRC(24) is mu_B1d in component B1AR (J_per_mol).
C ALGBRC(25) is mu_BARK in component B1AR (J_per_mol).
C ALGBRC(26) is mu_LR_B1_BARK in component B1AR (J_per_mol).
C ALGBRC(27) is mu_LR_B1Gs_BARK in component B1AR (J_per_mol).
C ALGBRC(12) is mu_B1p in component B1AR (J_per_mol).
C ALGBRC(14) is mu_PKACI in component B1AR (J_per_mol).
C ALGBRC(16) is mu_R_PKACI in component B1AR (J_per_mol).
C CONSTS(32) is F in component constants (C_per_mol).
C RATES(1) is d/dt q_L_B1 in component B1AR (fmol).
C RATES(2) is d/dt q_R_B1 in component B1AR (fmol).
C RATES(3) is d/dt q_Gs in component B1AR (fmol).
C RATES(4) is d/dt q_LR_B1 in component B1AR (fmol).
C RATES(6) is d/dt q_B1d in component B1AR (fmol).
C RATES(7) is d/dt q_BARK in component B1AR (fmol).
C RATES(8) is d/dt q_LR_B1_BARK in component B1AR (fmol).
C RATES(5) is d/dt q_LR_B1Gs in component B1AR (fmol).
C RATES(9) is d/dt q_LR_B1Gs_BARK in component B1AR (fmol).
C RATES(10) is d/dt q_B1p in component B1AR (fmol).
C RATES(11) is d/dt q_PKACI in component B1AR (fmol).
C RATES(12) is d/dt q_R_PKACI in component B1AR (fmol).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 0.00005
      CONSTS(2) = 0.00015
      CONSTS(3) = 0
      CONSTS(4) = 0.0000508778
      CONSTS(5) = 0
      CONSTS(6) = 0.0228
      CONSTS(7) = 0.0000508778
      CONSTS(8) = 0.0000508778
      CONSTS(9) = 0
      CONSTS(10) = 0.000221209
      CONSTS(11) = 0.008778
      STATES(1) = 1e-16
      STATES(2) = 1e-16
      STATES(3) = 1e-16
      STATES(4) = 1e-16
      STATES(5) = 1e-16
      STATES(6) = 1e-16
      STATES(7) = 1e-16
      STATES(8) = 1e-16
      STATES(9) = 1e-16
      STATES(10) = 1e-16
      STATES(11) = 1e-16
      STATES(12) = 1e-16
      CONSTS(12) = 0.000282928
      CONSTS(13) = 128604
      CONSTS(14) = 0.000200356
      CONSTS(15) = 91071.1
      CONSTS(16) = 2.28764e-05
      CONSTS(17) = 10398.4
      CONSTS(18) = 2.90698e-08
      CONSTS(19) = 1849.44
      CONSTS(20) = 0.0410501
      CONSTS(21) = 0.0242248
      CONSTS(22) = 0.0342084
      CONSTS(23) = 2.90698e-08
      CONSTS(24) = 0.226042
      CONSTS(25) = 0.226042
      CONSTS(26) = 0.319199
      CONSTS(27) = 1.13021e-09
      CONSTS(28) = 7.19049e-05
      CONSTS(29) = 2.79561
      CONSTS(30) = 8.31
      CONSTS(31) = 310
      CONSTS(32) = 96485
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = STATES(2)+CONSTS(1)
      ALGBRC(10) =  CONSTS(30)*CONSTS(31)*log( CONSTS(19)*ALGBRC(2))
      ALGBRC(6) = STATES(11)+CONSTS(10)
      ALGBRC(14) =  CONSTS(30)*CONSTS(31)*log( CONSTS(28)*ALGBRC(6))
      ALGBRC(8) = STATES(12)+CONSTS(11)
      ALGBRC(16) =  CONSTS(30)*CONSTS(31)*log( CONSTS(29)*ALGBRC(8))
      ALGBRC(17) =  CONSTS(16)*(EXP((ALGBRC(10)+ALGBRC(14))/( CONSTS(30)*CONSTS(31))) - EXP(ALGBRC(16)/( CONSTS(30)*CONSTS(31))))
      RATES(2) = - ALGBRC(17)
      RATES(10) = - ALGBRC(17)
      ALGBRC(4) = STATES(10)+CONSTS(9)
      ALGBRC(12) =  CONSTS(30)*CONSTS(31)*log( CONSTS(27)*ALGBRC(4))
      ALGBRC(19) =  CONSTS(17)*(EXP(ALGBRC(16)/( CONSTS(30)*CONSTS(31))) - EXP((ALGBRC(14)+ALGBRC(12))/( CONSTS(30)*CONSTS(31))))
      RATES(11) = ALGBRC(19) - ALGBRC(17)
      RATES(12) = ALGBRC(17) - ALGBRC(19)
      ALGBRC(7) = STATES(4)+CONSTS(3)
      ALGBRC(22) =  CONSTS(30)*CONSTS(31)*log( CONSTS(21)*ALGBRC(7))
      ALGBRC(13) = STATES(7)+CONSTS(6)
      ALGBRC(25) =  CONSTS(30)*CONSTS(31)*log( CONSTS(24)*ALGBRC(13))
      ALGBRC(15) = STATES(8)+CONSTS(7)
      ALGBRC(26) =  CONSTS(30)*CONSTS(31)*log( CONSTS(25)*ALGBRC(15))
      ALGBRC(28) =  CONSTS(12)*(EXP((ALGBRC(22)+ALGBRC(25))/( CONSTS(30)*CONSTS(31))) - EXP(ALGBRC(26)/( CONSTS(30)*CONSTS(31))))
      RATES(4) = - ALGBRC(28)
      ALGBRC(1) = TERNRY( sin( 2.00000* 3.14159265358979*VOI).GT.0.100000, 0.000100000, 1.00000e-06)
      ALGBRC(3) = STATES(1)+ALGBRC(1)
      ALGBRC(20) =  CONSTS(30)*CONSTS(31)*log( CONSTS(18)*ALGBRC(3))
      ALGBRC(11) = STATES(6)+CONSTS(5)
      ALGBRC(24) =  CONSTS(30)*CONSTS(31)*log( CONSTS(23)*ALGBRC(11))
      ALGBRC(29) =  CONSTS(13)*(EXP(ALGBRC(26)/( CONSTS(30)*CONSTS(31))) - EXP((ALGBRC(25)+ALGBRC(24)+ALGBRC(20))/( CONSTS(30)*CONSTS(31))))
      RATES(8) = ALGBRC(28) - ALGBRC(29)
      ALGBRC(9) = STATES(5)+CONSTS(4)
      ALGBRC(23) =  CONSTS(30)*CONSTS(31)*log( CONSTS(22)*ALGBRC(9))
      ALGBRC(18) = STATES(9)+CONSTS(8)
      ALGBRC(27) =  CONSTS(30)*CONSTS(31)*log( CONSTS(26)*ALGBRC(18))
      ALGBRC(30) =  CONSTS(14)*(EXP((ALGBRC(23)+ALGBRC(25))/( CONSTS(30)*CONSTS(31))) - EXP(ALGBRC(27)/( CONSTS(30)*CONSTS(31))))
      RATES(5) = - ALGBRC(30)
      ALGBRC(5) = STATES(3)+CONSTS(2)
      ALGBRC(21) =  CONSTS(30)*CONSTS(31)*log( CONSTS(20)*ALGBRC(5))
      ALGBRC(31) =  CONSTS(15)*(EXP(ALGBRC(27)/( CONSTS(30)*CONSTS(31))) - EXP((ALGBRC(25)+ALGBRC(24)+ALGBRC(20)+ALGBRC(21))/( CONSTS(30)*CONSTS(31))))
      RATES(1) = ALGBRC(29)+ALGBRC(31)
      RATES(3) = ALGBRC(31)
      RATES(6) = ALGBRC(29)+ALGBRC(31)
      RATES(7) = ((ALGBRC(29)+ALGBRC(31)) - ALGBRC(28)) - ALGBRC(30)
      RATES(9) = ALGBRC(30) - ALGBRC(31)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(2) = STATES(2)+CONSTS(1)
      ALGBRC(10) =  CONSTS(30)*CONSTS(31)*log( CONSTS(19)*ALGBRC(2))
      ALGBRC(6) = STATES(11)+CONSTS(10)
      ALGBRC(14) =  CONSTS(30)*CONSTS(31)*log( CONSTS(28)*ALGBRC(6))
      ALGBRC(8) = STATES(12)+CONSTS(11)
      ALGBRC(16) =  CONSTS(30)*CONSTS(31)*log( CONSTS(29)*ALGBRC(8))
      ALGBRC(17) =  CONSTS(16)*(EXP((ALGBRC(10)+ALGBRC(14))/( CONSTS(30)*CONSTS(31))) - EXP(ALGBRC(16)/( CONSTS(30)*CONSTS(31))))
      ALGBRC(4) = STATES(10)+CONSTS(9)
      ALGBRC(12) =  CONSTS(30)*CONSTS(31)*log( CONSTS(27)*ALGBRC(4))
      ALGBRC(19) =  CONSTS(17)*(EXP(ALGBRC(16)/( CONSTS(30)*CONSTS(31))) - EXP((ALGBRC(14)+ALGBRC(12))/( CONSTS(30)*CONSTS(31))))
      ALGBRC(7) = STATES(4)+CONSTS(3)
      ALGBRC(22) =  CONSTS(30)*CONSTS(31)*log( CONSTS(21)*ALGBRC(7))
      ALGBRC(13) = STATES(7)+CONSTS(6)
      ALGBRC(25) =  CONSTS(30)*CONSTS(31)*log( CONSTS(24)*ALGBRC(13))
      ALGBRC(15) = STATES(8)+CONSTS(7)
      ALGBRC(26) =  CONSTS(30)*CONSTS(31)*log( CONSTS(25)*ALGBRC(15))
      ALGBRC(28) =  CONSTS(12)*(EXP((ALGBRC(22)+ALGBRC(25))/( CONSTS(30)*CONSTS(31))) - EXP(ALGBRC(26)/( CONSTS(30)*CONSTS(31))))
      ALGBRC(1) = TERNRY( sin( 2.00000* 3.14159265358979*VOI).GT.0.100000, 0.000100000, 1.00000e-06)
      ALGBRC(3) = STATES(1)+ALGBRC(1)
      ALGBRC(20) =  CONSTS(30)*CONSTS(31)*log( CONSTS(18)*ALGBRC(3))
      ALGBRC(11) = STATES(6)+CONSTS(5)
      ALGBRC(24) =  CONSTS(30)*CONSTS(31)*log( CONSTS(23)*ALGBRC(11))
      ALGBRC(29) =  CONSTS(13)*(EXP(ALGBRC(26)/( CONSTS(30)*CONSTS(31))) - EXP((ALGBRC(25)+ALGBRC(24)+ALGBRC(20))/( CONSTS(30)*CONSTS(31))))
      ALGBRC(9) = STATES(5)+CONSTS(4)
      ALGBRC(23) =  CONSTS(30)*CONSTS(31)*log( CONSTS(22)*ALGBRC(9))
      ALGBRC(18) = STATES(9)+CONSTS(8)
      ALGBRC(27) =  CONSTS(30)*CONSTS(31)*log( CONSTS(26)*ALGBRC(18))
      ALGBRC(30) =  CONSTS(14)*(EXP((ALGBRC(23)+ALGBRC(25))/( CONSTS(30)*CONSTS(31))) - EXP(ALGBRC(27)/( CONSTS(30)*CONSTS(31))))
      ALGBRC(5) = STATES(3)+CONSTS(2)
      ALGBRC(21) =  CONSTS(30)*CONSTS(31)*log( CONSTS(20)*ALGBRC(5))
      ALGBRC(31) =  CONSTS(15)*(EXP(ALGBRC(27)/( CONSTS(30)*CONSTS(31))) - EXP((ALGBRC(25)+ALGBRC(24)+ALGBRC(20)+ALGBRC(21))/( CONSTS(30)*CONSTS(31))))
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END
Source
Derived from workspace BG_B1AR at changeset 3a8c75951d44.
Collaboration
To begin collaborating on this work, please use your git client and issue this command:
License
The terms of use/license for this work is unspecified.