Scippy

SCIP

Solving Constraint Integer Programs

sepa_gauge.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 2002-2022 Zuse Institute Berlin */
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 sepa_gauge.h
26  * @ingroup SEPARATORS
27  * @brief gauge separator
28  * @author Felipe Serrano
29  *
30  * This separator receives a point \f$ x_0 \f$ to separate and, given an interior point \f$ \bar x \f$, finds the
31  * intersection between the boundary of a convex relaxation of the current problem and the segment joining \f$ x_0 \f$
32  * and \f$ \bar x \f$. Then it generates gradient cuts at the intersection.
33  *
34  * The interior point \f$ \bar x \f$ is computed only once, by solving
35  * \f{align}{
36  * \min \; & t \\
37  * s.t. \; & g_j(x) \le t & \forall j=1,\ldots,m \\
38  * & l_k(x) \le 0 & \forall k=1,\ldots,p
39  * \f}
40  * where each \f$ g_j \f$ is a convex function and \f$ l_k \f$ is a linear function and
41  * \f[
42  * C = \{ x \colon g_j(x) \le 0 \, \forall j=1,\ldots,m, l_k(x) \le 0 \, \forall k=1,\ldots,p \}
43  * \f]
44  * is a convex relaxation of the current problem.
45  * If we can not find an interior solution, the separator will not be executed again.
46  *
47  * Note that we do not try to push the linear constraints into the interior, i.e. we use \f$ l_k(x) \le 0 \f$ instead
48  * of \f$ l_k(x) \le t \f$, since some of the inequalities might actually be equalities, forcing \f$ t \f$ to zero.
49  * We also use an arbitrary lower bound on \f$ t \f$ to handle the case when \f$ C \f$ is unbounded.
50  *
51  * By default, the separator, if enabled, runs only if the convex relaxation has at least two nonlinear convex constraints.
52  *
53  * In order to compute the boundary point, we consider only nonlinear convex constraints that are violated by the point
54  * we want to separate. These constraints define a convex region for which \f$ \bar x \f$ is an interior point. Then,
55  * a binary search is perform on the segment \f$[\bar x, x_0]\f$ in order to find the boundary point. Gradient cuts are
56  * computed for each of these nonlinear convex constraints which are active at the boundary point.
57  *
58  * Technical details:
59  * - We consider a constraint for the binary search only when its violation is larger than \f$ 10^{-4} \f$, see
60  * MIN_VIOLATION in sepa_gauge.c. The reason is that if the violation is too small, chances are that the point in the
61  * boundary is in the interior for this constraint and we wouldn't generate a cut for it anyway. On the other hand,
62  * even if we generate a cut for this constraint, it is likely that the boundary point is very close to the point to
63  * separate. Hence the cut generated would be very similar to the gradient cut at the point to separate.
64  * - Before separating, if a slight perturbation of the interior point in the direction of the point to separate
65  * gives a point outside the region, we do not separate. The reason is that the interior point we computed could be
66  * almost at the boundary and the segment \f$[\bar x, x_0]\f$ could be tangent to the region. In that case, the cuts
67  * we generate will not separate \f$ x_0 \f$ from the feasible region.
68  *
69  * This separator is currently disabled by default. It requires additional
70  * tuning to be enabled by default. However, it may be useful to enable
71  * it on instances with convex nonlinear constraints if SCIP spends
72  * many iterations in the separation loop without doing sufficient progress.
73  */
74 
75 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
76 
77 #ifndef __SCIP_SEPA_GAUGE_H__
78 #define __SCIP_SEPA_GAUGE_H__
79 
80 
81 #include "scip/def.h"
82 #include "scip/type_retcode.h"
83 #include "scip/type_scip.h"
84 
85 #ifdef __cplusplus
86 extern "C" {
87 #endif
88 
89 /** creates the gauge separator and includes it in SCIP
90  *
91  * @ingroup SeparatorIncludes
92  */
93 SCIP_EXPORT
95  SCIP* scip /**< SCIP data structure */
96  );
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 #endif
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for return codes for SCIP methods
type definitions for SCIP&#39;s main datastructure
SCIP_RETCODE SCIPincludeSepaGauge(SCIP *scip)
Definition: sepa_gauge.c:988
common defines and data types used in all packages of SCIP