Scippy

SCIP

Solving Constraint Integer Programs

extreduce_base.c File Reference

Detailed Description

extended reductions for Steiner tree problems

Author
Daniel Rehfeldt

This file implements interface methods for extended reduction techniques for several Steiner problems.

A list of all interface methods can be found in reduce.h.

Definition in file extreduce_base.c.

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "graph.h"
#include "solstp.h"
#include "extreduce.h"

Go to the source code of this file.

Data Structures

struct  general_star
 
struct  extension_pseudo_deletion
 

Macros

#define EXT_PSEUDO_DEGREE_MIN   3
 
#define EXT_PSEUDO_DEGREE_MAX   5
 
#define STP_GENSTAR_MAXDEG   6
 
#define STP_GENSTAR_MAXENDDEG   4
 
#define GENSTAR_NODE_OTHER   0
 
#define GENSTAR_NODE_TAIL   1
 
#define GENSTAR_NODE_HEAD   2
 
#define GENSTAR_NODE_COMBI   3
 
#define EXT_PROFIT_MINRATIO   0.05
 

Typedefs

typedef struct general_star GENSTAR
 
typedef struct extension_pseudo_deletion EXTPSEUDO
 

Enumerations

enum  EXTPSEUDO_MODE {
  delete_all = 0,
  delete_profits = 1,
  delete_nonprofits = 2
}
 

Functions

static SCIP_Bool graphmarkIsClean (const REDCOST *redcostdata, const GRAPH *graph)
 
static SCIP_RETCODE replaceEdgeByPath (SCIP *scip, int edge, const GENSTAR *genstar, GRAPH *graph, REDCOST *redcostdata, DISTDATA *distdata, EXTPERMA *extpermanent)
 
static void removeEdge (SCIP *scip, int edge, GRAPH *graph, DISTDATA *distdata, EXTPERMA *extpermanent)
 
static SCIP_RETCODE extInit (SCIP *scip, SCIP_Bool useSd, GRAPH *graph, STP_Bool *edgedeletable, DISTDATA **distdata, EXTPERMA **extpermanent)
 
static void extFree (SCIP *scip, GRAPH *graph, DISTDATA **distdata, EXTPERMA **extpermanent)
 
static void generalStarCheckInit (SCIP *scip, const GRAPH *g, GENSTAR *genstar)
 
static void generalStarCheckExit (SCIP *scip, const GRAPH *g, GENSTAR *genstar)
 
static void generalStarCheckGetNextStar (const GRAPH *g, GENSTAR *genstar, EXTCOMP *extcomp, SCIP_Bool *allVisited)
 
static SCIP_RETCODE generalStarCheck (SCIP *scip, const GRAPH *graph, const REDCOST *redcostdata, GENSTAR *genstar, EXTPERMA *extpermanent, SCIP_Bool *isDeletable)
 
static void generalStarSetUp (SCIP *scip, const GRAPH *graph, int edge, GENSTAR *genstar, SCIP_Bool *isPromising, DISTDATA *distdata)
 
static SCIP_RETCODE generalStarInit (SCIP *scip, const GRAPH *graph, GENSTAR *genstar)
 
static void generalStarExit (SCIP *scip, const GRAPH *graph, GENSTAR *genstar)
 
static SCIP_RETCODE generalStarDeleteEdges (SCIP *scip, REDCOST *redcostdata, EXTPERMA *extpermanent, GRAPH *graph, DISTDATA *distdata, int *nelims)
 
static SCIP_RETCODE pseudodeleteInit (SCIP *scip, const int *result, const GRAPH *g, SCIP_Real *offsetp, EXTPSEUDO *extpseudo)
 
static void pseudodeleteExit (SCIP *scip, EXTPSEUDO *extpseudo, int *nelimsp)
 
static SCIP_RETCODE pseudodeleteInitStar (SCIP *scip, const GRAPH *g, int node, STAR *stardata, int **compedges, int **extleaves)
 
