Scippy

GCG

Branch-and-Price & Column Generation for Everyone

solver_cliquer.c File Reference

Detailed Description

heuristic solver for pricing problems that solves independent set problems with cliquer

Author
Henri Lotze
Christian Puchert
Johannes Ehls

Definition in file solver_cliquer.c.

#include <assert.h>
#include "gcg/solver_cliquer.h"
#include "scip/cons_linear.h"
#include "scip/cons_varbound.h"
#include "gcg/pub_solver.h"
#include "gcg/pricer_gcg.h"
#include "gcg/relax_gcg.h"
#include "gcg/pub_gcgcol.h"
#include "gcg/pub_gcgvar.h"
#include "gcg/gcg.h"
#include "gcg/scip_misc.h"
#include "cliquer/cliquer.h"

Go to the source code of this file.

Data Structures

struct  GCG_SolverData
 

Macros

#define SOLVER_NAME   "cliquer"
 
#define SOLVER_DESC   "heuristic solver for pricing problems that solves independent set problems with cliquer"
 
#define SOLVER_PRIORITY   150
 
#define SOLVER_HEURENABLED   TRUE
 
#define SOLVER_EXACTENABLED   FALSE
 
#define DEFAULT_MAXNODES   200
 
#define DEFAULT_MAXDENSITY   1.0
 
#define DEFAULT_SKIPCHECKSNODELIMIT   75
 
#define DEFAULT_USELINCUTOFF   TRUE
 
#define DEFAULT_SLOPE   -1980
 
#define DEFAULT_INTERCEPT   2000
 
#define DEFAULT_OBJCOEFDISTR   0
 
#define DEFAULT_USEMULTIPL   FALSE
 
#define DEFAULT_MAXCLIQUECONSPERC   0.5
 
#define solverInitCliquer   NULL
 
#define solverExitCliquer   NULL
 
#define solverUpdateCliquer   NULL
 
#define solverSolveCliquer   NULL
 

Typedefs

typedef enum cliquerConsType CLIQUER_CONSTYPE
 

Enumerations

enum  cliquerConsType {
  LINEAR_IS ,
  LINEAR_IS_LIKE ,
  LINEAR_CLIQUE ,
  LINEAR_COUPLING_DECORATIVE ,
  LINEAR_COUPLING_CLIQUE ,
  VARBND_SAME ,
  VARBND_STD ,
  VARBND_IS
}
 

Functions

static INLINE SCIP_Bool isVarLinked (SCIP_VAR **linkedvars, int nlinkedvars, SCIP_VAR *var)
 
static SCIP_Bool areVarsLinkedRec (int **linkmatrix, int vindex1, int vindex2, int *vartrace, int *traceindex, SCIP_VAR **linkedvars, int nlinkedvars)
 
static SCIP_Bool areVarsLinked (SCIP *scip, int **linkmatrix, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_VAR **linkedvars, int nlinkedvars)
 
static void updateVarLinks (SCIP *scip, int **linkmatrix, SCIP_VAR *var1, SCIP_VAR *var2, SCIP_VAR **linkedvars, int *nlinkedvars)
 
static INLINE int getNodeIndex (SCIP_VAR *var, SCIP_VAR **vararray, int indexcount)
 
static int getLinkedNodeIndex (SCIP *scip, SCIP_VAR *var, SCIP_VAR **indsetvars, int indexcount, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars)
 
static INLINE int countReachableVars (SCIP *scip, int **linkmatrix, SCIP_VAR *var, SCIP_VAR **linkedvars, int nlinkedvars)
 
static INLINE SCIP_VAR * getLinkedNodeVar (SCIP *scip, SCIP_VAR *var, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars)
 
static INLINE int getNodeIndexCouplDigraph (SCIP *scip, SCIP_VAR *var, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars, SCIP_VAR **varsincouplings, int nvarsincouplings)
 
static void aggregateObjCoef (SCIP *scip, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars, SCIP_Real *aggrobjcoef)
 
static INLINE SCIP_Real getAggrObjCoef (SCIP_VAR *var, int nlinkedvars, int nvarsincouplings, SCIP_Real *aggrobjcoef)
 
static INLINE void setAggrObjCoef (SCIP *scip, SCIP_VAR *var, SCIP_Real value, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix, SCIP_Real *aggrobjcoef)
 
static int addVarToGraph (SCIP *scip, graph_t *g, SCIP_VAR *consvar, int *indexcount, SCIP_Real scalingfactor, SCIP_VAR **indsetvars, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars, int nvarsincouplings, SCIP_Real *aggrobjcoef)
 
static void setLinkedSolvals (SCIP *scip, SCIP_Real *solvals, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars, SCIP_VAR *var, SCIP_Real val)
 
static SCIP_Bool areObjectivesIntegral (SCIP *scip, SCIP_VAR **linkedvars, int nlinkedvars, SCIP_VAR **varsincouplings, int nvarsincouplings, SCIP_Real *aggrobjcoef)
 
static SCIP_Real scaleRelativeToMax (SCIP *scip, SCIP_VAR **linkedvars, int nlinkedvars, SCIP_VAR **varsincouplings, int nvarsincouplings, SCIP_Real *aggrobjcoef)
 
static void setProblemNotApplicable (GCG *gcg, int probnr, SCIP_Bool *isnotapplicable)
 
static INLINE int assureInCouplingGraph (SCIP *scip, SCIP_VAR **varsincouplings, int *nvarsincouplings, SCIP_VAR *var, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix)
 
static INLINE void updateCouplingDiGraph (SCIP *scip, SCIP_VAR **consvars, int nconsvars, SCIP_VAR *var, int **couplingmatrix, SCIP_VAR **varsincouplings, int *nvarsincouplings, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix)
 
static SCIP_Bool isCouplingRelevantRec (SCIP *scip, int varind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int nlinkedvars, SCIP_Real *aggrobjcoef, int maxdepth)
 
static INLINE SCIP_Bool isCouplingRelevant (SCIP *scip, int varind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int nlinkedvars, SCIP_Real *aggrobjcoef)
 
static INLINE SCIP_Bool isCouplingRelevantVar (SCIP *scip, SCIP_VAR *var, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars, SCIP_Real *aggrobjcoef)
 
static INLINE SCIP_Bool hasSuccessorRel (SCIP *scip, int varind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int nlinkedvars, SCIP_Real *aggrobjcoef)
 
