XPRScrossoverlpsol
XPRScrossoverlpsol |
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
int XPRS_CC XPRScrossoverlpsol(XPRSprob prob, int *status);
Arguments
prob
|
The current problem.
|
||||
status
|
Pointer to an
int where the status will be returned. The status is one of:
|
Related controls
Integer
Specifies which algorithm to use for cleaning up the solution.
|
|
Whether or not to protect the given dual solution during presolve.
|
Example
This example loads a problem, loads a solution for the problem and then uses
XPRScrossoverlpsol to find a basic optimal solution.
XPRSreadprob(prob, "problem", ""); XPRSloadlpsol(prob, x, NULL, dual, NULL, &status); XPRScrossoverlpsol(prob, &status);
A solution can also be loaded from an ASCII solution file using
XPRSreadslxsol.
Further information
1. The crossover contains 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