static void pseudodeleteFreeStar (SCIP *scip, int **compedges, int **extleaves)
 
static void pseudodeleteGetNextStar (const GRAPH *g, STAR *stardata, EXTCOMP *extcomp)
 
static SCIP_Bool pseudodeleteAllStarsChecked (const STAR *stardata)
 
static SCIP_Bool pseudodeleteBiasedIsPromising (SCIP *scip, const EXTPERMA *extperma, const GRAPH *g)
 
static SCIP_Bool pseudodeleteNodeIsPromising (const GRAPH *g, const EXTPERMA *extperma, const EXTPSEUDO *extpseudo, int node)
 
static SCIP_RETCODE pseudodeleteDeleteComputeCutoffs (SCIP *scip, SCIP_Bool checkpromising, SCIP_Bool abortDeg3, DISTDATA *distdata, int node, GRAPH *graph, EXTPSEUDO *extpseudo)
 
static SCIP_RETCODE pseudodeleteDeleteNode (SCIP *scip, int node, REDCOST *redcostdata, DISTDATA *distdata, GRAPH *graph, EXTPSEUDO *extpseudo, SCIP_Bool *success)
 
static SCIP_RETCODE pseudodeleteDeleteMarkedNodes (SCIP *scip, const SCIP_Bool *pseudoDelNodes, REDCOST *redcostdata, DISTDATA *distdata, GRAPH *graph, EXTPSEUDO *extpseudo)
 
static SCIP_RETCODE pseudodeleteExecute (SCIP *scip, const int *result, const SCIP_Bool *pseudoDelNodes, EXTPERMA *extperma, EXTPSEUDO *extpseudo, GRAPH *graph)
 
SCIP_RETCODE extreduce_init (SCIP *scip, SCIP_Bool useSd, enum EXTRED_MODE mode, GRAPH *graph, REDCOST *redcostdata, EXTPERMA **extpermanent)
 
void extreduce_exit (SCIP *scip, GRAPH *graph, EXTPERMA **extpermanent)
 
SCIP_RETCODE extreduce_deleteArcs (SCIP *scip, REDCOST *redcostdata, const int *result, GRAPH *graph, STP_Bool *edgedeletable, int *nelims)
 
SCIP_RETCODE extreduce_deleteEdges (SCIP *scip, EXTPERMA *extperma, GRAPH *graph, int *nelims)
 
SCIP_RETCODE extreduce_pseudoDeleteNodes (SCIP *scip, const SCIP_Bool *pseudoDelNodes, EXTPERMA *extperma, GRAPH *graph, SCIP_Real *offsetp, int *nelims)
 
SCIP_RETCODE extreduce_deleteGeneralStars (SCIP *scip, REDCOST *redcostdata, const int *result, GRAPH *graph, STP_Bool *edgedeletable, int *nelims)
 
SCIP_RETCODE extreduce_checkArc (SCIP *scip, const GRAPH *graph, REDCOST *redcostdata, int edge, EXTPERMA *extpermanent, SCIP_Bool *edgeIsDeletable)
 
SCIP_RETCODE extreduce_checkEdge (SCIP *scip, const GRAPH *graph, const REDCOST *redcostdata, int edge, EXTPERMA *extpermanent, SCIP_Bool *edgeIsDeletable)
 
SCIP_RETCODE extreduce_checkNode (SCIP *scip, const GRAPH *graph, const REDCOST *redcostdata, int node, STAR *stardata, EXTPERMA *extpermanent, SCIP_Bool *isPseudoDeletable)
 
void extreduce_edgeRemove (SCIP *scip, int edge, GRAPH *graph, DISTDATA *distdata, EXTPERMA *extpermanent)
 
SCIP_Bool extreduce_edgeIsValid (const GRAPH *graph, const REDCOST *redcostdata, int e)
 