static INLINE int getNSuccessorsRelevant (SCIP *scip, int varind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int nlinkedvars, SCIP_Real *aggrobjcoef, int *varmultiplicities, SCIP_Bool usemultiplicities)
 
static INLINE void initVarMultiplicities (SCIP *scip, int **linkmatrix, SCIP_VAR **linkedvars, int nlinkedvars, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int *varmultiplicities)
 
static INLINE void objCoefDistrHeurNatural (SCIP *scip, int actvarind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int *varmultiplicities, SCIP_Bool usemultipl, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix, SCIP_Real *aggrobjcoef, SCIP_CONS **constraints, int nconss, int *couplingcoefindices, CLIQUER_CONSTYPE *cliquerconstypes)
 
static INLINE void objCoefDistrHeurIS (SCIP *scip, int actvarind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int *varmultiplicities, SCIP_Bool usemultipl, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix, SCIP_Real *aggrobjcoef, SCIP_CONS **constraints, int nconss, int *couplingcoefindices, CLIQUER_CONSTYPE *cliquerconstypes)
 
static INLINE void objCoefDistrHeurUniform (SCIP *scip, int actvarind, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int *varmultiplicities, SCIP_Bool usemultipl, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix, SCIP_Real *aggrobjcoef)
 
static void distributeObjCoefRec (SCIP *scip, int actvarind, SCIP_Bool *isdistributed, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, int *varmultiplicities, SCIP_Bool usemultipl, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix, SCIP_Real *aggrobjcoef, SCIP_CONS **constraints, int nconss, int *couplingcoefindices, CLIQUER_CONSTYPE *cliquerconstypes, int selecteddistrheur)
 
static void distributeObjCoef (SCIP *scip, SCIP_CONS **constraints, int nconss, int *couplingcoefindices, CLIQUER_CONSTYPE *cliquerconstypes, int **couplingmatrix, SCIP_VAR **varsincouplings, int nvarsincouplings, SCIP_VAR **linkedvars, int nlinkedvars, int **linkmatrix, SCIP_Real *aggrobjcoef, int selecteddistrheur, SCIP_Bool usemultipl)
 
static SCIP_Bool determineCliquerConsTypes (SCIP *pricingprob, SCIP_CONS **constraints, SCIP_VAR **linkedvars, SCIP_VAR **vconsvars, int *markedconsindices, int **linkmatrix, int *couplingcoefindices, int *nlinkedvars, int nconss, int *markedcount, CLIQUER_CONSTYPE *cliquerconstypes)
 
static SCIP_Bool propagateVariablefixings (SCIP *pricingprob, SCIP_CONS **constraints, SCIP_VAR **linkedvars, SCIP_VAR **vconsvars, SCIP_VAR **varsincouplings, SCIP_Real *solvals, int **couplingmatrix, int **linkmatrix, int *nvarsincouplings, int *couplingcoefindices, int *consvarsfixedcount, int nlinkedvars, int nconss, int *nfixedvars, CLIQUER_CONSTYPE *cliquerconstypes)
 
static SCIP_RETCODE solveCliquer (SCIP_Bool exactly, GCG *gcg, SCIP *pricingprob, GCG_SOLVERDATA *solver, int probnr, SCIP_Real *lowerbound, GCG_PRICINGSTATUS *status)
 
static GCG_DECL_SOLVERFREE (solverFreeCliquer)
 
static GCG_DECL_SOLVERINITSOL (solverInitsolCliquer)
 
static GCG_DECL_SOLVEREXITSOL (solverExitsolCliquer)
 
static GCG_DECL_SOLVERSOLVEHEUR (solverSolveHeurCliquer)
 
SCIP_RETCODE GCGincludeSolverCliquer (GCG *gcg)
 

Macro Definition Documentation

◆ SOLVER_NAME

#define SOLVER_NAME   "cliquer"

Definition at line 55 of file solver_cliquer.c.

◆ SOLVER_DESC

#define SOLVER_DESC   "heuristic solver for pricing problems that solves independent set problems with cliquer"

Definition at line 56 of file solver_cliquer.c.

◆ SOLVER_PRIORITY

#define SOLVER_PRIORITY   150

Definition at line 57 of file solver_cliquer.c.

◆ SOLVER_HEURENABLED

#define SOLVER_HEURENABLED   TRUE

indicates whether the solver should be enabled

Definition at line 59 of file solver_cliquer.c.

◆ SOLVER_EXACTENABLED

#define SOLVER_EXACTENABLED   FALSE

indicates whether the solver should be enabled

Definition at line 60 of file solver_cliquer.c.

◆ DEFAULT_MAXNODES

#define DEFAULT_MAXNODES   200

Definition at line 62 of file solver_cliquer.c.

◆ DEFAULT_MAXDENSITY

#define DEFAULT_MAXDENSITY   1.0

Definition at line 63 of file solver_cliquer.c.

◆ DEFAULT_SKIPCHECKSNODELIMIT

#define DEFAULT_SKIPCHECKSNODELIMIT   75

Definition at line 64 of file solver_cliquer.c.

◆ DEFAULT_USELINCUTOFF

#define DEFAULT_USELINCUTOFF   TRUE

Definition at line 65 of file solver_cliquer.c.

◆ DEFAULT_SLOPE

#define DEFAULT_SLOPE   -1980

Definition at line 66 of file solver_cliquer.c.

◆ DEFAULT_INTERCEPT

#define DEFAULT_INTERCEPT   2000

Definition at line 67 of file solver_cliquer.c.

◆ DEFAULT_OBJCOEFDISTR

#define DEFAULT_OBJCOEFDISTR   0

Definition at line 68 of file solver_cliquer.c.

◆ DEFAULT_USEMULTIPL

#define DEFAULT_USEMULTIPL   FALSE

Definition at line 69 of file solver_cliquer.c.

◆ DEFAULT_MAXCLIQUECONSPERC

#define DEFAULT_MAXCLIQUECONSPERC   0.5

Definition at line 70 of file solver_cliquer.c.

◆ solverInitCliquer

#define solverInitCliquer   NULL

Definition at line 2803 of file solver_cliquer.c.

◆ solverExitCliquer

#define solverExitCliquer   NULL

Definition at line 2804 of file solver_cliquer.c.

◆ solverUpdateCliquer

#define solverUpdateCliquer   NULL

Definition at line 2805 of file solver_cliquer.c.

◆ solverSolveCliquer

#define solverSolveCliquer   NULL

Definition at line 2806 of file solver_cliquer.c.

Typedef Documentation

◆ CLIQUER_CONSTYPE

Definition at line 88 of file solver_cliquer.c.

Enumeration Type Documentation

◆ cliquerConsType

Enumerator
LINEAR_IS 
LINEAR_IS_LIKE 
LINEAR_CLIQUE 
LINEAR_COUPLING_DECORATIVE 
LINEAR_COUPLING_CLIQUE 
VARBND_SAME 
VARBND_STD 
VARBND_IS 

Definition at line 77 of file solver_cliquer.c.

Function Documentation

◆ isVarLinked()

static INLINE SCIP_Bool isVarLinked ( SCIP_VAR **  linkedvars,
int  nlinkedvars,
SCIP_VAR *  var 
)
static

Returns whether the given var is linked in some way with other variables

Parameters
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
varVariable whose membership in the linkedvars array is to be checked

Definition at line 111 of file solver_cliquer.c.

References FALSE, SCIP_Bool, and TRUE.

Referenced by addVarToGraph(), assureInCouplingGraph(), getLinkedNodeIndex(), getNodeIndexCouplDigraph(), initVarMultiplicities(), and setAggrObjCoef().

◆ areVarsLinkedRec()

static SCIP_Bool areVarsLinkedRec ( int **  linkmatrix,
int  vindex1,
int  vindex2,
int *  vartrace,
int *  traceindex,
SCIP_VAR **  linkedvars,
int  nlinkedvars 
)
static

Returns whether 2 variables are linked, either simply or in a transitive way in respect to a given linkmatrix matrix. Use of the wrapper function areVarsLinked(..) is recommended

Parameters
linkmatrixMatrix indicating which variables are linked by a node
vindex1Problem index of the first variable in the pair that is to be checked
vindex2Problem index of the second variable in the pair that is to be checked
vartraceArray to keep track of which nodes have already been visited during recursion
traceindexPointer to index to keep track of the number of visited nodes during recursion
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array

Definition at line 133 of file solver_cliquer.c.

References areVarsLinkedRec(), FALSE, SCIP_Bool, SCIPvarGetProbindex(), and TRUE.

Referenced by areVarsLinked(), and areVarsLinkedRec().

◆ areVarsLinked()

static SCIP_Bool areVarsLinked ( SCIP *  scip,
int **  linkmatrix,
SCIP_VAR *  var1,
SCIP_VAR *  var2,
SCIP_VAR **  linkedvars,
int  nlinkedvars 
)
static

Wrapper function for areVarsLinkedRec, mallocs and cleans up the necessary memory and passes through the result

Parameters
scipThe problem instance
linkmatrixMatrix indicating which variables are linked by a node
var1The first variable in the pair that is to be checked
var2The second variable in the pair that is to be checked
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array

Definition at line 184 of file solver_cliquer.c.

References areVarsLinkedRec(), SCIP_Bool, SCIP_CALL_ABORT, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPvarGetProbindex(), and TRUE.

Referenced by aggregateObjCoef(), getLinkedNodeIndex(), getLinkedNodeVar(), propagateVariablefixings(), setAggrObjCoef(), setLinkedSolvals(), and updateVarLinks().

◆ updateVarLinks()

static void updateVarLinks ( SCIP *  scip,
int **  linkmatrix,
SCIP_VAR *  var1,
SCIP_VAR *  var2,
SCIP_VAR **  linkedvars,
int *  nlinkedvars 
)
static

Update transitivity in the linkmatrix matrix between 2 variables that are to be linked and all linked variables

Parameters
scipThe Problem instance
linkmatrixMatrix indicating which variables are linked by a node
var1The first variable in the pair that is to be checked
var2The second variable in the pair that is to be checked
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array

Definition at line 226 of file solver_cliquer.c.

References areVarsLinked(), FALSE, SCIP_Bool, SCIPvarGetProbindex(), and TRUE.

Referenced by determineCliquerConsTypes().

◆ getNodeIndex()

static INLINE int getNodeIndex ( SCIP_VAR *  var,
SCIP_VAR **  vararray,
int  indexcount 
)
static

Get the node index of a given variable in a given array (for graph), else return -1

Parameters
varVariable for which the node index is to be determined
vararrayArray of variables that are mapped to a node of the graph
indexcountNumber of variables that are mapped in the graph

Definition at line 299 of file solver_cliquer.c.

Referenced by addVarToGraph(), countReachableVars(), getLinkedNodeIndex(), and getNodeIndexCouplDigraph().

◆ getLinkedNodeIndex()

static int getLinkedNodeIndex ( SCIP *  scip,
SCIP_VAR *  var,
SCIP_VAR **  indsetvars,
int  indexcount,
int **  linkmatrix,
SCIP_VAR **  linkedvars,
int  nlinkedvars 
)
static

Returns the node index of a given variable in the bijection or that of a linked variable, if any.

Parameters
scipThe problem instance
varVariable for which the node index is to be determined
indsetvarsArray of variables that are mapped to a node of the graph
indexcountNumber of variables that are mapped in the graph
linkmatrixMatrix indicating which variables are linked by a node
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array

Definition at line 317 of file solver_cliquer.c.

References areVarsLinked(), getNodeIndex(), and isVarLinked().

Referenced by addVarToGraph(), and solveCliquer().

◆ countReachableVars()

static INLINE int countReachableVars ( SCIP *  scip,
int **  linkmatrix,
SCIP_VAR *  var,
SCIP_VAR **  linkedvars,
int  nlinkedvars 
)
static

Computes the number of reachable nodes from a given variable

Parameters
scipThe problem instance
linkmatrixMatrix indicating which variables are linked
varThe starting variable
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsNumber of linked variables

Definition at line 357 of file solver_cliquer.c.

References getNodeIndex(), SCIP_Bool, SCIP_CALL_ABORT, SCIPallocBufferArray, SCIPallocCleanBufferArray, SCIPfreeBufferArray, SCIPvarGetProbindex(), and TRUE.

Referenced by initVarMultiplicities().

◆ getLinkedNodeVar()

static INLINE SCIP_VAR * getLinkedNodeVar ( SCIP *  scip,
SCIP_VAR *  var,
int **  linkmatrix,
SCIP_VAR **  linkedvars,
int  nlinkedvars 
)
static

Returns a representative variable for a given variable in the linked variable-bijection, if any, else NULL.

