This article deals with optimization of the truss structure. A genetic algorithm is used for this optimization. Within the strength calculation of the truss structure a normative assessment of the beam and their buckling stability is implemented. Also, the entire calculation is designed to use only standard profiles. In the first task, the optimization is focused on the weight of the structure, and in the second, on its price. There are also developments using different population sizes for individual cases, which will be described below. At the end of the work, a hypothesis is made for the link between price optimization and weight reduction.