This research  addresses the optimisation of building envelopes in order to minimise the amount of carbon dioxide emitted due to the energy employed for heating, cooling and lighting the internal environment. The objective is achieved by exploiting a global optimisation method called Particle Swarm Optimisation (PSO), inspired by the social behaviour of flocks of birds, schools of fish and swarms of bees and wasps. The nature suggests that the optimal solution can be identified by a number of "particles" moving in the search space; they are attracted by their own historical best position and by the global best position found so far in the group. The PSO algorithm is suited to solve continuous problems, but some variants allow for adaptation to binary and integer problems. Some real problems include categorical variables that cannot be processed directly with the PSO method. In order to tackle this sort of problem, in this thesis we propose an innovative PSO method, which is based on a different way of updating the qualitative components in the vector that identifies the position of each particle. The application of the method to two versions of a real case study shows good results.