Initializing help system before first use

XPRSgetprimalray

XPRSgetprimalray


Purpose
Retrieves a primal ray (primal unbounded direction) for the current problem, if the problem is found to be unbounded.
Synopsis
int XPRS_CC XPRSgetprimalray(XPRSprob prob, double dray[], int *hasRay);
Arguments
prob 
The current problem.
dray 
Double array of length COLS to hold the ray. May be NULL if not required.
hasRay 
This variable will be set to 1 if the Optimizer is able to return a primal ray, 0 otherwise.
Example
The following code tries to retrieve a primal ray:
int cols;
double *primalRay;
int hasRay;
...
XPRSgetintattrib(prob, XPRS_COLS, &cols);
primalRay = malloc(cols*sizeof(double));
XPRSgetprimalray(prob, primalRay, &hasRay);
if(!hasRay) printf("Could not retrieve a primal ray\n");
Further information
1. It is possible to retrieve a primal ray only when, after solving an LP problem, the final status ( LPSTATUS) is XPRS_LP_UNBOUNDED.
2. Primal rays are not post-solved. If the problem is in a presolved state, the primal ray that is returned will be for the presolved problem. If the problem was solved with presolve on and has been restored to the original state (the default behavior), this function will not be able to return a ray. To ensure that a primal ray can be obtained, it is recommended to solve a problem with presolve turned off ( PRESOLVE = 0).
Related topics

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