Scippy

SCIP

Solving Constraint Integer Programs

scip_heur.c
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-2019 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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file scip_heur.c
17  * @brief public methods for primal heuristic plugins and divesets
18  * @author Tobias Achterberg
19  * @author Timo Berthold
20  * @author Gerald Gamrath
21  * @author Robert Lion Gottwald
22  * @author Stefan Heinz
23  * @author Gregor Hendel
24  * @author Thorsten Koch
25  * @author Alexander Martin
26  * @author Marc Pfetsch
27  * @author Michael Winkler
28  * @author Kati Wolter
29  *
30  * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
31  */
32 
33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34 
35 #include "scip/debug.h"
36 #include "scip/heur.h"
37 #include "scip/pub_message.h"
38 #include "scip/scip_heur.h"
39 #include "scip/set.h"
40 #include "scip/struct_mem.h"
41 #include "scip/struct_scip.h"
42 #include "scip/struct_set.h"
43 
44 /** creates a primal heuristic and includes it in SCIP.
45  *
46  * @note method has all heuristic callbacks as arguments and is thus changed every time a new
47  * callback is added in future releases; consider using SCIPincludeHeurBasic() and setter functions
48  * if you seek for a method which is less likely to change in future releases
49  *
50  * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
51  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
52  *
53  * @pre This method can be called if @p scip is in one of the following stages:
54  * - \ref SCIP_STAGE_INIT
55  * - \ref SCIP_STAGE_PROBLEM
56  */
58  SCIP* scip, /**< SCIP data structure */
59  const char* name, /**< name of primal heuristic */
60  const char* desc, /**< description of primal heuristic */
61  char dispchar, /**< display character of primal heuristic */
62  int priority, /**< priority of the primal heuristic */
63  int freq, /**< frequency for calling primal heuristic */
64  int freqofs, /**< frequency offset for calling primal heuristic */
65  int maxdepth, /**< maximal depth level to call heuristic at (-1: no limit) */
66  SCIP_HEURTIMING timingmask, /**< positions in the node solving loop where heuristic should be executed;
67  * see definition of SCIP_HEURTIMING for possible values */
68  SCIP_Bool usessubscip, /**< does the heuristic use a secondary SCIP instance? */
69  SCIP_DECL_HEURCOPY ((*heurcopy)), /**< copy method of primal heuristic or NULL if you don't want to copy your plugin into sub-SCIPs */
70  SCIP_DECL_HEURFREE ((*heurfree)), /**< destructor of primal heuristic */
71  SCIP_DECL_HEURINIT ((*heurinit)), /**< initialize primal heuristic */
72  SCIP_DECL_HEUREXIT ((*heurexit)), /**< deinitialize primal heuristic */
73  SCIP_DECL_HEURINITSOL ((*heurinitsol)), /**< solving process initialization method of primal heuristic */
74  SCIP_DECL_HEUREXITSOL ((*heurexitsol)), /**< solving process deinitialization method of primal heuristic */
75  SCIP_DECL_HEUREXEC ((*heurexec)), /**< execution method of primal heuristic */
76  SCIP_HEURDATA* heurdata /**< primal heuristic data */
77  )
78 {
79  SCIP_HEUR* heur;
80 
81  SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeHeur", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
82 
83  /* check whether heuristic is already present */
84  if( SCIPfindHeur(scip, name) != NULL )
85  {
86  SCIPerrorMessage("heuristic <%s> already included.\n", name);
87  return SCIP_INVALIDDATA;
88  }
89 
90  SCIP_CALL( SCIPheurCreate(&heur, scip->set, scip->messagehdlr, scip->mem->setmem,
91  name, desc, dispchar, priority, freq, freqofs, maxdepth, timingmask, usessubscip,
92  heurcopy, heurfree, heurinit, heurexit, heurinitsol, heurexitsol, heurexec, heurdata) );
93 
94  SCIP_CALL( SCIPsetIncludeHeur(scip->set, heur) );
95 
96  return SCIP_OKAY;
97 }
98 
99 /** creates a primal heuristic and includes it in SCIP with its most fundamental callbacks.
100  * All non-fundamental (or optional) callbacks
101  * as, e. g., init and exit callbacks, will be set to NULL.
102  * Optional callbacks can be set via specific setter functions, see SCIPsetHeurCopy(), SCIPsetHeurFree(),
103  * SCIPsetHeurInit(), SCIPsetHeurExit(), SCIPsetHeurInitsol(), and SCIPsetHeurExitsol()
104  *
105 * @note if you want to set all callbacks with a single method call, consider using SCIPincludeHeur() instead
106  */
108  SCIP* scip, /**< SCIP data structure */
109  SCIP_HEUR** heur, /**< pointer to primal heuristic */
110  const char* name, /**< name of primal heuristic */
111  const char* desc, /**< description of primal heuristic */
112  char dispchar, /**< display character of primal heuristic */
113  int priority, /**< priority of the primal heuristic */
114  int freq, /**< frequency for calling primal heuristic */
115  int freqofs, /**< frequency offset for calling primal heuristic */
116  int maxdepth, /**< maximal depth level to call heuristic at (-1: no limit) */
117  SCIP_HEURTIMING timingmask, /**< positions in the node solving loop where heuristic should be executed;
118  * see definition of SCIP_HEURTIMING for possible values */
119  SCIP_Bool usessubscip, /**< does the heuristic use a secondary SCIP instance? */
120  SCIP_DECL_HEUREXEC ((*heurexec)), /**< execution method of primal heuristic */
121  SCIP_HEURDATA* heurdata /**< primal heuristic data */
122  )
123 {
124  SCIP_HEUR* heurptr;
125 
126  SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeHeurBasic", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
127 
128  /* check whether heuristic is already present */
129  if( SCIPfindHeur(scip, name) != NULL )
130  {
131  SCIPerrorMessage("heuristic <%s> already included.\n", name);
132  return SCIP_INVALIDDATA;
133  }
134 
135  SCIP_CALL( SCIPheurCreate(&heurptr, scip->set, scip->messagehdlr, scip->mem->setmem,
136  name, desc, dispchar, priority, freq, freqofs, maxdepth, timingmask, usessubscip,
137  NULL, NULL, NULL, NULL, NULL, NULL, heurexec, heurdata) );
138 
139  assert(heurptr != NULL);
140 
141  SCIP_CALL( SCIPsetIncludeHeur(scip->set, heurptr) );
142 
143  if( heur != NULL )
144  *heur = heurptr;
145 
146  return SCIP_OKAY;
147 }
148 
149 /* new callback/method setter methods */
150 
151 /** sets copy method of primal heuristic */
153  SCIP* scip, /**< SCIP data structure */
154  SCIP_HEUR* heur, /**< primal heuristic */
155  SCIP_DECL_HEURCOPY ((*heurcopy)) /**< copy method of primal heuristic or NULL if you don't want to copy your plugin into sub-SCIPs */
156  )
157 {
158  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetHeurCopy", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
159 
160  assert(heur != NULL);
161 
162  SCIPheurSetCopy(heur, heurcopy);
163 
164  return SCIP_OKAY;
165 }
166 
167 /** sets destructor method of primal heuristic */
169  SCIP* scip, /**< SCIP data structure */
170  SCIP_HEUR* heur, /**< primal heuristic */
171  SCIP_DECL_HEURFREE ((*heurfree)) /**< destructor of primal heuristic */
172  )
173 {
174  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetHeurFree", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
175 
176  assert(heur != NULL);
177 
178  SCIPheurSetFree(heur, heurfree);
179 
180  return SCIP_OKAY;
181 }
182 
183 /** sets initialization method of primal heuristic */
185  SCIP* scip, /**< SCIP data structure */
186  SCIP_HEUR* heur, /**< primal heuristic */
187  SCIP_DECL_HEURINIT ((*heurinit)) /**< initialize primal heuristic */
188  )
189 {
190  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetHeurInit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
191 
192  assert(heur != NULL);
193 
194  SCIPheurSetInit(heur, heurinit);
195 
196  return SCIP_OKAY;
197 }
198 
199 /** sets deinitialization method of primal heuristic */
201  SCIP* scip, /**< SCIP data structure */
202  SCIP_HEUR* heur, /**< primal heuristic */
203  SCIP_DECL_HEUREXIT ((*heurexit)) /**< deinitialize primal heuristic */
204  )
205 {
206  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetHeurExit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
207 
208  assert(heur != NULL);
209 
210  SCIPheurSetExit(heur, heurexit);
211 
212  return SCIP_OKAY;
213 }
214 
215 /** sets solving process initialization method of primal heuristic */
217  SCIP* scip, /**< SCIP data structure */
218  SCIP_HEUR* heur, /**< primal heuristic */
219  SCIP_DECL_HEURINITSOL ((*heurinitsol)) /**< solving process initialization method of primal heuristic */
220  )
221 {
222  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetHeurInitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
223 
224  assert(heur != NULL);
225 
226  SCIPheurSetInitsol(heur, heurinitsol);
227 
228  return SCIP_OKAY;
229 }
230 
231 /** sets solving process deinitialization method of primal heuristic */
233  SCIP* scip, /**< SCIP data structure */
234  SCIP_HEUR* heur, /**< primal heuristic */
235  SCIP_DECL_HEUREXITSOL ((*heurexitsol)) /**< solving process deinitialization method of primal heuristic */
236  )
237 {
238  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetHeurExitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
239 
240  assert(heur != NULL);
241 
242  SCIPheurSetExitsol(heur, heurexitsol);
243 
244  return SCIP_OKAY;
245 }
246 
247 /** returns the primal heuristic of the given name, or NULL if not existing */
249  SCIP* scip, /**< SCIP data structure */
250  const char* name /**< name of primal heuristic */
251  )
252 {
253  assert(scip != NULL);
254  assert(scip->set != NULL);
255  assert(name != NULL);
256 
257  return SCIPsetFindHeur(scip->set, name);
258 }
259 
260 /** returns the array of currently available primal heuristics */
262  SCIP* scip /**< SCIP data structure */
263  )
264 {
265  assert(scip != NULL);
266  assert(scip->set != NULL);
267 
268  SCIPsetSortHeurs(scip->set);
269 
270  return scip->set->heurs;
271 }
272 
273 /** returns the number of currently available primal heuristics */
275  SCIP* scip /**< SCIP data structure */
276  )
277 {
278  assert(scip != NULL);
279  assert(scip->set != NULL);
280 
281  return scip->set->nheurs;
282 }
283 
284 /** sets the priority of a primal heuristic */
286  SCIP* scip, /**< SCIP data structure */
287  SCIP_HEUR* heur, /**< primal heuristic */
288  int priority /**< new priority of the primal heuristic */
289  )
290 {
291  assert(scip != NULL);
292  assert(scip->set != NULL);
293 
294  SCIPheurSetPriority(heur, scip->set, priority);
295 
296  return SCIP_OKAY;
297 }
298 
299 /** create a diving set associated with a primal heuristic. The primal heuristic needs to be included
300  * before this method can be called. The diveset is installed in the array of divesets of the heuristic
301  * and can be retrieved later by accessing SCIPheurGetDivesets()
302  *
303  * @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
304  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
305  *
306  * @pre This method can be called if @p scip is in one of the following stages:
307  * - \ref SCIP_STAGE_INIT
308  * - \ref SCIP_STAGE_PROBLEM
309  */
311  SCIP* scip, /**< SCIP data structure */
312  SCIP_DIVESET** diveset, /**< pointer to created diving heuristic settings, or NULL if not needed */
313  SCIP_HEUR* heur, /**< primal heuristic to which the diveset belongs */
314  const char* name, /**< name for the diveset, or NULL if the name of the heuristic should be used */
315  SCIP_Real minreldepth, /**< minimal relative depth to start diving */
316  SCIP_Real maxreldepth, /**< maximal relative depth to start diving */
317  SCIP_Real maxlpiterquot, /**< maximal fraction of diving LP iterations compared to node LP iterations */
318  SCIP_Real maxdiveubquot, /**< maximal quotient (curlowerbound - lowerbound)/(cutoffbound - lowerbound)
319  * where diving is performed (0.0: no limit) */
320  SCIP_Real maxdiveavgquot, /**< maximal quotient (curlowerbound - lowerbound)/(avglowerbound - lowerbound)
321  * where diving is performed (0.0: no limit) */
322  SCIP_Real maxdiveubquotnosol, /**< maximal UBQUOT when no solution was found yet (0.0: no limit) */
323  SCIP_Real maxdiveavgquotnosol,/**< maximal AVGQUOT when no solution was found yet (0.0: no limit) */
324  SCIP_Real lpresolvedomchgquot,/**< percentage of immediate domain changes during probing to trigger LP resolve */
325  int lpsolvefreq, /**< LP solve frequency for (0: only if enough domain reductions are found by propagation)*/
326  int maxlpiterofs, /**< additional number of allowed LP iterations */
327  unsigned int initialseed, /**< initial seed for random number generation */
328  SCIP_Bool backtrack, /**< use one level of backtracking if infeasibility is encountered? */
329  SCIP_Bool onlylpbranchcands, /**< should only LP branching candidates be considered instead of the slower but
330  * more general constraint handler diving variable selection? */
331  SCIP_Bool specificsos1score, /**< should SOS1 variables be scored by the diving heuristics specific score function;
332  * otherwise use the score function of the SOS1 constraint handler */
333  SCIP_DECL_DIVESETGETSCORE((*divesetgetscore)) /**< method for candidate score and rounding direction */
334  )
335 {
336  SCIP_DIVESET* divesetptr = NULL;
337  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateDiveset", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
338 
339  /* create the diveset (this will add diving specific parameters for this heuristic) */
340  SCIP_CALL( SCIPdivesetCreate(&divesetptr, heur, name, scip->set, scip->messagehdlr, scip->mem->setmem,
341  minreldepth, maxreldepth, maxlpiterquot, maxdiveubquot, maxdiveavgquot, maxdiveubquotnosol,
342  maxdiveavgquotnosol, lpresolvedomchgquot, lpsolvefreq, maxlpiterofs, initialseed, backtrack,
343  onlylpbranchcands, specificsos1score, divesetgetscore) );
344 
345  assert(divesetptr != NULL);
346  if( diveset != NULL )
347  *diveset = divesetptr;
348 
349  return SCIP_OKAY;
350 }
SCIP_RETCODE SCIPsetHeurPriority(SCIP *scip, SCIP_HEUR *heur, int priority)
Definition: scip_heur.c:285
void SCIPheurSetInitsol(SCIP_HEUR *heur, SCIP_DECL_HEURINITSOL((*heurinitsol)))
Definition: heur.c:1232
#define SCIP_DECL_HEURINITSOL(x)
Definition: type_heur.h:97
#define NULL
Definition: def.h:253
SCIP_RETCODE SCIPsetHeurExitsol(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEUREXITSOL((*heurexitsol)))
Definition: scip_heur.c:232
unsigned int SCIP_HEURTIMING
Definition: type_timing.h:97
SCIP_RETCODE SCIPincludeHeur(SCIP *scip, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, SCIP_HEURTIMING timingmask, SCIP_Bool usessubscip, SCIP_DECL_HEURCOPY((*heurcopy)), SCIP_DECL_HEURFREE((*heurfree)), SCIP_DECL_HEURINIT((*heurinit)), SCIP_DECL_HEUREXIT((*heurexit)), SCIP_DECL_HEURINITSOL((*heurinitsol)), SCIP_DECL_HEUREXITSOL((*heurexitsol)), SCIP_DECL_HEUREXEC((*heurexec)), SCIP_HEURDATA *heurdata)
Definition: scip_heur.c:57
SCIP_HEUR ** SCIPgetHeurs(SCIP *scip)
Definition: scip_heur.c:261
void SCIPheurSetExitsol(SCIP_HEUR *heur, SCIP_DECL_HEUREXITSOL((*heurexitsol)))
Definition: heur.c:1243
void SCIPsetSortHeurs(SCIP_SET *set)
Definition: set.c:4462
#define FALSE
Definition: def.h:73
#define TRUE
Definition: def.h:72
#define SCIP_DECL_HEURCOPY(x)
Definition: type_heur.h:62
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
#define SCIP_DECL_HEUREXEC(x)
Definition: type_heur.h:128
void SCIPheurSetPriority(SCIP_HEUR *heur, SCIP_SET *set, int priority)
Definition: heur.c:1325
struct SCIP_HeurData SCIP_HEURDATA
Definition: type_heur.h:51
int nheurs
Definition: struct_set.h:114
SCIP_RETCODE SCIPcreateDiveset(SCIP *scip, SCIP_DIVESET **diveset, SCIP_HEUR *heur, const char *name, SCIP_Real minreldepth, SCIP_Real maxreldepth, SCIP_Real maxlpiterquot, SCIP_Real maxdiveubquot, SCIP_Real maxdiveavgquot, SCIP_Real maxdiveubquotnosol, SCIP_Real maxdiveavgquotnosol, SCIP_Real lpresolvedomchgquot, int lpsolvefreq, int maxlpiterofs, unsigned int initialseed, SCIP_Bool backtrack, SCIP_Bool onlylpbranchcands, SCIP_Bool specificsos1score, SCIP_DECL_DIVESETGETSCORE((*divesetgetscore)))
Definition: scip_heur.c:310
SCIP_RETCODE SCIPheurCreate(SCIP_HEUR **heur, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, SCIP_HEURTIMING timingmask, SCIP_Bool usessubscip, SCIP_DECL_HEURCOPY((*heurcopy)), SCIP_DECL_HEURFREE((*heurfree)), SCIP_DECL_HEURINIT((*heurinit)), SCIP_DECL_HEUREXIT((*heurexit)), SCIP_DECL_HEURINITSOL((*heurinitsol)), SCIP_DECL_HEUREXITSOL((*heurexitsol)), SCIP_DECL_HEUREXEC((*heurexec)), SCIP_HEURDATA *heurdata)
Definition: heur.c:793
SCIP_RETCODE SCIPsetHeurInit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURINIT((*heurinit)))
Definition: scip_heur.c:184
#define SCIP_DECL_DIVESETGETSCORE(x)
Definition: type_heur.h:149
SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
Definition: scip_heur.c:248
SCIP_RETCODE SCIPincludeHeurBasic(SCIP *scip, SCIP_HEUR **heur, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, SCIP_HEURTIMING timingmask, SCIP_Bool usessubscip, SCIP_DECL_HEUREXEC((*heurexec)), SCIP_HEURDATA *heurdata)
Definition: scip_heur.c:107
SCIP_MEM * mem
Definition: struct_scip.h:61
SCIP_RETCODE SCIPsetIncludeHeur(SCIP_SET *set, SCIP_HEUR *heur)
Definition: set.c:4418
#define SCIPerrorMessage
Definition: pub_message.h:45
SCIP_RETCODE SCIPcheckStage(SCIP *scip, const char *method, SCIP_Bool init, SCIP_Bool problem, SCIP_Bool transforming, SCIP_Bool transformed, SCIP_Bool initpresolve, SCIP_Bool presolving, SCIP_Bool exitpresolve, SCIP_Bool presolved, SCIP_Bool initsolve, SCIP_Bool solving, SCIP_Bool solved, SCIP_Bool exitsolve, SCIP_Bool freetrans, SCIP_Bool freescip)
Definition: debug.c:2010
void SCIPheurSetCopy(SCIP_HEUR *heur, SCIP_DECL_HEURCOPY((*heurcopy)))
Definition: heur.c:1188
internal methods for global SCIP settings
#define SCIP_CALL(x)
Definition: def.h:365
SCIP main data structure.
BMS_BLKMEM * setmem
Definition: struct_mem.h:39
public methods for primal heuristic plugins and divesets
#define SCIP_Bool
Definition: def.h:70
SCIP_RETCODE SCIPsetHeurExit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEUREXIT((*heurexit)))
Definition: scip_heur.c:200
SCIP_HEUR ** heurs
Definition: struct_set.h:80
methods for debugging
void SCIPheurSetFree(SCIP_HEUR *heur, SCIP_DECL_HEURFREE((*heurfree)))
Definition: heur.c:1199
datastructures for block memory pools and memory buffers
SCIP_HEUR * SCIPsetFindHeur(SCIP_SET *set, const char *name)
Definition: set.c:4442
SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURCOPY((*heurcopy)))
Definition: scip_heur.c:152
void SCIPheurSetExit(SCIP_HEUR *heur, SCIP_DECL_HEUREXIT((*heurexit)))
Definition: heur.c:1221
#define SCIP_DECL_HEUREXIT(x)
Definition: type_heur.h:86
SCIP_SET * set
Definition: struct_scip.h:62
public methods for message output
#define SCIP_DECL_HEURINIT(x)
Definition: type_heur.h:78
SCIP_MESSAGEHDLR * messagehdlr
Definition: struct_scip.h:65
#define SCIP_Real
Definition: def.h:164
void SCIPheurSetInit(SCIP_HEUR *heur, SCIP_DECL_HEURINIT((*heurinit)))
Definition: heur.c:1210
#define SCIP_DECL_HEURFREE(x)
Definition: type_heur.h:70
SCIP_RETCODE SCIPsetHeurInitsol(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURINITSOL((*heurinitsol)))
Definition: scip_heur.c:216
SCIP_RETCODE SCIPdivesetCreate(SCIP_DIVESET **divesetptr, SCIP_HEUR *heur, const char *name, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_Real minreldepth, SCIP_Real maxreldepth, SCIP_Real maxlpiterquot, SCIP_Real maxdiveubquot, SCIP_Real maxdiveavgquot, SCIP_Real maxdiveubquotnosol, SCIP_Real maxdiveavgquotnosol, SCIP_Real lpresolvedomchgquot, int lpsolvefreq, int maxlpiterofs, unsigned int initialseed, SCIP_Bool backtrack, SCIP_Bool onlylpbranchcands, SCIP_DIVETYPE divetypemask, SCIP_DECL_DIVESETGETSCORE((*divesetgetscore)))
Definition: heur.c:187
SCIP_RETCODE SCIPsetHeurFree(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURFREE((*heurfree)))
Definition: scip_heur.c:168
internal methods for primal heuristics
#define SCIP_DECL_HEUREXITSOL(x)
Definition: type_heur.h:108
datastructures for global SCIP settings
int SCIPgetNHeurs(SCIP *scip)
Definition: scip_heur.c:274