CoinUtils 2.11.12
Loading...
Searching...
No Matches
CoinPresolveMatrix Class Reference

Augments CoinPrePostsolveMatrix with information about the problem that is only needed during presolve. More...

#include <CoinPresolveMatrix.hpp>

Inheritance diagram for CoinPresolveMatrix:
Collaboration diagram for CoinPresolveMatrix:

Public Member Functions

 CoinPresolveMatrix (int ncols0, double maxmin, ClpSimplex *si, int nrows, CoinBigIndex nelems, bool doStatus, double nonLinearVariable, double bulkRatio)
 `Native' constructor
void update_model (ClpSimplex *si, int nrows0, int ncols0, CoinBigIndex nelems0)
 Update the model held by a Clp OSI.
 CoinPresolveMatrix (int ncols0, double maxmin, OsiSolverInterface *si, int nrows, CoinBigIndex nelems, bool doStatus, double nonLinearVariable, const char *prohibited, const char *rowProhibited=NULL)
 Generic OSI constructor.
void update_model (OsiSolverInterface *si, int nrows0, int ncols0, CoinBigIndex nelems0)
 Update the model held by a generic OSI.
 ~CoinPresolveMatrix ()
 Destructor.
Functions to load the problem representation
void setMatrix (const CoinPackedMatrix *mtx)
 Load the cofficient matrix.
int countEmptyRows ()
 Count number of empty rows.
void setVariableType (int i, int variableType)
 Set variable type information for a single variable.
void setVariableType (const unsigned char *variableType, int lenParam)
 Set variable type information for all variables.
void setVariableType (bool allIntegers, int lenParam)
 Set the type of all variables.
void setAnyInteger (bool anyInteger=true)
 Set a flag for presence (true) or absence (false) of integer variables.
Functions to retrieve problem information
const CoinBigIndexgetRowStarts () const
 Get row start vector for row-major packed matrix.
const int * getColIndicesByRow () const
 Get vector of column indices for row-major packed matrix.
const double * getElementsByRow () const
 Get vector of elements for row-major packed matrix.
bool isInteger (int i) const
 Check for integrality of the specified variable.
bool anyInteger () const
 Check if there are any integer variables.
int presolveOptions () const
 Picks up any special options.
void setPresolveOptions (int value)
 Sets any special options (see #presolveOptions_).
Functions to manipulate row and column processing status
void initColsToDo ()
 Initialise the column ToDo lists.
int stepColsToDo ()
 Step column ToDo lists.
*Return the number of columns on the int numberColsToDo ()
*Has column been changed bool colChanged (int i) const
*Mark column as not changed void unsetColChanged (int i)
*Mark column as changed void setColChanged (int i)
*Mark column as changed and add to list of columns to process next void addCol (int i)
*Test if column is eligible for preprocessing bool colProhibited (int i) const
bool colProhibited2 (int i) const
 Test if column is eligible for preprocessing.
*Mark column as ineligible for preprocessing void setColProhibited (int i)
bool colUsed (int i) const
 Test if column is marked as used.
*Mark column as used void setColUsed (int i)
*Mark column as unused void unsetColUsed (int i)
*Has column infinite ub (originally) inline bool colInfinite(int i) const
*Mark column as not infinite ub (originally) inline void unsetColInfinite(int i)
*Mark column as infinite ub (originally) inline void setColInfinite(int i)
void initRowsToDo ()
 Initialise the row ToDo lists.
int stepRowsToDo ()
 Step row ToDo lists.
*Return the number of rows on the int numberRowsToDo ()
*Has row been changed bool rowChanged (int i) const
*Mark row as not changed void unsetRowChanged (int i)
*Mark row as changed void setRowChanged (int i)
*Mark row as changed and add to list of rows to process next void addRow (int i)
*Test if row is eligible for preprocessing bool rowProhibited (int i) const
bool rowProhibited2 (int i) const
 Test if row is eligible for preprocessing.
*Mark row as ineligible for preprocessing void setRowProhibited (int i)
bool rowUsed (int i) const
 Test if row is marked as used.
*Mark row as used void setRowUsed (int i)
*Mark row as unused void unsetRowUsed (int i)
*Check if there are any prohibited rows or columns bool anyProhibited () const
*Set a flag for presence of prohibited rows or columns void setAnyProhibited (bool val=true)

Public Attributes

Row and column processing status

Information used to determine if rows or columns can be changed and if they require further processing due to changes.

There are four major lists: the [row,col]ToDo list, and the [row,col]NextToDo list. In general, a transform processes entries from the ToDo list and adds entries to the NextToDo list.

There are two vectors, [row,col]Changed, which track the status of individual rows and columns.

unsigned char * colChanged_
 Column change status information.
int * colsToDo_
 Input list of columns to process.
int numberColsToDo_
 Length of colsToDo_.
int * nextColsToDo_
 Output list of columns to process next.
int numberNextColsToDo_
 Length of nextColsToDo_.
unsigned char * rowChanged_
 Row change status information.
int * rowsToDo_
 Input list of rows to process.
int numberRowsToDo_
 Length of rowsToDo_.
int * nextRowsToDo_
 Output list of rows to process next.
int numberNextRowsToDo_
 Length of nextRowsToDo_.
bool anyProhibited_
 Fine control over presolve actions.

Friends

void assignPresolveToPostsolve (CoinPresolveMatrix *&preObj)
 Initialize a CoinPostsolveMatrix object, destroying the CoinPresolveMatrix object.

(Note that these are not member symbols.)

void presolve_no_dups (const CoinPresolveMatrix *preObj, bool doCol=true, bool doRow=true)
 Check column-major and/or row-major matrices for duplicate entries in the major vectors.
void presolve_links_ok (const CoinPresolveMatrix *preObj, bool doCol=true, bool doRow=true)
 Check the links which track storage order for major vectors in the bulk storage area.
void presolve_no_zeros (const CoinPresolveMatrix *preObj, bool doCol=true, bool doRow=true)
 Check for explicit zeros in the column- and/or row-major matrices.
void presolve_consistent (const CoinPresolveMatrix *preObj, bool chkvals=true)
 Checks for equivalence of the column- and row-major matrices.
void presolve_check_sol (const CoinPresolveMatrix *preObj, int chkColSol=2, int chkRowAct=1, int chkStatus=1)
 Check primal solution and architectural variable status.
void presolve_check_nbasic (const CoinPresolveMatrix *preObj)
 Check for the proper number of basic variables.

Matrix storage management links

Linked lists, modelled after the linked lists used in OSL factorization.

They are used for management of the bulk coefficient and minor index storage areas.

presolvehlinkclink_
 Linked list for the column-major representation.
presolvehlinkrlink_
 Linked list for the row-major representation.
double dobias_
 Objective function offset introduced during presolve.
void change_bias (double change_amount)
 Adjust objective function constant offset.

Row-major representation

Common row-major format: A pair of vectors with positional correspondence to hold coefficients and column indices, and a second pair of vectors giving the starting position and length of each row in the first pair.

CoinBigIndexmrstrt_
 Vector of row start positions in #hcol, rowels_.
int * hinrow_
 Vector of row lengths.
double * rowels_
 Coefficients (positional correspondence with hcol_).
int * hcol_
 Column indices (positional correspondence with rowels_).
unsigned char * integerType_
 Tracks integrality of columns (1 for integer, 0 for continuous).
bool anyInteger_
 Flag to say if any variables are integer.
bool tuning_
 Print statistics for tuning.
double startTime_
 Start time of presolve.
double feasibilityTolerance_
 Bounds can be moved by this to retain feasibility.
int status_
 Output status: 0 = feasible, 1 = infeasible, 2 = unbounded.
int pass_
 Presolve pass number.
int maxSubstLevel_
 Maximum substitution level.
void statistics ()
 Say we want statistics - also set time.
double feasibilityTolerance ()
 Return feasibility tolerance.
void setFeasibilityTolerance (double val)
 Set feasibility tolerance.
int status ()
 Returns problem status (0 = feasible, 1 = infeasible, 2 = unbounded).
void setStatus (int status)
 Set problem status.
void setPass (int pass=0)
 Set pass number.
void setMaximumSubstitutionLevel (int level)
 Set Maximum substitution level (normally 3).

Scratch work arrays

Preallocated work arrays are useful to avoid having to allocate and free work arrays in individual presolve methods.

All are allocated from setMatrix by initializeStuff, freed from ~CoinPresolveMatrix. You can use deleteStuff followed by initializeStuff to remove and recreate them.

*Preallocated scratch work array
*Preallocated scratch work *nrows_ int * usefulRowInt_
*Preallocated scratch work *nrows_ double * usefulRowDouble_
*Preallocated scratch work *ncols_ int * usefulColumnInt_
*Preallocated scratch work ncols_ double * usefulColumnDouble_
*Work array for count of infinite contributions to row lhs upper bound int * infiniteUp_
*Work array for sum of finite contributions to row lhs upper bound double * sumUp_
*Work array for count of infinite contributions to row lhs lower bound int * infiniteDown_
*Work array for sum of finite contributions to row lhs lower bound double * sumDown_
*Array of random numbers (max row, column) double *randomNumber_
int recomputeSums (int whichRow)
 Recompute row lhs bounds.
*Allocate scratch arrays void initializeStuff ()
*Free scratch arrays void deleteStuff ()

Detailed Description

Augments CoinPrePostsolveMatrix with information about the problem that is only needed during presolve.

For problem manipulation, this class adds a row-major matrix representation, linked lists that allow for easy manipulation of the matrix when applying presolve transforms, and vectors to track row and column processing status (changed, needs further processing, change prohibited)

For problem representation, this class adds information about variable type (integer or continuous), an objective offset, and a feasibility tolerance.

NOTE that the anyInteger_ and anyProhibited_ flags are independent of the vectors used to track this information for individual variables (integerType_ and rowChanged_ and colChanged_, respectively).

NOTE also that at the end of presolve the column-major and row-major matrix representations are loosely packed (i.e., there may be gaps between columns in the bulk storage arrays).

NOTE that while you might think that CoinPresolve is prepared to handle minimisation or maximisation, it's unlikely that this still works. This is a good thing: better to convert objective coefficients and duals once, before starting presolve, rather than doing it over and over in each transform that considers dual variables.

The constructors that take an OSI or ClpSimplex as a parameter really should not be here, but for historical reasons they will likely remain for the forseeable future. – lh, 111202 –

Definition at line 905 of file CoinPresolveMatrix.hpp.

Constructor & Destructor Documentation

◆ CoinPresolveMatrix() [1/2]

CoinPresolveMatrix::CoinPresolveMatrix ( int ncols0,
double maxmin,
ClpSimplex * si,
int nrows,
CoinBigIndex nelems,
bool doStatus,
double nonLinearVariable,
double bulkRatio )

`Native' constructor