void extreduce_treeRecompCosts (SCIP *scip, const GRAPH *graph, EXTDATA *extdata)
 
int extreduce_getMaxStackSize (void)
 
int extreduce_getMaxStackNcomponents (const GRAPH *graph)
 
int extreduce_getMaxTreeDepth (const GRAPH *graph, const EXTPERMA *extpermanent)
 

Macro Definition Documentation

◆ EXT_PSEUDO_DEGREE_MIN

#define EXT_PSEUDO_DEGREE_MIN   3

Definition at line 35 of file extreduce_base.c.

Referenced by pseudodeleteExecute().

◆ EXT_PSEUDO_DEGREE_MAX

#define EXT_PSEUDO_DEGREE_MAX   5

Definition at line 36 of file extreduce_base.c.

Referenced by pseudodeleteExecute(), and pseudodeleteNodeIsPromising().

◆ STP_GENSTAR_MAXDEG

#define STP_GENSTAR_MAXDEG   6

Definition at line 38 of file extreduce_base.c.

Referenced by generalStarCheck(), generalStarInit(), and generalStarSetUp().

◆ STP_GENSTAR_MAXENDDEG

#define STP_GENSTAR_MAXENDDEG   4

Definition at line 39 of file extreduce_base.c.

Referenced by generalStarInit().

◆ GENSTAR_NODE_OTHER

#define GENSTAR_NODE_OTHER   0

◆ GENSTAR_NODE_TAIL

#define GENSTAR_NODE_TAIL   1

Definition at line 42 of file extreduce_base.c.

Referenced by generalStarCheckGetNextStar(), and generalStarCheckInit().

◆ GENSTAR_NODE_HEAD

#define GENSTAR_NODE_HEAD   2

Definition at line 43 of file extreduce_base.c.

Referenced by generalStarCheckGetNextStar(), and generalStarCheckInit().

◆ GENSTAR_NODE_COMBI

#define GENSTAR_NODE_COMBI   3

Definition at line 44 of file extreduce_base.c.

Referenced by generalStarCheckGetNextStar(), and generalStarCheckInit().

◆ EXT_PROFIT_MINRATIO

#define EXT_PROFIT_MINRATIO   0.05

Definition at line 46 of file extreduce_base.c.

Referenced by pseudodeleteBiasedIsPromising().

Typedef Documentation

◆ GENSTAR

typedef struct general_star GENSTAR

generalized star

◆ EXTPSEUDO

helper

Enumeration Type Documentation

◆ EXTPSEUDO_MODE

Enumerator
delete_all 
delete_profits 
delete_nonprofits 

Definition at line 49 of file extreduce_base.c.

Function Documentation

◆ graphmarkIsClean()

static SCIP_Bool graphmarkIsClean ( const REDCOST redcostdata,
const GRAPH graph 
)
static

all good with the graph->mark array?

Parameters
redcostdatareduced cost data
graphgraph data structure

Definition at line 89 of file extreduce_base.c.

References FALSE, GRAPH::grad, graph_get_nNodes(), graph_knot_isInRange(), graph_knot_printInfo(), Is_term, GRAPH::mark, nnodes, redcosts_getRootTop(), GRAPH::term, and TRUE.

Referenced by extreduce_deleteArcs(), extreduce_deleteEdges(), extreduce_deleteGeneralStars(), and pseudodeleteExecute().

◆ replaceEdgeByPath()

static SCIP_RETCODE replaceEdgeByPath ( SCIP scip,
int  edge,
const GENSTAR genstar,
GRAPH graph,
REDCOST redcostdata,
DISTDATA distdata,
EXTPERMA extpermanent 
)
inlinestatic

◆ removeEdge()

static void removeEdge ( SCIP scip,
int  edge,
GRAPH graph,
DISTDATA distdata,
EXTPERMA extpermanent 
)
inlinestatic

◆ extInit()

