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 4 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 5 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 k7 in component model_parameters (first_order_rate_constant).
C STATES(4) is AMp in component AMp (dimensionless).
C CONSTS(3) is k3 in component model_parameters (first_order_rate_constant).
C CONSTS(4) is k4 in component model_parameters (first_order_rate_constant).
C CONSTS(5) is k5 in component model_parameters (first_order_rate_constant).
C ALGBRC(4) is k6 in component model_parameters (first_order_rate_constant).
C ALGBRC(2) is phosphorylation in component phosphorylation (dimensionless).
C ALGBRC(3) is stress in component stress (dimensionless).
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.5
CONSTS(2) = 0.01
STATES(4) = 0.0
CONSTS(3) = 0.4
CONSTS(4) = 0.1
CONSTS(5) = 0.5
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = TERNRY(VOI.GE.0.00000.AND.VOI.LT.5.00000, 0.550000, 0.300000)
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(4) = ALGBRC(1)
RATES(4) = ( CONSTS(3)*STATES(3)+ ALGBRC(4)*STATES(2)) - (CONSTS(5)+CONSTS(4))*STATES(4)
RATES(2) = CONSTS(5)*STATES(4) - (ALGBRC(4)+CONSTS(2))*STATES(2)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(1) = TERNRY(VOI.GE.0.00000.AND.VOI.LT.5.00000, 0.550000, 0.300000)
ALGBRC(4) = ALGBRC(1)
ALGBRC(2) = STATES(4)+STATES(3)
ALGBRC(3) = STATES(4)+STATES(2)
RETURN
END
REAL FUNCTION TERNRY(TEST, VALA, VALB)
LOGICAL TEST
REAL VALA, VALB
IF (TEST) THEN
TERNRY = VALA
ELSE
TERNRY = VALB
ENDIF
RETURN
END
