Scippy

SCIP

Solving Constraint Integer Programs

compr.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-2024 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file compr.h
26 * @ingroup INTERNALAPI
27 * @brief internal methods for tree compressions
28 * @author Jakob Witzig
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_COMPR_H__
34#define __SCIP_COMPR_H__
35
36
37#include "scip/def.h"
39#include "scip/type_reopt.h"
40#include "scip/type_retcode.h"
41#include "scip/type_result.h"
42#include "scip/type_set.h"
43#include "scip/type_compr.h"
44#include "scip/type_message.h"
45#include "scip/pub_compr.h"
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
51/** copies the given tree compression to a new scip */
53 SCIP_COMPR* compr, /**< tree compression */
54 SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
55 );
56
57/** creates a tree compression */
59 SCIP_COMPR** compr, /**< pointer to tree compression data structure */
60 SCIP_SET* set, /**< global SCIP settings */
61 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
62 BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
63 const char* name, /**< name of tree compression */
64 const char* desc, /**< description of tree compression */
65 int priority, /**< priority of the tree compression */
66 int minnnodes, /**< minimal number of nodes for calling compression */
67 SCIP_DECL_COMPRCOPY ((*comprcopy)), /**< copy method of tree compression or NULL if you don't want to copy
68 * your plugin into sub-SCIPs */
69 SCIP_DECL_COMPRFREE ((*comprfree)), /**< destructor of tree compression */
70 SCIP_DECL_COMPRINIT ((*comprinit)), /**< initialize tree compression */
71 SCIP_DECL_COMPREXIT ((*comprexit)), /**< deinitialize tree compression */
72 SCIP_DECL_COMPRINITSOL ((*comprinitsol)), /**< solving process initialization method of tree compression */
73 SCIP_DECL_COMPREXITSOL ((*comprexitsol)), /**< solving process deinitialization method of tree compression */
74 SCIP_DECL_COMPREXEC ((*comprexec)), /**< execution method of tree compression */
75 SCIP_COMPRDATA* comprdata /**< tree compression data */
76 );
77
78/** calls destructor and frees memory of tree compression */
80 SCIP_COMPR** compr, /**< pointer to tree compression data structure */
81 SCIP_SET* set /**< global SCIP settings */
82 );
83
84/** initializes tree compression */
86 SCIP_COMPR* compr, /**< tree compression */
87 SCIP_SET* set /**< global SCIP settings */
88 );
89
90/** calls exit method of tree compression */
92 SCIP_COMPR* compr, /**< tree compression */
93 SCIP_SET* set /**< global SCIP settings */
94 );
95
96/** informs tree compression that the branch and bound process is being started */
98 SCIP_COMPR* compr, /**< tree compression */
99 SCIP_SET* set /**< global SCIP settings */
100 );
101
102/** informs tree compression that the branch and bound process data is being freed */
104 SCIP_COMPR* compr, /**< tree compression */
105 SCIP_SET* set /**< global SCIP settings */
106 );
107
108/** calls execution method of tree compression */
110 SCIP_COMPR* compr, /**< tree compression */
111 SCIP_SET* set, /**< global SCIP settings */
112 SCIP_REOPT* reopt, /**< reoptimization data structure */
113 SCIP_RESULT* result /**< pointer to store the result of the callback method */
114 );
115
116/** sets priority of tree compression */
118 SCIP_COMPR* compr, /**< tree compression */
119 SCIP_SET* set, /**< global SCIP settings */
120 int priority /**< new priority of the tree compression */
121 );
122
123/** sets copy callback of tree compression */
125 SCIP_COMPR* compr, /**< tree compression */
126 SCIP_DECL_COMPRCOPY ((*comprcopy)) /**< copy callback of tree compression or NULL if you don't want to copy your plugin into sub-SCIPs */
127 );
128
129/** sets destructor callback of tree compression */
131 SCIP_COMPR* compr, /**< tree compression */
132 SCIP_DECL_COMPRFREE ((*comprfree)) /**< destructor of tree compression */
133 );
134
135/** sets initialization callback of tree compression */
137 SCIP_COMPR* compr, /**< tree compression */
138 SCIP_DECL_COMPRINIT ((*comprinit)) /**< initialize tree compression */
139 );
140
141/** sets deinitialization callback of tree compression */
143 SCIP_COMPR* compr, /**< tree compression */
144 SCIP_DECL_COMPREXIT ((*comprexit)) /**< deinitialize tree compression */
145 );
146
147/** sets solving process initialization callback of tree compression */
149 SCIP_COMPR* compr, /**< tree compression */
150 SCIP_DECL_COMPRINITSOL ((*comprinitsol)) /**< solving process initialization callback of tree compression */
151 );
152
153/** sets solving process deinitialization callback of tree compression */
155 SCIP_COMPR* compr, /**< tree compression */
156 SCIP_DECL_COMPREXITSOL ((*comprexitsol)) /**< solving process deinitialization callback of tree compression */
157 );
158
159/** should the compression be executed at the given depth, frequency, timing, ... */
160SCIP_EXPORT
162 SCIP_COMPR* compr, /**< tree compression */
163 int depth, /**< depth of current node */
164 int nnodes /**< number of open nodes */
165 );
166
167#ifdef __cplusplus
168}
169#endif
170
171#endif
SCIP_RETCODE SCIPcomprFree(SCIP_COMPR **compr, SCIP_SET *set)
Definition: compr.c:203
void SCIPcomprSetExitsol(SCIP_COMPR *compr, SCIP_DECL_COMPREXITSOL((*comprexitsol)))
Definition: compr.c:431
void SCIPcomprSetCopy(SCIP_COMPR *compr, SCIP_DECL_COMPRCOPY((*comprcopy)))
Definition: compr.c:376
void SCIPcomprSetPriority(SCIP_COMPR *compr, SCIP_SET *set, int priority)
Definition: compr.c:486
void SCIPcomprSetInitsol(SCIP_COMPR *compr, SCIP_DECL_COMPRINITSOL((*comprinitsol)))
Definition: compr.c:420
void SCIPcomprSetFree(SCIP_COMPR *compr, SCIP_DECL_COMPRFREE((*comprfree)))
Definition: compr.c:387
SCIP_RETCODE SCIPcomprExec(SCIP_COMPR *compr, SCIP_SET *set, SCIP_REOPT *reopt, SCIP_RESULT *result)
Definition: compr.c:299
void SCIPcomprSetInit(SCIP_COMPR *compr, SCIP_DECL_COMPRINIT((*comprinit)))
Definition: compr.c:398
SCIP_RETCODE SCIPcomprExitsol(SCIP_COMPR *compr, SCIP_SET *set)
SCIP_RETCODE SCIPcomprCreate(SCIP_COMPR **compr, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, int minnnodes, SCIP_DECL_COMPRCOPY((*comprcopy)), SCIP_DECL_COMPRFREE((*comprfree)), SCIP_DECL_COMPRINIT((*comprinit)), SCIP_DECL_COMPREXIT((*comprexit)), SCIP_DECL_COMPRINITSOL((*comprinitsol)), SCIP_DECL_COMPREXITSOL((*comprexitsol)), SCIP_DECL_COMPREXEC((*comprexec)), SCIP_COMPRDATA *comprdata)
Definition: compr.c:170
SCIP_RETCODE SCIPcomprExit(SCIP_COMPR *compr, SCIP_SET *set)
Definition: compr.c:269
SCIP_RETCODE SCIPcomprInit(SCIP_COMPR *compr, SCIP_SET *set)
Definition: compr.c:230
SCIP_RETCODE SCIPcomprCopyInclude(SCIP_COMPR *compr, SCIP_SET *set)
Definition: compr.c:84
SCIP_Bool SCIPcomprShouldBeExecuted(SCIP_COMPR *compr, int depth, int nnodes)
Definition: compr.c:442
SCIP_RETCODE SCIPcomprInitsol(SCIP_COMPR *compr, SCIP_SET *set)
void SCIPcomprSetExit(SCIP_COMPR *compr, SCIP_DECL_COMPREXIT((*comprexit)))
Definition: compr.c:409
common defines and data types used in all packages of SCIP
#define SCIP_Bool
Definition: def.h:91
#define nnodes
Definition: gastrans.c:74
memory allocation routines
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:437
public methods for tree compressions
Definition: heur_padm.c:135
type definitions for tree compression
#define SCIP_DECL_COMPREXITSOL(x)
Definition: type_compr.h:104
struct SCIP_ComprData SCIP_COMPRDATA
Definition: type_compr.h:49
#define SCIP_DECL_COMPRFREE(x)
Definition: type_compr.h:66
#define SCIP_DECL_COMPREXEC(x)
Definition: type_compr.h:120
#define SCIP_DECL_COMPREXIT(x)
Definition: type_compr.h:82
#define SCIP_DECL_COMPRINIT(x)
Definition: type_compr.h:74
#define SCIP_DECL_COMPRINITSOL(x)
Definition: type_compr.h:93
#define SCIP_DECL_COMPRCOPY(x)
Definition: type_compr.h:58
type definitions for message output methods
type definitions for collecting reoptimization information
result codes for SCIP callback methods
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:61
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for global SCIP settings