According to a first aspect, it is presented a method for determining a treatment plan comprising a distribution of spots for use with ion beam therapy for providing the spots in a target volume. The method comprises the steps of: selecting energy layers to be used in the treatment plan; determining a number of spot sizes to use; generating, for each energy layer, one copy of the energy layer for each spot size to use and populating each copy with spots of the spot size for that copy; optimizing spots of all copies of all energy layers, by repeatedly varying a weight of at least a subset of the spots and calculating an effect on a performance measurement, wherein the performance measurement is calculated by combining a plurality of evaluation criteria, comprising a first criterion related to total treatment time and a second criterion related to a desired dose distribution.