Parameters
scipThe problem instance
varVariable for which the node index is to be determined
linkmatrixMatrix indicating which variables are linked by a node
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array

Definition at line 410 of file solver_cliquer.c.

References areVarsLinked(), and NULL.

Referenced by assureInCouplingGraph(), and getNodeIndexCouplDigraph().

◆ getNodeIndexCouplDigraph()

static INLINE int getNodeIndexCouplDigraph ( SCIP *  scip,
SCIP_VAR *  var,
int **  linkmatrix,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings 
)
static

Returns the index of the representative variable for a given variable in the linked variable-bijection, if any.

Parameters
scipThe problem instance
varVariable for which the node index is to be determined
linkmatrixMatrix indicating which variables are linked by a node
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array

Definition at line 430 of file solver_cliquer.c.

References getLinkedNodeVar(), getNodeIndex(), isVarLinked(), and NULL.

Referenced by isCouplingRelevantVar(), objCoefDistrHeurIS(), and objCoefDistrHeurNatural().

◆ aggregateObjCoef()

static void aggregateObjCoef ( SCIP *  scip,
int **  linkmatrix,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
SCIP_Real *  aggrobjcoef 
)
static

Aggregates objective coefficients for linked variables in the aggrobjcoef array.

Parameters
scipThe problem instance
linkmatrixMatrix indicating which variables are linked by a node
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
aggrobjcoefArray of aggregated objective coefficients.

Definition at line 448 of file solver_cliquer.c.

References areVarsLinked(), SCIP_CALL_ABORT, SCIP_Real, SCIPallocClearBufferArray, SCIPfreeBufferArray, SCIPvarGetObj(), and SCIPvarGetProbindex().

Referenced by solveCliquer().

◆ getAggrObjCoef()

static INLINE SCIP_Real getAggrObjCoef ( SCIP_VAR *  var,
int  nlinkedvars,
int  nvarsincouplings,
SCIP_Real *  aggrobjcoef 
)
static

Returns the aggregated objective coefficient.

Parameters
varThe variable for which the aggr. obj. coef. should be returned
nlinkedvarsIndex of linkedvars array
nvarsincouplingsIndex of varsincouplings array
aggrobjcoefArray of aggregated objective coefficients.

Definition at line 495 of file solver_cliquer.c.

References SCIP_Real, SCIPvarGetObj(), and SCIPvarGetProbindex().

Referenced by addVarToGraph(), areObjectivesIntegral(), distributeObjCoefRec(), isCouplingRelevantRec(), objCoefDistrHeurIS(), objCoefDistrHeurNatural(), objCoefDistrHeurUniform(), scaleRelativeToMax(), and solveCliquer().

◆ setAggrObjCoef()

static INLINE void setAggrObjCoef ( SCIP *  scip,
SCIP_VAR *  var,
SCIP_Real  value,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
int **  linkmatrix,
SCIP_Real *  aggrobjcoef 
)
static

Set (/update) aggregated objective coefficients savely.

Parameters
scipThe problem instance
varThe variable for which the aggr. obj. coef. should be updated
valueValue to set for given var (and linked vars)
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
linkmatrixMatrix indicating which variables are linked by a node
aggrobjcoefArray of aggregated objective coefficients.

Definition at line 509 of file solver_cliquer.c.

References areVarsLinked(), isVarLinked(), and SCIPvarGetProbindex().

Referenced by objCoefDistrHeurIS(), objCoefDistrHeurNatural(), and objCoefDistrHeurUniform().

◆ addVarToGraph()

static int addVarToGraph ( SCIP *  scip,
graph_t *  g,
SCIP_VAR *  consvar,
int *  indexcount,
SCIP_Real  scalingfactor,
SCIP_VAR **  indsetvars,
int **  linkmatrix,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
int  nvarsincouplings,
SCIP_Real *  aggrobjcoef 
)
static

Add a variable to the bijection graph g and indsetvars array. Returns the index of the corresponding node in the graph.

Parameters
scipThe problem instance
gGraph into which to insert the new variable as a node
consvarThe variable that is to be assigned a node in the graph
indexcountPointer to Index of the next unassigned node in the graph
scalingfactorFactor for scaling the weight of newly mapped nodes
indsetvarsArray that keeps track of variables that are part of the graph
linkmatrixMatrix indicating which variables are linked by a node
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
nvarsincouplingsIndex of varsincouplings array
aggrobjcoefArray of aggregated objective coefficients.

Definition at line 538 of file solver_cliquer.c.

References abs(), getAggrObjCoef(), getLinkedNodeIndex(), getNodeIndex(), isVarLinked(), SCIP_Real, and SCIPisLT().

Referenced by solveCliquer().

◆ setLinkedSolvals()

static void setLinkedSolvals ( SCIP *  scip,
SCIP_Real *  solvals,
int **  linkmatrix,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
SCIP_VAR *  var,
SCIP_Real  val 
)
static

Set the solvals of a variable and of all its linked variables, if any

Parameters
scipThe problem instance
solvalsArray holding the current solution values of all variables of the problem
linkmatrixMatrix indicating which variables are linked by a node
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
varVar that may be linked that itself should be set to the value val
valValue to which all linked vars are supposed to be set to

Definition at line 583 of file solver_cliquer.c.

References areVarsLinked(), SCIPisGE(), SCIPisLE(), SCIPvarGetLbLocal(), SCIPvarGetProbindex(), and SCIPvarGetUbLocal().

Referenced by propagateVariablefixings(), and solveCliquer().

◆ areObjectivesIntegral()

static SCIP_Bool areObjectivesIntegral ( SCIP *  scip,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
SCIP_Real *  aggrobjcoef 
)
static

Check if the objective coefficients of the variables are already Integral

Parameters
scipThe problem instance
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
varsincouplingsArray of variables that are involved in coupling
nvarsincouplingsIndex of varsincouplings array
aggrobjcoefArray of aggregated objective coefficients.

Definition at line 613 of file solver_cliquer.c.

References FALSE, getAggrObjCoef(), SCIP_Bool, SCIP_Real, SCIPgetNVars(), SCIPgetVars(), SCIPisZero(), and TRUE.

Referenced by solveCliquer().

◆ scaleRelativeToMax()

static SCIP_Real scaleRelativeToMax ( SCIP *  scip,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
SCIP_Real *  aggrobjcoef 
)
static

Scale the objective coefficients of the variables maximally s.t. they become integral and the sum of values does not exceed INT_MAX