static SCIP_RETCODE extInit ( SCIP scip,
SCIP_Bool  useSd,
GRAPH graph,
STP_Bool edgedeletable,
DISTDATA **  distdata,
EXTPERMA **  extpermanent 
)
inlinestatic

initialize

Parameters
scipSCIP data structure
useSduse special distance?
graphgraph data structure
edgedeletableedge array to mark which (directed) edge can be removed
distdatadistance data (out)
extpermanentpermanent extension data (out)

Definition at line 275 of file extreduce_base.c.

References GRAPH::extended, extred_full, extreduce_distDataInit(), extreduce_extPermaInit(), FALSE, graph_init_dcsr(), graph_mark(), graph_pc_isPcMw(), SCIP_CALL, SCIP_OKAY, and STP_EXT_CLOSENODES_MAXN.

Referenced by extreduce_deleteArcs(), and extreduce_deleteGeneralStars().

◆ extFree()

static void extFree ( SCIP scip,
GRAPH graph,
DISTDATA **  distdata,
EXTPERMA **  extpermanent 
)
inlinestatic

free

Parameters
scipSCIP data structure
graphgraph data structure
distdatadistance data (in/out)
extpermanentpermanent extension data (in/out)

Definition at line 298 of file extreduce_base.c.

References extreduce_distDataFree(), extreduce_extPermaFree(), and graph_free_dcsr().

Referenced by extreduce_deleteArcs(), and extreduce_deleteGeneralStars().

◆ generalStarCheckInit()

static void generalStarCheckInit ( SCIP scip,
const GRAPH g,
GENSTAR genstar 
)
inlinestatic

initializes for check

Parameters
scipSCIP data structure
ggraph data structure
genstargeneral star

Definition at line 313 of file extreduce_base.c.

References GENSTAR_NODE_COMBI, GENSTAR_NODE_HEAD, GENSTAR_NODE_OTHER, GENSTAR_NODE_TAIL, graph_edge_isInRange(), graph_edge_printInfo(), GRAPH::head, reduce_starResetWithEdges(), SCIPdebugMessage, general_star::star, StpVecClear, StpVecGetSize, and StpVecPushBack.

Referenced by generalStarCheck().

◆ generalStarCheckExit()

static void generalStarCheckExit ( SCIP scip,
const GRAPH g,
GENSTAR genstar 
)
inlinestatic

exits from check

Parameters
scipSCIP data structure
ggraph data structure
genstargeneral star

Definition at line 375 of file extreduce_base.c.

References GENSTAR_NODE_OTHER, graph_edge_isInRange(), GRAPH::head, and StpVecGetSize.

Referenced by generalStarCheck().

◆ generalStarCheckGetNextStar()

static void generalStarCheckGetNextStar ( const GRAPH g,
GENSTAR genstar,
EXTCOMP extcomp,
SCIP_Bool allVisited 
)
inlinestatic

◆ generalStarCheck()

static SCIP_RETCODE generalStarCheck ( SCIP scip,
const GRAPH graph,
const REDCOST redcostdata,
GENSTAR genstar,
EXTPERMA extpermanent,
SCIP_Bool isDeletable 
)
inlinestatic

◆ generalStarSetUp()

static void generalStarSetUp ( SCIP scip,
const GRAPH graph,
int  edge,
GENSTAR genstar,
SCIP_Bool isPromising,
DISTDATA distdata 
)
inlinestatic

◆ generalStarInit()

static SCIP_RETCODE generalStarInit ( SCIP scip,
const GRAPH graph,
GENSTAR genstar 
)
static

initializes

Parameters
scipSCIP data structure
graphgraph data structure
genstargeneral star

Definition at line 768 of file extreduce_base.c.

References GRAPH::knots, reduce_starInit(), SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPallocCleanBufferArray, general_star::star, STP_GENSTAR_MAXDEG, STP_GENSTAR_MAXENDDEG, and StpVecReserve.

