# Effects of Decision Variables Selection on Sewer Optimization Problem
## 2 Methods
### Artificial Protozoa Optimizer (APO)  
The artificial protozoa optimizer (APO) is a recent bio-inspired metaheuristic algorithm proposed with the goal of dealing with complex optimization problems for different applications, ranging from engineering design to image segmentation [34]. APO derives inspiration from protozoa's survival mechanisms, more particularly considering foraging, dormancy, and reproductive behavior. In return, these behaviors contribute to the algorithm's capacity of exploring and exploiting search space. In this section, a detailed account of the algorithm, along with its mathematical models and pseudo code for implementation, is presented. The algorithm starts by initializing the initial solutions and parameters of the algorithm, such as the population size and the maximum number of function evaluations. This lets the algorithm get into the state before the iterative process of optimization starts. The optimization loop begins by checking if the termination criteria; in this case, the maximum number of evaluations (_MaxFEs_) is met. If the condition is satisfied, the algorithm stops; otherwise, it proceeds to the next step. At this level, the population's protozoa are ranked according to their fitness values. The ranking made here is important because it is what permits the algorithm to classify the protozoa in terms of the performance regarding the optimization problem. Following the classification, the algorithm performs an evaluation of the behavior exhibited by each of the protozoa and determines the course of foraging, dormancy, or reproduction. This is the most critical process in the decision mechanism, and the adaptability and efficiency of the APO algorithm strongly rely on it. For protozoa during the foraging process, the algorithm differentiates autotrophic and non-autotrophic ones. Autotrophic protozoa generate new protozoa with a particular foraging behavior modeled by Equation (11). The general equation of foraging behavior modeled by Equation (12)is used to express the foraging behavior of non-autotrophic protozoa. Protozoa in the dormancy state give rise to new protozoa following the behavior depicted by Equation (13). Dormancy behavior is modeled to represent how the protozoa can survive in unfavorable situations through reduced activity and energy preservation. On the other hand, protozoa not in the dormancy state reproduce to produce new protozoa following Equation (14). Reproduction is carried out as a process whereby the population is diversified and continuously improved from new genetic materials. After the foraging, dormancy, or reproduction, the algorithm updates the evaluation and updating of the protozoa population. The newly generated protozoa are then evaluated for their fitness, and the population is updated with those individuals. If a better solution to this evaluation is found, the global optimum solution is also updated. The steps of the optimization loop are carried out until some predefined termination criteria are met. Through this iterative population improvement and utilization of the different behaviors of protozoa, the APO algorithm becomes competent to navigate its solution space towards finding an optimal solution. When the maximum allowable number of function evaluations is conducted or another stopping condition satisfied, the algorithm stops and gives the best solution found so far. This detailed approach makes the APO algorithm remain robust, adaptive, and efficient in solving complex optimization problems. \[X_{i}^{new}=X_{i}+f\cdot\left(X_{j}-X_{i}+\frac{1}{np}\cdot\sum_{k=1}^{np}w_{ a}(X_{k-}-X_{k+})\right)\bigodot M_{f}, \tag{11}\]  
Here, \(X_{i}^{new}\) represents the new position of the protozoan, and \(X_{i}\) is its current time step position. \(X_{j}\) denotes a randomly picked up the position of some other protozoan, and \(np\) is the total number of pairs for neighboring.