Parameters
scipThe problem instance
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
varsincouplingsArray of variables that are involved in coupling
nvarsincouplingsIndex of varsincouplings array
aggrobjcoefArray of aggregated objective coefficients.

Definition at line 643 of file solver_cliquer.c.

References getAggrObjCoef(), SCIP_Real, SCIPgetNVars(), SCIPgetVars(), and SCIPisLT().

Referenced by solveCliquer().

◆ setProblemNotApplicable()

static void setProblemNotApplicable ( GCG *  gcg,
int  probnr,
SCIP_Bool *  isnotapplicable 
)
static

Set isnotapplicable to true for given problem number if solver is applied at root node and no cuts are applied.

Parameters
gcgmaster problem SCIP data structure
probnrpricing problem number
isnotapplicablearray storing if solver is applicable to problems

Definition at line 684 of file solver_cliquer.c.

References GCGgetMasterprob(), GCGisRootNode(), SCIPgetNCutsApplied(), and TRUE.

Referenced by solveCliquer().

◆ assureInCouplingGraph()

static INLINE int assureInCouplingGraph ( SCIP *  scip,
SCIP_VAR **  varsincouplings,
int *  nvarsincouplings,
SCIP_VAR *  var,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
int **  linkmatrix 
)
static

Returns index in adjacency matrix of coupling digraph (after inserting it if not already contained).

Parameters
scipThe problem instance
varsincouplingsArray of variables that are involved in coupling
nvarsincouplingsIndex of varsincouplings array
varVariable whose membership in the varsincouplings array is to be checked
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
linkmatrixMatrix indicating which variables are linked by eq-constraints

Definition at line 696 of file solver_cliquer.c.

References getLinkedNodeVar(), and isVarLinked().

Referenced by updateCouplingDiGraph().

◆ updateCouplingDiGraph()

static INLINE void updateCouplingDiGraph ( SCIP *  scip,
SCIP_VAR **  consvars,
int  nconsvars,
SCIP_VAR *  var,
int **  couplingmatrix,
SCIP_VAR **  varsincouplings,
int *  nvarsincouplings,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
int **  linkmatrix 
)
static

Update coupling digraph for a given coupling(like) constraint, i.e., the coupling and constraint vars. This is done by assuring all variables have a corresponding index in the graph. Then, directed edges from coupling var to each other var involved in the constraint are inserted.

Parameters
scipThe problem instance
consvarsArray of variables in constraint for which to update the graph
nconsvarsIndex of consvars array
varCoupling / vbd variable for which to update graph
couplingmatrixMatrix indicating which variables are involved in couplings
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
linkmatrixMatrix indicating which variables are linked by eq-constraints

Definition at line 726 of file solver_cliquer.c.

References assureInCouplingGraph().

Referenced by propagateVariablefixings().

◆ isCouplingRelevantRec()

static SCIP_Bool isCouplingRelevantRec ( SCIP *  scip,
int  varind,
int **  couplingmatrix,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
int  nlinkedvars,
SCIP_Real *  aggrobjcoef,
int  maxdepth 
)
static

Recursive function - should be called through isCouplingRelevant() or other non-recursive methods. Checks if a variable for a given index in the coupling digraph is relevant for distributing the coefficients.

Parameters
scipThe problem instance
varindVariable index for which to check if it has a successor
couplingmatrixMatrix indicating which variables are involved in couplings
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array
nlinkedvarsIndex of linkedvars array
aggrobjcoefArray of aggregated objective coefficients.
maxdepthInteger limiting recursion to finite depth in case of a cycle.

Definition at line 762 of file solver_cliquer.c.

References FALSE, getAggrObjCoef(), isCouplingRelevantRec(), SCIP_Bool, SCIPisLT(), and TRUE.

Referenced by getNSuccessorsRelevant(), hasSuccessorRel(), isCouplingRelevant(), isCouplingRelevantRec(), and isCouplingRelevantVar().

◆ isCouplingRelevant()

static INLINE SCIP_Bool isCouplingRelevant ( SCIP *  scip,
int  varind,
int **  couplingmatrix,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
int  nlinkedvars,
SCIP_Real *  aggrobjcoef 
)
static

Checks if a variable for a given index in the coupling digraph is relevant for distributing the coefficients. A variable is said to be relevant iff

  • it has a negative objective coefficient or
  • in the digraph a node corresponding to a variable with negative obj. coef. is reachable in the digraph.
Parameters
scipThe problem instance
varindVariable index for which to check if it has a successor
couplingmatrixMatrix indicating which variables are involved in couplings
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array
nlinkedvarsIndex of linkedvars array
aggrobjcoefArray of aggregated objective coefficients.

Definition at line 798 of file solver_cliquer.c.

References isCouplingRelevantRec(), and SCIP_Bool.

Referenced by objCoefDistrHeurIS(), objCoefDistrHeurNatural(), and objCoefDistrHeurUniform().

◆ isCouplingRelevantVar()

static INLINE SCIP_Bool isCouplingRelevantVar ( SCIP *  scip,
SCIP_VAR *  var,
int **  couplingmatrix,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
int **  linkmatrix,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
SCIP_Real *  aggrobjcoef 
)
static

Same as isCouplingRelevant(), but takes a SCIP_VAR pointer instead of the digraph index.

Parameters
scipThe problem instance
varVariable for which to check if it has a successor
couplingmatrixMatrix indicating which variables are involved in couplings
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array
linkmatrixMatrix indicating which variables are linked by eq-constraints
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
aggrobjcoefArray of aggregated objective coefficients.

Definition at line 814 of file solver_cliquer.c.

References getNodeIndexCouplDigraph(), isCouplingRelevantRec(), and SCIP_Bool.

Referenced by objCoefDistrHeurIS(), and objCoefDistrHeurNatural().

◆ hasSuccessorRel()

static INLINE SCIP_Bool hasSuccessorRel ( SCIP *  scip,
int  varind,
int **  couplingmatrix,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
int  nlinkedvars,
SCIP_Real *  aggrobjcoef 
)
static

Checks in the coupling digraph if a var with a given index has a coupling relevant successor.

Parameters
scipThe problem instance
varindVariable index for which to check if it has a successor
couplingmatrixMatrix indicating which variables are involved in couplings
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array
nlinkedvarsIndex of linkedvars array
aggrobjcoefArray of aggregated objective coefficients.

Definition at line 837 of file solver_cliquer.c.

