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 (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_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#include "scip/type_retcode.h"
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
53/** creates the sync primal heuristic and includes it in SCIP
54 *
55 * @ingroup PrimalHeuristicIncludes
56 */
57SCIP_EXPORT
59 SCIP* scip /**< SCIP data structure */
60 );
61
62/**@addtogroup PRIMALHEURISTICS
63 *
64 * @{
65 */
66
67/** pass solution to sync heuristic */
68SCIP_EXPORT
70 SCIP* scip, /**< SCIP data structure */
71 SCIP_HEUR* heur, /**< sync heuristic */
72 SCIP_SOL* sol /**< solution to be passed */
73 );
74
75/** @} */
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPheurSyncPassSol(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
Definition: heur_sync.c:190
SCIP_RETCODE SCIPincludeHeurSync(SCIP *scip)
Definition: heur_sync.c:161
type definitions for primal heuristics
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
type definitions for storing primal CIP solutions