A method for manufacturing a workpiece with a predefined sequence of machine tools by a computer-controlled manufacturing machine with an optimal tool configuration, said machine tools being located at respective locations set by the optimal tool configuration and being assigned to respective, precalculated operation times, and a machine including a tool transfer point and a tool handler for moving a selected tool from a respective location of the respective locations to the transfer point, the method comprising:
- a) allocating initial locations of the machine tools, and calculating for all tools i) a first transfer time function, returning a time between the respective location and the transfer point, and ii) a second transfer time function, returning a time of a tool handler movement without moving a tool;
- b) generating possible tool location sequences as a random set of tool location sequences;
- c) calculating a respective first cost factor for possible tool location sequences utilizing a first cost function utilizing the first and second transfer time functions;
- d) ranking tool location sequences obtained in step c) in accordance with the respective first cost factor, a subset of the tool location sequences with a lowest first cost factor being utilized as a selected set of tool location sequences, new tool location sequences being explored based on the selected set of tool location sequences and the new tool location sequences being added to the selected set of tool location sequences, and step c) being continue to calculate the cost function and perform the ranking and selection and exploration until a predefined parameter for the number of iterations is reached, define the selected set of tool location sequences with the lowest cost function being defined as the optimal tool configuration;
- e) transferring the machine tools from their initial locations to the optimal locations in accordance with the optimal tool configuration;
- f) manufacturing the workpiece with the optimal tool configuration by the manufacturing machine.