GOBNILP  f164d83
Macros | Functions
subip_cuts.c File Reference

Code using a sub-IP to find "cluster constraint" cutting planes. More...

#include "subip_cuts.h"
#include "scip/scipdefplugins.h"
Include dependency graph for subip_cuts.c:

Macros

#define max(A, B)   ((A) > (B) ? (A) : (B))
 
#define min(A, B)   ((A) < (B) ? (A) : (B))
 

Functions

static SCIP_RETCODE AddClusterCut (SCIP *scip, const ParentSetData *psd, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Bool *incluster, int cluster_size, int kval, SCIP_Bool addtopool, SCIP_Bool forcecuts, SCIP_Bool *found_efficacious_ptr, SCIP_Bool ci_cut, SCIP_Bool matroidpaircuts, int matroidpaircutslimit, int matroidpairmaxcuts, SCIP_Real excess, SCIP_Bool *cutoff)
 Given a cluster, finds family variables for that cluster and adds the cluster cut. More...
 
static SCIP_RETCODE FindFamilyVarsinClusterCut (SCIP *scip, const ParentSetData *psd, const SCIP_Bool *incluster, int cluster_size, int **cluster, ParentSetData **outpsd)
 
static SCIP_RETCODE FindPairs (SCIP *scip, const ParentSetData *old_psd, const ParentSetData *psd, const int *cluster, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, int maxcuts, SCIP_Bool addtopool, SCIP_Bool forcecuts, SCIP_Bool *found_efficacious_ptr, SCIP_Real excess, SCIP_Bool *cutoff)
 Find which variables in a cluster can be paired to give an efficacious cut. More...
 
static void inc_loss (SCIP_Real **loss, int a, int b, SCIP_Real inc)
 
SCIP_RETCODE IP_findCuts (SCIP *scip, ParentSetData *psd, SolutionInfo *solinfo, SCIP_SOL *sol, int *nGen, int k_lb, int k_ub, SCIP_CONSHDLR *conshdlr, SCIP_Bool addtopool, SCIP_Bool forcecuts, SCIP_Bool *found_efficacious_ptr, SCIP_Real limits_time, SCIP_Real limits_gap, SCIP_Real limits_absgap, SCIP_Bool incumbent_cons, int *must_be_included, int n_must_be_included, int *must_be_excluded, int n_must_be_excluded, SCIP_Bool ci_cut, SCIP_Bool matroidpaircuts, int matroidpaircutslimit, int matroidpairmaxcuts, SCIP_Bool *cutoff)
 main routine for looking for cutting planes More...
 
static SCIP_Bool stays (const ParentSetData *psd, int a, int b, int i, int k)
 

Detailed Description

Code using a sub-IP to find "cluster constraint" cutting planes.

Function Documentation

◆ AddClusterCut()

static SCIP_RETCODE AddClusterCut ( SCIP *  scip,
const ParentSetData psd,
SCIP_CONSHDLR *  conshdlr,
SCIP_SOL *  sol,
SCIP_Bool *  incluster,
int  cluster_size,
int  kval,
SCIP_Bool  addtopool,
SCIP_Bool  forcecuts,
SCIP_Bool *  found_efficacious_ptr,
SCIP_Bool  ci_cut,
SCIP_Bool  matroidpaircuts,
int  matroidpaircutslimit,
int  matroidpairmaxcuts,
SCIP_Real  excess,
SCIP_Bool *  cutoff 
)
static

Given a cluster, finds family variables for that cluster and adds the cluster cut.

Parameters
scip(Main) SCIP instance
psdfamily variable information
conshdlrthe constraint handler responsible for adding these cuts (will be 'dagcluster')
solsolution to be separated
inclusterthe cluster itself: incluster[i] = TRUE iff i is in the cluster
cluster_sizethe size of the found cluster
kvalkval = 1 for normal cluster cuts, kval = k for a 'k-cluster cut'
addtopoolwhether to add the cut to the global cut pool
forcecutswhether to force cuts to be added
found_efficacious_ptrfor recording whether the cutting plane is efficacious
ci_cutwhether we are adding a CI cut
cutoffcutoff = TRUE if a cut is added which leads to a cutoff ( set by SCIPaddRow )

References ParentSetData::n, and ParentSetData::PaVars.

Referenced by IP_findCuts().

◆ FindFamilyVarsinClusterCut()

static SCIP_RETCODE FindFamilyVarsinClusterCut ( SCIP *  scip,
const ParentSetData psd,
const SCIP_Bool *  incluster,
int  cluster_size,
int **  cluster,
ParentSetData **  outpsd 
)
static
Parameters
scip(Main) SCIP instance
psdfamily variable information
inclusterthe cluster itself: incluster[i] = TRUE iff i is in the cluster
cluster_sizethe size of the found cluster
cluster(*cluster)[i] will be the ith cluster member
outpsdfamily variables in the cut

