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 13 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 29 entries in the constant variable array.
C
C
C STATES(1) is P_Open in component kinetics (dimensionless).
C STATES(2) is P_Closed in component kinetics (dimensionless).
C STATES(3) is P_I1 in component kinetics (dimensionless).
C STATES(4) is P_I2 in component kinetics (dimensionless).
C VOI is time in component environment (ms).
C ALGBRC(3) is current in component stimulus_protocol (nA_per_nF).
C ALGBRC(4) is voltage_out in component environment (mV).
C ALGBRC(5) is transmembranevoltage in component environment (mV).
C ALGBRC(2) is pressure in component environment (mmHg).
C ALGBRC(1) is stretch in component stimulus_protocol (dimensionless).
C CONSTS(1) is pressure_stim_offset in component environment (ms).
C CONSTS(2) is pressure_stim_period in component environment (ms).
C CONSTS(3) is pressure_stim_duration in component environment (ms).
C CONSTS(4) is pressure_stim_amplitude in component environment (dimensionless).
C CONSTS(5) is current_stim_offset in component environment (ms).
C CONSTS(6) is current_stim_period in component environment (ms).
C CONSTS(7) is current_stim_duration in component environment (ms).
C CONSTS(8) is current_stim_amplitude in component environment (nA_per_nF).
C CONSTS(9) is current_stim_end in component environment (ms).
C CONSTS(10) is current_N_period_total in component environment (dimensionless).
C CONSTS(11) is current_N_period_applied in component environment (dimensionless).
C CONSTS(12) is r1 in component kinetics (per_ms).
C CONSTS(13) is r3 in component kinetics (per_ms).
C CONSTS(14) is r4 in component kinetics (per_ms).
C CONSTS(15) is r5 in component kinetics (per_ms).
C CONSTS(16) is r6 in component kinetics (per_ms).
C CONSTS(17) is r7 in component kinetics (per_ms).
C CONSTS(18) is r8 in component kinetics (per_ms).
C CONSTS(19) is ce1 in component kinetics (dimensionless).
C CONSTS(20) is ce3 in component kinetics (dimensionless).
C CONSTS(21) is ce4 in component kinetics (dimensionless).
C CONSTS(22) is cm4 in component kinetics (dimensionless).
C CONSTS(23) is ce5 in component kinetics (dimensionless).
C CONSTS(24) is ce6 in component kinetics (dimensionless).
C CONSTS(25) is ce7 in component kinetics (dimensionless).
C CONSTS(26) is ce8 in component kinetics (dimensionless).
C CONSTS(27) is r2 in component kinetics (per_ms).
C CONSTS(28) is ce2 in component kinetics (dimensionless).
C CONSTS(29) is cm2 in component kinetics (dimensionless).
C ALGBRC(6) is p_O_I1 in component kinetics (per_ms).
C ALGBRC(7) is p_I1_O in component kinetics (per_ms).
C ALGBRC(8) is p_I1_C in component kinetics (per_ms).
C ALGBRC(9) is p_C_I1 in component kinetics (per_ms).
C ALGBRC(10) is p_C_O in component kinetics (per_ms).
C ALGBRC(11) is p_O_C in component kinetics (per_ms).
C ALGBRC(12) is p_I2_O in component kinetics (per_ms).
C ALGBRC(13) is p_O_I2 in component kinetics (per_ms).
C RATES(1) is d/dt P_Open in component kinetics (dimensionless).
C RATES(2) is d/dt P_Closed in component kinetics (dimensionless).
C RATES(3) is d/dt P_I1 in component kinetics (dimensionless).
C RATES(4) is d/dt P_I2 in component kinetics (dimensionless).
C
SUBROUTINE initConsts(CONSTS, RATES, STATES)
REAL CONSTS(*), RATES(*), STATES(*)
STATES(1) = 0.0
STATES(2) = 0.3
STATES(3) = 0.1
STATES(4) = 0.6
CONSTS(1) = 100
CONSTS(2) = 2000
CONSTS(3) = 5
CONSTS(4) = 1.1
CONSTS(5) = 100
CONSTS(6) = 1000
CONSTS(7) = 500
CONSTS(8) = 80
CONSTS(9) = 999999999999999
CONSTS(10) = 1
CONSTS(11) = 1
CONSTS(12) = 0.02634342
CONSTS(13) = 0.0008000712
CONSTS(14) = 0.008945307
CONSTS(15) = 1.3529515e-5
CONSTS(16) = 6.206403e-5
CONSTS(17) = 6.603723e-6
CONSTS(18) = 0.00079357607
CONSTS(19) = -2.3753126
CONSTS(20) = -5.6010337
CONSTS(21) = 0.70629007
CONSTS(22) = -12.101605
CONSTS(23) = 6.46389
CONSTS(24) = -1.2173947
CONSTS(25) = 8.739162
CONSTS(26) = -3.364573
CONSTS(27) = ( CONSTS(12)*CONSTS(13)*CONSTS(15))/( CONSTS(14)*CONSTS(16))
CONSTS(28) = ((CONSTS(19)+CONSTS(20)+CONSTS(23)) - CONSTS(21)) - CONSTS(24)
CONSTS(29) = - CONSTS(22)
RETURN
END
SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(3) = TERNRY(VOI.GE.CONSTS(5).AND.VOI.LT.CONSTS(9).AND. INT(MOD(VOI - CONSTS(5), CONSTS(6))).LE.CONSTS(7).AND. INT(MOD(VOI - CONSTS(5), CONSTS(10)*CONSTS(6))).LT. CONSTS(11)*CONSTS(6), CONSTS(8), 0.00000)
ALGBRC(4) = (ALGBRC(3)/1.00000)*1.00000
ALGBRC(6) = CONSTS(12)*EXP(( CONSTS(19)*ALGBRC(4))/140.000)
ALGBRC(1) = TERNRY(VOI.GE.CONSTS(1).AND. INT(MOD(VOI - CONSTS(1), CONSTS(2))).LE.CONSTS(3), CONSTS(4), 1.00000)
ALGBRC(2) = 350.000*MAX(2, 0.00000, ALGBRC(1) - 1.00000)
ALGBRC(7) = CONSTS(27)*EXP(( CONSTS(28)*ALGBRC(4))/140.000+( CONSTS(29)*ALGBRC(2))/70.0000)
ALGBRC(8) = CONSTS(13)*EXP(( CONSTS(20)*ALGBRC(4))/140.000)
ALGBRC(9) = CONSTS(14)*EXP(( CONSTS(21)*ALGBRC(4))/140.000+( CONSTS(22)*ALGBRC(2))/70.0000)
RATES(3) = - (ALGBRC(7)+ALGBRC(8))*STATES(3)+ ALGBRC(9)*STATES(2)+ ALGBRC(6)*STATES(1)
ALGBRC(10) = CONSTS(15)*EXP(( CONSTS(23)*ALGBRC(4))/140.000)
ALGBRC(11) = CONSTS(16)*EXP(( CONSTS(24)*ALGBRC(4))/140.000)
RATES(2) = - (ALGBRC(9)+ALGBRC(10))*STATES(2)+ ALGBRC(11)*STATES(1)+ ALGBRC(8)*STATES(3)
ALGBRC(12) = CONSTS(17)*EXP(( (( CONSTS(25)*ALGBRC(4))/140.000)*ALGBRC(2))/70.0000)
ALGBRC(13) = CONSTS(18)*EXP(( CONSTS(26)*ALGBRC(4))/140.000)
RATES(1) = - (ALGBRC(6)+ALGBRC(13)+ALGBRC(11))*STATES(1)+ ALGBRC(10)*STATES(2)+ ALGBRC(7)*STATES(3)+ ALGBRC(12)*STATES(4)
RATES(4) = - ALGBRC(12)*STATES(4)+ ALGBRC(13)*STATES(1)
RETURN
END
SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
ALGBRC(3) = TERNRY(VOI.GE.CONSTS(5).AND.VOI.LT.CONSTS(9).AND. INT(MOD(VOI - CONSTS(5), CONSTS(6))).LE.CONSTS(7).AND. INT(MOD(VOI - CONSTS(5), CONSTS(10)*CONSTS(6))).LT. CONSTS(11)*CONSTS(6), CONSTS(8), 0.00000)
ALGBRC(4) = (ALGBRC(3)/1.00000)*1.00000
ALGBRC(6) = CONSTS(12)*EXP(( CONSTS(19)*ALGBRC(4))/140.000)
ALGBRC(1) = TERNRY(VOI.GE.CONSTS(1).AND. INT(MOD(VOI - CONSTS(1), CONSTS(2))).LE.CONSTS(3), CONSTS(4), 1.00000)
ALGBRC(2) = 350.000*MAX(2, 0.00000, ALGBRC(1) - 1.00000)
ALGBRC(7) = CONSTS(27)*EXP(( CONSTS(28)*ALGBRC(4))/140.000+( CONSTS(29)*ALGBRC(2))/70.0000)
ALGBRC(8) = CONSTS(13)*EXP(( CONSTS(20)*ALGBRC(4))/140.000)
ALGBRC(9) = CONSTS(14)*EXP(( CONSTS(21)*ALGBRC(4))/140.000+( CONSTS(22)*ALGBRC(2))/70.0000)
ALGBRC(10) = CONSTS(15)*EXP(( CONSTS(23)*ALGBRC(4))/140.000)
ALGBRC(11) = CONSTS(16)*EXP(( CONSTS(24)*ALGBRC(4))/140.000)
ALGBRC(12) = CONSTS(17)*EXP(( (( CONSTS(25)*ALGBRC(4))/140.000)*ALGBRC(2))/70.0000)
ALGBRC(13) = CONSTS(18)*EXP(( CONSTS(26)*ALGBRC(4))/140.000)
ALGBRC(5) = (ALGBRC(4) - 5.00000)*STATES(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
