Excise fixed variables from the model. More...
#include <CoinPresolveFixed.hpp>
Classes | |
struct | action |
Structure to hold information necessary to reintroduce a column into the problem representation. More... | |
Public Member Functions | |
const char * | name () const |
Returns string "remove_fixed_action". More... | |
void | postsolve (CoinPostsolveMatrix *prob) const |
Apply the postsolve transformation for this particular presolve action. More... | |
virtual | ~remove_fixed_action () |
Destructor. More... | |
![]() | |
CoinPresolveAction (const CoinPresolveAction *next) | |
Construct a postsolve object and add it to the transformation list. More... | |
void | setNext (const CoinPresolveAction *nextAction) |
modify next (when building rather than passing) More... | |
virtual | ~CoinPresolveAction () |
Virtual destructor. More... | |
Static Public Member Functions | |
static const remove_fixed_action * | presolve (CoinPresolveMatrix *prob, int *fcols, int nfcols, const CoinPresolveAction *next) |
Excise the specified columns. More... | |
![]() | |
static void | throwCoinError (const char *error, const char *ps_routine) |
Stub routine to throw exceptions. More... | |
Public Attributes | |
int * | colrows_ |
Array of row indices for coefficients of excised columns. More... | |
double * | colels_ |
Array of coefficients of excised columns. More... | |
int | nactions_ |
Number of entries in actions_. More... | |
action * | actions_ |
Vector specifying variable(s) affected by this object. More... | |
![]() | |
const CoinPresolveAction * | next |
The next presolve transformation. More... | |
Private Member Functions | |
remove_fixed_action (int nactions, action *actions, double *colels, int *colrows, const CoinPresolveAction *next) | |
Constructor. More... | |
Related Functions | |
(Note that these are not member functions.) | |
const CoinPresolveAction * | remove_fixed (CoinPresolveMatrix *prob, const CoinPresolveAction *next) |
Scan the problem for fixed columns and remove them. More... | |
Excise fixed variables from the model.
Implements the action of virtually removing one or more fixed variables x_j from the model by substituting the value sol_j in each constraint. Specifically, for each constraint i where a_ij != 0, rlo_i and rup_i are adjusted by -a_ij*sol_j and a_ij is set to 0.
There is an implicit assumption that the variable already has the correct value. If this isn't true, corrections to row activity may be incorrect. If you want to guard against this possibility, consider make_fixed_action.
Actual removal of the empty column from the matrix is handled by drop_empty_cols_action. Correction of the objective function is done there.
Definition at line 25 of file CoinPresolveFixed.hpp.
|
private |
Constructor.
|
virtual |
Destructor.
|
virtual |
Returns string "remove_fixed_action".
Implements CoinPresolveAction.
|
static |
Excise the specified columns.
Remove the specified columns (nfcols
, fcols
) from the problem representation (prob
), leaving the appropriate postsolve object linked as the head of the list of postsolve objects (currently headed by next
).
|
virtual |
Apply the postsolve transformation for this particular presolve action.
Implements CoinPresolveAction.
|
related |
Scan the problem for fixed columns and remove them.
A front end to collect a list of columns with equal bounds and hand them to remove_fixed_action::presolve() for processing.
int* remove_fixed_action::colrows_ |
Array of row indices for coefficients of excised columns.
Definition at line 36 of file CoinPresolveFixed.hpp.
double* remove_fixed_action::colels_ |
Array of coefficients of excised columns.
Definition at line 38 of file CoinPresolveFixed.hpp.
int remove_fixed_action::nactions_ |
Number of entries in actions_.
Definition at line 40 of file CoinPresolveFixed.hpp.
action* remove_fixed_action::actions_ |
Vector specifying variable(s) affected by this object.
Definition at line 42 of file CoinPresolveFixed.hpp.