We study optimization problems extended by a flexible objective, namely the Ordered Median Function (OMF). The OMF incorporates a large number of objectives into one function. Concrete objectives are given by choosing values for a parameter vector. Using optimization problems extended by the OMF, only one model, solution algorithm and implementation is necessary to analyze many concrete objectives. In this paper, we propose a general framework to model optimization problems extended by the OMF. The approach is based on a formulation of the OMF using partial sums of sorted values. It is problem independent and can be applied to any optimization problem if a linear or mixed-integer linear representation of the set of feasible solutions is available. Furthermore, it can be applied without any further linearizations. Using the presented modeling framework practioners are able to compare and evaluate different objective functions without changing the model and implementation. This is especially useful in an early stage of problem solving and if the most adequate objective is not yet known. Exemplarily we show how the approach can be applied to optimization problems from the areas of location, routing and scheduling. (C) 2016 Elsevier B.V. All rights reserved.