References ParentSetData::n, ParentSetData::nParents, ParentSetData::nParentSets, ParentSetData::ParentSets, and ParentSetData::PaVars.

◆ FindPairs()

static SCIP_RETCODE FindPairs ( SCIP *  scip,
const ParentSetData old_psd,
const ParentSetData psd,
const int *  cluster,
SCIP_CONSHDLR *  conshdlr,
SCIP_SOL *  sol,
int  maxcuts,
SCIP_Bool  addtopool,
SCIP_Bool  forcecuts,
SCIP_Bool *  found_efficacious_ptr,
SCIP_Real  excess,
SCIP_Bool *  cutoff 
)
static

Find which variables in a cluster can be paired to give an efficacious cut.

Parameters
scip(Main) SCIP instance
old_psdoriginal family variable information
psdspecialised family variable information
clusterthe cluster
conshdlrthe constraint handler responsible for adding these cuts (will be 'dagcluster')
solsolution to be separated
maxcutsthe maximum number of cuts to add (in this function)
addtopoolwhether to add the cut to the global cut pool
forcecutswhether to force cuts to be added
found_efficacious_ptrfor recording whether the cutting plane is efficacious
cutoffcutoff = TRUE if a cut is added which leads to a cutoff ( set by SCIPaddRow )

References ParentSetData::n, ParentSetData::nParents, ParentSetData::nParentSets, ParentSetData::ParentSets, and ParentSetData::PaVars.

◆ IP_findCuts()

SCIP_RETCODE IP_findCuts ( SCIP *  scip,
ParentSetData psd,
SolutionInfo solinfo,
SCIP_SOL *  sol,
int *  nGen,
int  k_lb,
int  k_ub,
SCIP_CONSHDLR *  conshdlr,
SCIP_Bool  addtopool,
SCIP_Bool  forcecuts,
SCIP_Bool *  found_efficacious_ptr,
SCIP_Real  limits_time,
SCIP_Real  limits_gap,
SCIP_Real  limits_absgap,
SCIP_Bool  incumbent_cons,
int *  must_be_included,
int  n_must_be_included,
int *  must_be_excluded,
int  n_must_be_excluded,
SCIP_Bool  ci_cut,
SCIP_Bool  matroidpaircuts,
int  matroidpaircutslimit,
int  matroidpairmaxcuts,
SCIP_Bool *  cutoff 
)

main routine for looking for cutting planes

The number of found cutting planes is recorded in *nGen. A positive value indicates that the current solution is infeasible.

< sub MIP for finding good clusters for cutting planes

< subIP variables: family[i][k] = 1 if kth parent set of ith variable is one of those in cluster cut

< subIP variables: incluster[i] if variable i in cluster

< lower bound on number of parents to be in cluster for family variable to be set

< clausecons[i][k] is the constraint "if family[i][k]=1 then incluster[i]=1"

< overlapcons[i][k] is the constraint "if family[i][k]=1 then \sum_{u \in W} >= kvar"

< constraint for lb for cluster size (depends on kvar)

< (optional) constraint that incumbent must lie on cluster cut

Parameters
scipSCIP data structure
psdfamily variable information
solinfoinformation about the solution to be separated
solsolution to be separated
nGen*nGen is number of cutting planes added ( even non-efficacious ones are added )
k_lblowerbound on 'k' values for k-cluster searching, always positive
k_ubupperbound on 'k' values for k-cluster searching
conshdlrconstraint handler
addtopoolwhether to add any found cut to the global cut pool
forcecutswhether to force cuts to be added
found_efficacious_ptrto return whether an efficacious cutting plane was found
limits_timelimit on how long to spend sub-IP solving
limits_gaplimit on size of gap in sub-IP
limits_absgaplimit on size of the absolute gap in sub-IP
incumbent_conswhether to consider only cutting planes on which the incumbent lies
must_be_includedset of nodes which must be included in any found cluster
n_must_be_includedsize of the set of nodes which must be included in any found cluster
must_be_excludedset of nodes which must be excluded from any found cluster
n_must_be_excludedsize of the set of nodes which must be excluded from any found cluster
ci_cutTRUE if we are looking for conditional independence cuts
cutoffcutoff = TRUE if a cut is added which leads to a cutoff ( set by SCIPaddRow )

References AddClusterCut(), SolutionInfo::lpsolvals, ParentSetData::n, ParentSetData::nParents, ParentSetData::nParentSets, SolutionInfo::nposvars, scored_parentset::nvars, ParentSetData::ParentSets, ParentSetData::PaVars, and SolutionInfo::posvars.

Here is the call graph for this function: