Scippy

SCIP

Solving Constraint Integer Programs

type_heur.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-2014 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 email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file type_heur.h
17  * @ingroup TYPEDEFINITIONS
18  * @brief type definitions for primal heuristics
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  *
22  * This file defines the interface for primal heuristics implemented in C.
23  *
24  * - \ref HEUR "Instructions for implementing a primal heuristic"
25  * - \ref PRIMALHEURISTICS "List of available primal heuristics"
26  * - \ref scip::ObjHeur "C++ wrapper class"
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_TYPE_HEUR_H__
32 #define __SCIP_TYPE_HEUR_H__
33 
34 #include "scip/def.h"
35 #include "scip/type_scip.h"
36 #include "scip/type_result.h"
37 #include "scip/type_timing.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 typedef struct SCIP_Heur SCIP_HEUR; /**< primal heuristic */
44 typedef struct SCIP_HeurData SCIP_HEURDATA; /**< locally defined primal heuristic data */
45 
46 
47 /** copy method for heuristic plugins (called when SCIP copies plugins)
48  *
49  * input:
50  * - scip : SCIP main data structure
51  * - heur : the primal heuristic itself
52  */
53 #define SCIP_DECL_HEURCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)
54 
55 /** destructor of primal heuristic to free user data (called when SCIP is exiting)
56  *
57  * input:
58  * - scip : SCIP main data structure
59  * - heur : the primal heuristic itself
60  */
61 #define SCIP_DECL_HEURFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)
62 
63 /** initialization method of primal heuristic (called after problem was transformed)
64  *
65  * input:
66  * - scip : SCIP main data structure
67  * - heur : the primal heuristic itself
68  */
69 #define SCIP_DECL_HEURINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)
70 
71 /** deinitialization method of primal heuristic (called before transformed problem is freed)
72  *
73  * input:
74  * - scip : SCIP main data structure
75  * - heur : the primal heuristic itself
76  */
77 #define SCIP_DECL_HEUREXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)
78 
79 /** solving process initialization method of primal heuristic (called when branch and bound process is about to begin)
80  *
81  * This method is called when the presolving was finished and the branch and bound process is about to begin.
82  * The primal heuristic may use this call to initialize its branch and bound specific data.
83  *
84  * input:
85  * - scip : SCIP main data structure
86  * - heur : the primal heuristic itself
87  */
88 #define SCIP_DECL_HEURINITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)
89 
90 /** solving process deinitialization method of primal heuristic (called before branch and bound process data is freed)
91  *
92  * This method is called before the branch and bound process is freed.
93  * The primal heuristic should use this call to clean up its branch and bound data.
94  *
95  * input:
96  * - scip : SCIP main data structure
97  * - heur : the primal heuristic itself
98  */
99 #define SCIP_DECL_HEUREXITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)
100 
101 /** execution method of primal heuristic
102  *
103  * Searches for feasible primal solutions. The method is called in the node processing loop.
104  *
105  * input:
106  * - scip : SCIP main data structure
107  * - heur : the primal heuristic itself
108  * - heurtiming : current point in the node solving loop
109  * - nodeinfeasible : was the current node already detected to be infeasible?
110  * - result : pointer to store the result of the heuristic call
111  *
112  * possible return values for *result:
113  * - SCIP_FOUNDSOL : at least one feasible primal solution was found
114  * - SCIP_DIDNOTFIND : the heuristic searched, but did not find a feasible solution
115  * - SCIP_DIDNOTRUN : the heuristic was skipped
116  * - SCIP_DELAYED : the heuristic was skipped, but should be called again as soon as possible, disregarding
117  * its frequency
118  */
119 #define SCIP_DECL_HEUREXEC(x) SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, \
120  SCIP_Bool nodeinfeasible, SCIP_RESULT* result)
121 
122 #ifdef __cplusplus
123 }
124 #endif
125 
126 #endif
struct SCIP_Heur SCIP_HEUR
Definition: type_heur.h:43
timing definitions for SCIP
struct SCIP_HeurData SCIP_HEURDATA
Definition: type_heur.h:44
type definitions for SCIP's main datastructure
result codes for SCIP callback methods
common defines and data types used in all packages of SCIP