C C There are a total of 5 entries in the algebraic variable array. C There are a total of 2 entries in each of the rate and state variable arrays. C There are a total of 7 entries in the constant variable array. C C C VOI is time in component environment (second). C ALGBRC(1) is kappa_L1 in component rate_constants (per_second). C CONSTS(1) is kappa_P1 in component rate_constants (per_second). C ALGBRC(3) is kappa_L2 in component rate_constants (per_second). C CONSTS(2) is kappa_P2 in component rate_constants (per_second). C CONSTS(3) is kappa_L2_0 in component rate_constants (per_second). C CONSTS(4) is kappa_L2_1 in component rate_constants (per_second). C ALGBRC(2) is Kd_Ca in component rate_constants (nanomolar). C CONSTS(5) is n in component rate_constants (dimensionless). C STATES(1) is Ca_i in component cytosolic_calcium (nanomolar). C CONSTS(6) is Ca_o in component cytosolic_calcium (nanomolar). C ALGBRC(4) is Ca_i_ss in component cytosolic_calcium (nanomolar). C CONSTS(7) is gamma in component cytosolic_calcium (dimensionless). C STATES(2) is Ca_s in component subspace_calcium (nanomolar). C ALGBRC(5) is Ca_s_ss in component subspace_calcium (nanomolar). C RATES(1) is d/dt Ca_i in component cytosolic_calcium (nanomolar). C RATES(2) is d/dt Ca_s in component subspace_calcium (nanomolar). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) CONSTS(1) = 0.132 CONSTS(2) = 3.78 CONSTS(3) = 0.054 CONSTS(4) = 2.4 CONSTS(5) = 3 STATES(1) = 75 CONSTS(6) = 2000000.0 CONSTS(7) = 0.24 STATES(2) = 5300.0 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.40.0000, 5.00000e-06, 2.00000e-05) ALGBRC(2) = TERNRY(VOI.GE.0.00000.AND.VOI.LT.80.0000, 1.00000, 0.500000) ALGBRC(3) = CONSTS(3)+CONSTS(4)/(1.00000+( 1000.00*ALGBRC(2))/STATES(1) ** CONSTS(5)) RATES(1) = - (ALGBRC(1)+CONSTS(1)+ CONSTS(7)*(ALGBRC(3)+CONSTS(2)))*STATES(1)+ CONSTS(7)*ALGBRC(3)*STATES(2)+ ALGBRC(1)*CONSTS(6) RATES(2) = (ALGBRC(3)+CONSTS(2))*STATES(1) - ALGBRC(3)*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.40.0000, 5.00000e-06, 2.00000e-05) ALGBRC(2) = TERNRY(VOI.GE.0.00000.AND.VOI.LT.80.0000, 1.00000, 0.500000) ALGBRC(3) = CONSTS(3)+CONSTS(4)/(1.00000+( 1000.00*ALGBRC(2))/STATES(1) ** CONSTS(5)) ALGBRC(4) = CONSTS(6)/(1.00000+CONSTS(1)/ALGBRC(1)) ALGBRC(5) = ALGBRC(4)*(1.00000+CONSTS(2)/ALGBRC(3)) RETURN END REAL FUNCTION TERNRY(TEST, VALA, VALB) LOGICAL TEST REAL VALA, VALB IF (TEST) THEN TERNRY = VALA ELSE TERNRY = VALB ENDIF RETURN END