Scippy

SCIP

Solving Constraint Integer Programs

sepaspecial.c File Reference

Detailed Description

Separator for Steiner tree problem contraints beyond flow-balance-directed-cut constraints.

Author
Daniel Rehfeldt

This file includes some special separator routines beyond the flow-balance directed cut formulation constraints.

Definition in file sepaspecial.c.

#include <assert.h>
#include <string.h>
#include "sepaspecial.h"
#include "probdata_stp.h"
#include "portab.h"
#include "stpvector.h"
#include "prop_stp.h"
#include "scip/cons_linear.h"

Go to the source code of this file.

Data Structures

struct  pseudoancestor_cliques
 
struct  prize_collecting_implications
 
struct  vertex_terminal_implications
 

Macros

#define PCIMPLICATIONS_ALLOC_FACTOR   4
 

Functions

static SCIP_Real get_inflow (const GRAPH *g, const SCIP_Real *xval, int vert)
 
static SCIP_RETCODE pacliquesBuildMap (SCIP *scip, const GRAPH *g, PACLIQUES *pacliques)
 
SCIP_RETCODE sepaspecial_pacliquesInit (SCIP *scip, const GRAPH *g, PACLIQUES **pacliques)
 
void sepaspecial_pacliquesFree (SCIP *scip, PACLIQUES **pacliques)
 
SCIP_RETCODE sepaspecial_pacliquesSeparate (SCIP *scip, SCIP_CONSHDLR *conshdlr, PACLIQUES *pacliques, int maxcuts, int *ncuts)
 
SCIP_RETCODE sepaspecial_pcimplicationsInit (SCIP *scip, const GRAPH *g, PCIMPLICATION **pcimplications)
 
void sepaspecial_pcimplicationsFree (SCIP *scip, PCIMPLICATION **pcimplications)
 
SCIP_RETCODE sepaspecial_pcimplicationsSeparate (SCIP *scip, SCIP_CONSHDLR *conshdlr, PCIMPLICATION *pcimplications, int maxcuts, int *ncuts)
 
int sepaspecial_pcimplicationsGetNstarts (const PCIMPLICATION *pcimp)
 
const int * sepaspecial_pcimplicationsGetStarts (const PCIMPLICATION *pcimp)
 
const int * sepaspecial_pcimplicationsGetVerts (const PCIMPLICATION *pcimp)
 
SCIP_RETCODE sepaspecial_vtimplicationsInit (SCIP *scip, const GRAPH *g, VTIMPLICATION **vtimplications)
 
void sepaspecial_vtimplicationsFree (SCIP *scip, VTIMPLICATION **vtimplications)
 
SCIP_RETCODE sepaspecial_vtimplicationsSeparate (SCIP *scip, SCIP_CONSHDLR *conshdlr, VTIMPLICATION *vtimplications, int maxcuts, int *ncuts)
 

Macro Definition Documentation

◆ PCIMPLICATIONS_ALLOC_FACTOR

#define PCIMPLICATIONS_ALLOC_FACTOR   4

Definition at line 38 of file sepaspecial.c.

Referenced by sepaspecial_pcimplicationsInit().

Function Documentation

◆ get_inflow()

static SCIP_Real get_inflow ( const GRAPH g,
const SCIP_Real xval,
int  vert 
)
inlinestatic

returns incoming flow for given node

Parameters
ggraph data structure
xvaledge values
vertthe vertex

Definition at line 76 of file sepaspecial.c.

References GRAPH::ieat, and GRAPH::inpbeg.

Referenced by sepaspecial_pcimplicationsSeparate(), and sepaspecial_vtimplicationsSeparate().

◆ pacliquesBuildMap()

static SCIP_RETCODE pacliquesBuildMap ( SCIP scip,
const GRAPH g,
PACLIQUES pacliques 
)
static

◆ sepaspecial_pacliquesInit()

SCIP_RETCODE sepaspecial_pacliquesInit ( SCIP scip,
const GRAPH g,
PACLIQUES **  pacliques 
)

◆ sepaspecial_pacliquesFree()

void sepaspecial_pacliquesFree ( SCIP scip,
PACLIQUES **  pacliques 
)

frees

Parameters
scipSCIP data structure
pacliquesclique data

Definition at line 207 of file sepaspecial.c.

References SCIPfreeMemoryArray, and SCIPfreeMemoryArrayNull.

