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 4 entries in each of the rate and state variable arrays.
C There are a total of 12 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C STATES(1) is M in component M (dimensionless).
C STATES(2) is AM in component AM (dimensionless).
C STATES(3) is Mp in component Mp (dimensionless).
C ALGBRC(1) is k1 in component model_parameters (first_order_rate_constant).
C CONSTS(1) is k2 in component model_parameters (first_order_rate_constant).
C CONSTS(2) is gx in component model_parameters (first_order_rate_constant).
C STATES(4) is AMp in component AMp (dimensionless).
C CONSTS(3) is fp in component model_parameters (first_order_rate_constant).
C CONSTS(4) is gp in component model_parameters (first_order_rate_constant).
C CONSTS(5) is k5 in component model_parameters (first_order_rate_constant).
C ALGBRC(2) is k6 in component model_parameters (first_order_rate_constant).
C CONSTS(6) is fp1 in component model_parameters (first_order_rate_constant).
C CONSTS(7) is gp1 in component model_parameters (first_order_rate_constant).
C CONSTS(8) is g1 in component model_parameters (first_order_rate_constant).
C CONSTS(9) is gp3 in component model_parameters (first_order_rate_constant).
C CONSTS(10) is g3 in component model_parameters (first_order_rate_constant).
C CONSTS(11) is g2 in component model_parameters (first_order_rate_constant).
C CONSTS(12) is gp2 in component model_parameters (first_order_rate_constant).
C RATES(1) is d/dt M in component M (dimensionless).
C RATES(3) is d/dt Mp in component Mp (dimensionless).
C RATES(4) is d/dt AMp in component AMp (dimensionless).
C RATES(2) is d/dt AM in component AM (dimensionless).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
STATES(1) = 1.0
STATES(2) = 0.0
STATES(3) = 0.0
CONSTS(1) = 0.1
CONSTS(2) = 0.11
STATES(4) = 0.0
CONSTS(3) = 0.44
CONSTS(4) = 0.11
CONSTS(5) = 0.1
CONSTS(6) = 0.88
CONSTS(7) = 0.22
CONSTS(8) = 0.01
CONSTS(9) = 3.00000*CONSTS(7)
CONSTS(10) = 3.00000*CONSTS(8)
CONSTS(11) = 20.0000*CONSTS(8)
CONSTS(12) = 4.00000*(CONSTS(6)+CONSTS(7))
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = TERNRY(VOI.GT.0.00000.AND.VOI.LT.5.00000, 0.350000, 0.0600000)
RATES(1) = - ( ALGBRC(1)*STATES(1))+ CONSTS(1)*STATES(3)+ CONSTS(2)*STATES(2)
RATES(3) = ( CONSTS(4)*STATES(4)+ ALGBRC(1)*STATES(1)) - (CONSTS(1)+CONSTS(3))*STATES(3)
ALGBRC(2) = ALGBRC(1)
RATES(4) = ( CONSTS(3)*STATES(3)+ ALGBRC(2)*STATES(2)) - (CONSTS(5)+CONSTS(4))*STATES(4)
RATES(2) = CONSTS(5)*STATES(4) - (ALGBRC(2)+CONSTS(2))*STATES(2)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = TERNRY(VOI.GT.0.00000.AND.VOI.LT.5.00000, 0.350000, 0.0600000)
ALGBRC(2) = ALGBRC(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
