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 3 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 9 entries in the constant variable array. C C C VOI is t in component main (second). C STATES(1) is q_1 in component main (mole). C STATES(2) is q_2 in component main (mole). C CONSTS(1) is q in component main (mole). C CONSTS(2) is E_tot in component main (mole). C ALGBRC(1) is v in component main (mol_per_s). C CONSTS(3) is kappa_3 in component main (mol_per_s). C CONSTS(4) is kappa_4 in component main (mol_per_s). C CONSTS(5) is K_s in component main (per_mol). C CONSTS(6) is K_m in component main (per_mol). C CONSTS(8) is k_m in component main (mole). C CONSTS(9) is v_max in component main (mol_per_s). C ALGBRC(2) is v_MM in component main (mol_per_s). C CONSTS(7) is q20 in component main (mole). C ALGBRC(3) is v_0 in component main (mol_per_s). C RATES(1) is d/dt q_1 in component main (mole). C RATES(2) is d/dt q_2 in component main (mole). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 10 STATES(2) = 0 CONSTS(1) = 0 CONSTS(2) = 10 CONSTS(3) = 1 CONSTS(4) = 0.1 CONSTS(5) = 0.1 CONSTS(6) = 1 CONSTS(7) = 0 CONSTS(8) = 2.00000/( CONSTS(5)*(1.00000+CONSTS(3)/CONSTS(4))) CONSTS(9) = ( CONSTS(2)*CONSTS(3)*CONSTS(6))/(1.00000+CONSTS(3)/CONSTS(4)) RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = ( CONSTS(2)*CONSTS(3)*CONSTS(4)*CONSTS(6)*CONSTS(5)*(STATES(1) - STATES(2)))/( 2.00000*CONSTS(4)+ (CONSTS(3)+CONSTS(4))*CONSTS(5)*(STATES(1)+STATES(2))+ 2.00000*CONSTS(3)*CONSTS(5)*CONSTS(5)*STATES(1)*STATES(2)) RATES(1) = - ALGBRC(1) RATES(2) = ALGBRC(1) - 0.100000*STATES(2) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = ( CONSTS(2)*CONSTS(3)*CONSTS(4)*CONSTS(6)*CONSTS(5)*(STATES(1) - STATES(2)))/( 2.00000*CONSTS(4)+ (CONSTS(3)+CONSTS(4))*CONSTS(5)*(STATES(1)+STATES(2))+ 2.00000*CONSTS(3)*CONSTS(5)*CONSTS(5)*STATES(1)*STATES(2)) ALGBRC(2) = ( CONSTS(9)*STATES(1))/(CONSTS(8)+STATES(1)) ALGBRC(3) = ( CONSTS(2)*CONSTS(3)*CONSTS(4)*CONSTS(6)*CONSTS(5)*(STATES(1) - CONSTS(7)))/( 2.00000*CONSTS(4)+ (CONSTS(3)+CONSTS(4))*CONSTS(5)*(STATES(1)+CONSTS(7))+ 2.00000*CONSTS(3)*CONSTS(5)*CONSTS(5)*STATES(1)*CONSTS(7)) RETURN END