1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /*                                                                           */
3 /*                  This file is part of the program and library             */
4 /*         SCIP --- Solving Constraint Integer Programs                      */
5 /*                                                                           */
6 /*    Copyright (C) 2002-2021 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_trysol.h
17  * @ingroup PRIMALHEURISTICS
18  * @brief  primal heuristic that tries a given solution
19  * @author Marc Pfetsch
20  *
21  * This heuristic takes a solution from somewhere else via the function SCIPheurPassSolTrySol(). It
22  * then tries to commit this solution. It is mainly used by cons_indicator, which tries to correct a
23  * given solution, but cannot directly submit this solution, because it is a constraint handler and
24  * not a heuristic.
25  */
26 
27 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
28 
29 #ifndef __SCIP_HEUR_TRYSOL_H__
30 #define __SCIP_HEUR_TRYSOL_H__
31 
32 #include "scip/def.h"
33 #include "scip/type_heur.h"
34 #include "scip/type_retcode.h"
35 #include "scip/type_scip.h"
36 #include "scip/type_sol.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 /** creates the trysol primal heuristic and includes it in SCIP
43  *
44  *  @ingroup PrimalHeuristicIncludes
45  */
46 SCIP_EXPORT
47 SCIP_RETCODE SCIPincludeHeurTrySol(
48    SCIP*                 scip                /**< SCIP data structure */
49    );
50 
51 /**@addtogroup PRIMALHEURISTICS
52  *
53  * @{
54  */
55 
56 /** pass solution to trysol heuristic */
57 SCIP_EXPORT
58 SCIP_RETCODE SCIPheurPassSolTrySol(
59    SCIP*                 scip,               /**< SCIP data structure */
60    SCIP_HEUR*            heur,               /**< trysol heuristic */
61    SCIP_SOL*             sol                 /**< solution to be passed */
62    );
63 
64 /** pass solution to trysol heuristic which just gets added (without checking feasibility */
65 SCIP_EXPORT
66 SCIP_RETCODE SCIPheurPassSolAddSol(
67    SCIP*                 scip,               /**< SCIP data structure */
68    SCIP_HEUR*            heur,               /**< trysol heuristic */
69    SCIP_SOL*             sol                 /**< solution to be passed */
70    );
71 
72 /** @} */
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif
79