2.1. Robotic Cell
A RC is an integrated system in manufacturing and industrial automation that employs one or more robots, along with equipment and tools, to perform specific tasks such as assembly, welding, painting, material handling, and inspection. These cells are designed to enhance efficiency, precision, and safety in production processes. They are particularly useful for reducing labor costs, improving product quality, and operating in hazardous environments. Additional benefits of a RC include reducing human errors, enabling continuous operation, and improving product consistency. However, their implementation involves a significant investment, making it crucial to optimize their programming, particularly in transportation and processing operations, to avoid bottlenecks and maximize performance [
25].
The layout of an RC is the structural design that organizes robots, equipment, tools, and workstations within a cell to optimize workflow, minimize downtime, and maximize efficiency. Achieving an efficient design requires the consideration of factors such as material flow, optimal space utilization, safety, flexibility to adapt to changes, and equipment integration. Layouts are classified into configurations based on process requirements and space constraints. Among the most common are the following:
Linear layout: Equipment and robots are arranged sequentially for high-volume processes.
U-shaped or open layout: Optimizes space, facilitates quick access between stations, and offers greater flexibility for customized configurations.
Cellular or circular layout: Robots operate from a central position toward distributed stations, suitable for continuous or loop-based cyclic processes [
26].
Proper planning of these aspects contributes to improving costs, productivity, and the overall quality of the automated system.
Figure 1 illustrates the typical configurations of an RC.
Work area optimization focuses on strategically organizing the physical space to ensure a continuous workflow. Meanwhile, cycle time optimization reduces the time required to complete tasks by eliminating unnecessary movements. Together, these strategies enhance production speed, lower operational costs, and ensure effective and safe processes [
23].
2.2. Genetic Algorithm
A GA is an evolutionary algorithm inspired by natural selection and the biological processes of reproducing the fittest individuals. Initially, the GA generates a population of random candidate solutions, referred to as individuals or chromosomes. Each chromosome consists of a set of genes that represent the problem’s variables. The evolutionary process is governed by an iterative mechanism in which a fitness function evaluates how well a solution addresses the problem. The higher the fitness, the greater the probability of the solution being selected for the next generation [
27].
GAs employ three main operators to drive the evolutionary process:
Selection: This process determines which chromosomes will contribute to the next generation. The most common methods include Roulette Wheel, where the probability of selection is proportional to an individual’s fitness; Tournament, in which a random group of individuals is selected, and the fittest advances; and Rank Selection, which orders individuals by their fitness and assigns selection probabilities proportional to their rank.
Crossover: This operator combines pairs of chromosomes to produce new offspring. Crossovers can occur at one or two random points or follow a fixed probability to determine the crossover location.
Mutation: This introduces variability by randomly altering one or more genes in a chromosome. Mutation prevents the population from becoming trapped in local optima and enhances exploration of the search space [
28].
Figure 2 illustrates the cycle of a GA, represented as a circular flowchart. It begins with an initial population of chromosomes and progresses through key stages such as fitness evaluation, selection of the fittest individuals, crossover to generate new chromosomes, and mutation to introduce variability. These stages are repeated iteratively until a stopping criterion is met, such as a predefined number of generations or no change in the fitness value, highlighting the continuous evolutionary process toward optimal solutions.
2.3. Ant Colony Algorithm
The ACO is a search technique inspired by the collective behavior of ants in finding short paths to a food source. Ants initially move randomly until they discover food, then return to their colony while depositing pheromones along their path. These pheromones serve as a guide for other ants to follow the same route, allowing them to find the food source without moving randomly. If multiple paths to the food source exist, shorter paths will accumulate higher pheromone concentrations, making them more attractive. Conversely, longer paths will gradually lose pheromones due to their volatility. In this way, the ants collectively determine the shortest route [
29].
In an ACO, artificial ants search for solutions within a defined search space. Pheromones are represented as numerical values that reinforce the best solutions, while suboptimal ones are discarded through an evaporation process. With successive iterations, the algorithm converges towards the optimal or near-optimal solution, emulating the cooperative and adaptive behavior of a colony of ants. Mathematically, the problem is represented as a graph, where nodes correspond to states and edges represent transitions between them. An initial uniform amount of pheromone is assigned to all edges. A set of artificial ants constructs solutions by traversing the graph, starting from an initial node and building a complete solution. The probability of selecting an edge depends on the higher pheromone levels and problem-specific information, such as distance or cost [
29].
The probability
Pij of an ant selecting edge (
i,
j) is calculated as [
30]
where
τij: pheromone level on edge (i,j);
µij: heuristic value associated with edge (i,j);
α: importance of pheromones;
β: importance of heuristics.
This probabilistic selection ensures a balance between exploration of new paths and exploitation of existing high-quality solutions. Once the ants complete their solutions, the quality of each solution is evaluated based on the problem’s objective function. The pheromone levels on the transitions used in the best solutions are updated by adding pheromones. Meanwhile, the pheromone levels on other transitions are reduced by an evaporation factor, preventing stagnation in suboptimal solutions. The pheromone update is mathematically expressed as [
30]
where
∆τij: increment in pheromone on edge (i,j), typically proportional to the inverse of the solution cost or another performance metric.
ρ: evaporation rate, controlling the reduction in pheromone levels.
The above steps are repeated for a fixed number of iterations or until a stopping criterion is met, such as reaching an optimal solution.
Figure 3 illustrates the ACO cycle through a circular flowchart, highlighting the main stages of the process.
2.4. Methodology
This study proposes a dual-approach evolutionary methodology for the optimal design of RC, aimed at simultaneously improving spatial distribution (layout) and temporal efficiency (robot trajectory). The solution is structured in two main stages; the first phase employs a GA to optimize the placement of workstations within the cell, while the second phase uses an ACO algorithm to determine the most efficient trajectory of the robotic arm between those stations.
2.4.1. Geometric Modeling of the Robotic Cell Environment
The physical environment of each RC consists of a specific set of workstations with variable dimensions, an industrial robot, and a defined operating area. Each of these elements is modeled as a rectangular polygon, defined as
where (
xmin,
ymin) and (
xmax,
ymax) correspond to the opposite corners of the diagonal that delimit the area occupied by element
i, as illustrated in
Figure 4. This representation facilitates the calculation of areas, collision detection, and verification of spatial constraints.
To ensure the operational feasibility of the system, a set of geometric and kinematic constraints was incorporated into the model. These include exclusion zones for human access or maintenance, pedestrian pathways, physical interferences, and safety margins between components. In addition, clearance zones were defined to guarantee safe and ergonomic access for human operators during tasks such as assembly, disassembly, maintenance, and changeovers, activities that remain essential even in Industry 4.0 collaborative environments. Furthermore, key boundary conditions were established to guide the optimization process: (1) robot reach limitations, (2) collision avoidance between stations and the robot base, and (3) workspace limits defined by the maximum available area (L × W). These constraints collectively define the feasible design space and ensure that the resulting solutions are not only optimal but also implementable under real-world industrial conditions.
2.4.2. Design Vector and Objective Function Formulation
Once the physical environment of the RC has been defined, the problem is formulated as a combinatorial multi-objective optimization, aiming to determine the optimal spatial configuration of the workstations. The goal is to simultaneously minimize the total occupied area and the physical interferences between components.
Each workstation is encoded as a gene within a continuous design vector. Since this is a real-valued representation, each gene takes coordinates (
xi,
yi) within the allowed domain of the workspace:
where
L and
W are the dimensions of the available workspace. A complete individual (i.e., a candidate solution) is defined as
This modeling generates an initial population randomly distributed according to a uniform distribution. Based on this encoding, the algorithm evaluates two objective functions:
These objectives are combined in a weighted composite function:
where weights
w1 and
w2 allow adjusting the relative importance of each objective, prioritizing in this case the elimination of physical interferences.
2.4.3. Evolutionary Operators
Once the population is evaluated using the composite fitness function, individuals are selected to participate in the crossover stage. A binary tournament selection strategy is employed due to its balance between computational simplicity and effective selective pressure.
This process involves performing λ = N/2 independent tournaments, where N is the population size. In each tournament, two individuals are randomly selected using uniform sampling, and their performance is compared based on the objective function, which weighs both the occupied area of the layout and the number of interferences between stations. The better-performing individual is chosen as a parent.
The proposed GA relies solely on the classic one-point crossover operator. This choice is based on two key considerations:
Structured exploratory capability: crossover enables the efficient recombination of promising solutions, facilitating the transfer of useful substructures (gene blocks) between individuals without significantly disrupting the integrity of the layout.
Population stability: by omitting random mutation operators, uncontrolled dispersion in the search space is avoided, allowing smoother convergence toward feasible regions of the design space.
The crossover operator is applied with a probability Pc, generating two offspring from a randomly selected point n within the gene vector. The first offspring inherits the first n genes from the first parent and the remaining genes from the second parent; the second offspring is constructed in reverse. This scheme maintains structural diversity without the need for additional operators, which is particularly beneficial in problems where the station topology directly affects the feasibility of the resulting design.
2.4.4. General Framework of the Proposed Genetic Algorithm
The GA was implemented using the Python programming language [
31], version 3.5, within the integrated development environment (IDE) Visual Studio Code [
32], version 1.91. Experimental tests were conducted on a computer equipped with an 11th Gen Intel
® Core™ i7-11800H processor running at 2.30 GHz and 64 GB of RAM (Santa Clara, CA, USA).
The overall workflow of the algorithm is summarized in Algorithm 1, which outlines the general logic of the evolutionary process from the random generation of the initial population to the identification of the best solution found after applying the defined evolutionary operators.
Algorithm 1: GA for RC layout optimization |
1: | # Inputs: |
2: | # N: population size |
3: | # G: number of generations |
4: | # Pc: crossover probability |
5: | # w1, w2: weights for area and interference |
6: | # domain: coordinate bounds for station placement |
7: | |
8: | def genetic_algorithm(N, G, Pc, w1, w2, domain): |
9: | population = initialize_population(N, domain) # Initialize population |
10: | for individual in population: # Evaluate initial population |
11: | area = evaluate_area(individual) |
12: | interference = evaluate_interference(individual) |
13: | individual.fitness = w1 * area + w2 * interference |
14: | for generation in range(G): # Evolutionary loop |
15: | new_population = [] |
16: | while len(new_population) < N: # Tournament selection |
17: | parent1 = tournament_selection(population) |
18: | parent2 = tournament_selection(population) |
19: | if random.random() < Pc: # One-point crossover |
20: | child1, child2 = one_point_crossover(parent1, parent2) |
21: | else: |
22: | child1, child2 = parent1.copy(), parent2.copy() |
23: | new_population.extend([child1, child2]) |
24: | for individual in new_population: # Evaluate new population |
25: | area = evaluate_area(individual) |
26: | interference = evaluate_interference(individual) |
27: | individual.fitness = w1 * area + w2 * interference |
28: | population = new_population # Replace old population |
29: | best = min(population, key=lambda ind: ind.fitness) # Return best solution |
30: | return best |
31: | |
2.4.5. Sensitivity Analysis and Parameter Tuning of GA
To validate the robustness of the GA and select efficient parameter configurations, a sensitivity analysis was performed on key evolutionary parameters, population size, number of generations, crossover probability (Pc),and the weights w1 and w2 used in the composite fitness function. The aim was to assess how these values affect layout quality, station interference, and execution time.
This analysis consisted of multiple algorithms runs, where each parameter was varied systematically while holding the others constant. The impact on performance metric, such as convergence time, number of collisions, and total area were recorded for each setting.
Crossover Probability (Pc): This parameter controls how frequently the recombination operator is applied to the selected parents. Since crossover is the only evolutionary operator used, a high Pc (between 0.9 and 1.0) is recommended to promote broad exploration and prevent premature convergence. Slightly lower values (e.g., 0.8 or 0.85) may be considered if population diversity declines.
Population Size and Number of Generations: These parameters were empirically tuned based on algorithm performance under different test cases. Larger populations improve genetic diversity but increase computation time. Similarly, more generations enable deeper exploration but at higher computational cost. Tests showed that using between 30 and 100 individuals and 50 to 150 generations provided a good balance between solution quality and processing efficiency.
Weights w1 and w2 in the Composite Function: Each candidate solution was evaluated using a weighted fitness function (9) that combines two objectives: minimizing the total layout area (farea) and minimizing physical interferences between stations (finterference). The following weight combinations were tested: w1 = 1, w2 = 100; w1 = 1, w2 = 500; w1 = 1, w2 = 1000.
The final selection was based on solutions that avoided interference while maintaining compact layouts. Interference reduction was prioritized due to its critical impact on the physical feasibility of the RC.
Table 1 presents a representative subset of the results obtained, specifically the top 10 scenarios evaluated during the sensitivity analysis. Each row shows the parameter combinations that delivered the best performance in terms of layout compactness, interference elimination, and execution time. This selection highlights the most efficient configurations and provides empirical support for the final parameter choices used in the GA implementation.
The sensitivity analysis enabled the identification of efficient configurations of the GA in terms of both solution quality and execution time. The most effective parameter combination was achieved with a population size of 60,100 generations, a crossover probability Pc = 0.95, and weights w1 = 1 and w2 = 500. This configuration produced a layout with an occupied area of 81 square units, no interferences between stations, and an execution time of only 15.12 min.
This result shows that moderate parameterization can be sufficient to reach optimal solutions (in terms of population size and number of generations), provided that adequate selective pressure is maintained through crossover and that geometric feasibility is prioritized via proper weighting in the objective function.
2.4.6. Graph Model
At this stage, the goal is to optimize the robotic arm’s path between the workstations, based on the spatial configuration previously determined by the GA. To achieve this, a fully connected directed graph is constructed, where each node represents a workstation located at coordinates (x,y), and each edge corresponds to a possible path between two stations.
The graph is formally defined as
where
V = {v1, v2, …, vn} is the set of nodes representing the workstations in the optimal layout produced by the GA.
E= {(vi, vj) ∣ i≠j} is the set of edges representing all possible transitions between station pairs.
Each edge (vi,vj) is associated with a heuristic cost ηij, which can be computed based on the Euclidean distance between stations or estimated travel time considering the robot arm’s constraints, such as maximum speed and acceleration.
The graph is implemented using an adjacency matrix, where each cell stores the heuristic value and the corresponding pheromone level for that edge. This graph model serves as the foundation for applying the ACO algorithm, which aims to find the most efficient route visiting each station exactly once while minimizing the robot’s total cycle time.
Figure 5 shows an example of a graph with four stations, where the heuristic cost and pheromone level associated with each edge are illustrated.
2.4.7. Definition of ACO Parameters
The performance of ACO largely depends on the appropriate configuration of its key parameters, which govern the balance between exploration of the solution space and convergence toward optimal solutions. The following are the main components that determine the system’s behavior.
Number of ants (m): Each ant represents a tentative solution that visits all stations exactly once. One ant per station was used (m = n), allowing each ant to start from a different station to enhance diversity in graph exploration.
Initial pheromone (τ0): A uniform pheromone value was assigned to all edges at the start of the algorithm, typically ranging from 1 to 2. This neutral setting enables the evolutionary process to guide path selection based on accumulated performance.
Evaporation rate (ρ): Controls how quickly pheromone values decrease in each iteration. High values of ρ (0.4–0.5) promote exploration, while low values (0.1–0.2) promote exploitation and faster convergence. In this work, values between 0.1 and 0.5 were evaluated.
Heuristic (
ηij): Each edge (
i,
j) has a heuristic value based on the estimated travel time, considering robotic arm constraints such as maximum speed and acceleration. It is calculated as
Higher values indicate more favorable paths.
Relative importance of pheromone and heuristic (α,β): These parameters control how much the ant’s decisions are influenced by accumulated pheromone α versus the local heuristic β. In this implementation, values between 1 and 2 were used for both, promoting a balanced influence between past success and travel efficiency.
Number of iterations: A maximum of 1000 cycles was set as the stopping criterion. Alternatively, the algorithm halts if no substantial improvement is observed over 20 consecutive iterations.
A dual strategy combining intensification and diversification was implemented to guide the search process. Intensification reinforces the most promising paths by increasing pheromone levels on successful routes, while diversification promotes exploration through pheromone evaporation and the deployment of multiple ants with randomized initial routes. This balance is essential to prevent premature convergence to suboptimal solutions and to avoid excessive exploration without meaningful improvement.
2.4.8. General Scheme of the Proposed ACO
Based on the previous sections, the pseudocode summarizing the general logic of the ACO is presented. This includes the processes of route construction, total travel time evaluation, pheromone level updating, and identification of the best solution found.
The implementation was carried out using the same hardware and software resources previously employed in the execution of the GA. The complete procedure is described in Algorithm 2.
Algorithm 2: ACO for minimizing robot path time between stations |
1: | # Inputs: |
2: | # m: set number of ants |
3: | # E: iterations |
4: | # t0: initialize pheromone |
5: | # p: evaporation rate |
6: | # a: pheromone influence |
7: | # b: heuristic influence |
8: | # Q: pheromone deposit factor |
9: | |
10: | initialize_pheromone_matrix(t0) # Set initial pheromone value τ0 |
11: | calculate_heuristic_matrix(n) # Compute heuristic values based on travel time |
12: | |
13: | for interation in range(E): # ACO main loop |
14: | solutions = [] # Store all constructed paths and their travel times |
15: | for ant in range(m): # Each ant constructs a solution |
16: | current_node = randomly_select_start_station() |
17: | visited_nodes = [current_node] |
18: | tour = [current_node] |
19: | total_time = 0 |
20: | while not all_nodes_visited(visited_nodes): # Construct the full tour |
21: | next_node = select_next_node( |
22: | current_node, |
23: | visited_nodes, |
24: | pheromone_matrix, |
25: | heuristic_matrix, |
26: | a,b |
27: | ) |
28: | total_time += estimate_time(current_node, next_node) |
29: | tour.append(next_node) |
30: | visited_nodes.append(next_node) |
31: | current_node = next_node |
32: | solutions.append((tour, total_time)) # Save the solution |
33: | pheromone_matrix *= (1 − p) # Pheromone evaporation |
34: | best_solution = select_best_solution(solutions) # Pheromone update |
35: | for i in range(len(best_solution [0]) − 1): |
36: | from_node = best_solution [0][i] |
37: | to_node = best_solution [0][i+1] |
38: | pheromone_matrix[from_node][to_node] += Q/best_solution [1] |
39: | if convergence_criteria_met(): # Check for convergence or stop criteria |
40: | break |
41: | return best _solution |
42: | |
2.4.9. Sensitivity Analysis and Parameter Tuning of ACO
To assess the influence of key parameters in ACO on path optimization performance, a systematic sensitivity analysis was carried out. The parameters considered included the selection probability associated with pheromone levels (α), ranging from 1.0 to 2.0; the heuristic influence based on estimated distance (β), also ranging from 1.0 to 2.0; the pheromone evaporation rate (ρ), evaluated between 0.1 and 0.5; the initial pheromone quantity (Q), with values between 1.0 and 2.0; the number of ants (m), set equal to the number of workstations (m = N); and the maximum number of iterations (T), limited to 100 cycles.
Representative combinations of these parameters were defined, while maintaining the geometric conditions of the RC fixed, based on the layout previously optimized by GA. Each configuration was evaluated based on the total time required for the robot to visit all stations, considering kinematic constraints such as maximum speed and acceleration.
The results revealed configurations that support convergence toward more efficient paths. Specifically, higher values of
α (between 1.5 and 2.0) and moderate evaporation rates (
ρ between 0.2 and 0.4) led to more robust solutions by balancing the exploitation of promising paths and the exploration of new alternatives. Additionally, it was confirmed that assigning one ant per station yields good results without significantly increasing computation time. A summary of the evaluated scenarios and the best results obtained is presented in
Table 2.
The results presented in the ACO Sensitivity Table clearly demonstrate how different parameter combinations significantly affect the algorithm’s performance, particularly in terms of the robot’s total travel time. The most efficient configurations were observed for values of α = 1.5, β = 2.0, ρ = 0.3, and an initial pheromone level of τ0 ≈ 1.5. With this parameter setting, the algorithm was able to minimize the total path time to below 11.28 s, representing highly favorable performance in terms of temporal efficiency.
2.4.10. Validation for Real-World Feasibility
Although the optimization of robot trajectories is performed on a two-dimensional plane (X, Y) to reduce computational complexity, the resulting solutions are subsequently validated in a three-dimensional environment using Mitsubishi RT TOOLBOX3 PRO. This industrial-grade software enables full simulation of robot motion, including vertical displacements (Z-axis), forward and inverse kinematics, collision detection, and reachability constraints.
Incorporating this 3D validation stage ensures that the optimized paths are not only theoretically efficient but also physically executable under real-world operational conditions. This methodological decision addresses the need to balance the computational efficiency of the model with its practical feasibility in industrial environments.
The use of RT TOOLBOX3 PRO acts as a bridge between algorithmic optimization and actual implementation, allowing for the detection of inconsistencies not visible in a planar model, such as vertical interferences or errors in end-effector orientation. This hybrid strategy, 2D optimization followed by 3D validation, reinforces the applicability of the proposed framework in manufacturing scenarios, where both performance and operational precision are critical.