The main goal of this thesis is to implement an algorithm for building layout optimization which will take into account structural stability, possible variants of production plan, cost and other rules and constraints. These variables and constraints are defined by the members of Faculty of Civil Engineering. The optimization will be based on Simulated Annealing or Evolutionary computation. The implemented algorithm will boost the production by allowing factory buildings to count with the production requirements as well as production reconfiguration. The method will be evaluated empirically by running performance and quality tests on the provided datasets.