Initializing help system before first use

XPRSloadlpsol

Purpose
Loads an LP solution for the problem into the Optimizer.
Topic areas
Synopsis
int XPRS_CC XPRSloadlpsol(XPRSprob prob, const double x[], const double slack[], const double duals[], const double djs[], int *p_status);
Arguments
prob 
The current problem.
Optional: Double array of length COLS (for the original problem and not the presolve problem) containing the values of the variables.
slack 
Optional: double array of length ROWS containing the values of slack variables.
duals 
Optional: double array of length ROWS containing the values of dual variables.
djs 
Optional: double array of length COLS containing the values of reduced costs.
p_status 
Pointer to an int where the status will be returned. The status is one of:
Solution is loaded.
Solution is not loaded because the problem is in presolved status.
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, duals, NULL, &status);
XPRScrossoverlpsol(prob, &status);
Further information
1. If neither variable values nor dual values are provided, the current solution in memory will be unloaded.
2. When variables x is NULL, the variables will be set to their bounds.
3. When slack variables slack is NULL, it will be computed from variables x. If slacks are provided, variables cannot be omitted.
4. When dual variables duals is NULL, both dual variables and reduced costs will be set to zero.
5. When reduced costs djs is NULL, it will be computed from dual variables duals. If reduced costs are provided, dual variables cannot be omitted.
Related topics

© 2001-2025 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.