Detailed Description
dual compensation presolver
This presolver looks for variables with i) objcoef >= 0 and exactly one downlock ii) objcoef <= 0 and exactly one uplock and fixes the variable in case i) at the lower bound and in case ii) at the upper bound if a combination of singleton continuous variables can compensate the downlock in case i) and the uplock in case ii).
Definition in file presol_dualcomp.c.
#include "blockmemshell/memory.h"
#include "scip/presol_dualcomp.h"
#include "scip/pub_matrix.h"
#include "scip/pub_message.h"
#include "scip/pub_presol.h"
#include "scip/pub_var.h"
#include "scip/scip_general.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_nlp.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_presol.h"
#include "scip/scip_pricer.h"
#include "scip/scip_prob.h"
#include "scip/scip_probing.h"
#include "scip/scip_var.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | PRESOL_NAME "dualcomp" |
#define | PRESOL_DESC "compensate single up-/downlocks by singleton continuous variables" |
#define | PRESOL_PRIORITY -50 |
#define | PRESOL_MAXROUNDS -1 |
#define | PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE /* timing of the presolver (fast, medium, or exhaustive) */ |
#define | DEFAULT_COMP_ONLY_DIS_VARS FALSE |
Typedefs | |
typedef enum Fixingdirection | FIXINGDIRECTION |
typedef enum Lockcompensation | LOCKCOMPENSATION |
Enumerations | |
enum | Fixingdirection { FIXATLB = -1, NOFIX = 0, FIXATUB = 1, FIXATLB = -1, NOFIX = 0, FIXATUB = 1, FIXATLB = -1, NOFIX = 0, FIXATUB = 1, FIXATLB = -1, NOFIX = 0, FIXATUB = 1 } |
enum | Lockcompensation { COMPENSATE_DOWNLOCK = 0, COMPENSATE_UPLOCK = 1 } |
Functions | |
static SCIP_RETCODE | compensateVarLock (SCIP *scip, SCIP_MATRIX *matrix, int col, int row, SCIP_Real val, SCIP_Bool twosides, LOCKCOMPENSATION compensation, FIXINGDIRECTION *varstofix, int *nfixings) |
static | SCIP_DECL_PRESOLCOPY (presolCopyDualcomp) |
static | SCIP_DECL_PRESOLEXEC (presolExecDualcomp) |
static | SCIP_DECL_PRESOLFREE (presolFreeDualcomp) |
SCIP_RETCODE | SCIPincludePresolDualcomp (SCIP *scip) |
Macro Definition Documentation
◆ PRESOL_NAME
#define PRESOL_NAME "dualcomp" |
Definition at line 59 of file presol_dualcomp.c.
Referenced by SCIP_DECL_PRESOLCOPY(), and SCIPincludePresolDualcomp().
◆ PRESOL_DESC
#define PRESOL_DESC "compensate single up-/downlocks by singleton continuous variables" |
Definition at line 60 of file presol_dualcomp.c.
Referenced by SCIPincludePresolDualcomp().
◆ PRESOL_PRIORITY
#define PRESOL_PRIORITY -50 |
priority of the presolver (>= 0: before, < 0: after constraint handlers)
Definition at line 66 of file presol_dualcomp.c.
Referenced by SCIPincludePresolDualcomp().
◆ PRESOL_MAXROUNDS
#define PRESOL_MAXROUNDS -1 |
maximal number of presolving rounds the presolver participates in (-1: no limit)
Definition at line 67 of file presol_dualcomp.c.
Referenced by SCIPincludePresolDualcomp().
◆ PRESOL_TIMING
#define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE /* timing of the presolver (fast, medium, or exhaustive) */ |
Definition at line 68 of file presol_dualcomp.c.
Referenced by SCIPincludePresolDualcomp().
◆ DEFAULT_COMP_ONLY_DIS_VARS
#define DEFAULT_COMP_ONLY_DIS_VARS FALSE |
should only discrete variables be compensated?
Definition at line 70 of file presol_dualcomp.c.
Referenced by SCIPincludePresolDualcomp().
Typedef Documentation
◆ FIXINGDIRECTION
typedef enum Fixingdirection FIXINGDIRECTION |
Definition at line 89 of file presol_dualcomp.c.
◆ LOCKCOMPENSATION
typedef enum Lockcompensation LOCKCOMPENSATION |
Definition at line 97 of file presol_dualcomp.c.
Enumeration Type Documentation
◆ Fixingdirection
enum Fixingdirection |
type of fixing direction
Definition at line 83 of file presol_dualcomp.c.
◆ Lockcompensation
enum Lockcompensation |
type of variable lock compensation
Enumerator | |
---|---|
COMPENSATE_DOWNLOCK | |
COMPENSATE_UPLOCK |
Definition at line 92 of file presol_dualcomp.c.
Function Documentation
◆ compensateVarLock()
|
static |
try to compensate a variable with a single opposite lock by using singleton continuous variables
- Parameters
-
scip SCIP main data structure matrix matrix containing the constraints col variable fixing candidate row row index with opposite lock val value of fixing candidate in the opposite lock constraint twosides flag indicating that two sides are present compensation type of lock compensation varstofix array holding fixing information nfixings number of possible fixings
Definition at line 106 of file presol_dualcomp.c.
References COMPENSATE_DOWNLOCK, COMPENSATE_UPLOCK, FALSE, FIXATLB, FIXATUB, NOFIX, NULL, SCIP_Bool, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPdebugMsg, SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPmatrixGetColNDownlocks(), SCIPmatrixGetColNNonzs(), SCIPmatrixGetColNUplocks(), SCIPmatrixGetNColumns(), SCIPmatrixGetNRows(), SCIPmatrixGetRowIdxPtr(), SCIPmatrixGetRowLhs(), SCIPmatrixGetRowNNonzs(), SCIPmatrixGetRowRhs(), SCIPmatrixGetRowValPtr(), SCIPmatrixGetVar(), SCIPmatrixPrintRow(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetObj(), SCIPvarGetType(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by SCIP_DECL_PRESOLEXEC().
◆ SCIP_DECL_PRESOLCOPY()
|
static |
copy method for constraint handler plugins (called when SCIP copies plugins)
Definition at line 514 of file presol_dualcomp.c.
References NULL, PRESOL_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludePresolDualcomp(), and SCIPpresolGetName().
◆ SCIP_DECL_PRESOLEXEC()
|
static |
execution method of presolver
Definition at line 528 of file presol_dualcomp.c.
References BMSclearMemoryArray, COMPENSATE_DOWNLOCK, COMPENSATE_UPLOCK, compensateVarLock(), FALSE, FIXATLB, FIXATUB, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PRESOLVING, SCIP_SUCCESS, SCIP_VARTYPE_CONTINUOUS, SCIPallocBufferArray, SCIPallowStrongDualReds(), SCIPdebugMsg, SCIPfixVar(), SCIPfreeBufferArray, SCIPgetNActivePricers(), SCIPgetNContVars(), SCIPgetStage(), SCIPinProbing(), SCIPisEQ(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPisNLPEnabled(), SCIPisStopped(), SCIPisZero(), SCIPmatrixCreate(), SCIPmatrixFree(), SCIPmatrixGetColIdxPtr(), SCIPmatrixGetColNDownlocks(), SCIPmatrixGetColNNonzs(), SCIPmatrixGetColNUplocks(), SCIPmatrixGetColValPtr(), SCIPmatrixGetNColumns(), SCIPmatrixGetRowLhs(), SCIPmatrixGetRowRhs(), SCIPmatrixGetVar(), SCIPmatrixIsRowRhsInfinity(), SCIPpresolGetData(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetObj(), SCIPvarGetType(), SCIPvarGetUbGlobal(), and TRUE.
◆ SCIP_DECL_PRESOLFREE()
|
static |
destructor of presolver to free user data (called when SCIP is exiting)
Definition at line 831 of file presol_dualcomp.c.
References NULL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPpresolGetData(), and SCIPpresolSetData().