Urban morphology is a result of the interconnection of various factors, such as climate, economy, traditions and culture. Urban districts had been developed in order to find the most efficient structure, to establish the optimal street network and to provide the high level of land use. The spatial organization of urban districts as well as the geometrical shape of the buildings has direct connection with the urban microclimate and with the energy consumption of the district. Compact urban structures with low surface to volume ratio have big potential to minimize the cooling and heating loads of the buildings. Urban patterns with high density provide the maximal economical efficiency with the reduction of the resources spent for the provision of the transport, energy, water and wastewater infrastructure. Within the research the relation between the building density and the surface to volume of the urban pattern were studied in order to generate the optimized solution. The six parametric models of the different urban morphologies were established. Within the algorithms the geometrical properties of the buildings, such as height, width and length could be changed, but the plot remained fixed. The Galapagos Evolutionary Solver was used as a tool in order to find the set of parameters, which brings to the urban pattern the optimal combination of density and surface to volume ratio. Among all tested patterns the rectangular and the trapezoidal urban blocks with relatively small dimensions of the base and bigger number of floors had demonstrated the highest economical and energy performance. Annotation English