Scippy

SCIP

Solving Constraint Integer Programs

branch_stp.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2022 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 /**@file branch_stp.h
16  * @brief Steiner vertex branching rule
17  * @author Daniel Rehfeldt
18  *
19  * The Steiner branching rule implemented in this file is described in
20  * "A Generic Approach to Solving the Steiner Tree Problem and Variants" by Daniel Rehfeldt.
21  * It removes includes and exludes Steiner vertices during branching.
22  *
23 */
24 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
25 
26 #ifndef __SCIP_BRANCH_STP_H__
27 #define __SCIP_BRANCH_STP_H__
28 
29 
30 #include "scip/scip.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 #define BRANCH_STP_VERTEX_UNSET -2
37 #define BRANCH_STP_VERTEX_KILLED -1
38 #define BRANCH_STP_VERTEX_NONTERM 0
39 #define BRANCH_STP_VERTEX_TERM 1
40 
41 
42 /** parse constraint name and apply changes to graph or array */
43 SCIP_EXPORT
45  int* vertexchgs, /**< array to store changes */
46  const char* consname, /**< constraint name */
47  SCIP_Bool* conflictFound /**< conflict with existing vertex changes found? */
48  );
49 
50 /** applies vertex changes caused by this branching rule, either on a graph or on an array */
51 SCIP_EXPORT
53  SCIP* scip, /**< SCIP data structure */
54  int* vertexchgs, /**< array to store changes */
55  SCIP_Bool* conflictFound /**< conflict with existing vertex changes found? */
56  );
57 
58 
59 /** get last change */
60 SCIP_EXPORT
62  SCIP* scip, /**< SCIP data structure */
63  int* vertex, /**< changed vertex */
64  SCIP_Bool* isDeleted /**< deleted? (otherwise terminal) */
65  );
66 
67 
68 /** is the branching rule active? */
69 SCIP_EXPORT
71  SCIP* scip /**< SCIP data structure */
72  );
73 
74 /** applies vertex changes caused by this branching rule, either on a graph or on an array */
75 SCIP_EXPORT
77  const GRAPH* g, /**< graph data structure */
78  int* nodestate /**< node state array */
79  );
80 
81 /** creates the stp branching rule and includes it to SCIP */
82 SCIP_EXPORT
84  SCIP* scip /**< SCIP data structure */
85  );
86 
87 /** returns whether branching-rule is compatible with given graph problem type */
88 SCIP_EXPORT
90  const GRAPH* graph /**< graph */
91 );
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 #endif
SCIP_RETCODE SCIPStpBranchruleGetVertexChgLast(SCIP *scip, int *vertex, SCIP_Bool *isDeleted)
Definition: branch_stp.c:1036
void SCIPStpBranchruleInitNodeState(const GRAPH *g, int *nodestate)
Definition: branch_stp.c:954
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_RETCODE SCIPincludeBranchruleStp(SCIP *scip)
Definition: branch_stp.c:1129
SCIP_RETCODE STPStpBranchruleParseConsname(int *vertexchgs, const char *consname, SCIP_Bool *conflictFound)
Definition: branch_stp.c:902
SCIP_Bool SCIPStpBranchruleIsActive(SCIP *scip)
Definition: branch_stp.c:1099
#define SCIP_Bool
Definition: def.h:84
SCIP_Bool SCIPStpBranchruleProbIsCompatible(const GRAPH *graph)
Definition: branch_stp.c:1119
SCIP callable library.
SCIP_RETCODE SCIPStpBranchruleGetVertexChgs(SCIP *scip, int *vertexchgs, SCIP_Bool *conflictFound)
Definition: branch_stp.c:977