This constructor creates an empty object which must then be loaded. On the other hand, it doesn't assume that the client is an OsiSolverInterface. */ CoinPresolveMatrix(int ncols_alloc, int nrows_alloc, CoinBigIndex nelems_alloc);

/*! Clp OSI constructor

See Clp code for the definition.

◆ CoinPresolveMatrix() [2/2]

CoinPresolveMatrix::CoinPresolveMatrix ( int ncols0,
double maxmin,
OsiSolverInterface * si,
int nrows,
CoinBigIndex nelems,
bool doStatus,
double nonLinearVariable,
const char * prohibited,
const char * rowProhibited = NULL )

Generic OSI constructor.

See OSI code for the definition.

◆ ~CoinPresolveMatrix()

CoinPresolveMatrix::~CoinPresolveMatrix ( )

Destructor.

Member Function Documentation

◆ update_model() [1/2]

void CoinPresolveMatrix::update_model ( ClpSimplex * si,
int nrows0,
int ncols0,
CoinBigIndex nelems0 )

Update the model held by a Clp OSI.

◆ update_model() [2/2]

void CoinPresolveMatrix::update_model ( OsiSolverInterface * si,
int nrows0,
int ncols0,
CoinBigIndex nelems0 )

Update the model held by a generic OSI.

◆ setMatrix()

void CoinPresolveMatrix::setMatrix ( const CoinPackedMatrix * mtx)

Load the cofficient matrix.

Load the coefficient matrix before loading the other vectors (bounds, objective, variable type) required to define the problem.

◆ countEmptyRows()

int CoinPresolveMatrix::countEmptyRows ( )
inline

Count number of empty rows.

Definition at line 981 of file CoinPresolveMatrix.hpp.

◆ setVariableType() [1/3]

void CoinPresolveMatrix::setVariableType ( int i,
int variableType )
inline

Set variable type information for a single variable.

Set variableType to 0 for continous, 1 for integer. Does not manipulate the anyInteger_ flag.

Definition at line 995 of file CoinPresolveMatrix.hpp.

◆ setVariableType() [2/3]

void CoinPresolveMatrix::setVariableType ( const unsigned char * variableType,
int lenParam )

Set variable type information for all variables.

Set variableType[i] to 0 for continuous, 1 for integer. Does not manipulate the anyInteger_ flag.

◆ setVariableType() [3/3]

void CoinPresolveMatrix::setVariableType ( bool allIntegers,
int lenParam )

Set the type of all variables.

allIntegers should be true to set the type to integer, false to set the type to continuous.

◆ setAnyInteger()

void CoinPresolveMatrix::setAnyInteger ( bool anyInteger = true)
inline

Set a flag for presence (true) or absence (false) of integer variables.

Definition at line 1017 of file CoinPresolveMatrix.hpp.

◆ getRowStarts()

const CoinBigIndex * CoinPresolveMatrix::getRowStarts ( ) const
inline

Get row start vector for row-major packed matrix.

Definition at line 1028 of file CoinPresolveMatrix.hpp.

◆ getColIndicesByRow()

const int * CoinPresolveMatrix::getColIndicesByRow ( ) const
inline

Get vector of column indices for row-major packed matrix.

Definition at line 1033 of file CoinPresolveMatrix.hpp.

◆ getElementsByRow()

const double * CoinPresolveMatrix::getElementsByRow ( ) const
inline

Get vector of elements for row-major packed matrix.

Definition at line 1038 of file CoinPresolveMatrix.hpp.

◆ isInteger()

bool CoinPresolveMatrix::isInteger ( int i) const
inline

Check for integrality of the specified variable.

Consults the integerType_ vector if present; fallback is the anyInteger_ flag.

Definition at line 1048 of file CoinPresolveMatrix.hpp.

◆ anyInteger()

bool CoinPresolveMatrix::anyInteger ( ) const
inline

Check if there are any integer variables.

Consults the anyInteger_ flag

Definition at line 1063 of file CoinPresolveMatrix.hpp.

◆ presolveOptions()

int CoinPresolveMatrix::presolveOptions ( ) const
inline

Picks up any special options.

Definition at line 1068 of file CoinPresolveMatrix.hpp.

◆ setPresolveOptions()

void CoinPresolveMatrix::setPresolveOptions ( int value)
inline

Sets any special options (see #presolveOptions_).

Definition at line 1073 of file CoinPresolveMatrix.hpp.

◆ change_bias()

void CoinPresolveMatrix::change_bias ( double change_amount)
inline

Adjust objective function constant offset.

Definition at line 1096 of file CoinPresolveMatrix.hpp.

◆ statistics()

void CoinPresolveMatrix::statistics ( )

Say we want statistics - also set time.

◆ feasibilityTolerance()

double CoinPresolveMatrix::feasibilityTolerance ( )
inline

Return feasibility tolerance.

Definition at line 1143 of file CoinPresolveMatrix.hpp.

◆ setFeasibilityTolerance()

void CoinPresolveMatrix::setFeasibilityTolerance ( double val)
inline

Set feasibility tolerance.

Definition at line 1148 of file CoinPresolveMatrix.hpp.

◆ status()

int CoinPresolveMatrix::status ( )
inline

Returns problem status (0 = feasible, 1 = infeasible, 2 = unbounded).

Definition at line 1160 of file CoinPresolveMatrix.hpp.

◆ setStatus()

void CoinPresolveMatrix::setStatus ( int status)
inline

Set problem status.

Definition at line 1165 of file CoinPresolveMatrix.hpp.

◆ setPass()

void CoinPresolveMatrix::setPass ( int pass = 0)
inline

Set pass number.

Definition at line 1179 of file CoinPresolveMatrix.hpp.

◆ setMaximumSubstitutionLevel()

void CoinPresolveMatrix::setMaximumSubstitutionLevel ( int level)
inline

Set Maximum substitution level (normally 3).

Definition at line 1190 of file CoinPresolveMatrix.hpp.

◆ numbers()

*Array of random CoinPresolveMatrix::numbers ( max row,
column  )

◆ recomputeSums()

int CoinPresolveMatrix::recomputeSums ( int whichRow)

Recompute row lhs bounds.

Calculate finite contributions to row lhs upper and lower bounds and count infinite contributions. Returns the number of rows found to be infeasible.

If whichRow < 0, bounds are recomputed for all rows.

As of 110611, this seems to be a work in progress in the sense that it's barely used by the existing presolve code.

◆ initializeStuff()

*Allocate scratch arrays void CoinPresolveMatrix::initializeStuff ( )

◆ deleteStuff()

*Free scratch arrays void CoinPresolveMatrix::deleteStuff ( )

◆ initColsToDo()

void CoinPresolveMatrix::initColsToDo ( )

Initialise the column ToDo lists.

Places all columns in the colsToDo_ list except for columns marked as prohibited (viz. colChanged_).

◆ stepColsToDo()

int CoinPresolveMatrix::stepColsToDo ( )

Step column ToDo lists.

Moves columns on the nextColsToDo_ list to the colsToDo_ list, emptying nextColsToDo_. Returns the number of columns transferred.

◆ numberColsToDo()

*Return the number of columns on the int CoinPresolveMatrix::numberColsToDo ( )
inline

Definition at line 1339 of file CoinPresolveMatrix.hpp.

◆ colChanged()

*Has column been changed bool CoinPresolveMatrix::colChanged ( int i) const
inline

Definition at line 1345 of file CoinPresolveMatrix.hpp.

◆ unsetColChanged()

*Mark column as not changed void CoinPresolveMatrix::unsetColChanged ( int i)
inline

Definition at line 1350 of file CoinPresolveMatrix.hpp.

◆ setColChanged()

*Mark column as changed void CoinPresolveMatrix::setColChanged ( int i)
inline

Definition at line 1355 of file CoinPresolveMatrix.hpp.

◆ addCol()

*Mark column as changed and add to list of columns to process next void CoinPresolveMatrix::addCol ( int i)
inline

Definition at line 1360 of file CoinPresolveMatrix.hpp.

◆ colProhibited()

*Test if column is eligible for preprocessing bool CoinPresolveMatrix::colProhibited ( int i) const
inline

Definition at line 1368 of file CoinPresolveMatrix.hpp.

◆ colProhibited2()

bool CoinPresolveMatrix::colProhibited2 ( int i) const
inline

Test if column is eligible for preprocessing.

The difference between this method and colProhibited() is that this method first tests anyProhibited_ before examining the specific entry for the specified column.

Definition at line 1378 of file CoinPresolveMatrix.hpp.

◆ setColProhibited()

*Mark column as ineligible for preprocessing void CoinPresolveMatrix::setColProhibited ( int i)
inline

Definition at line 1386 of file CoinPresolveMatrix.hpp.

◆ colUsed()

bool CoinPresolveMatrix::colUsed ( int i) const
inline

Test if column is marked as used.

This is for doing faster lookups to see where two columns have entries in common.

Definition at line 1395 of file CoinPresolveMatrix.hpp.

◆ setColUsed()

*Mark column as used void CoinPresolveMatrix::setColUsed ( int i)
inline

Definition at line 1400 of file CoinPresolveMatrix.hpp.

◆ unsetColUsed()

*Mark column as unused void CoinPresolveMatrix::unsetColUsed ( int i)
inline

Definition at line 1405 of file CoinPresolveMatrix.hpp.

◆ ub() [1/3]

*Has column infinite CoinPresolveMatrix::ub ( originally ) const
inline

Definition at line 1409 of file CoinPresolveMatrix.hpp.

◆ ub() [2/3]

*Mark column as not infinite CoinPresolveMatrix::ub ( originally )
inline

Definition at line 1414 of file CoinPresolveMatrix.hpp.

◆ ub() [3/3]

*Mark column as infinite CoinPresolveMatrix::ub ( originally )
inline

Definition at line 1419 of file CoinPresolveMatrix.hpp.

◆ initRowsToDo()

void CoinPresolveMatrix::initRowsToDo ( )

Initialise the row ToDo lists.

Places all rows in the rowsToDo_ list except for rows marked as prohibited (viz. rowChanged_).

◆ stepRowsToDo()

int CoinPresolveMatrix::stepRowsToDo ( )

Step row ToDo lists.

Moves rows on the nextRowsToDo_ list to the rowsToDo_ list, emptying nextRowsToDo_. Returns the number of rows transferred.

◆ numberRowsToDo()

*Return the number of rows on the int CoinPresolveMatrix::numberRowsToDo ( )
inline

Definition at line 1440 of file CoinPresolveMatrix.hpp.

◆ rowChanged()

*Has row been changed bool CoinPresolveMatrix::rowChanged ( int i) const
inline

Definition at line 1446 of file CoinPresolveMatrix.hpp.

◆ unsetRowChanged()

*Mark row as not changed void CoinPresolveMatrix::unsetRowChanged ( int i)
inline

Definition at line 1451 of file CoinPresolveMatrix.hpp.

◆ setRowChanged()

*Mark row as changed void CoinPresolveMatrix::setRowChanged ( int i)
inline

Definition at line 1456 of file CoinPresolveMatrix.hpp.

◆ addRow()

*Mark row as changed and add to list of rows to process next void CoinPresolveMatrix::addRow ( int i)
inline

Definition at line 1461 of file CoinPresolveMatrix.hpp.

◆ rowProhibited()

*Test if row is eligible for preprocessing bool CoinPresolveMatrix::rowProhibited ( int i) const
inline

Definition at line 1469 of file CoinPresolveMatrix.hpp.

◆ rowProhibited2()

bool CoinPresolveMatrix::rowProhibited2 ( int i) const
inline

Test if row is eligible for preprocessing.

The difference between this method and rowProhibited() is that this method first tests anyProhibited_ before examining the specific entry for the specified row.

Definition at line 1479 of file CoinPresolveMatrix.hpp.

◆ setRowProhibited()

*Mark row as ineligible for preprocessing void CoinPresolveMatrix::setRowProhibited ( int i)
inline

Definition at line 1487 of file CoinPresolveMatrix.hpp.

◆ rowUsed()

bool CoinPresolveMatrix::rowUsed ( int i) const
inline

Test if row is marked as used.

This is for doing faster lookups to see where two rows have entries in common. It can be used anywhere as long as it ends up zeroed out.

Definition at line 1496 of file CoinPresolveMatrix.hpp.

◆ setRowUsed()

*Mark row as used void CoinPresolveMatrix::setRowUsed ( int i)
inline

Definition at line 1501 of file CoinPresolveMatrix.hpp.

◆ unsetRowUsed()

*Mark row as unused void CoinPresolveMatrix::unsetRowUsed ( int i)
inline

Definition at line 1506 of file CoinPresolveMatrix.hpp.

◆ anyProhibited()

*Check if there are any prohibited rows or columns bool CoinPresolveMatrix::anyProhibited ( ) const
inline

Definition at line 1512 of file CoinPresolveMatrix.hpp.

◆ setAnyProhibited()

*Set a flag for presence of prohibited rows or columns void CoinPresolveMatrix::setAnyProhibited ( bool val = true)
inline

Definition at line 1517 of file CoinPresolveMatrix.hpp.

◆ assignPresolveToPostsolve

void assignPresolveToPostsolve ( CoinPresolveMatrix *& preObj)
friend

◆ presolve_no_dups()

void presolve_no_dups ( const CoinPresolveMatrix * preObj,
bool doCol = true,
bool doRow = true )
related

Check column-major and/or row-major matrices for duplicate entries in the major vectors.

By default, scans both the column- and row-major matrices. Set doCol (doRow) to false to suppress the column (row) scan.

◆ presolve_links_ok()

void presolve_links_ok ( const CoinPresolveMatrix * preObj,
bool doCol = true,
bool doRow = true )
related

Check the links which track storage order for major vectors in the bulk storage area.

By default, scans both the column- and row-major matrix. Set doCol = false to suppress the column-major scan. Set doRow = false to suppres the row-major scan.

◆ presolve_no_zeros()

void presolve_no_zeros ( const CoinPresolveMatrix * preObj,
bool doCol = true,
bool doRow = true )
related

Check for explicit zeros in the column- and/or row-major matrices.

By default, scans both the column- and row-major matrices. Set doCol (doRow) to false to suppress the column (row) scan.

◆ presolve_consistent()

void presolve_consistent ( const CoinPresolveMatrix * preObj,
bool chkvals = true )
related

Checks for equivalence of the column- and row-major matrices.

Normally the routine will test for coefficient presence and value. Set chkvals to false to suppress the check for equal value.

◆ presolve_check_sol()

void presolve_check_sol ( const CoinPresolveMatrix * preObj,
int chkColSol = 2,
int chkRowAct = 1,
int chkStatus = 1 )
related

Check primal solution and architectural variable status.

The architectural variables can be checked for bogus values, feasibility, and valid status. The row activity is checked for bogus values, accuracy, and feasibility. By default, row activity is not checked (presolve is sloppy about maintaining it). See the definitions in CoinPresolvePsdebug.cpp for more information.

◆ presolve_check_nbasic()

void presolve_check_nbasic ( const CoinPresolveMatrix * preObj)
related

Check for the proper number of basic variables.

Member Data Documentation

◆ clink_

presolvehlink* CoinPresolveMatrix::clink_

Linked list for the column-major representation.

Definition at line 1087 of file CoinPresolveMatrix.hpp.

◆ rlink_

presolvehlink* CoinPresolveMatrix::rlink_

Linked list for the row-major representation.

Definition at line 1089 of file CoinPresolveMatrix.hpp.

◆ dobias_

double CoinPresolveMatrix::dobias_

Objective function offset introduced during presolve.

Definition at line 1093 of file CoinPresolveMatrix.hpp.

◆ mrstrt_

CoinBigIndex* CoinPresolveMatrix::mrstrt_

Vector of row start positions in #hcol, rowels_.

Definition at line 1116 of file CoinPresolveMatrix.hpp.

◆ hinrow_

int* CoinPresolveMatrix::hinrow_

Vector of row lengths.

Definition at line 1118 of file CoinPresolveMatrix.hpp.

◆ rowels_

double* CoinPresolveMatrix::rowels_

Coefficients (positional correspondence with hcol_).

Definition at line 1120 of file CoinPresolveMatrix.hpp.

◆ hcol_

int* CoinPresolveMatrix::hcol_

Column indices (positional correspondence with rowels_).

Definition at line 1122 of file CoinPresolveMatrix.hpp.

◆ integerType_

unsigned char* CoinPresolveMatrix::integerType_

Tracks integrality of columns (1 for integer, 0 for continuous).

Definition at line 1126 of file CoinPresolveMatrix.hpp.

◆ anyInteger_

bool CoinPresolveMatrix::anyInteger_

Flag to say if any variables are integer.

Note that this flag is not manipulated by the various setVariableType routines.

Definition at line 1132 of file CoinPresolveMatrix.hpp.

◆ tuning_

bool CoinPresolveMatrix::tuning_

Print statistics for tuning.

Definition at line 1134 of file CoinPresolveMatrix.hpp.

◆ startTime_

double CoinPresolveMatrix::startTime_

Start time of presolve.

Definition at line 1138 of file CoinPresolveMatrix.hpp.

◆ feasibilityTolerance_

double CoinPresolveMatrix::feasibilityTolerance_

Bounds can be moved by this to retain feasibility.

Definition at line 1141 of file CoinPresolveMatrix.hpp.

◆ status_

int CoinPresolveMatrix::status_

Output status: 0 = feasible, 1 = infeasible, 2 = unbounded.

Actually implemented as single bit flags: 1^0 = infeasible, 1^1 = unbounded.

Definition at line 1158 of file CoinPresolveMatrix.hpp.

◆ pass_

int CoinPresolveMatrix::pass_

Presolve pass number.

Should be incremented externally by the method controlling application of presolve transforms. Used to control the execution of testRedundant (evoked by the implied_free transform).

Definition at line 1177 of file CoinPresolveMatrix.hpp.

◆ maxSubstLevel_

int CoinPresolveMatrix::maxSubstLevel_

Maximum substitution level.

Used to control the execution of subst from implied_free

Definition at line 1188 of file CoinPresolveMatrix.hpp.

◆ colChanged_

unsigned char* CoinPresolveMatrix::colChanged_

Column change status information.

Coded using the following bits:

  • 0x01: Column has changed
  • 0x02: preprocessing prohibited
  • 0x04: Column has been used
  • 0x08: Column originally had infinite ub

Definition at line 1218 of file CoinPresolveMatrix.hpp.

◆ colsToDo_

int* CoinPresolveMatrix::colsToDo_

Input list of columns to process.

Definition at line 1220 of file CoinPresolveMatrix.hpp.

◆ numberColsToDo_

int CoinPresolveMatrix::numberColsToDo_

Length of colsToDo_.

Definition at line 1222 of file CoinPresolveMatrix.hpp.

◆ nextColsToDo_

int* CoinPresolveMatrix::nextColsToDo_

Output list of columns to process next.

Definition at line 1224 of file CoinPresolveMatrix.hpp.

◆ numberNextColsToDo_

int CoinPresolveMatrix::numberNextColsToDo_

Length of nextColsToDo_.

Definition at line 1226 of file CoinPresolveMatrix.hpp.

◆ rowChanged_

unsigned char* CoinPresolveMatrix::rowChanged_

Row change status information.

Coded using the following bits:

  • 0x01: Row has changed
  • 0x02: preprocessing prohibited
  • 0x04: Row has been used

Definition at line 1237 of file CoinPresolveMatrix.hpp.

◆ rowsToDo_

int* CoinPresolveMatrix::rowsToDo_

Input list of rows to process.

Definition at line 1239 of file CoinPresolveMatrix.hpp.

◆ numberRowsToDo_

int CoinPresolveMatrix::numberRowsToDo_

Length of rowsToDo_.

Definition at line 1241 of file CoinPresolveMatrix.hpp.

◆ nextRowsToDo_

int* CoinPresolveMatrix::nextRowsToDo_

Output list of rows to process next.

Definition at line 1243 of file CoinPresolveMatrix.hpp.

◆ numberNextRowsToDo_

int CoinPresolveMatrix::numberNextRowsToDo_

Length of nextRowsToDo_.

Definition at line 1245 of file CoinPresolveMatrix.hpp.

◆ anyProhibited_

bool CoinPresolveMatrix::anyProhibited_

Fine control over presolve actions.

Set/clear the following bits to allow or suppress actions:

  • 0x01 allow duplicate column tests for integer variables
  • 0x02 not used
  • 0x04 set to inhibit x+y+z=1 mods
  • 0x08 not used
  • 0x10 set to allow stuff which won't unroll easily (overlapping duplicate rows; opportunistic fixing of variables from bound propagation).
  • 0x04000 allow presolve transforms to arbitrarily ignore infeasibility and set arbitrary feasible bounds.
  • 0x10000 instructs implied_free_action to be `more lightweight'; will return without doing anything after 15 presolve passes.
  • 0x(2,4,6)0000 instructs implied_free_action to remove small created elements
  • 0x80000000 set by presolve to say dupcol_action compressed columns */ int presolveOptions_; /*! Flag to say if any rows or columns are marked as prohibited

Note that this flag is not manipulated by any of the various set*Prohibited routines.

Definition at line 1269 of file CoinPresolveMatrix.hpp.

◆ array

*Preallocated scratch work CoinPresolveMatrix::array

Definition at line 1282 of file CoinPresolveMatrix.hpp.

◆ usefulRowInt_

* Preallocated scratch work * nrows_ int* CoinPresolveMatrix::usefulRowInt_

Definition at line 1283 of file CoinPresolveMatrix.hpp.

◆ usefulRowDouble_

* Preallocated scratch work * nrows_ double* CoinPresolveMatrix::usefulRowDouble_

Definition at line 1285 of file CoinPresolveMatrix.hpp.

◆ usefulColumnInt_

* Preallocated scratch work * ncols_ int* CoinPresolveMatrix::usefulColumnInt_

Definition at line 1287 of file CoinPresolveMatrix.hpp.

◆ usefulColumnDouble_

* Preallocated scratch work ncols_ double* CoinPresolveMatrix::usefulColumnDouble_

Definition at line 1289 of file CoinPresolveMatrix.hpp.

◆ infiniteUp_

* Work array for count of infinite contributions to row lhs upper bound int* CoinPresolveMatrix::infiniteUp_

Definition at line 1294 of file CoinPresolveMatrix.hpp.

◆ sumUp_

* Work array for sum of finite contributions to row lhs upper bound double* CoinPresolveMatrix::sumUp_

Definition at line 1296 of file CoinPresolveMatrix.hpp.

◆ infiniteDown_

* Work array for count of infinite contributions to row lhs lower bound int* CoinPresolveMatrix::infiniteDown_

Definition at line 1298 of file CoinPresolveMatrix.hpp.

◆ sumDown_

* Work array for sum of finite contributions to row lhs lower bound double* CoinPresolveMatrix::sumDown_

Definition at line 1300 of file CoinPresolveMatrix.hpp.


The documentation for this class was generated from the following files: