This thesis creates a model of real manufacturing process and a simulation of its behaviour in the simulation environment Witness. The real system is optimized by the use of economic criteria. The thesis employs methods of simulation, modeling and optimization, which are together with the decision making, systems approach, operations research and queuing systems content of the theoretical part.