The process industries are characterized by a large number of continuously operating plants, for which optimal operation is of economic importance. However, optimal operation is particularly difficult to achieve when the process model used in the optimization is inaccurate or in the presence of process disturbances. In highly automated plants, optimal operation is typically addressed by a decision hierarchy involving several levels that include plant scheduling, real-time optimization (RTO), and process control. At the RTO level, medium-term decisions are made by considering economic objectives explicitly. This step typically relies on an optimizer that determines the optimal steady-state operating point under slowly changing conditions such as catalyst decay or changes in raw material quality. This optimal operating point is characterized by setpoints that are passed to lower-level controllers. Model-based RTO typically involves nonlinear first-principles models that describe the steady-state behavior of the plant. Since accurate models are rarely available in industrial applications, RTO typically proceeds using an iterative two-step approach, namely a parameter estimation step followed by an optimization step. The idea is to repeatedly estimate selected uncertain model parameters and use the updated model to generate new inputs via optimization. This way, the model is expected to yield a better description of the plant at its current operating point. The classical two-step approach works well provided that (i) there is little structural plant-model mismatch, and (ii) the changing operating conditions provide sufficient excitation for estimating the uncertain model parameters. Unfortunately, such conditions are rarely met in practice and, in the presence of plant-model mismatch, the algorithm might not converge to the plant optimum, or worse, to a feasible operating point. As far as feasibility is concerned, the updated model should be able to match the plant constraints. Alternatively, feasibility can be enforced without requiring the solution of a parameter estimation problem by adding plant-model bias terms to the model outputs. These biases are obtained by subtracting the model outputs from the measured plant outputs. A bias-update scheme, where the bias terms are used to modify the constraints in the steady-state optimization problem, has been used in industry. However, the analysis of this scheme has received little attention in the research community. In the context of this thesis, such an RTO scheme is referred to as constraint adaptation. The constraint-adaptation scheme is studied, and its local convergence properties are analyzed. Constraint adaptation guarantees reaching a feasible operating point upon convergence. However, the constraints might be violated during the iterations of the algorithm, even when starting the adaptation from within the feasible region. Constraint violations can be avoided by controlling the constraints in