The topic of this paper is the application of nonlinear model predictive control (NMPC) for optimizing control of an offshore oil and gas production facility. Of particular interest is the use of NMPC for direct short-term production optimization, where two methods for (one-layer) production optimization in NMPC are investigated. The first method is the unreachable setpoints method where an unreachable setpoint is used in order to maximize oil production. The ideas from this method are combined with the exact penalty function for soft constraints in a second method, named infeasible soft-constraints. Both methods can be implemented within standard NMPC software tools.The case-study first looks into the use of NMPC for "conventional" pressure control, where disturbance rejection of time-varying disturbances (caused, e.g., by the 'slugging' phenomenon) is an issue. Then the above two methods for production optimization are employed, where both methods find the economically optimal operating point. Two different types of reservoir models are studied, using rate-independent and rate-dependent gas/oil ratios. These models lead to different types of optimums. The relative merits of the two methods for production optimization, and advantages of the two one-layer approaches compared to a two-layer structure, are discussed.