The operation of dynamic processes can be optimized using models that predict the system behavior well, in particular its optimality features. In practice, however, process models are often structurally inaccurate, and on-line adaptation is typically required for appropriate prediction and optimization. Furthermore, it is difficult to identify process model parameters on-line during optimization because of lack of persistent excitation. This paper addresses the modeling issue for the purpose of real-time optimization. It will be shown that the models used for real-time optimization need not be valid as a whole; instead, it suffices that they represent the optimality conditions well. Two types of models are considered, namely, the traditional ”plant models” and the tailor-made ”solution models”. The features of each type, in particular their ability to be adapted using on-line measurements, are discussed and illustrated through a simple car example.