Scippy

SCIP

Solving Constraint Integer Programs

sepa_partition.c File Reference

Detailed Description

partition-separator. Searches for two partitions of size 2 and 3 (extension of triangle-inequalities).

Author
Leon Eifler

Definition in file sepa_partition.c.

#include <assert.h>
#include <string.h>
#include "sepa_partition.h"
#include "probdata_cyc.h"
#include "scip/cons_linear.h"

Go to the source code of this file.

Macros

#define SEPA_NAME   "partition"
 
#define SEPA_DESC   "separator to separate partition-inequalities in cycle-clustering application"
 
#define SEPA_PRIORITY   1500
 
#define SEPA_FREQ   5
 
#define SEPA_MAXBOUNDDIST   0.0
 
#define SEPA_USESSUBSCIP   FALSE
 
#define SEPA_DELAY   FALSE
 
#define MAXCUTS   2000
 
#define MAXCUTSCREATED   10000
 
#define MAXROUNDS   20
 
#define MAXTRIANGLEDISTANCE   -0.2
 

Functions

static SCIP_RETCODE createPartitionCut (SCIP *scip, SCIP_SEPA *sepa, SCIP_ROW ***cuts, int *cutsize, int *ncutscreated, int *firstpart, int *secondpart, int nfirst, int nsecond, SCIP_Real **violations, SCIP_Real violation)
 
static SCIP_DECL_SEPACOPY (sepaCopyPartition)
 
static SCIP_DECL_SEPAEXECLP (sepaExeclpPartition)
 
SCIP_RETCODE SCIPincludeSepaPartition (SCIP *scip)
 

Macro Definition Documentation

◆ SEPA_NAME

#define SEPA_NAME   "partition"

Definition at line 30 of file sepa_partition.c.

Referenced by SCIP_DECL_SEPACOPY(), and SCIPincludeSepaPartition().

◆ SEPA_DESC

#define SEPA_DESC   "separator to separate partition-inequalities in cycle-clustering application"

Definition at line 31 of file sepa_partition.c.

Referenced by SCIPincludeSepaPartition().

◆ SEPA_PRIORITY

#define SEPA_PRIORITY   1500

Definition at line 32 of file sepa_partition.c.

Referenced by SCIPincludeSepaPartition().

◆ SEPA_FREQ

#define SEPA_FREQ   5

Definition at line 33 of file sepa_partition.c.

Referenced by SCIPincludeSepaPartition().

◆ SEPA_MAXBOUNDDIST

#define SEPA_MAXBOUNDDIST   0.0

Definition at line 34 of file sepa_partition.c.

Referenced by SCIPincludeSepaPartition().

◆ SEPA_USESSUBSCIP

#define SEPA_USESSUBSCIP   FALSE

does the separator use a secondary SCIP instance?

Definition at line 35 of file sepa_partition.c.

Referenced by SCIPincludeSepaPartition().

◆ SEPA_DELAY

#define SEPA_DELAY   FALSE

should separation method be delayed, if other separators found cuts?

Definition at line 36 of file sepa_partition.c.

Referenced by SCIPincludeSepaPartition().

◆ MAXCUTS

#define MAXCUTS   2000

maximal number of cuts that can be added to cut pool

Definition at line 37 of file sepa_partition.c.

Referenced by SCIP_DECL_SEPAEXECLP().

◆ MAXCUTSCREATED

#define MAXCUTSCREATED   10000

maximal number of cuts to select from

Definition at line 38 of file sepa_partition.c.

Referenced by SCIP_DECL_SEPAEXECLP().

◆ MAXROUNDS

#define MAXROUNDS   20

maximal number of separation rounds per node

Definition at line 39 of file sepa_partition.c.

Referenced by SCIP_DECL_SEPAEXECLP().

◆ MAXTRIANGLEDISTANCE

#define MAXTRIANGLEDISTANCE   -0.2

maximal negative violation of triangle-inequality to construct cut from

Definition at line 40 of file sepa_partition.c.

Referenced by SCIP_DECL_SEPAEXECLP().

Function Documentation

◆ createPartitionCut()

static SCIP_RETCODE createPartitionCut ( SCIP scip,
SCIP_SEPA sepa,
SCIP_ROW ***  cuts,
int *  cutsize,
int *  ncutscreated,
int *  firstpart,
int *  secondpart,
int  nfirst,
int  nsecond,
SCIP_Real **  violations,
SCIP_Real  violation 
)
static

Given two partitions S, T creates the corresponding cut and adds it do SCIP

Parameters
scipSCIP data structure
sepaseparator
cutsarray to store generated cut
cutsizesize of the cut array
ncutscreatednumber of created cuts
firstpartthe first partition
secondpartthe second partition
nfirstnumber of states in first partition
nsecondnumber of states in second partition
violationsarray to stor the violation of each cut
violationviolation of the cut that should be created

Definition at line 45 of file sepa_partition.c.

References FALSE, getEdgevar(), MAX, NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddVarToRow(), SCIPcacheRowExtensions(), SCIPcreateEmptyRowSepa(), SCIPcycGetEdgevars(), SCIPdebug, SCIPflushRowExtensions(), SCIPinfinity(), SCIPprintRow(), SCIPreallocBufferArray, SCIPsnprintf(), and TRUE.

Referenced by SCIP_DECL_SEPAEXECLP().

◆ SCIP_DECL_SEPACOPY()

static SCIP_DECL_SEPACOPY ( sepaCopyPartition  )
static

copy method for separator plugins (called when SCIP copies plugins)

Definition at line 125 of file sepa_partition.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPincludeSepaPartition(), SCIPsepaGetName(), and SEPA_NAME.

◆ SCIP_DECL_SEPAEXECLP()

◆ SCIPincludeSepaPartition()

SCIP_RETCODE SCIPincludeSepaPartition ( SCIP scip)

creates the Partition separator and includes it in SCIP

Parameters
scipSCIP data structure

Definition at line 462 of file sepa_partition.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPincludeSepaBasic(), SCIPsetSepaCopy(), SEPA_DELAY, SEPA_DESC, SEPA_FREQ, SEPA_MAXBOUNDDIST, SEPA_NAME, SEPA_PRIORITY, and SEPA_USESSUBSCIP.

Referenced by SCIP_DECL_SEPACOPY(), and SCIPincludeCycPlugins().