Scippy

SCIP

Solving Constraint Integer Programs

heur_trysol.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-2023 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_trysol.h
26  * @ingroup PRIMALHEURISTICS
27  * @brief primal heuristic that tries a given solution
28  * @author Marc Pfetsch
29  *
30  * This heuristic takes a solution from somewhere else via the function SCIPheurPassSolTrySol(). It
31  * then tries to commit this solution. It is mainly used by cons_indicator, which tries to correct a
32  * given solution, but cannot directly submit this solution, because it is a constraint handler and
33  * not a heuristic.
34  */
35 
36 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
37 
38 #ifndef __SCIP_HEUR_TRYSOL_H__
39 #define __SCIP_HEUR_TRYSOL_H__
40 
41 #include "scip/def.h"
42 #include "scip/type_heur.h"
43 #include "scip/type_retcode.h"
44 #include "scip/type_scip.h"
45 #include "scip/type_sol.h"
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 /** creates the trysol 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 /** pass solution to trysol heuristic */
66 SCIP_EXPORT
68  SCIP* scip, /**< SCIP data structure */
69  SCIP_HEUR* heur, /**< trysol heuristic */
70  SCIP_SOL* sol /**< solution to be passed */
71  );
72 
73 /** pass solution to trysol heuristic which just gets added (without checking feasibility */
74 SCIP_EXPORT
76  SCIP* scip, /**< SCIP data structure */
77  SCIP_HEUR* heur, /**< trysol heuristic */
78  SCIP_SOL* sol /**< solution to be passed */
79  );
80 
81 /** @} */
82 
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #endif
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPheurPassSolAddSol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
Definition: heur_trysol.c:293
SCIP_RETCODE SCIPheurPassSolTrySol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
Definition: heur_trysol.c:252
SCIP_RETCODE SCIPincludeHeurTrySol(SCIP *scip)
Definition: heur_trysol.c:222
type definitions for primal heuristics
type definitions for SCIP&#39;s main datastructure
type definitions for storing primal CIP solutions
common defines and data types used in all packages of SCIP