*3.1. Velocity Tests*

Given that for simulations over extended periods, the calculation times can be relevant; this aspect has always constituted a preoccupation for the program's developers. The program was originally developed in FORTRAN [15], with its successive adaptations. This way, when the original FORTRAN routines were converted to C language, the developers proceeded to make comparisons in terms of execution times [16] as well as result precision [17].

A series of tests will be done in order to support the previously mentioned statements. On the one hand, velocity tests have been carried out in order to measure calculation times for both options (EPA SWMM 5 Interface and SWMM Toolkit). A total of 9 cases in which network size, rain duration and rain-runoff simulation are modified have been performed for each option. Just as it was done during the SWMM 4-SWMM 5 transition [16], and with the hopes of ensuring equality of conditions, every case was processed with the same computer.

In order to see the effect that is obtained as a result of modifications in network size, three specific networks have been chosen and they are shown in Figure 3. The first network (Net1) corresponds to the network that is available in the program's manual [14]. It is rather simple, as it consists of 5 nodes and 4 pipelines. The second network (Net2) is obtained by simplifying the sewer network of a district of Bogotá (Colombia) and consists of 82 nodes and 83 links. Finally, the third case corresponds to the Xirivella network (Spain). This network possesses all the elements that are typically found in a network, such as pumping stations, sewer overflows, waste water treatment plant, etc. It has 916 nodes and 931 links.

**Figure 3.** Networks used for calculation time evaluation.

On the other hand, three different rain situations have been tested. In the first situation, once again the expected rain that is provided in the SWMM user's manual sample is used. It consists of a 6-h long rainfall period, with intensity values that change every hour, and a 12-h long simulation. The second rain period corresponds to the data collected in a rain gage located in Almassora (Spain). All the records corresponding to October 2000 have been processed, with a 31-day long simulation and a rain time interval of one hour. Finally, for each of the three networks runoff, hydrographs obtained with the rain in case 1 have been collected. These hydrographs have been assigned as direct inflows in each of the nodes, and the hydraulic simulation has been done exclusively, thus avoiding hydrologic calculations.

In order to compare the differences in simulation times, the 9 cases (three networks ˆ three rain events) have all been simulated using both the EPA SWMM native interface and the Toolkit. Execution times have been annotated for every case. For the comparison, a small application that allowed the measuring of the time employed in the calculation with millisecond precision was used. Ten simulations were carried out for each case in which some parameters such as slopes or diameters were changed. Total spent time was also measured for every simulation. The results of this test are shown in Table 2.


**Table 2.** Execution time comparison (in milliseconds).

It is possible to draw certain conclusions from the previous results. On the one hand, the greater the size of the network, the more time is required to calculate it. These data are obvious; however, it can also be observed that, the greater the size of the network, a larger percentage of time is spent in archive manipulation. When the Toolkit is used, there is a 25% time saving for network 1, 33% for network 2, and 77% for network 3 if the rain lasts 6 hours. It can also be observed that memory data manipulation slows down the process, that is, as the time that is destined for calculation increases, the relative importance of the time employed in archive data decreases. This is also an expected conclusion; however, when analyzing the results obtained in case 2, what is stated in the previous paragraph is ratified, since the Toolkit reduces the calculation time for a month-long rain by 0.2% for network 1, 4.2% for network 2 and 9.2% for network 3. Finally, the previous execution of the hydrologic calculation to write the results as direct inflow in a new archive supposes time savings of 10% in every case. Put differently, once the new archive without hydrologic data but with an entrance hydrograph for each node is obtained, the Toolkit may reduce calculation time by 10% when comparing this with the same operation using the EPA SWMM interface.

Short but intense rain periods are generally used in the optimization process, very similar to those seen in the case that was previously described. In these situations, one can observe how the Toolkit may significantly contribute to savings in calculation times. The larger the network, the more time saved. As has been observed, the saving may exceed 75% for very large networks.
