We propose a novel prediction-optimization framework to maximize the prediction output over different possible options on control variables, where the relationship in each plant is captured via a regression model. We utilize nonlinear programming to model the system of production plants for both single-period and multi-period problems. For piecewise linear regressors, we reformulate them into mixed-integer linear programs. For highly nonlinear models, we propose primal-dual optimization algorithms and a derivative-free optimization to solve the nonlinear problems. We provide a flexible optimization approach that can take in regression functions without derivative information, such as random trees, and those with derivatives, such as neural networks. We test the performance of these models using an oil and gas client dataset.