Referenced by SCIP_DECL_CONSEXITSOL().

◆ sepaspecial_pacliquesSeparate()

◆ sepaspecial_pcimplicationsInit()

◆ sepaspecial_pcimplicationsFree()

void sepaspecial_pcimplicationsFree ( SCIP scip,
PCIMPLICATION **  pcimplications 
)

frees (R)PC implications

Parameters
scipSCIP data structure
pcimplicationsimplication data

Definition at line 485 of file sepaspecial.c.

References SCIPfreeMemoryArray, and SCIPfreeMemoryArrayNull.

Referenced by SCIP_DECL_CONSEXITSOL().

◆ sepaspecial_pcimplicationsSeparate()

◆ sepaspecial_pcimplicationsGetNstarts()

int sepaspecial_pcimplicationsGetNstarts ( const PCIMPLICATION pcimp)

return number of proper potential terminals

Parameters
pcimpimplications

Definition at line 636 of file sepaspecial.c.

References prize_collecting_implications::pcimplnppterms.

Referenced by SCIPStpGetPcImplNstarts().

◆ sepaspecial_pcimplicationsGetStarts()

const int* sepaspecial_pcimplicationsGetStarts ( const PCIMPLICATION pcimp)

return CSR like starts

Parameters
pcimpimplications

Definition at line 647 of file sepaspecial.c.

References prize_collecting_implications::pcimplstart.

Referenced by SCIPStpGetPcImplStarts().

◆ sepaspecial_pcimplicationsGetVerts()

const int* sepaspecial_pcimplicationsGetVerts ( const PCIMPLICATION pcimp)

return CSR like vertices

Parameters
pcimpimplications

Definition at line 658 of file sepaspecial.c.

References prize_collecting_implications::pcimplverts.

Referenced by SCIPStpGetPcImplVerts().

◆ sepaspecial_vtimplicationsInit()

SCIP_RETCODE sepaspecial_vtimplicationsInit ( SCIP scip,
const GRAPH g,
VTIMPLICATION **  vtimplications 
)

initializes implications

Parameters
scipSCIP data structure
ggraph data structure
vtimplicationsimplication data

Definition at line 669 of file sepaspecial.c.

References BLOCKED, GRAPH::cost, EAT_LAST, FARAWAY, flipedge, GE, graph_get_nNodes(), graph_typeIsSpgLike(), GRAPH::head, Is_term, LT, nnodes, NULL, GRAPH::oeat, GRAPH::outbeg, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocMemory, StpVecPushBack, and GRAPH::term.

Referenced by SCIP_DECL_CONSSEPALP().

◆ sepaspecial_vtimplicationsFree()

void sepaspecial_vtimplicationsFree ( SCIP scip,
VTIMPLICATION **  vtimplications 
)

frees implications

Parameters
scipSCIP data structure
vtimplicationsimplication data

Definition at line 730 of file sepaspecial.c.

References SCIPfreeMemoryArray, and StpVecFree.

Referenced by SCIP_DECL_CONSEXITSOL().

◆ sepaspecial_vtimplicationsSeparate()

SCIP_RETCODE sepaspecial_vtimplicationsSeparate ( SCIP scip,
SCIP_CONSHDLR conshdlr,
VTIMPLICATION vtimplications,
int  maxcuts,
int *  ncuts 
)

separates implications

Parameters
scipSCIP data structure
conshdlrconstraint handler
vtimplicationsimplication data
maxcutsmaximal number of cuts
ncutspointer to store number of cuts

Definition at line 743 of file sepaspecial.c.

References EAT_LAST, FALSE, flipedge, get_inflow(), graph_edge_isInRange(), GRAPH::ieat, GRAPH::inpbeg, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddPoolCut(), SCIPaddRow(), SCIPaddVarToRow(), SCIPcacheRowExtensions(), SCIPcreateEmptyRowConshdlr(), SCIPdebugMessage, SCIPflushRowExtensions(), SCIPinfinity(), SCIPisCutEfficacious(), SCIPisFeasLT(), SCIPprobdataGetGraph2(), SCIPprobdataGetVars(), SCIPprobdataGetXval(), SCIPreleaseRow(), StpVecGetSize, GRAPH::tail, and TRUE.

Referenced by SCIP_DECL_CONSSEPALP().