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