Initializing help system before first use

# 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.
Topic areas
Barrier, LP
Synopsis
`int XPRS_CC XPRScrossoverlpsol(XPRSprob prob, int *p_status);`
Arguments

prob | The current problem.
p_status | Pointer to an int where the status will be returned. The status is one of:
0 | The crossover is successful.
1 | The crossover is not performed because the problem has no solution.

Related controls
Integer

ALGAFTERCROSSOVER | Specifies which algorithm to use for cleaning up the solution.
PREPROTECTDUAL | 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
XPRSloadlpsol, XPRSreadslxsol, Section Crossover.
Parent Topic Console and Library Functions

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.