C++ Crossover
This section documents the C++ crossover operator implementations.
- double_backbone_based_crossover(orig_graph: Graph, parents: Sequence[set], seed: SupportsInt | SupportsIndex) Graph
@brief Double Backbone Based (DBX) crossover operator.
Identifies common nodes between parent solutions (the “backbone”) and constructs an offspring by preserving these common nodes and probabilistically inheriting others.
@param originalGraph The original problem graph. @param parents Pair of parent solutions to cross over. @param seed Random seed for the operation. @return Unique pointer to the new offspring graph.
- inherit_repair_recombination(orig_graph: Graph, parents: Sequence[set], seed: SupportsInt | SupportsIndex) Graph
@brief Inherit-Repair-Recombination (IRR) crossover operator.
Uses three parents to create offspring through a process of inheritance followed by repair operations to maintain feasibility.
@param originalGraph The original problem graph. @param parents Tuple of three parent solutions. @param seed Random seed for the operation. @return Unique pointer to the new offspring graph.
- reduce_solve_combine(orig_graph: pycnp._pycnp.Graph, parents: collections.abc.Sequence[set], search: str = 'CHNS', beta: typing.SupportsFloat | typing.SupportsIndex = 0.9, seed: typing.SupportsInt | typing.SupportsIndex) Graph
@brief Reduce-Solve-Combine (RSC) crossover operator.
Reduces common nodes between parents, solves the reduced subproblem via local search, and combines the results to form an offspring.
@param originalGraph The original problem graph. @param parents Pair of parent solutions. @param search_strategy The local search strategy to use on the subproblem. @param beta Parameter controlling the reduction intensity. @param seed Random seed for the operation. @return Unique pointer to the new offspring graph.