A new approach to the optimal control with constraints is proposed to achieve a desired end product quality, and a modified kernel partial least-squares (KPLS) is used to build the combining model of nonlinear processes. The particle swarm optimization algorithm is used to solve the optimal problem. The contributions of the article are as follows: The modified KPLS is proposed for the optimal control purpose, and the optimal manipulated variables are computed for the next batch run based on modified KPLS. The proposed approach is applied to a bulk polymerization of styrene batch process and fused magnesium furnace. Simulation results show the proposed approach is effective for predicting the control profile of next batch run.