Scippy

SCIP

Solving Constraint Integer Programs

type_relax.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 type_relax.h
26  * @ingroup TYPEDEFINITIONS
27  * @brief type definitions for relaxators
28  * @author Tobias Achterberg
29  */
30 
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32 
33 #ifndef __SCIP_TYPE_RELAX_H__
34 #define __SCIP_TYPE_RELAX_H__
35 
36 #include "scip/def.h"
37 #include "scip/type_retcode.h"
38 #include "scip/type_result.h"
39 #include "scip/type_scip.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 typedef struct SCIP_Relax SCIP_RELAX; /**< relaxator */
46 typedef struct SCIP_Relaxation SCIP_RELAXATION; /**< relaxator */
47 typedef struct SCIP_RelaxData SCIP_RELAXDATA; /**< locally defined relaxator data */
48 
49 
50 /** copy method for relaxator plugins (called when SCIP copies plugins)
51  *
52  * input:
53  * - scip : SCIP main data structure
54  * - relax : the relaxator itself
55  */
56 #define SCIP_DECL_RELAXCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax)
57 
58 /** destructor of relaxator to free user data (called when SCIP is exiting)
59  *
60  * input:
61  * - scip : SCIP main data structure
62  * - relax : the relaxator itself
63  */
64 #define SCIP_DECL_RELAXFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax)
65 
66 /** initialization method of relaxator (called after problem was transformed)
67  *
68  * input:
69  * - scip : SCIP main data structure
70  * - relax : the relaxator itself
71  */
72 #define SCIP_DECL_RELAXINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax)
73 
74 /** deinitialization method of relaxator (called before transformed problem is freed)
75  *
76  * input:
77  * - scip : SCIP main data structure
78  * - relax : the relaxator itself
79  */
80 #define SCIP_DECL_RELAXEXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax)
81 
82 /** solving process initialization method of relaxator (called when branch and bound process is about to begin)
83  *
84  * This method is called when the presolving was finished and the branch and bound process is about to begin.
85  * The relaxator may use this call to initialize its branch and bound specific data.
86  *
87  * input:
88  * - scip : SCIP main data structure
89  * - relax : the relaxator itself
90  */
91 #define SCIP_DECL_RELAXINITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax)
92 
93 /** solving process deinitialization method of relaxator (called before branch and bound process data is freed)
94  *
95  * This method is called before the branch and bound process is freed.
96  * The relaxator should use this call to clean up its branch and bound data.
97  *
98  * input:
99  * - scip : SCIP main data structure
100  * - relax : the relaxator itself
101  */
102 #define SCIP_DECL_RELAXEXITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax)
103 
104 /** execution method of relaxator
105  *
106  * The method is called in the node processing loop. It solves the current subproblem's relaxation.
107  * Like the LP relaxation, the relaxator should only operate on COLUMN variables.
108  *
109  * input:
110  * - scip : SCIP main data structure
111  * - relax : the relaxator itself
112  * - lowerbound : pointer to store a lowerbound for the current node
113  * - result : pointer to store the result of the relaxation call
114  *
115  * possible return values for *result (if more than one applies, the first in the list should be used):
116  * - SCIP_CUTOFF : the node is infeasible in the variable's bounds and can be cut off
117  * - SCIP_CONSADDED : an additional constraint was generated, and the relaxator should not be called again on the
118  * same relaxation
119  * - SCIP_REDUCEDDOM : a variable's domain was reduced, and the relaxator should not be called again on the same
120  * relaxation
121  * - SCIP_SEPARATED : a cutting plane was generated, and the relaxator should not be called again on the same relaxation
122  * - SCIP_SUCCESS : the relaxator solved the relaxation and should not be called again on the same relaxation
123  * - SCIP_SUSPENDED : the relaxator interrupted its solving process to wait for additional input (e.g. cutting
124  * planes); however, it is able to continue the solving in order to improve the dual bound
125  * - SCIP_DIDNOTRUN : the relaxator was skipped
126  */
127 #define SCIP_DECL_RELAXEXEC(x) SCIP_RETCODE x (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbound, SCIP_RESULT* result)
128 
129 #ifdef __cplusplus
130 }
131 #endif
132 
133 #endif
type definitions for return codes for SCIP methods
type definitions for SCIP&#39;s main datastructure
struct SCIP_RelaxData SCIP_RELAXDATA
Definition: type_relax.h:47
result codes for SCIP callback methods
common defines and data types used in all packages of SCIP