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 1 entries in the algebraic variable array. C There are a total of 3 entries in each of the rate and state variable arrays. C There are a total of 2 entries in the constant variable array. C C C STATES(1) is A in component BidirectionalExampleComponent (uM). C STATES(2) is B in component BidirectionalExampleComponent (uM). C STATES(3) is C in component BidirectionalExampleComponent (uM). C ALGBRC(1) is J in component BidirectionalExampleComponent (uM_per_s). C CONSTS(1) is kf in component BidirectionalExampleComponent (per_uM_per_s). C CONSTS(2) is kr in component BidirectionalExampleComponent (per_s). C VOI is t in component BidirectionalExampleComponent (second). C RATES(1) is d/dt A in component BidirectionalExampleComponent (uM). C RATES(2) is d/dt B in component BidirectionalExampleComponent (uM). C RATES(3) is d/dt C in component BidirectionalExampleComponent (uM). C SUBROUTINE initConsts(CONSTS, RATES, STATES) REAL CONSTS(*), RATES(*), STATES(*) STATES(1) = 10 STATES(2) = 5 STATES(3) = 0 CONSTS(1) = 0.2 CONSTS(2) = 0.05 RETURN END SUBROUTINE computeRates(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = CONSTS(1)*STATES(1)*STATES(2) - CONSTS(2)*STATES(3) RATES(1) = - ALGBRC(1) RATES(2) = - ALGBRC(1) RATES(3) = ALGBRC(1) RETURN END SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC) REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*) ALGBRC(1) = CONSTS(1)*STATES(1)*STATES(2) - CONSTS(2)*STATES(3) RETURN END