1. Method for solving an optimization task consisting of a plurality of sub-functions in the control of the operation of the elevator group, in which the optimization task is related to control functions such as allocation of elevator calls in the control of the elevator group in which method a set of plurality of solution alternatives is generated, characterized in that each sub-function is normalized, normalized cost functions of the sub-functions are generated for each solution alternative for solving the optimization task, based on the normalized cost functions of the sub-functions, a set of solutions to the optimization task is formed, from the set of solutions, the best solution is selected, if necessary, a new set of solution alternatives is generated, from which correspondingly the best solution is selected, and the apparatus is controlled in accordance with the solution thus selected.