Particle swarm optimization (PSO) is a classical metaheuristic algorithm. The initial form of PSO may not suitable for several optimization problems of structural engineering. A basic modification of PSO is the usage of an inertia function in order to adjust the contribution of existing values of the velocity. In several problems, the inertia function is necessary in order to keep the candidate possible solution in a possible range without an extreme increase of the velocity value. This situation is proved by employing PSO for a basic topology optimization of a truss structure. The problem is solved by using constant inertia functions from 0.1 to 1 with 0.1 increments. The inertia function is crucially effective in the performance, sensibility and computational.