Initializing help system before first use

problem.crossoverlpsol

problem.crossoverlpsol


Purpose
Provides a basic optimal solution for a given solution of an LP problem. This function behaves like the crossover after the barrier algorithm.
Synopsis
status = problem.crossoverlpsol()
Argument
status 
One of:
The crossover was successful.
The crossover was not performed because the problem has no solution.
Example
This example loads a problem, loads a solution for the problem and then uses crossoverlpsol to find a basic optimal solution.
p = xp.problem()
p.read('problem.mps')
status = p.loadlpsol(x, None, dual, None)
status = p.crossoverlpsol()
A solution can also be loaded from an ASCII solution file using problem.readslxsol.
Further information
1. The crossover performs two phases: a crossover phase for finding a basic solution and a clean-up phase for finding a basic optimal solution. Setting algaftercrossover to 0 will allow the crossover to skip the clean-up phase.
2. The given solution is expected to be feasible or nearly feasible, otherwise the crossover may take a long time to find a basic feasible solution. More importantly, the given solution is expected to have a small duality gap. A small duality gap indicates that the given solution is close to the optimal solution. If the given solution is far away from the optimal solution, the clean-up phase may need many simplex iterations to move to a basic optimal solution.
Related topics