I am simulating the rather complex process of algae and bacteria dynamics in a waste water treatment plant using Simulink (MATLAB varsion 2012a). A snapshot illustrating the model set-up is attached. All dynamics are defined in a MATLAB S-function and simulations are done using the ode15s...