Scippy

SCIP

Solving Constraint Integer Programs

pub_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-2017 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 pub_heur.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for primal heuristics
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PUB_HEUR_H__
25 #define __SCIP_PUB_HEUR_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_misc.h"
30 #include "scip/type_heur.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /**@addtogroup PublicHeuristicMethods
37  *
38  * @{
39  */
40 
41 
42 
43 /** compares two heuristics w. r. to their priority */
44 extern
45 SCIP_DECL_SORTPTRCOMP(SCIPheurComp);
46 
47 /** comparison method for sorting heuristics w.r.t. to their name */
48 extern
49 SCIP_DECL_SORTPTRCOMP(SCIPheurCompName);
50 
51 /** gets user data of primal heuristic */
52 extern
54  SCIP_HEUR* heur /**< primal heuristic */
55  );
56 
57 /** sets user data of primal heuristic; user has to free old data in advance! */
58 extern
59 void SCIPheurSetData(
60  SCIP_HEUR* heur, /**< primal heuristic */
61  SCIP_HEURDATA* heurdata /**< new primal heuristic user data */
62  );
63 
64 /** gets name of primal heuristic */
65 extern
66 const char* SCIPheurGetName(
67  SCIP_HEUR* heur /**< primal heuristic */
68  );
69 
70 /** gets description of primal heuristic */
71 extern
72 const char* SCIPheurGetDesc(
73  SCIP_HEUR* heur /**< primal heuristic */
74  );
75 
76 /** gets display character of primal heuristic */
77 extern
79  SCIP_HEUR* heur /**< primal heuristic */
80  );
81 
82 /** returns the timing mask of the heuristic */
83 extern
85  SCIP_HEUR* heur /**< primal heuristic */
86  );
87 
88 /** sets new timing mask for heuristic */
89 extern
91  SCIP_HEUR* heur, /**< primal heuristic */
92  SCIP_HEURTIMING timingmask /**< new timing mask of heuristic */
93  );
94 
95 /** does the heuristic use a secondary SCIP instance? */
96 extern
98  SCIP_HEUR* heur /**< primal heuristic */
99  );
100 
101 /** gets priority of primal heuristic */
102 extern
104  SCIP_HEUR* heur /**< primal heuristic */
105  );
106 
107 /** gets frequency of primal heuristic */
108 extern
109 int SCIPheurGetFreq(
110  SCIP_HEUR* heur /**< primal heuristic */
111  );
112 
113 /** sets frequency of primal heuristic */
114 extern
115 void SCIPheurSetFreq(
116  SCIP_HEUR* heur, /**< primal heuristic */
117  int freq /**< new frequency of heuristic */
118  );
119 
120 /** gets frequency offset of primal heuristic */
121 extern
123  SCIP_HEUR* heur /**< primal heuristic */
124  );
125 
126 /** gets maximal depth level for calling primal heuristic (returns -1, if no depth limit exists) */
127 extern
129  SCIP_HEUR* heur /**< primal heuristic */
130  );
131 
132 /** gets the number of times, the heuristic was called and tried to find a solution */
133 extern
135  SCIP_HEUR* heur /**< primal heuristic */
136  );
137 
138 /** gets the number of primal feasible solutions found by this heuristic */
139 extern
141  SCIP_HEUR* heur /**< primal heuristic */
142  );
143 
144 /** gets the number of new best primal feasible solutions found by this heuristic */
145 extern
147  SCIP_HEUR* heur /**< primal heuristic */
148  );
149 
150 /** is primal heuristic initialized? */
151 extern
153  SCIP_HEUR* heur /**< primal heuristic */
154  );
155 
156 /** gets time in seconds used in this heuristic for setting up for next stages */
157 extern
159  SCIP_HEUR* heur /**< primal heuristic */
160  );
161 
162 /** gets time in seconds used in this heuristic */
163 extern
165  SCIP_HEUR* heur /**< primal heuristic */
166  );
167 
168 /** returns array of divesets of this primal heuristic, or NULL if it has no divesets */
169 extern
171  SCIP_HEUR* heur /**< primal heuristic */
172  );
173 
174 /** returns the number of divesets of this primal heuristic */
175 extern
177  SCIP_HEUR* heur /**< primal heuristic */
178  );
179 
180 /* @} */
181 
182 /** get the heuristic to which this diving setting belongs */
183 extern
185  SCIP_DIVESET* diveset /**< diving settings */
186  );
187 
188 /** get the working solution of this dive set */
189 extern
191  SCIP_DIVESET* diveset /**< diving settings */
192  );
193 
194 /** set the working solution for this dive set */
195 extern
197  SCIP_DIVESET* diveset, /**< diving settings */
198  SCIP_SOL* sol /**< new working solution for this dive set, or NULL */
199  );
200 
201 /**@addtogroup PublicDivesetMethods
202  *
203  * @{
204  */
205 
206 /** get the name of the dive set */
207 extern
208 const char* SCIPdivesetGetName(
209  SCIP_DIVESET* diveset /**< diving settings */
210  );
211 
212 /** get the minimum relative depth of the diving settings */
213 extern
215  SCIP_DIVESET* diveset /**< diving settings */
216  );
217 
218 /** get the maximum relative depth of the diving settings */
219 extern
221  SCIP_DIVESET* diveset /**< diving settings */
222  );
223 
224 /** get the number of successful runs of the diving settings */
225 extern
227  SCIP_DIVESET* diveset /**< diving settings */
228  );
229 
230 /** get the number of calls to this dive set */
231 extern
233  SCIP_DIVESET* diveset /**< diving settings */
234  );
235 
236 /** get the number of calls successfully terminated at a feasible leaf node */
237 extern
239  SCIP_DIVESET* diveset /**< diving settings */
240  );
241 
242 /** get the minimum depth reached by this dive set */
243 extern
245  SCIP_DIVESET* diveset /**< diving settings */
246  );
247 
248 /** get the maximum depth reached by this dive set */
249 extern
251  SCIP_DIVESET* diveset /**< diving settings */
252  );
253 
254 /** get the average depth this dive set reached during execution */
255 extern
257  SCIP_DIVESET* diveset /**< diving settings */
258  );
259 
260 /** get the minimum depth at which this dive set found a solution */
261 extern
263  SCIP_DIVESET* diveset /**< diving settings */
264  );
265 
266 /** get the maximum depth at which this dive set found a solution */
267 extern
269  SCIP_DIVESET* diveset /**< diving settings */
270  );
271 
272 /** get the average depth at which this dive set found a solution */
273 extern
275  SCIP_DIVESET* diveset /**< diving settings */
276  );
277 
278 /** get the total number of LP iterations used by this dive set */
279 extern
281  SCIP_DIVESET* diveset /**< diving settings */
282  );
283 
284 /** get the total number of probing nodes used by this dive set */
285 extern
287  SCIP_DIVESET* diveset /**< diving settings */
288  );
289 
290 /** get the total number of backtracks performed by this dive set */
291 extern
293  SCIP_DIVESET* diveset /**< diving settings */
294  );
295 
296 /** get the maximum LP iterations quotient of the diving settings */
297 extern
299  SCIP_DIVESET* diveset /**< diving settings */
300  );
301 
302 /** get the maximum LP iterations offset of the diving settings */
303 extern
305  SCIP_DIVESET* diveset /**< diving settings */
306  );
307 
308 /** get the maximum upper bound quotient parameter of the diving settings if no solution is available */
309 extern
311  SCIP_DIVESET* diveset /**< diving settings */
312  );
313 
314 /** get the average quotient parameter of the diving settings if no solution is available */
315 extern
317  SCIP_DIVESET* diveset /**< diving settings */
318  );
319 
320 /** get the maximum upper bound quotient parameter of the diving settings if an incumbent solution exists */
321 extern
323  SCIP_DIVESET* diveset /**< diving settings */
324  );
325 
326 /** get the average upper bound quotient parameter of the diving settings if an incumbent solution exists */
327 extern
329  SCIP_DIVESET* diveset /**< diving settings */
330  );
331 
332 /** should backtracking be applied? */
333 extern
335  SCIP_DIVESET* diveset /**< diving settings */
336  );
337 
338 /** returns the LP solve frequency for diving LPs (0: dynamically based on number of intermediate domain reductions) */
339 extern
341  SCIP_DIVESET* diveset /**< diving settings */
342  );
343 
344 /** returns the domain reduction quotient for triggering an immediate resolve of the diving LP (0.0: always resolve)*/
345 extern
347  SCIP_DIVESET* diveset /**< diving settings */
348  );
349 
350 /** should only LP branching candidates be considered instead of the slower but
351  * more general constraint handler diving variable selection?
352  */
353 extern
355  SCIP_DIVESET* diveset /**< diving settings */
356  );
357 
358 /** returns TRUE if dive set supports diving of the specified type */
359 extern
361  SCIP_DIVESET* diveset, /**< diving settings */
362  SCIP_DIVETYPE divetype /**< bit mask that represents the supported dive types by this dive set */
363  );
364 
365 /** returns the random number generator of this \p diveset for tie-breaking */
366 extern
368  SCIP_DIVESET* diveset /**< diving settings */
369  );
370 
371 /* @} */
372 
373 #ifdef __cplusplus
374 }
375 #endif
376 
377 #endif
SCIP_HEURTIMING SCIPheurGetTimingmask(SCIP_HEUR *heur)
Definition: heur.c:1211
int SCIPdivesetGetMinSolutionDepth(SCIP_DIVESET *diveset)
Definition: heur.c:432
int SCIPheurGetPriority(SCIP_HEUR *heur)
Definition: heur.c:1242
SCIP_Real SCIPheurGetSetupTime(SCIP_HEUR *heur)
Definition: heur.c:1359
type definitions for miscellaneous datastructures
SCIP_SOL * SCIPdivesetGetWorkSolution(SCIP_DIVESET *diveset)
Definition: heur.c:327
SCIP_Longint SCIPdivesetGetNBacktracks(SCIP_DIVESET *diveset)
Definition: heur.c:482
SCIP_Bool SCIPdivesetUseBacktrack(SCIP_DIVESET *diveset)
Definition: heur.c:539
SCIP_Longint SCIPheurGetNBestSolsFound(SCIP_HEUR *heur)
Definition: heur.c:1327
unsigned int SCIP_HEURTIMING
Definition: type_timing.h:97
SCIP_Real SCIPdivesetGetUbQuot(SCIP_DIVESET *diveset)
Definition: heur.c:523
int SCIPdivesetGetMaxLPIterOffset(SCIP_DIVESET *diveset)
Definition: heur.c:500
SCIP_DIVESET ** SCIPheurGetDivesets(SCIP_HEUR *heur)
Definition: heur.c:1379
SCIP_Real SCIPdivesetGetAvgQuotNoSol(SCIP_DIVESET *diveset)
Definition: heur.c:516
SCIP_Real SCIPdivesetGetMaxRelDepth(SCIP_DIVESET *diveset)
Definition: heur.c:366
int SCIPheurGetFreqofs(SCIP_HEUR *heur)
Definition: heur.c:1287
struct SCIP_HeurData SCIP_HEURDATA
Definition: type_heur.h:51
SCIP_Longint SCIPdivesetGetNLPIterations(SCIP_DIVESET *diveset)
Definition: heur.c:462
SCIP_Bool SCIPheurUsesSubscip(SCIP_HEUR *heur)
Definition: heur.c:1232
unsigned int SCIP_DIVETYPE
Definition: type_heur.h:48
SCIP_Real SCIPdivesetGetMinRelDepth(SCIP_DIVESET *diveset)
Definition: heur.c:358
int SCIPdivesetGetNSolutionCalls(SCIP_DIVESET *diveset)
Definition: heur.c:392
SCIP_Real SCIPdivesetGetAvgSolutionDepth(SCIP_DIVESET *diveset)
Definition: heur.c:452
void SCIPheurSetData(SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)
Definition: heur.c:1102
void SCIPheurSetFreq(SCIP_HEUR *heur, int freq)
Definition: heur.c:1276
SCIP_Bool SCIPdivesetUseOnlyLPBranchcands(SCIP_DIVESET *diveset)
Definition: heur.c:580
SCIP_Real SCIPdivesetGetMaxLPIterQuot(SCIP_DIVESET *diveset)
Definition: heur.c:492
int SCIPdivesetGetMaxSolutionDepth(SCIP_DIVESET *diveset)
Definition: heur.c:442
const char * SCIPheurGetName(SCIP_HEUR *heur)
Definition: heur.c:1181
int SCIPheurGetMaxdepth(SCIP_HEUR *heur)
Definition: heur.c:1297
type definitions for primal heuristics
int SCIPdivesetGetMaxDepth(SCIP_DIVESET *diveset)
Definition: heur.c:412
SCIP_Real SCIPdivesetGetAvgQuot(SCIP_DIVESET *diveset)
Definition: heur.c:531
SCIP_Real SCIPdivesetGetAvgDepth(SCIP_DIVESET *diveset)
Definition: heur.c:422
const char * SCIPheurGetDesc(SCIP_HEUR *heur)
Definition: heur.c:1191
int SCIPheurGetFreq(SCIP_HEUR *heur)
Definition: heur.c:1266
SCIP_Real SCIPdivesetGetLPResolveDomChgQuot(SCIP_DIVESET *diveset)
Definition: heur.c:568
int SCIPheurGetNDivesets(SCIP_HEUR *heur)
Definition: heur.c:1389
SCIP_HEUR * SCIPdivesetGetHeur(SCIP_DIVESET *diveset)
Definition: heur.c:319
SCIP_Longint SCIPheurGetNCalls(SCIP_HEUR *heur)
Definition: heur.c:1307
SCIP_Bool SCIPdivesetSupportsType(SCIP_DIVESET *diveset, SCIP_DIVETYPE divetype)
Definition: heur.c:590
#define SCIP_Bool
Definition: def.h:61
SCIP_Real SCIPdivesetGetUbQuotNoSol(SCIP_DIVESET *diveset)
Definition: heur.c:508
SCIP_RANDNUMGEN * SCIPdivesetGetRandnumgen(SCIP_DIVESET *diveset)
Definition: heur.c:557
void SCIPdivesetSetWorkSolution(SCIP_DIVESET *diveset, SCIP_SOL *sol)
Definition: heur.c:337
SCIP_DECL_SORTPTRCOMP(SCIPheurComp)
Definition: heur.c:40
#define SCIP_Real
Definition: def.h:135
char SCIPheurGetDispchar(SCIP_HEUR *heur)
Definition: heur.c:1201
void SCIPheurSetTimingmask(SCIP_HEUR *heur, SCIP_HEURTIMING timingmask)
Definition: heur.c:1221
#define SCIP_Longint
Definition: def.h:120
SCIP_Longint SCIPheurGetNSolsFound(SCIP_HEUR *heur)
Definition: heur.c:1317
SCIP_Longint SCIPdivesetGetSolSuccess(SCIP_DIVESET *diveset)
Definition: heur.c:374
SCIP_Bool SCIPheurIsInitialized(SCIP_HEUR *heur)
Definition: heur.c:1337
common defines and data types used in all packages of SCIP
SCIP_HEURDATA * SCIPheurGetData(SCIP_HEUR *heur)
Definition: heur.c:1092
SCIP_Real SCIPheurGetTime(SCIP_HEUR *heur)
Definition: heur.c:1369
int SCIPdivesetGetNCalls(SCIP_DIVESET *diveset)
Definition: heur.c:382
SCIP_Longint SCIPdivesetGetNProbingNodes(SCIP_DIVESET *diveset)
Definition: heur.c:472
int SCIPdivesetGetLPSolveFreq(SCIP_DIVESET *diveset)
Definition: heur.c:547
const char * SCIPdivesetGetName(SCIP_DIVESET *diveset)
Definition: heur.c:348
int SCIPdivesetGetMinDepth(SCIP_DIVESET *diveset)
Definition: heur.c:402