Scippy

SCIP

Solving Constraint Integer Programs

dpborder_base.c File Reference

Detailed Description

Dynamic programming solver for Steiner tree (sub-) problems with small border.

Author
Daniel Rehfeldt

Definition in file dpborder_base.c.

#include "dpborder.h"
#include "dpborderinterns.h"
#include "stpvector.h"
#include "solstp.h"

Go to the source code of this file.

Macros

#define DPB_MINTERMRATIO   0.4
 
#define DPB_MAXNNODES   1000
 
#define DPB_MINNNODES   100
 
#define DPB_MAXAVGDEG   4.5
 

Functions

static SCIP_Bool dpborderIsNonPromising (const GRAPH *graph)
 
static SCIP_RETCODE dpborderInitHelper (SCIP *scip, GRAPH *graph, DPBORDER *dpborder)
 
SCIP_RETCODE dpborder_dpbsequenceInit (SCIP *scip, const GRAPH *graph, DPBSEQUENCE **dpbsequence)
 
void dpborder_dpbsequenceCopy (const DPBSEQUENCE *dpbsequence_source, DPBSEQUENCE *dpbsequence_target)
 
void dpborder_dpbsequenceFree (SCIP *scip, DPBSEQUENCE **dpbsequence)
 
SCIP_RETCODE dpborder_dpblevelInit (SCIP *scip, DPBLEVEL **dpblevel)
 
void dpborder_dpblevelFree (SCIP *scip, DPBLEVEL **dpblevel)
 
SCIP_RETCODE dpborder_probePotential (SCIP *scip, GRAPH *graph, DPBORDER *dpborder, SCIP_Bool *hasPotential)
 
SCIP_RETCODE dpborder_solve (SCIP *scip, GRAPH *graph, DPBORDER *dpborder, int *solution, SCIP_Bool *wasSolved)
 
SCIP_RETCODE dpborder_init (SCIP *scip, const GRAPH *graph, DPBORDER **dpborder)
 
void dpborder_free (SCIP *scip, DPBORDER **dpborder)
 

Macro Definition Documentation

◆ DPB_MINTERMRATIO

#define DPB_MINTERMRATIO   0.4

Definition at line 29 of file dpborder_base.c.

Referenced by dpborderIsNonPromising().

◆ DPB_MAXNNODES

#define DPB_MAXNNODES   1000

Definition at line 30 of file dpborder_base.c.

Referenced by dpborderIsNonPromising().

◆ DPB_MINNNODES

#define DPB_MINNNODES   100

Definition at line 31 of file dpborder_base.c.

Referenced by dpborderIsNonPromising().

◆ DPB_MAXAVGDEG

#define DPB_MAXAVGDEG   4.5

Definition at line 32 of file dpborder_base.c.

Referenced by dpborderIsNonPromising().

Function Documentation

◆ dpborderIsNonPromising()

static SCIP_Bool dpborderIsNonPromising ( const GRAPH graph)
static

non-promising? quick check

Parameters
graphoriginal graph

Definition at line 43 of file dpborder_base.c.

References DPB_MAXAVGDEG, DPB_MAXNNODES, DPB_MINNNODES, DPB_MINTERMRATIO, GRAPH::edges, FALSE, GRAPH::knots, SCIP_Real, GRAPH::terms, and TRUE.

Referenced by dpborder_probePotential().

◆ dpborderInitHelper()

◆ dpborder_dpbsequenceInit()

◆ dpborder_dpbsequenceCopy()

void dpborder_dpbsequenceCopy ( const DPBSEQUENCE dpbsequence_source,
DPBSEQUENCE dpbsequence_target 
)

◆ dpborder_dpbsequenceFree()

void dpborder_dpbsequenceFree ( SCIP scip,
DPBSEQUENCE **  dpbsequence 
)

◆ dpborder_dpblevelInit()

SCIP_RETCODE dpborder_dpblevelInit ( SCIP scip,
DPBLEVEL **  dpblevel 
)

◆ dpborder_dpblevelFree()

void dpborder_dpblevelFree ( SCIP scip,
DPBLEVEL **  dpblevel 
)

frees

Parameters
scipSCIP data structure
dpblevelto be freed

Definition at line 170 of file dpborder_base.c.

References SCIPfreeMemory, and StpVecFree.

Referenced by dpborder_free(), and dpborder_getPredLevel().

◆ dpborder_probePotential()

SCIP_RETCODE dpborder_probePotential ( SCIP scip,
GRAPH graph,
DPBORDER dpborder,
SCIP_Bool hasPotential 
)

checks whether DP border has potential NOTE: needs to be called before dpborder_solve!

Parameters
scipSCIP data structure
graphgraph of sub-problem
dpborderborder
hasPotentialwas problem solved to optimality?

Definition at line 186 of file dpborder_base.c.

References BPBORDER_MAXBORDERSIZE, BPBORDER_MAXNPARTITIONS, dpborder_coreComputeOrderingSimple(), dpborderInitHelper(), dpborderIsNonPromising(), dynamic_programming_border::dpbsequence, FALSE, graph_free_csr(), graph_init_csrWithEdgeId(), dynamic_programming_border_nodes_sequence::maxbordersize, dynamic_programming_border_nodes_sequence::maxnpartitions, SCIP_CALL, SCIP_OKAY, and TRUE.

Referenced by SCIPStpDpRelaxIsPromising().

◆ dpborder_solve()

SCIP_RETCODE dpborder_solve ( SCIP scip,
GRAPH graph,
DPBORDER dpborder,
int *  solution,
SCIP_Bool wasSolved 
)

◆ dpborder_init()

◆ dpborder_free()