XPRSloadlpsol
XPRSloadlpsol |
Purpose
Loads an LP solution for the problem into the Optimizer.
Synopsis
int XPRS_CC XPRSloadlpsol(XPRSprob prob, double x[], double slack[], double dual[], double dj[], int *status);
Arguments
prob
|
The current problem.
|
||||
x
|
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.
|
||||
dual
|
Optional: double array of length
ROWS containing the values of dual variables.
|
||||
dj
|
Optional: double array of length
COLS containing the values of reduced costs.
|
||||
status
|
Pointer to an
int where the status will be returned. The status is one of:
|
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);
Further information
1. At least one of variables
x and dual variables
dual must be provided.
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
dual is
NULL, both dual variables and reduced costs will be set to zero.
5. When reduced costs
dj is
NULL, it will be computed from dual variables
dual. If reduced costs are provided, dual variables cannot be omitted.
Related topics