Referenced by generalStarDeleteEdges().

◆ generalStarExit()

static void generalStarExit ( SCIP scip,
const GRAPH graph,
GENSTAR genstar 
)
static

exits

Parameters
scipSCIP data structure
graphgraph data structure
genstargeneral star

Definition at line 788 of file extreduce_base.c.

References GRAPH::knots, reduce_starFree(), SCIPfreeBufferArray, SCIPfreeCleanBufferArray, general_star::star, and StpVecFree.

Referenced by generalStarDeleteEdges().

◆ generalStarDeleteEdges()

static SCIP_RETCODE generalStarDeleteEdges ( SCIP scip,
REDCOST redcostdata,
EXTPERMA extpermanent,
GRAPH graph,
DISTDATA distdata,
int *  nelims 
)
static

deletes center edges of general stars

Parameters
scipSCIP data structure
redcostdatareduced cost data structures
extpermanentextension data
graphgraph data structure
distdatadistance data
nelimsnumber of eliminations (out)

Definition at line 810 of file extreduce_base.c.

References CONNECT, GRAPH::edges, FALSE, flipedge, generalStarCheck(), generalStarExit(), generalStarInit(), generalStarSetUp(), graph_edge_isDeleted(), NULL, removeEdge(), replaceEdgeByPath(), extension_data_permanent::result, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and extension_data_permanent::solIsValid.

Referenced by extreduce_deleteEdges(), and extreduce_deleteGeneralStars().

◆ pseudodeleteInit()

◆ pseudodeleteExit()

static void pseudodeleteExit ( SCIP scip,
EXTPSEUDO extpseudo,
int *  nelimsp 
)
inlinestatic

◆ pseudodeleteInitStar()

static SCIP_RETCODE pseudodeleteInitStar ( SCIP scip,
const GRAPH g,
int  node,
STAR stardata,
int **  compedges,
int **  extleaves 
)
inlinestatic

initializes new star

Parameters
scipSCIP data structure
ggraph data structure
nodenode
stardatastar
compedgesto be allocated
extleavesto be allocated

Definition at line 949 of file extreduce_base.c.

References GRAPH::grad, reduce_starReset(), SCIP_CALL, SCIP_OKAY, and SCIPallocBufferArray.

Referenced by extreduce_checkNode().

◆ pseudodeleteFreeStar()

static void pseudodeleteFreeStar ( SCIP scip,
int **  compedges,
int **  extleaves 
)
inlinestatic

frees new star

Parameters
scipSCIP data structure
compedgesto be freed
extleavesto be freed

Definition at line 971 of file extreduce_base.c.

References SCIPfreeBufferArray.

Referenced by extreduce_checkNode().

◆ pseudodeleteGetNextStar()

static void pseudodeleteGetNextStar ( const GRAPH g,
STAR stardata,
EXTCOMP extcomp 
)
inlinestatic

◆ pseudodeleteAllStarsChecked()

static SCIP_Bool pseudodeleteAllStarsChecked ( const STAR stardata)
inlinestatic

frees new star

Parameters
stardatastar

Definition at line 1014 of file extreduce_base.c.

References reduce_starAllAreChecked().

Referenced by extreduce_checkNode().

◆ pseudodeleteBiasedIsPromising()

static SCIP_Bool pseudodeleteBiasedIsPromising ( SCIP scip,
const EXTPERMA extperma,
const GRAPH g 
)
inlinestatic

is biased SD extension promising?

Parameters
scipSCIP data structure
extpermaextension data
ggraph data structure

Definition at line 1025 of file extreduce_base.c.

References GRAPH::cost, EXT_PROFIT_MINRATIO, FALSE, graph_get_nNodes(), graph_pc_isPc(), GT, Is_term, nnodes, special_distance_implied_profit::nodes_bias, nterms, reduce_sdprofitFree(), reduce_sdprofitInit1stOnly(), SCIP_CALL_ABORT, SCIPdebugMessage, GRAPH::term, GRAPH::terms, and TRUE.

