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 10 entries in the algebraic variable array.
C There are a total of 7 entries in each of the rate and state variable arrays.
C There are a total of 13 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is q_L in component environment (fmol).
C STATES(2) is q_K1 in component environment (fmol).
C STATES(3) is q_K2 in component environment (fmol).
C STATES(4) is q_LK1 in component environment (fmol).
C STATES(5) is q_K2P in component environment (fmol).
C STATES(6) is q_P in component environment (fmol).
C STATES(7) is q_LK1K2 in component environment (fmol).
C ALGBRC(8) is v_Re1 in component RTK (fmol_per_sec).
C ALGBRC(9) is v_Re2 in component RTK (fmol_per_sec).
C ALGBRC(10) is v_Re3 in component RTK (fmol_per_sec).
C CONSTS(1) is kappa_Re1 in component RTK_parameters (fmol_per_sec).
C CONSTS(2) is kappa_Re2 in component RTK_parameters (fmol_per_sec).
C CONSTS(3) is kappa_Re3 in component RTK_parameters (fmol_per_sec).
C CONSTS(4) is K_L in component RTK_parameters (per_fmol).
C CONSTS(5) is K_K1 in component RTK_parameters (per_fmol).
C CONSTS(6) is K_K2 in component RTK_parameters (per_fmol).
C CONSTS(7) is K_LK1 in component RTK_parameters (per_fmol).
C CONSTS(8) is K_K2P in component RTK_parameters (per_fmol).
C CONSTS(9) is K_P in component RTK_parameters (per_fmol).
C CONSTS(10) is K_LK1K2 in component RTK_parameters (per_fmol).
C CONSTS(11) is R in component constants (J_per_K_per_mol).
C CONSTS(12) is T in component constants (kelvin).
C ALGBRC(1) is mu_L in component RTK (J_per_mol).
C ALGBRC(2) is mu_K1 in component RTK (J_per_mol).
C ALGBRC(3) is mu_K2 in component RTK (J_per_mol).
C ALGBRC(4) is mu_LK1 in component RTK (J_per_mol).
C ALGBRC(5) is mu_K2P in component RTK (J_per_mol).
C ALGBRC(6) is mu_P in component RTK (J_per_mol).
C ALGBRC(7) is mu_LK1K2 in component RTK (J_per_mol).
C CONSTS(13) is F in component constants (C_per_mol).
C RATES(1) is d/dt q_L in component environment (fmol).
C RATES(2) is d/dt q_K1 in component environment (fmol).
C RATES(3) is d/dt q_K2 in component environment (fmol).
C RATES(4) is d/dt q_LK1 in component environment (fmol).
C RATES(5) is d/dt q_K2P in component environment (fmol).
C RATES(6) is d/dt q_P in component environment (fmol).
C RATES(7) is d/dt q_LK1K2 in component environment (fmol).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 1
      STATES(2) = 1e-3
      STATES(3) = 1e-3
      STATES(4) = 1e-6
      STATES(5) = 1e-9
      STATES(6) = 1
      STATES(7) = 1e-9
      CONSTS(1) = 0.000186898
      CONSTS(2) = 0.0125535
      CONSTS(3) = 132.879
      CONSTS(4) = 197.162
      CONSTS(5) = 197.162
      CONSTS(6) = 4.01297e+09
      CONSTS(7) = 0.00144219
      CONSTS(8) = 3.79118e-07
      CONSTS(9) = 2.54645e+07
      CONSTS(10) = 2.14714e-05
      CONSTS(11) = 8.31
      CONSTS(12) = 310
      CONSTS(13) = 96485
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  CONSTS(11)*CONSTS(12)*log( CONSTS(4)*STATES(1))
      ALGBRC(2) =  CONSTS(11)*CONSTS(12)*log( CONSTS(5)*STATES(2))
      ALGBRC(4) =  CONSTS(11)*CONSTS(12)*log( CONSTS(7)*STATES(4))
      ALGBRC(8) =  CONSTS(1)*(EXP((ALGBRC(1)+ALGBRC(2))/( CONSTS(11)*CONSTS(12))) - EXP(ALGBRC(4)/( CONSTS(11)*CONSTS(12))))
      RATES(1) = - ALGBRC(8)
      RATES(2) = - ALGBRC(8)
      ALGBRC(3) =  CONSTS(11)*CONSTS(12)*log( CONSTS(6)*STATES(3))
      ALGBRC(7) =  CONSTS(11)*CONSTS(12)*log( CONSTS(10)*STATES(7))
      ALGBRC(9) =  CONSTS(2)*(EXP((ALGBRC(4)+ALGBRC(3))/( CONSTS(11)*CONSTS(12))) - EXP(ALGBRC(7)/( CONSTS(11)*CONSTS(12))))
      RATES(3) = - ALGBRC(9)
      ALGBRC(5) =  CONSTS(11)*CONSTS(12)*log( CONSTS(8)*STATES(5))
      ALGBRC(6) =  CONSTS(11)*CONSTS(12)*log( CONSTS(9)*STATES(6))
      ALGBRC(10) =  CONSTS(3)*(EXP((ALGBRC(6)+ALGBRC(7))/( CONSTS(11)*CONSTS(12))) - EXP((ALGBRC(4)+ALGBRC(5))/( CONSTS(11)*CONSTS(12))))
      RATES(4) = (ALGBRC(8) - ALGBRC(9))+ALGBRC(10)
      RATES(5) = ALGBRC(10)
      RATES(6) = - ALGBRC(10)
      RATES(7) = ALGBRC(9) - ALGBRC(10)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) =  CONSTS(11)*CONSTS(12)*log( CONSTS(4)*STATES(1))
      ALGBRC(2) =  CONSTS(11)*CONSTS(12)*log( CONSTS(5)*STATES(2))
      ALGBRC(4) =  CONSTS(11)*CONSTS(12)*log( CONSTS(7)*STATES(4))
      ALGBRC(8) =  CONSTS(1)*(EXP((ALGBRC(1)+ALGBRC(2))/( CONSTS(11)*CONSTS(12))) - EXP(ALGBRC(4)/( CONSTS(11)*CONSTS(12))))
      ALGBRC(3) =  CONSTS(11)*CONSTS(12)*log( CONSTS(6)*STATES(3))
      ALGBRC(7) =  CONSTS(11)*CONSTS(12)*log( CONSTS(10)*STATES(7))
      ALGBRC(9) =  CONSTS(2)*(EXP((ALGBRC(4)+ALGBRC(3))/( CONSTS(11)*CONSTS(12))) - EXP(ALGBRC(7)/( CONSTS(11)*CONSTS(12))))
      ALGBRC(5) =  CONSTS(11)*CONSTS(12)*log( CONSTS(8)*STATES(5))
      ALGBRC(6) =  CONSTS(11)*CONSTS(12)*log( CONSTS(9)*STATES(6))
      ALGBRC(10) =  CONSTS(3)*(EXP((ALGBRC(6)+ALGBRC(7))/( CONSTS(11)*CONSTS(12))) - EXP((ALGBRC(4)+ALGBRC(5))/( CONSTS(11)*CONSTS(12))))
      RETURN
      END