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 2 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 35 entries in the constant variable array.
C
C
C VOI is time in component environment (hour).
C STATES(1) is GH in component GH (ng_ml).
C CONSTS(1) is GHS in component GH (dimensionless).
C CONSTS(2) is k1 in component GH (first_order_rate_constant).
C CONSTS(3) is kr1 in component GH (ng_ml_hr).
C CONSTS(4) is t1 in component GH (pg_ml).
C CONSTS(5) is n1 in component GH (dimensionless).
C CONSTS(6) is n2 in component GH (dimensionless).
C CONSTS(7) is g0 in component GH (dimensionless).
C CONSTS(8) is ng0 in component GH (dimensionless).
C CONSTS(9) is tg0 in component GH (dimensionless).
C CONSTS(10) is t2 in component GH (pg_ml).
C STATES(2) is SRIF_PeV in component SRIF_PeV (pg_ml).
C CONSTS(34) is F1_GHS in component F (dimensionless).
C STATES(3) is GHRH in component GHRH (pg_ml).
C STATES(4) is ghr_GHRH in component ghr_GHRH (pg_ml).
C CONSTS(11) is k4 in component SRIF_PeV (first_order_rate_constant).
C CONSTS(12) is kr4 in component SRIF_PeV (pg_ml_hr).
C CONSTS(13) is t5 in component SRIF_PeV (ng_ml).
C CONSTS(14) is n5 in component SRIF_PeV (dimensionless).
C CONSTS(15) is S_basal in component SRIF_PeV (pg_ml_hr).
C STATES(5) is SRIF_ArC in component SRIF_ArC (pg_ml).
C CONSTS(16) is k2 in component SRIF_ArC (first_order_rate_constant).
C CONSTS(17) is kr2 in component SRIF_ArC (pg_ml_hr).
C CONSTS(18) is t3 in component SRIF_ArC (pg_ml).
C CONSTS(19) is n3 in component SRIF_ArC (dimensionless).
C CONSTS(20) is k3 in component GHRH (first_order_rate_constant).
C CONSTS(21) is kr3 in component GHRH (pg_ml_hr).
C CONSTS(22) is t4 in component GHRH (pg_ml).
C CONSTS(23) is n4 in component GHRH (dimensionless).
C CONSTS(35) is F2_GHS in component F (dimensionless).
C CONSTS(24) is g1 in component F (dimensionless).
C CONSTS(25) is g2 in component F (dimensionless).
C CONSTS(26) is tg1 in component F (dimensionless).
C CONSTS(27) is tg2 in component F (dimensionless).
C CONSTS(28) is ng1 in component F (dimensionless).
C CONSTS(29) is ng2 in component F (dimensionless).
C ALGBRC(2) is dghr_GHRH_dt in component ghr_GHRH (pg_ml_hr).
C ALGBRC(1) is inject in component ghr_GHRH (pg_ml_hr).
C CONSTS(30) is kghr in component ghr_GHRH (first_order_rate_constant).
C CONSTS(31) is C in component ghr_GHRH (pg_ml_hr).
C CONSTS(32) is onset in component ghr_GHRH (hour).
C CONSTS(33) is duration in component ghr_GHRH (hour).
C RATES(1) is d/dt GH in component GH (ng_ml).
C RATES(2) is d/dt SRIF_PeV in component SRIF_PeV (pg_ml).
C RATES(5) is d/dt SRIF_ArC in component SRIF_ArC (pg_ml).
C RATES(3) is d/dt GHRH in component GHRH (pg_ml).
C RATES(4) is d/dt ghr_GHRH in component ghr_GHRH (pg_ml).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      STATES(1) = 0.0
      CONSTS(1) = 20.0
      CONSTS(2) = 3.0
      CONSTS(3) = 600.0
      CONSTS(4) = 357.0
      CONSTS(5) = 5.0
      CONSTS(6) = 2.0
      CONSTS(7) = 2.0
      CONSTS(8) = 2.9
      CONSTS(9) = 200.0
      CONSTS(10) = 10.0
      STATES(2) = 0.0
      STATES(3) = 0.0
      STATES(4) = 0.0
      CONSTS(11) = 25.0
      CONSTS(12) = 20400.0
      CONSTS(13) = 10.0
      CONSTS(14) = 2.0
      CONSTS(15) = 900.0
      STATES(5) = 0.0
      CONSTS(16) = 25.0
      CONSTS(17) = 2200.0
      CONSTS(18) = 400.0
      CONSTS(19) = 2.0
      CONSTS(20) = 40.0
      CONSTS(21) = 63000.0
      CONSTS(22) = 28.0
      CONSTS(23) = 5.0
      CONSTS(24) = 90000.0
      CONSTS(25) = 100.0
      CONSTS(26) = 390.0
      CONSTS(27) = 10000.0
      CONSTS(28) = 3.0
      CONSTS(29) = 2.0
      CONSTS(30) = 15.0
      CONSTS(31) = 10000.0
      CONSTS(32) = 2.0
      CONSTS(33) = 0.2
      CONSTS(34) =  CONSTS(24)*(CONSTS(1)/CONSTS(26) ** CONSTS(28)/(1.00000+CONSTS(1)/CONSTS(26) ** CONSTS(28)))
      CONSTS(35) =  CONSTS(25)*(CONSTS(1)/CONSTS(27) ** CONSTS(29)/(1.00000+CONSTS(1)/CONSTS(27) ** CONSTS(29)))
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) =  CONSTS(3)*((STATES(3)+STATES(4))/CONSTS(4) ** CONSTS(5)/((STATES(3)+STATES(4))/CONSTS(4) ** CONSTS(5)+1.00000)+ CONSTS(7)*(CONSTS(1)/CONSTS(9) ** CONSTS(8)/(1.00000+CONSTS(1)/CONSTS(9) ** CONSTS(8)))+(1.00000+CONSTS(34))/(1.00000+STATES(2)/CONSTS(10) ** CONSTS(6)+CONSTS(34))) -  CONSTS(2)*STATES(1)
      RATES(2) = - ( CONSTS(11)*STATES(2))+ CONSTS(12)*(STATES(1)/CONSTS(13) ** CONSTS(14)/(STATES(1)/CONSTS(13) ** CONSTS(14)+1.00000))+CONSTS(15)
      RATES(5) =  CONSTS(17)*((STATES(3)+STATES(4))/CONSTS(18) ** CONSTS(19)/(1.00000+(STATES(3)+STATES(4))/CONSTS(18) ** CONSTS(19))) -  CONSTS(16)*STATES(5)
      RATES(3) = ( CONSTS(21)*((1.00000+CONSTS(35))/(1.00000+(STATES(2)+STATES(5))/CONSTS(22) ** CONSTS(23)+CONSTS(35)))+ STATES(4)*1.00000) -  CONSTS(20)*STATES(3)
      ALGBRC(1) = TERNRY(VOI.LT.CONSTS(32), 0.00000, TERNRY(VOI.GE.CONSTS(32).AND.VOI.LE.CONSTS(32)+CONSTS(33), CONSTS(31), TERNRY(VOI.GT.CONSTS(32)+CONSTS(33), 0.00000, 0.0/0.0)
      RATES(4) = ALGBRC(1) -  CONSTS(30)*STATES(4)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = TERNRY(VOI.LT.CONSTS(32), 0.00000, TERNRY(VOI.GE.CONSTS(32).AND.VOI.LE.CONSTS(32)+CONSTS(33), CONSTS(31), TERNRY(VOI.GT.CONSTS(32)+CONSTS(33), 0.00000, 0.0/0.0)
      ALGBRC(2) = ALGBRC(1) -  CONSTS(30)*STATES(4)
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END