The ability of a model-based real-time optimization scheme to converge to the plant optimum relies on the ability of the underlying process model to predict the plant's necessary conditions of optimality (NCO). These include the values and gradients of the active constraints as well as the gradient of the cost function. Hence, in the presence of plant-model mismatch or unmeasured disturbances, one could measure the plant NCO and use them for tracking the plant optimum. This paper shows how the optimization problem can be modified to incorporate information regarding the plant NCO. The so-called modifiers, which express the difference between the measured or estimated plant NCO and those predicted by the model, are added to the constraint and cost functions in a modified optimization problem and are adapted iteratively. Local convergence and model-adequacy issues are analyzed. The modifier-adaptation scheme is tested experimentally on a three-tank system.