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 8 entries in the algebraic variable array.
C There are a total of 1 entries in each of the rate and state variable arrays.
C There are a total of 10 entries in the constant variable array.
C
C
C VOI is time in component environment (minute).
C CONSTS(1) is BFM in component muscle_O2_delivery (L_per_minute).
C CONSTS(2) is OVA in component muscle_O2_delivery (mL_per_L).
C CONSTS(3) is HM in component muscle_O2_delivery (dimensionless).
C CONSTS(4) is AOM in component muscle_O2_delivery (dimensionless).
C CONSTS(10) is O2ARTM in component M_O2_blood_supply (mL_per_minute).
C ALGBRC(5) is RMO in component delivery_of_O2_to_M_tissues (mL_per_minute).
C ALGBRC(6) is PVO in component M_venous_O2_content (mmHg).
C CONSTS(5) is EXC in component parameter_values (dimensionless).
C CONSTS(6) is EXCXP2 in component parameter_values (dimensionless).
C ALGBRC(7) is OVS in component M_venous_O2_content (dimensionless).
C ALGBRC(2) is PMO in component pressure_of_O2_in_M_tissue_cells (mmHg).
C ALGBRC(4) is MMO in component metabolic_O2_consumption_by_M_tissue (mL_per_minute).
C ALGBRC(3) is P2O in component metabolic_O2_consumption_by_M_tissue (mmHg).
C CONSTS(7) is OMM in component parameter_values (mL_per_minute).
C CONSTS(8) is PM5 in component parameter_values (per_mmHg).
C ALGBRC(1) is QOM in component volume_of_O2_in_M_tissue (mL).
C ALGBRC(8) is DO2M in component volume_of_O2_in_M_tissue (mL_per_minute).
C STATES(1) is QOM1 in component volume_of_O2_in_M_tissue (mL).
C CONSTS(9) is PK2 in component parameter_values (mmHg_per_mL).
C RATES(1) is d/dt QOM1 in component volume_of_O2_in_M_tissue (mL).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 0.989949
      CONSTS(2) = 204.497
      CONSTS(3) = 40.0381
      CONSTS(4) = 1.00002
      CONSTS(5) = 1
      CONSTS(6) = 0.17
      CONSTS(7) = 57.1
      CONSTS(8) = 30
      STATES(1) = 48.0839
      CONSTS(9) = 0.79167
      CONSTS(10) =  CONSTS(2)*CONSTS(1)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = TERNRY(STATES(1).LT.0.000100000, 0.000100000, STATES(1))
      ALGBRC(2) =  CONSTS(9)*ALGBRC(1)
CALL minimize(minfunc_0, CONSTS, VARIABLES, <VAR>)
      ALGBRC(3) = TERNRY(ALGBRC(2).GT.38.0000, 38.0000, ALGBRC(2))
      ALGBRC(4) =  CONSTS(4)*CONSTS(7)*CONSTS(5)*(1.00000 - 38.0001 - ALGBRC(3) ** 3.00000/54872.0)
      ALGBRC(8) = ALGBRC(5) - ALGBRC(4)
      RATES(1) = ALGBRC(8)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = TERNRY(STATES(1).LT.0.000100000, 0.000100000, STATES(1))
      ALGBRC(2) =  CONSTS(9)*ALGBRC(1)
      ALGBRC(3) = TERNRY(ALGBRC(2).GT.38.0000, 38.0000, ALGBRC(2))
      ALGBRC(4) =  CONSTS(4)*CONSTS(7)*CONSTS(5)*(1.00000 - 38.0001 - ALGBRC(3) ** 3.00000/54872.0)
      ALGBRC(8) = ALGBRC(5) - ALGBRC(4)
      RETURN
      END
REAL FUNCTION minfunc_0(CONSTS, VARIABLES)
            REAL CONSTS(*), VARIABLES(*) 
      minfunc_0[1] = abs(ALGBRC(7) - (CONSTS(10) - ALGBRC(5))/( CONSTS(3)*5.25000*CONSTS(1)))
      minfunc_0[2] = abs(ALGBRC(6) -  57.1400*ALGBRC(7)*CONSTS(5) ** CONSTS(6))
      minfunc_0[3] = abs(ALGBRC(5) -  (ALGBRC(6) - ALGBRC(2))*CONSTS(8)*CONSTS(1))
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END