Referenced by extreduce_pseudoDeleteNodes().

◆ pseudodeleteNodeIsPromising()

static SCIP_Bool pseudodeleteNodeIsPromising ( const GRAPH g,
const EXTPERMA extperma,
const EXTPSEUDO extpseudo,
int  node 
)
inlinestatic

◆ pseudodeleteDeleteComputeCutoffs()

static SCIP_RETCODE pseudodeleteDeleteComputeCutoffs ( SCIP scip,
SCIP_Bool  checkpromising,
SCIP_Bool  abortDeg3,
DISTDATA distdata,
int  node,
GRAPH graph,
EXTPSEUDO extpseudo 
)
inlinestatic

◆ pseudodeleteDeleteNode()

static SCIP_RETCODE pseudodeleteDeleteNode ( SCIP scip,
int  node,
REDCOST redcostdata,
DISTDATA distdata,
GRAPH graph,
EXTPSEUDO extpseudo,
SCIP_Bool success 
)
inlinestatic

◆ pseudodeleteDeleteMarkedNodes()

static SCIP_RETCODE pseudodeleteDeleteMarkedNodes ( SCIP scip,
const SCIP_Bool pseudoDelNodes,
REDCOST redcostdata,
DISTDATA distdata,
GRAPH graph,
EXTPSEUDO extpseudo 
)
static

apply pseudo eliminations for marked nodes NOTE: bad design, but useful to reuse the SDs...

Parameters
scipSCIP data structure
pseudoDelNodesnode with pseudo deletable nodes
redcostdatareduced cost data
distdatadistance data
graphgraph data structure
extpseudodata

Definition at line 1304 of file extreduce_base.c.