References FALSE, isCouplingRelevantRec(), SCIP_Bool, and TRUE.

Referenced by distributeObjCoef().

◆ getNSuccessorsRelevant()

static INLINE int getNSuccessorsRelevant ( SCIP *  scip,
int  varind,
int **  couplingmatrix,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
int  nlinkedvars,
SCIP_Real *  aggrobjcoef,
int *  varmultiplicities,
SCIP_Bool  usemultiplicities 
)
static

Get the number of coupling-relevant successors in the Coupling DiGraph.

Parameters
scipThe problem instance
varindVariable index for which to count the successors
couplingmatrixMatrix indicating which variables are involved in couplings
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array
nlinkedvarsIndex of linkedvars array
aggrobjcoefArray of aggregated objective coefficients.
varmultiplicitiesArray holding number of vars represented by digraph node
usemultiplicitiesWether to use the given multiplicities

Definition at line 863 of file solver_cliquer.c.

References isCouplingRelevantRec().

Referenced by objCoefDistrHeurIS(), objCoefDistrHeurNatural(), and objCoefDistrHeurUniform().

◆ initVarMultiplicities()

static INLINE void initVarMultiplicities ( SCIP *  scip,
int **  linkmatrix,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
int **  couplingmatrix,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
int *  varmultiplicities 
)
static

Compute entries for varmultiplicities array holding counts of represented variables per digraph node

Parameters
scipThe problem instance
linkmatrixMatrix indicating which variables are linked
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsNumber of linked variables
couplingmatrixMatrix indicating which variables are involved in couplings
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array
varmultiplicitiesArray holding number of vars represented by digraph node

Definition at line 893 of file solver_cliquer.c.

References countReachableVars(), and isVarLinked().

Referenced by distributeObjCoef().

◆ objCoefDistrHeurNatural()

static INLINE void objCoefDistrHeurNatural ( SCIP *  scip,
int  actvarind,
int **  couplingmatrix,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
int *  varmultiplicities,
SCIP_Bool  usemultipl,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
int **  linkmatrix,
SCIP_Real *  aggrobjcoef,
SCIP_CONS **  constraints,
int  nconss,
int *  couplingcoefindices,
CLIQUER_CONSTYPE *  cliquerconstypes 
)
static

Coupling(-like) Variable Objective Distribution Strategy 1: Natural Coefficient Share Distribution.

Parameters
scipThe problem instance
actvarindIndex of actual variable
couplingmatrixMatrix indicating which variables are involved in couplings
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array
varmultiplicitiesArray holding number of vars represented by digraph node
usemultiplWether varmultiplicities should be used for weighting
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
linkmatrixMatrix indicating which variables are linked by eq-constraints
aggrobjcoefArray of aggregated objective coefficients.
constraintsArray containing pointers to SCIP constraints of pricing problem
nconssIndex of constraints array
couplingcoefindicesArray for coupling coefficient of each constraint (if coupling)
cliquerconstypesArray holding constraint types (specific to this solver)

Definition at line 946 of file solver_cliquer.c.

