Scippy

SCIP

Solving Constraint Integer Programs

sepa_convexproj.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 sepa_convexproj.h
26 * @ingroup SEPARATORS
27 * @brief convexproj separator
28 * @author Felipe Serrano
29 *
30 * This separator receives a point \f$ x_0 \f$ to separate, projects it onto a convex relaxation
31 * of the current problem and then generates gradient cuts at the projection.
32 *
33 * In more detail, the separator builds and stores a convex relaxation of the problem
34 * \f[
35 * C = \{ x \colon g_j(x) \le 0 \, \forall j=1,\ldots,m \}
36 * \f]
37 * where each \f$ g_j \f$ is a convex function and computes the projection by solving
38 * \f{align}{
39 * \min \; & || x - x_0 ||^2 \\
40 * s.t. \; & g_j(x) \le 0 & \forall j=1,\ldots,m.
41 * \f}
42 *
43 * By default, if enabled, the separator runs only if the convex relaxation has at least one nonlinear convex function.
44 *
45 * The separator generates cuts for constraints which were violated by the solution we want to separate and active
46 * at the projection. If the projection problem is not solved to optimality, it still tries to add a cut at the
47 * best solution found. In case that the projection problem is solved to optimality, it is guaranteed that a cut
48 * separates the point. To see this, remember that \f$ z \f$ is the projection if and only if
49 * \f[
50 * \langle x - z, z - x_0 \rangle \ge 0 \, \forall x \in C \\
51 * \f]
52 * This inequality is violated for \f$ x = x_0 \f$. On the other hand, one of the optimality conditions of the
53 * projection problem at the optimum looks like
54 * \f[
55 * 2 (z - x_0) + \sum_j \lambda_j \nabla g_j(z) = 0.
56 * \f]
57 * Now suppose that the no gradient cut at \f$ z \f$ separates \f$ x_0 \f$, i.e.,
58 * \f[
59 * g_j(z) + \langle \nabla g_j(z), x_0 - z \rangle \le 0.
60 * \f]
61 * Multiplying each inequality with \f$ \lambda_j \ge 0 \f$ and summing up, we get the following contradiction:
62 * \f[
63 * \langle -2(z - x_0), x_0 - z \rangle \le 0.
64 * \f]
65 *
66 * This separator is currently disabled by default. It requires additional
67 * tuning to be enabled by default. However, it may be useful to enable
68 * it on instances with convex nonlinear constraints if SCIP spends
69 * many iterations in the separation loop without doing sufficient progress.
70 */
71
72/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
73
74#ifndef __SCIP_SEPA_CONVEXPROJ_H__
75#define __SCIP_SEPA_CONVEXPROJ_H__
76
77
78#include "scip/def.h"
79#include "scip/type_retcode.h"
80#include "scip/type_scip.h"
81
82#ifdef __cplusplus
83extern "C" {
84#endif
85
86/** creates the convexproj separator and includes it in SCIP
87 *
88 * @ingroup SeparatorIncludes
89 */
90SCIP_EXPORT
92 SCIP* scip /**< SCIP data structure */
93 );
94
95#ifdef __cplusplus
96}
97#endif
98
99#endif
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPincludeSepaConvexproj(SCIP *scip)
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for SCIP's main datastructure