Pipe design is one of the most significant research lines in the area of parabolic semi-cylindrical solar collectors. The main idea behind pipe design is to increase the capillarity angle by expanding the total area being heated, therefore boosting the work capacity of the device. Such capillarity depends on several factors, whose numerical calculations are highly complex. Moreover, some of those variables are integers, whereas some others are real; hence, it is necessary to use optimization techniques that are capable of searching in those numerical spaces. There are several optimization tools that allow individual codification as binary strings, granting the coding of integer, real, or any other, as part of the same individual. Consequently, in this paper we propose the comparison of four metaheuristics when they are utilized to maximize the capillarity angle of the pipe in a parabolic trough. Experimental results show a better performance of binary particle swarm optimization when compared against the other techniques, achieving improvements in the capillarity angle of on average 11 % in comparison with a similar study.