References denominator(), FALSE, getAggrObjCoef(), getNodeIndexCouplDigraph(), getNSuccessorsRelevant(), isCouplingRelevant(), isCouplingRelevantVar(), LINEAR_COUPLING_CLIQUE, LINEAR_COUPLING_DECORATIVE, SCIP_Bool, SCIP_CALL_ABORT, SCIP_Real, SCIPallocClearBufferArray, SCIPblkmem(), SCIPfreeBufferArray, SCIPgetConsNVars(), SCIPgetVarsLinear(), SCIPgetVarVarbound(), SCIPgetVbdvarVarbound(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImageInt(), SCIPhashmapSetImageInt(), setAggrObjCoef(), and VARBND_STD.

Referenced by distributeObjCoefRec().

◆ objCoefDistrHeurIS()

static INLINE void objCoefDistrHeurIS ( SCIP *  scip,
int  actvarind,
int **  couplingmatrix,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
int *  varmultiplicities,
SCIP_Bool  usemultipl,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
int **  linkmatrix,
SCIP_Real *  aggrobjcoef,
SCIP_CONS **  constraints,
int  nconss,
int *  couplingcoefindices,
CLIQUER_CONSTYPE *  cliquerconstypes 
)
static

Coupling(-like) Variable Objective Distribution Strategy 2: Independent Set-based share distribution.

Parameters
scipThe problem instance
actvarindIndex of actual variable
couplingmatrixMatrix indicating which variables are involved in couplings
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array
varmultiplicitiesArray holding number of vars represented by digraph node
usemultiplWether varmultiplicities should be used for weighting
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
linkmatrixMatrix indicating which variables are linked by eq-constraints
aggrobjcoefArray of aggregated objective coefficients.
constraintsArray containing pointers to SCIP constraints of pricing problem
nconssIndex of constraints array
couplingcoefindicesArray for coupling coefficient of each constraint (if coupling)
cliquerconstypesArray holding constraint types (specific to this solver)

Definition at line 1107 of file solver_cliquer.c.

References denominator(), FALSE, getAggrObjCoef(), getNodeIndexCouplDigraph(), getNSuccessorsRelevant(), isCouplingRelevant(), isCouplingRelevantVar(), LINEAR_COUPLING_CLIQUE, NULL, SCIP_Bool, SCIP_CALL_ABORT, SCIP_Real, SCIPblkmem(), SCIPgetConsNVars(), SCIPgetVarsLinear(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImageInt(), SCIPhashmapSetImageInt(), and setAggrObjCoef().

Referenced by distributeObjCoefRec().

◆ objCoefDistrHeurUniform()

static INLINE void objCoefDistrHeurUniform ( SCIP *  scip,
int  actvarind,
int **  couplingmatrix,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
int *  varmultiplicities,
SCIP_Bool  usemultipl,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
int **  linkmatrix,
SCIP_Real *  aggrobjcoef 
)
static

Coupling(-like) Variable Objective Distribution Strategy 3: Uniform Coefficient Share Distribution.

Parameters
scipThe problem instance
actvarindIndex of actual variable
couplingmatrixMatrix indicating which variables are involved in couplings
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array
varmultiplicitiesArray holding number of vars represented by digraph node
usemultiplWether varmultiplicities should be used for weighting
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
linkmatrixMatrix indicating which variables are linked by eq-constraints
aggrobjcoefArray of aggregated objective coefficients.

Definition at line 1266 of file solver_cliquer.c.

References getAggrObjCoef(), getNSuccessorsRelevant(), isCouplingRelevant(), SCIP_Real, and setAggrObjCoef().

Referenced by distributeObjCoefRec().

◆ distributeObjCoefRec()

static void distributeObjCoefRec ( SCIP *  scip,
int  actvarind,
SCIP_Bool *  isdistributed,
int **  couplingmatrix,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
int *  varmultiplicities,
SCIP_Bool  usemultipl,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
int **  linkmatrix,
SCIP_Real *  aggrobjcoef,
SCIP_CONS **  constraints,
int  nconss,
int *  couplingcoefindices,
CLIQUER_CONSTYPE *  cliquerconstypes,
int  selecteddistrheur 
)
static

Distributes the objective coefficient of coupling(-like) vars to all other vars occurring in those constraints. -> Recursive function: Should be called through non-recursive wrapper function 'distributeObjCoef()'.

Parameters
scipThe problem instance
actvarindIndex of actual variable
isdistributedArray storing if a coupled variable was visited
couplingmatrixMatrix indicating which variables are involved in couplings
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array
varmultiplicitiesArray holding number of vars represented by digraph node
usemultiplWether varmultiplicities should be used for weighting
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
linkmatrixMatrix indicating which variables are linked by eq-constraints
aggrobjcoefArray of aggregated objective coefficients.
constraintsArray containing pointers to SCIP constraints of pricing problem
nconssIndex of constraints array
couplingcoefindicesArray for coupling coefficient of each constraint (if coupling)
cliquerconstypesArray holding constraint types (specific to this solver)
selecteddistrheurNumber of selected obj coef distribution heuristic.

Definition at line 1307 of file solver_cliquer.c.

References distributeObjCoefRec(), getAggrObjCoef(), objCoefDistrHeurIS(), objCoefDistrHeurNatural(), objCoefDistrHeurUniform(), SCIPisGT(), and TRUE.

Referenced by distributeObjCoef(), and distributeObjCoefRec().

◆ distributeObjCoef()

static void distributeObjCoef ( SCIP *  scip,
SCIP_CONS **  constraints,
int  nconss,
int *  couplingcoefindices,
CLIQUER_CONSTYPE *  cliquerconstypes,
int **  couplingmatrix,
SCIP_VAR **  varsincouplings,
int  nvarsincouplings,
SCIP_VAR **  linkedvars,
int  nlinkedvars,
int **  linkmatrix,
SCIP_Real *  aggrobjcoef,
int  selecteddistrheur,
SCIP_Bool  usemultipl 
)
static

Distributes the objective coefficient of coupling(-like) vars to all other vars occurring in those constraints.

Parameters
scipThe problem instance
constraintsArray containing pointers to SCIP constraints of pricing problem
nconssIndex of constraints array
couplingcoefindicesArray for coupling coefficient of each constraint (if coupling)
cliquerconstypesArray holding constraint types (specific to this solver)
couplingmatrixMatrix indicating which variables are linked by a node
varsincouplingsArray of variables that are involved in couplings
nvarsincouplingsIndex of varsincouplings array
linkedvarsArray of variables that are linked by eq-constraints
nlinkedvarsIndex of linkedvars array
linkmatrixMatrix indicating which variables are linked by eq-constraints
aggrobjcoefArray of aggregated objective coefficients.
selecteddistrheurNumber of selected obj coef distribution heuristic.
usemultiplWether varmultiplicities should be used for weighting

Definition at line 1403 of file solver_cliquer.c.

References distributeObjCoefRec(), hasSuccessorRel(), initVarMultiplicities(), NULL, SCIP_Bool, SCIP_CALL_ABORT, SCIPallocBufferArray, SCIPallocClearBufferArray, SCIPfreeBufferArray, and TRUE.

Referenced by solveCliquer().

◆ determineCliquerConsTypes()

static SCIP_Bool determineCliquerConsTypes ( SCIP *  pricingprob,
SCIP_CONS **  constraints,
SCIP_VAR **  linkedvars,
SCIP_VAR **  vconsvars,
int *  markedconsindices,
int **  linkmatrix,
int *  couplingcoefindices,
int *  nlinkedvars,
int  nconss,
int *  markedcount,
CLIQUER_CONSTYPE *  cliquerconstypes 
)
static

Determine cliquer constraint type and save it in the cliquerconstype array. Also, build same-constraint equality graph and coupling digraph.

Returns
SCIP bool that is false in case a constraint is encountered that cannot be handled, true if propagation was successful.
Parameters
pricingprobpricing problem SCIP data structure
constraintsArray containing pointers to SCIP constraints of pricing problem
linkedvarsArray of variables that are linked by eq-constraints
vconsvarsArray to store variables of a varbound constraint.
markedconsindicesArray containing pointers to SCIP constraints to mark them
linkmatrixMatrix indicating which variables are linked by a node
couplingcoefindicesArray for coupling coefficient of each constraint (if coupling)
nlinkedvarsIndex of linkedvars array
nconssIndex of constraints array
markedcountIndex of markedconstraints array
cliquerconstypesArray holding constraint types (specific to this solver)

Definition at line 1460 of file solver_cliquer.c.

References abs(), FALSE, LINEAR_CLIQUE, LINEAR_COUPLING_CLIQUE, LINEAR_COUPLING_DECORATIVE, LINEAR_IS, LINEAR_IS_LIKE, NULL, SCIP_Bool, SCIP_Real, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPgetConsNVars(), SCIPgetLhsLinear(), SCIPgetLhsVarbound(), SCIPgetNVarsLinear(), SCIPgetRhsLinear(), SCIPgetRhsVarbound(), SCIPgetValsLinear(), SCIPgetVarVarbound(), SCIPgetVbdcoefVarbound(), SCIPgetVbdvarVarbound(), SCIPisEQ(), SCIPisInfinity(), SCIPisLT(), TRUE, updateVarLinks(), VARBND_IS, VARBND_SAME, and VARBND_STD.

Referenced by solveCliquer().

◆ propagateVariablefixings()

static SCIP_Bool propagateVariablefixings ( SCIP *  pricingprob,
SCIP_CONS **  constraints,
SCIP_VAR **  linkedvars,
SCIP_VAR **  vconsvars,
SCIP_VAR **  varsincouplings,
SCIP_Real *  solvals,
int **  couplingmatrix,
int **  linkmatrix,
int *  nvarsincouplings,
int *  couplingcoefindices,
int *  consvarsfixedcount,
int  nlinkedvars,
int  nconss,
int *  nfixedvars,
CLIQUER_CONSTYPE *  cliquerconstypes 
)
static

Propagate fixings of variables through constraints until the set of fixed variables is stable.

Returns
SCIP bool that is false in case the problem is infeasible, true if propagation was successful.
Parameters
pricingprobpricing problem SCIP data structure
constraintsArray containing pointers to SCIP constraints of pricing problem
linkedvarsArray of variables that are linked by eq-constraints
vconsvarsArray to store variables of a varbound constraint.
varsincouplingsArray of variables that are involved in couplings
solvalsArray holding the current solution values of all problem variables
couplingmatrixMatrix indicating which variables are involved in couplings
linkmatrixMatrix indicating which variables are linked by a node
nvarsincouplingsIndex of varsincouplings array
couplingcoefindicesArray for coupling coefficient of each constraint (if coupling)
consvarsfixedcountArray for counting how many variables are fixed per constraint
nlinkedvarsIndex of linkedvars array
nconssIndex of constraints array
nfixedvarsInteger counting the number of currently fixed problem variables
cliquerconstypesArray holding constraint types (specific to this solver)

Definition at line 1701 of file solver_cliquer.c.

References areVarsLinked(), FALSE, LINEAR_CLIQUE, LINEAR_COUPLING_CLIQUE, LINEAR_COUPLING_DECORATIVE, LINEAR_IS, LINEAR_IS_LIKE, NULL, SCIP_Bool, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPgetConsNVars(), SCIPgetNVarsLinear(), SCIPgetVarsLinear(), SCIPgetVarVarbound(), SCIPgetVbdvarVarbound(), SCIPvarGetProbindex(), setLinkedSolvals(), TRUE, updateCouplingDiGraph(), VARBND_IS, VARBND_SAME, and VARBND_STD.

Referenced by solveCliquer().

◆ solveCliquer()

static SCIP_RETCODE solveCliquer ( SCIP_Bool  exactly,
GCG *  gcg,
SCIP *  pricingprob,
GCG_SOLVERDATA *  solver,
int  probnr,
SCIP_Real *  lowerbound,
GCG_PRICINGSTATUS *  status 
)
static

Solve the pricing problem as an independent set problem, in an approximate way.

Parameters
exactlyshould the pricing problem be solved to optimality or heuristically?
gcgGCG data structure
pricingprobpricing problem SCIP data structure
solversolver data structure
probnrproblem number
lowerboundpointer to store lower bound
statuspointer to store pricing problem status

Definition at line 2012 of file solver_cliquer.c.

References addVarToGraph(), aggregateObjCoef(), areObjectivesIntegral(), determineCliquerConsTypes(), distributeObjCoef(), FALSE, GCG_PRICINGSTATUS_INFEASIBLE, GCG_PRICINGSTATUS_NOTAPPLICABLE, GCG_PRICINGSTATUS_UNKNOWN, GCGcreateGcgCol(), GCGgetMasterprob(), GCGpricerAddCol(), getAggrObjCoef(), getLinkedNodeIndex(), GCG_SolverData::isnotapplicable, GCG_SolverData::lincutoffintercept, GCG_SolverData::lincutoffslope, LINEAR_CLIQUE, LINEAR_COUPLING_CLIQUE, LINEAR_COUPLING_DECORATIVE, LINEAR_IS, LINEAR_IS_LIKE, GCG_SolverData::maxcliqueconsperc, GCG_SolverData::maxdensity, GCG_SolverData::maxnodes, NULL, GCG_SolverData::objcoefdistr, propagateVariablefixings(), scaleRelativeToMax(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPallocClearBufferArray, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetConsNVars(), SCIPgetConss(), SCIPgetDepth(), SCIPgetNBinVars(), SCIPgetNConss(), SCIPgetNVars(), SCIPgetVars(), SCIPgetVarsLinear(), SCIPgetVarVarbound(), SCIPgetVbdvarVarbound(), SCIPinfinity(), SCIPisGT(), SCIPisLT(), SCIPvarGetLbLocal(), SCIPvarGetObj(), SCIPvarGetProbindex(), SCIPvarGetUbLocal(), setLinkedSolvals(), setProblemNotApplicable(), GCG_SolverData::skipchecksnodelimit, TRUE, GCG_SolverData::uselincutoff, GCG_SolverData::usemultiplicity, VARBND_IS, VARBND_SAME, and VARBND_STD.

Referenced by GCG_DECL_SOLVERSOLVEHEUR().

◆ GCG_DECL_SOLVERFREE()

static GCG_DECL_SOLVERFREE ( solverFreeCliquer  )
static

destructor of pricing solver to free user data (called when SCIP is exiting)

Definition at line 2735 of file solver_cliquer.c.

References GCGgetDwMasterprob(), GCGsolverGetData(), GCGsolverSetData(), NULL, SCIP_OKAY, and SCIPfreeMemory.

◆ GCG_DECL_SOLVERINITSOL()

static GCG_DECL_SOLVERINITSOL ( solverInitsolCliquer  )
static

solving process initialization method of pricing solver (called when branch and bound process is about to begin)

Definition at line 2754 of file solver_cliquer.c.

References GCGgetDwMasterprob(), GCGgetMasterprob(), GCGgetNPricingprobs(), GCGsolverGetData(), GCG_SolverData::isnotapplicable, NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocClearBlockMemoryArray.

◆ GCG_DECL_SOLVEREXITSOL()

static GCG_DECL_SOLVEREXITSOL ( solverExitsolCliquer  )
static

solving process deinitialization method of pricing solver (called before branch and bound process data is freed)

Definition at line 2781 of file solver_cliquer.c.

References GCGgetMasterprob(), GCGgetNPricingprobs(), GCGsolverGetData(), GCG_SolverData::isnotapplicable, NULL, SCIP_OKAY, and SCIPfreeBlockMemoryArray.

◆ GCG_DECL_SOLVERSOLVEHEUR()

static GCG_DECL_SOLVERSOLVEHEUR ( solverSolveHeurCliquer  )
static

heuristic solving method of independent set solver

Definition at line 2810 of file solver_cliquer.c.

References FALSE, GCGsolverGetData(), NULL, SCIP_CALL, SCIP_OKAY, and solveCliquer().

◆ GCGincludeSolverCliquer()