@@ -18,7 +18,7 @@ def get_pareto_parameters(self, num_points, **kwargs):
1818 # ── Public interface ──────────────────────────────────────────────────────
1919
2020 def generate_pareto_front (
21- self , num_points = 100 , generations = 100 , T = 10 , nr = 2 , verbose = False , ** kwargs
21+ self , num_points = 100 , generations = 100 , T = 10 , nr = 2 , verbose = False , crossover_operator = "sbx" , ** kwargs
2222 ):
2323 """
2424 MOEA/D with Tchebycheff decomposition, stable normalisation, and
@@ -143,21 +143,23 @@ def normalise(f):
143143 nb_idx = neighbors [i ]
144144 p1_idx , p2_idx = np .random .choice (nb_idx , 2 , replace = False )
145145
146- # Simulated Binary Crossover (SBX)
147- offspring = self ._sbx_crossover (population [p1_idx ], population [p2_idx ])
148-
149- # CRITICAL: We MUST repair immediately after SBX because it
150- # violates the simplex (sum != 1, potential negative weights)
151- offspring = self ._repair (offspring )
152-
153- # Polynomial Mutation
154- # (Replaces the 10% vector-level Gaussian mutation with
155- # mathematically standard component-level Polynomial Mutation)
156- offspring = self ._polynomial_mutation (offspring )
157-
158- # CRITICAL: Repair again because polynomial mutation pushes
159- # bounds independently, breaking the sum-to-1 constraint.
160- offspring = self ._repair (offspring )
146+ if crossover_operator == "sbx" :
147+ # Simulated Binary Crossover (SBX)
148+ offspring = self ._sbx_crossover (population [p1_idx ], population [p2_idx ])
149+ # CRITICAL: We MUST repair immediately after SBX
150+ offspring = self ._repair (offspring )
151+
152+ # Polynomial Mutation
153+ offspring = self ._polynomial_mutation (offspring )
154+ # CRITICAL: Repair again because polynomial mutation pushes bounds
155+ offspring = self ._repair (offspring )
156+
157+ elif crossover_operator == "simplex" :
158+ # Linear mix crossing the full valid line segment on the simplex.
159+ # It natively avoids breaking the simplex geometry.
160+ offspring = self ._simplex_crossover (population [p1_idx ], population [p2_idx ])
161+ else :
162+ raise ValueError (f"Unknown crossover operator: { crossover_operator } " )
161163
162164 # Evaluate offspring.
163165 off_f = np .array (
0 commit comments