An embodiment can include one or more computer readable media storing executable instructions for performing execution scheduling for code generated from an executable graphical model. Systems that are capable of selecting the operating mode and operating in the continuous conduction mode or the discontinuous conduction mode are also disclosed. The reaction of the alkali salts of chlorite and chlorate and acid produces chlorine dioxide in-situ in the water of the industrial water system.