Order Crossover

Order Crossover #

File position: /EMOC/src/operator/order_crossover.h and /EMOC/src/operator/order_crossover.cpp

void OrderCrossover(Individual *parent1, Individual *parent2, Individual *offspring1, Individual *offspring2)

Do the order crossover on parent1 and parent2, the results are stored in offspring1 and offspring2. Note this crossover is for permutation encoding problems.

Parameter:
parent1: Individual*, default=None
    The pointer to the first parent individual to do order crossover.

parent2: Individual*, default=None
    The pointer to the second parent individual to do order crossover.

offspring1: Individual*, default=None
    The pointer to the first offspring individual of order crossover results. The memory of the offspring need to be allocated outside the function.

offspring2: Individual*, default=None
    The pointer to the second offspring individual of order crossover results. The memory of the offspring need to be allocated outside the function.
Returns:
void