Initializing help system before first use

# XPRSgetpresolvebasis

Purpose
Returns the current basis from memory into the user's data areas. If the problem is presolved, the presolved basis will be returned. Otherwise the original basis will be returned.
Topic areas
Simplex, LP
Synopsis
`int XPRS_CC XPRSgetpresolvebasis(XPRSprob prob, int rowstat[], int colstat[]);`
Arguments

prob | The current problem.
rowstat | Integer array of length ROWS to hold the basis status of the stack, surplus or artificial variable associated with each row. The status will be one of:
XPRS_BASISSTATUS_NONBASIC_LOWER (0) | slack, surplus or artificial is non-basic at lower bound;
XPRS_BASISSTATUS_BASIC (1) | slack, surplus or artificial is basic;
XPRS_BASISSTATUS_NONBASIC_UPPER (2) | slack or surplus is non-basic at upper bound.
May be NULL if not required.
colstat | Integer array of length COLS to hold the basis status of the columns in the constraint matrix. The status will be one of:
XPRS_BASISSTATUS_NONBASIC_LOWER (0) | variable is non-basic at lower bound, or superbasic at zero if the variable has no lower bound;
XPRS_BASISSTATUS_BASIC (1) | variable is basic;
XPRS_BASISSTATUS_NONBASIC_UPPER (2) | variable is at upper bound;
XPRS_BASISSTATUS_SUPERBASIC (3) | variable is super-basic.
May be NULL if not required.

Example
The following obtains and outputs basis information on a presolved problem prior to the tree search:

    XPRSprob prob;
    int i, cols, *colstat;
    ...
    XPRSreadprob(prob,"mymip","");
    XPRSmipoptimize(prob,"l");
    XPRSgetintattrib(prob,XPRS_COLS,&cols);
    colstat = malloc(cols*sizeof(int));
    XPRSgetpresolvebasis(prob,NULL,colstat);
    for(i=0;i<cols;i++)
     printf("Column %d: %d\n", i, colstat[i]);
    XPRSmipoptimize(prob);

Related topics
XPRSgetbasis, XPRSloadbasis, XPRSloadpresolvebasis.
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.