Scippy

SCIP

Solving Constraint Integer Programs

heur_sync.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 2002-2022 Zuse Institute Berlin */
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_sync.h
26  * @ingroup PRIMALHEURISTICS
27  * @brief primal heuristic that adds given solutions
28  * @author Leona Gottwald
29  *
30  * This heuristic takes solutions from somewhere else via the function SCIPheurSyncPassSol(). It
31  * then tries to commit this solution. It is used by the concurrent solvers, when solutions are
32  * communicated between solvers, but cannot directly submitted because SCIP might be in a stage where
33  * this is not allowed.
34  * If multiple solutions are passed it will keep the best N solutions depending on the parameter setting
35  * "concsolvers/sync/maxnsols"
36  */
37 
38 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
39 
40 #ifndef __SCIP_HEUR_SYNC_H__
41 #define __SCIP_HEUR_SYNC_H__
42 
43 #include "scip/def.h"
44 #include "scip/type_sol.h"
45 #include "scip/type_scip.h"
46 #include "scip/type_heur.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 /** creates the sync primal heuristic and includes it in SCIP
53  *
54  * @ingroup PrimalHeuristicIncludes
55  */
56 SCIP_EXPORT
58  SCIP* scip /**< SCIP data structure */
59  );
60 
61 /**@addtogroup PRIMALHEURISTICS
62  *
63  * @{
64  */
65 
66 /** pass solution to sync heuristic */
67 SCIP_EXPORT
69  SCIP* scip, /**< SCIP data structure */
70  SCIP_HEUR* heur, /**< sync heuristic */
71  SCIP_SOL* sol /**< solution to be passed */
72  );
73 
74 /** @} */
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for primal heuristics
type definitions for SCIP&#39;s main datastructure
SCIP_RETCODE SCIPincludeHeurSync(SCIP *scip)
Definition: heur_sync.c:161
SCIP_RETCODE SCIPheurSyncPassSol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
Definition: heur_sync.c:190
type definitions for storing primal CIP solutions
common defines and data types used in all packages of SCIP