Scippy

SCIP

Solving Constraint Integer Programs

heur_proximity.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 heur_proximity.h
26 * @ingroup PRIMALHEURISTICS
27 * @brief improvement heuristic which uses an auxiliary objective instead of the original objective function which
28 * is itself added as a constraint to a sub-SCIP instance. The heuristic was presented by Matteo Fischetti
29 * and Michele Monaci
30 * @author Gregor Hendel
31 */
32
33/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34
35#ifndef __SCIP_HEUR_PROXIMITY_H__
36#define __SCIP_HEUR_PROXIMITY_H__
37
38#include "scip/def.h"
39#include "scip/type_heur.h"
40#include "scip/type_result.h"
41#include "scip/type_retcode.h"
42#include "scip/type_scip.h"
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/** creates the proximity primal heuristic and includes it in SCIP
49 *
50 * @ingroup PrimalHeuristicIncludes
51 */
52SCIP_EXPORT
54 SCIP* scip /**< SCIP data structure */
55 );
56
57/**@addtogroup PRIMALHEURISTICS
58 *
59 * @{
60 */
61
62/** main procedure of the proximity heuristic, creates and solves a sub-SCIP
63 *
64 * @note the method can be applied in an iterative way, keeping the same subscip in between. If the @p freesubscip
65 * parameter is set to FALSE, the heuristic will keep the subscip data structures. Always set this parameter
66 * to TRUE, or call SCIPdeleteSubproblemProximity() afterwards
67 */
68SCIP_EXPORT
70 SCIP* scip, /**< original SCIP data structure */
71 SCIP_HEUR* heur, /**< heuristic data structure */
72 SCIP_RESULT* result, /**< result data structure */
73 SCIP_Real minimprove, /**< factor by which proximity should at least improve the incumbent */
74 SCIP_Longint nnodes, /**< node limit for the subproblem */
75 SCIP_Longint nlpiters, /**< LP iteration limit for the subproblem */
76 SCIP_Longint* nusednodes, /**< pointer to store number of used nodes in subscip */
77 SCIP_Longint* nusedlpiters, /**< pointer to store number of used LP iterations in subscip */
78 SCIP_Bool freesubscip /**< should the created sub-MIP be freed at the end of the method? */
79 );
80
81/** frees the sub-MIP created by proximity */
82SCIP_EXPORT
84 SCIP* scip /** SCIP data structure */
85 );
86
87/** @} */
88
89#ifdef __cplusplus
90}
91#endif
92
93#endif
common defines and data types used in all packages of SCIP
#define SCIP_Longint
Definition: def.h:158
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:173
#define nnodes
Definition: gastrans.c:74
SCIP_RETCODE SCIPdeleteSubproblemProximity(SCIP *scip)
SCIP_RETCODE SCIPapplyProximity(SCIP *scip, SCIP_HEUR *heur, SCIP_RESULT *result, SCIP_Real minimprove, SCIP_Longint nnodes, SCIP_Longint nlpiters, SCIP_Longint *nusednodes, SCIP_Longint *nusedlpiters, SCIP_Bool freesubscip)
SCIP_RETCODE SCIPincludeHeurProximity(SCIP *scip)
type definitions for primal heuristics
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 SCIP's main datastructure