Determination of the operating conditions of a field under a set of physical system constraints (e.g. compressor limits) and engineering preferences (e.g. voidage replacement) is a primary concern for petroleum engineers. Rule-based systems have been proposed for this but the process is most suitably defined as an optimization problem. An optimization procedure utilizing Mixed Integer Linear Programming (MILP) is proposed in this study. Well rates that honour system and engineering constraints are simultaneously handled while the maximum for an objective is sought (e.g. field oil rate or cash revenue). Optimal rates for the current conditions of the field are determined. Note that this amounts to instantaneous optimization, hence cannot account for recurrent events such as water break-throughs. Nevertheless, an efficient and robust instantaneous optimizer is useful within a grander optimization scheme, within short forecast periods and also in real-time allocation situations. The proposed approach is able to efficiently handle the nonlinearities in the system by way of piece-wise linear functions. Also due to the formulation of the problem, the exact optimal solution is guaranteed to be found. Another property of the approach is that, in cases where it is not possible to simultaneously honour all the targets and limits of the system, a scheme is introduced that allows the engineer to prioritize the constraints. This prioritization scheme proves to be of great practical significance since most real cases have conflicting targets and limits, which result in optimization systems with no feasible solutions. Also a heuristic is introduced and utilized, that ensures realistic results by the elimination of mathematical artefacts (rate oscillations in time) that often arise when the reservoir contains wells with similar properties (e.g. WOR and GOR). The optimization system is applied to synthetic cases and two real field cases. The real field cases pose problems that cannot be handled by conventional rule-based systems.