Scippy

SCIP

Solving Constraint Integer Programs

heur_subnlp.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-2022 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 heur_subnlp.h
17  * @ingroup PRIMALHEURISTICS
18  * @brief NLP local search primal heuristic using sub-SCIPs
19  * @author Stefan Vigerske
20  *
21  * This heuristic applies a NLP local search to a nonlinear CIP after fixing all discrete variables.
22  * That is, the CIP is copied, all discrete variables are fixed, presolving is applied,
23  * and if the resulting CIP has a nonlinear relaxation, then it is tried to solve this relaxation
24  * by an NLP solver.
25  * The heuristic only runs if continuous nonlinearities are present (@ref SCIPhasNLPContinuousNonlinearity()).
26  *
27  * Fixing values for discrete values are either taken from a solution of the LP relaxation which
28  * satisfies all integrality constraints, or are provided by SCIPupdateStartpointHeurSubNlp().
29  *
30  * This heuristic is orthogonal to the undercover heuristic (@ref heur_undercover.h), which fixes
31  * variables in a nonlinear CIP in a way that a (possibly mixed-integer) linear subproblem is obtained.
32  */
33 
34 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35 
36 #ifndef HEUR_SUBNLP_H_
37 #define HEUR_SUBNLP_H_
38 
39 #include "scip/def.h"
40 #include "scip/type_heur.h"
41 #include "scip/type_result.h"
42 #include "scip/type_retcode.h"
43 #include "scip/type_scip.h"
44 #include "scip/type_sol.h"
45 #include "scip/type_var.h"
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 /** creates the NLP local search primal heuristic and includes it in SCIP
52  *
53  * @ingroup PrimalHeuristicIncludes
54  */
55 SCIP_EXPORT
57  SCIP* scip /**< SCIP data structure */
58  );
59 
60 /**@addtogroup PRIMALHEURISTICS
61  *
62  * @{
63  */
64 
65 /** main procedure of the subNLP heuristic */
66 SCIP_EXPORT
68  SCIP* scip, /**< original SCIP data structure */
69  SCIP_HEUR* heur, /**< heuristic data structure */
70  SCIP_RESULT* result, /**< pointer to store result of: solution found, no solution found, or fixing is infeasible (cutoff) */
71  SCIP_SOL* refpoint, /**< point to take fixation of discrete variables from, and startpoint for NLP solver; if NULL, then LP solution is used */
72  SCIP_SOL* resultsol /**< a solution where to store found solution values, if any, or NULL if to try adding to SCIP */
73  );
74 
75 /** updates the starting point for the NLP heuristic
76  *
77  * Is called, for example, by a constraint handler that handles nonlinear constraints when a check on feasibility of a solution fails.
78  */
79 SCIP_EXPORT
81  SCIP* scip, /**< SCIP data structure */
82  SCIP_HEUR* heur, /**< subNLP heuristic */
83  SCIP_SOL* solcand, /**< solution candidate */
84  SCIP_Real violation /**< constraint violation of solution candidate */
85  );
86 
87 /** gets startpoint candidate to be used in next call to NLP heuristic, or NULL if none */
88 SCIP_EXPORT
90  SCIP* scip, /**< original SCIP data structure */
91  SCIP_HEUR* heur /**< heuristic data structure */
92  );
93 
94 /** @} */
95 
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #endif /*HEUR_SUBNLP_H_*/
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
SCIP_RETCODE SCIPincludeHeurSubNlp(SCIP *scip)
Definition: heur_subnlp.c:1661
SCIP_RETCODE SCIPapplyHeurSubNlp(SCIP *scip, SCIP_HEUR *heur, SCIP_RESULT *result, SCIP_SOL *refpoint, SCIP_SOL *resultsol)
Definition: heur_subnlp.c:1757
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
type definitions for return codes for SCIP methods
SCIP_SOL * SCIPgetStartCandidateHeurSubNlp(SCIP *scip, SCIP_HEUR *heur)
Definition: heur_subnlp.c:1996
type definitions for primal heuristics
type definitions for SCIP&#39;s main datastructure
type definitions for problem variables
type definitions for storing primal CIP solutions
#define SCIP_Real
Definition: def.h:177
result codes for SCIP callback methods
SCIP_RETCODE SCIPupdateStartpointHeurSubNlp(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *solcand, SCIP_Real violation)
Definition: heur_subnlp.c:1932
common defines and data types used in all packages of SCIP