摘要:A sensor network was created inside a building, as part of a project. The sensors monitored the room temperature, humidity, and CO2 . The location of the sensor nodes is fixed. A serious problem was to find out how to connect these sensors in order to ensure an optimal communication in the network. Another problem was the fact that the building was atypical, so the location of the sensors could not be applied to the grid. Two optimization criteria, namely the distance between the nodes and the quality of the working environment between them, limited the present research because in addition to reinforced concrete walls and foam concrete walls, other materials were also used in the building. The problem is described by a network graph and optimized by finding its spanning tree. A new algorithm was created for finding a multi-criteria spanning tree of a network graph taking into account the constraints for the weights of the edges. The algorithm has been programmed in C language and used to solve the task. The usage of this algorithm and the whole concept of finding a multi-criteria spanning tree of a sensor network graph is a contribution to sensor network topology optimization and it can be applied in similar projects as well.