It is provided a method for optimizing a treatment plan for use in radiation therapy of a patient volume. The method is performed in a treatment planning system and comprises the steps of: obtaining a first quality function of the treatment plan, the first quality function yielding an output value based on an input treatment plan; obtaining a first pair of input values and a slope indicator, the input values associating a value of the first quality function to a value of a score; constructing a score function that maps values of the first quality function to values of the score by fitting a curve to the first pair of input values and the slope indicator; and optimizing the treatment plan with respect to the score function.