References FALSE, GRAPH::grad, graph_get_nNodes(), Is_term, extension_pseudo_deletion::nelims_simple, nnodes, pseudodeleteDeleteComputeCutoffs(), pseudodeleteDeleteNode(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, STP_DELPSEUDO_MAXGRAD, and GRAPH::term.

Referenced by pseudodeleteExecute().

◆ pseudodeleteExecute()

static SCIP_RETCODE pseudodeleteExecute ( SCIP scip,
const int *  result,
const SCIP_Bool pseudoDelNodes,
EXTPERMA extperma,
EXTPSEUDO extpseudo,
GRAPH graph 
)
static

◆ extreduce_init()

SCIP_RETCODE extreduce_init ( SCIP scip,
SCIP_Bool  useSd,
enum EXTRED_MODE  mode,
GRAPH graph,
REDCOST redcostdata,
EXTPERMA **  extpermanent 
)

initializes

Parameters
scipSCIP data structure
useSduse special distance?
modemode
graphgraph data structure
redcostdatareduced costs data
extpermanentpermanent extension data (out)

Definition at line 1425 of file extreduce_base.c.

References extension_data_permanent::distdata_default, GRAPH::extended, extreduce_distDataInit(), extreduce_extPermaInit(), FALSE, graph_init_dcsr(), graph_mark(), graph_pc_isPcMw(), NULL, extension_data_permanent::redcostdata, SCIP_CALL, SCIP_OKAY, and STP_EXT_CLOSENODES_MAXN.

Referenced by reduce_da().

◆ extreduce_exit()

void extreduce_exit ( SCIP scip,
GRAPH graph,
EXTPERMA **  extpermanent 
)

frees

Parameters
scipSCIP data structure
graphgraph data structure
extpermanentpermanent extension data

Definition at line 1452 of file extreduce_base.c.

References extension_data_permanent::distdata_biased, extension_data_permanent::distdata_default, extreduce_distDataFree(), extreduce_extPermaFree(), and graph_free_dcsr().

Referenced by reduce_da(), and reduce_termsepaDa().

◆ extreduce_deleteArcs()

SCIP_RETCODE extreduce_deleteArcs ( SCIP scip,
REDCOST redcostdata,
const int *  result,
GRAPH graph,
STP_Bool edgedeletable,
int *  nelims 
)

Extended reduction test for arcs. This method will also set edgedeletable[a] to TRUE if arc 'a' can be deleted, but its anti-parallel arc not.

Parameters
scipSCIP data structure
redcostdatareduced cost data
resultsolution array or NULL
graphgraph data structure
edgedeletableedge array to mark which (directed) edge can be removed
nelimsnumber of eliminations

Definition at line 1476 of file extreduce_base.c.

References CONNECT, GRAPH::cost, extension_data_permanent::distdata_default, extFree(), extInit(), extreduce_checkArc(), extreduce_edgeIsValid(), FALSE, flipedge, graph_get_nEdges(), graph_pc_isPc(), graphmarkIsClean(), NULL, extension_data_permanent::redcostEqualAllow, redcosts_getCutoffTop(), reduce_sdRepairSetUp(), removeEdge(), extension_data_permanent::result, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPisEQ(), SCIPisZero(), distance_data::sdistdata, and TRUE.

Referenced by fixVarsExtendedRed().

◆ extreduce_deleteEdges()

◆ extreduce_pseudoDeleteNodes()

SCIP_RETCODE extreduce_pseudoDeleteNodes ( SCIP scip,
const SCIP_Bool pseudoDelNodes,
EXTPERMA extperma,
GRAPH graph,
SCIP_Real offsetp,
int *  nelims 
)

◆ extreduce_deleteGeneralStars()

SCIP_RETCODE extreduce_deleteGeneralStars ( SCIP scip,
REDCOST redcostdata,
const int *  result,
GRAPH graph,
STP_Bool edgedeletable,
int *  nelims 
)

deletes center edges of general stars

Parameters
scipSCIP data structure
redcostdatareduced cost data
resultsolution array or NULL
graphgraph data structure (in/out)
edgedeletableedge array to mark which (directed) edge can be removed (in/out)
nelimsnumber of eliminations (out)

Definition at line 1750 of file extreduce_base.c.

References extension_data_permanent::distdata_default, extFree(), extInit(), generalStarDeleteEdges(), graph_pc_isPc(), graphmarkIsClean(), GRAPH::knots, redcosts_getCutoffTop(), redcosts_getRootTop(), reduce_sdRepairSetUp(), extension_data_permanent::result, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPisZero(), and distance_data::sdistdata.

Referenced by testGeneralStarDeletedEdge1(), testGeneralStarDeletedEdge2(), and testGeneralStarDeletedEdge3().

◆ extreduce_checkArc()

SCIP_RETCODE extreduce_checkArc ( SCIP scip,
const GRAPH graph,
REDCOST redcostdata,
int  edge,
EXTPERMA extpermanent,
SCIP_Bool edgeIsDeletable 
)

◆ extreduce_checkEdge()

SCIP_RETCODE extreduce_checkEdge ( SCIP scip,
const GRAPH graph,
const REDCOST redcostdata,
int  edge,
EXTPERMA extpermanent,
SCIP_Bool edgeIsDeletable 
)

check edge

Parameters
scipSCIP data structure
graphgraph data structure
redcostdatareduced cost data structures
edgeedge to be checked
extpermanentextension data
edgeIsDeletableis edge deletable?

Definition at line 1854 of file extreduce_base.c.

References initial_extension_component::compedges, GRAPH::extended, extLeafIsExtendable(), extreduce_checkComponent(), extreduce_extPermaIsClean(), FALSE, graph_isMarked(), graph_pc_isPcMw(), GRAPH::head, extension_data_permanent::isterm, SCIP_Bool, SCIP_CALL, SCIP_OKAY, GRAPH::tail, and TRUE.

Referenced by extCheckEdge(), and extreduce_deleteEdges().

◆ extreduce_checkNode()

SCIP_RETCODE extreduce_checkNode ( SCIP scip,
const GRAPH graph,
const REDCOST redcostdata,
int  node,
STAR stardata,
EXTPERMA extpermanent,
SCIP_Bool isPseudoDeletable 
)

check node for possible

Parameters
scipSCIP data structure
graphgraph data structure
redcostdatareduced cost data structures
nodethe node
stardatastar
extpermanentextension data
isPseudoDeletableis node pseudo-deletable?

Definition at line 1890 of file extreduce_base.c.

References initial_extension_component::compedges, extension_data_permanent::distdata_default, extreduce_checkComponent(), extreduce_spgCheck3ComponentSimple(), FALSE, GRAPH::grad, initial_extension_component::ncompedges, pseudodeleteAllStarsChecked(), pseudodeleteFreeStar(), pseudodeleteGetNextStar(), pseudodeleteInitStar(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, extension_data_permanent::tree_maxdepth, and TRUE.

Referenced by extCheckNode(), and pseudodeleteExecute().

◆ extreduce_edgeRemove()

void extreduce_edgeRemove ( SCIP scip,
int  edge,
GRAPH graph,
DISTDATA distdata,
EXTPERMA extpermanent 
)

deletes an edge and makes corresponding adaptations

Parameters
scipSCIP
edgeedge to delete
graphgraph data structure (in/out)
distdatadistance data (in/out)
extpermanent(in/out) can be NULL

Definition at line 1946 of file extreduce_base.c.

References removeEdge().

Referenced by deleteEdge(), deletenodesDeg1(), extCheckArc(), termcompDeleteEdges(), and testDistCloseNodesPcAreValidAfterDeletion().

◆ extreduce_edgeIsValid()

SCIP_Bool extreduce_edgeIsValid ( const GRAPH graph,
const REDCOST redcostdata,
int  e 
)

is the edge valid?

Parameters
graphgraph data structure
redcostdatareduced cost data
eedge to be checked

Definition at line 1959 of file extreduce_base.c.

References EAT_FREE, EQ, FALSE, flipedge, graph_edge_isInRange(), graph_pc_isPcMw(), graph_pc_knotIsDummyTerm(), GRAPH::head, GRAPH::mark, GRAPH::oeat, redcosts_getEdgeCostsTop(), GRAPH::tail, and TRUE.

Referenced by extreduce_deleteArcs(), and extreduce_deleteEdges().

◆ extreduce_treeRecompCosts()

◆ extreduce_getMaxStackSize()

int extreduce_getMaxStackSize ( void  )

get maximum allowed stack size

Definition at line 2062 of file extreduce_base.c.

References STP_EXT_MAXSTACKSIZE.

Referenced by extreduce_checkComponent(), and extreduce_extdataCleanArraysDbg().

◆ extreduce_getMaxStackNcomponents()

int extreduce_getMaxStackNcomponents ( const GRAPH graph)

get maximum allowed number of components

Parameters
graphgraph data structure

Definition at line 2069 of file extreduce_base.c.

References STP_EXT_MAXNCOMPS.

Referenced by extreduce_checkComponent(), and extreduce_extdataCleanArraysDbg().

◆ extreduce_getMaxTreeDepth()

int extreduce_getMaxTreeDepth ( const GRAPH graph,
const EXTPERMA extpermanent 
)

get maximum allowed depth for extended tree in given graph

Parameters
graphgraph data structure
extpermanentextension data

Definition at line 2080 of file extreduce_base.c.

References extred_fast, graph_get_nVET(), extension_data_permanent::mode, NULL, STP_EXT_DEPTH_MAXNEDGES, STP_EXT_DEPTH_MIDNEDGES, STP_EXT_MAXDFSDEPTH, STP_EXT_MIDDFSDEPTH, and STP_EXT_MINDFSDEPTH.

Referenced by extreduce_extPermaInit().