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 8 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 (minute).
C STATES(1) is Rs in component Rs (number_per_cell).
C STATES(2) is L in component L (picomolar).
C STATES(3) is Cs in component Cs (number_per_cell).
C CONSTS(1) is Vs in component model_parameters (number_per_cell_minute).
C CONSTS(11) is kf in component model_parameters (second_order_rate_constant).
C CONSTS(2) is kr in component model_parameters (first_order_rate_constant).
C CONSTS(3) is kt in component model_parameters (first_order_rate_constant).
C CONSTS(4) is ksyn in component model_parameters (first_order_rate_constant).
C CONSTS(5) is ke in component model_parameters (first_order_rate_constant).
C STATES(4) is Ri in component Ri (number_per_cell).
C STATES(5) is Li in component Li (picomolar).
C STATES(6) is Ci in component Ci (number_per_cell).
C CONSTS(13) is kfe in component model_parameters (second_order_rate_constant).
C CONSTS(12) is kre in component model_parameters (first_order_rate_constant).
C CONSTS(6) is kh in component model_parameters (first_order_rate_constant).
C CONSTS(7) is kx in component model_parameters (first_order_rate_constant).
C CONSTS(8) is Ve in component model_parameters (L_per_cell).
C CONSTS(9) is NA in component model_parameters (number_per_picomole).
C STATES(7) is Ld in component Ld (number_per_cell).
C STATES(8) is Y in component Y (cell_per_L).
C CONSTS(10) is IL2 in component model_parameters (dimensionless).
C RATES(1) is d/dt Rs in component Rs (number_per_cell).
C RATES(3) is d/dt Cs in component Cs (number_per_cell).
C RATES(4) is d/dt Ri in component Ri (number_per_cell).
C RATES(6) is d/dt Ci in component Ci (number_per_cell).
C RATES(5) is d/dt Li in component Li (picomolar).
C RATES(7) is d/dt Ld in component Ld (number_per_cell).
C RATES(2) is d/dt L in component L (picomolar).
C RATES(8) is d/dt Y in component Y (cell_per_L).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 1500
      STATES(2) = 10
      STATES(3) = 1
      CONSTS(1) = 11
      CONSTS(2) = 0.0138
      CONSTS(3) = 0.007
      CONSTS(4) = 0.0011
      CONSTS(5) = 0.04
      STATES(4) = 300
      STATES(5) = 0.01
      STATES(6) = 1
      CONSTS(6) = 0.035
      CONSTS(7) = 0.15
      CONSTS(8) = 1e-14
      CONSTS(9) = 6.022e11
      STATES(7) = 1
      STATES(8) = 2.5e8
      CONSTS(10) = 1
      CONSTS(11) = TERNRY(CONSTS(10).EQ.1.00000, CONSTS(2)/11.1000, CONSTS(2)/8.20000)
      CONSTS(12) = TERNRY(CONSTS(10).EQ.1.00000,  CONSTS(2)*8.00000,  CONSTS(2)*5.00000)
      CONSTS(13) = TERNRY(CONSTS(10).EQ.1.00000, CONSTS(12)/1000.00, CONSTS(12)/3000.00)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) = ( (CONSTS(2)+CONSTS(4))*STATES(3)+CONSTS(1)) - ( CONSTS(11)*STATES(2)*STATES(1)+ CONSTS(3)*STATES(1))
      RATES(3) =  CONSTS(11)*STATES(2)*STATES(1) -  (CONSTS(2)+CONSTS(5))*STATES(3)
      RATES(4) = ( CONSTS(12)*STATES(6)+ CONSTS(3)*STATES(1)) - ( CONSTS(13)*STATES(5)*STATES(4)+ CONSTS(6)*STATES(4))
      RATES(6) = ( CONSTS(13)*STATES(5)*STATES(4)+ CONSTS(5)*STATES(3)) -  (CONSTS(12)+CONSTS(6))*STATES(6)
      RATES(5) = ( CONSTS(12)*STATES(6) -  CONSTS(13)*STATES(5)*STATES(4))/( CONSTS(8)*CONSTS(9)) -  CONSTS(7)*STATES(5)
      RATES(7) =  CONSTS(6)*STATES(6)
      RATES(2) = ( (( CONSTS(2)*STATES(3)+ CONSTS(7)*STATES(5)*CONSTS(8)*CONSTS(9)) -  CONSTS(11)*STATES(2)*STATES(1))*STATES(8))/CONSTS(9)
      RATES(8) = TERNRY(( 600.000*STATES(3))/(250.000+STATES(3)) - 200.000.GT.0.00000,  (( 600.000*STATES(3))/(250.000+STATES(3)) - 200.000)*1000.00, 0.00000)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END