The production optimization problem can be viewed as a scheduling problem. Intuitively, to sweep efficiently, the production wells in a high permeability region should be closed early on while the production wells in a low permeability region should be opened initially. In this Rotenone paper, a new approach to the optimization of oil production under water-flooding is presented using optimal switching time method. The parameterized control variables use a special form of bang–bang (on–off) control settings. Hence, in this case, the switching time is defined as the time when a well changes from an on to an off mode, and vice versa. The gradient of a single switching time is computed explicitly by evaluating the Hamiltonian on the left and the right limit with respect to the time control, which becomes the main contribution of this paper. Some examples of realistic reservoir settings are presented to show the potential application of the proposed method. It should be mentioned that Sudaryanto and Yortsos (2000) state the shape of the optimal solutions sometimes be of the bang–bang type. However, birds is unclear under what conditions the optimal setting can be happened to have bang–bang optimal solution. The sufficient conditions for optimality are described by Zandvliet (2008), where they demonstrate the switching time method gives a better performance compare to the reactive control method. The gradient is calculated using a dynamic multi-phase reservoir simulator, MoReS.