Scippy

SCIP

Solving Constraint Integer Programs

scip_iisfinder.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-2025 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 scip_iisfinder.h
26 * @ingroup PUBLICCOREAPI
27 * @brief public methods for IIS finder plugins
28 * @author Mark Turner
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_SCIP_IISFINDER_H__
34#define __SCIP_SCIP_IISFINDER_H__
35
36
37#include "scip/def.h"
38#include "scip/type_iisfinder.h"
39#include "scip/type_retcode.h"
40#include "scip/type_scip.h"
41#include "scip/type_tree.h"
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47/**@addtogroup PublicIISfinderMethods
48 *
49 * @{
50 */
51
52/** creates an IIS finder and includes it in SCIP
53 *
54 * @note this method has all IIS finder callbacks as arguments and is thus changed every time a new
55 * callback is added in future releases; consider using SCIPincludeIISfinderBasic() and setter functions
56 * if you seek for a method which is less likely to change in future releases
57 */
58SCIP_EXPORT
60 SCIP* scip, /**< SCIP data structure */
61 const char* name, /**< name of IIS finder */
62 const char* desc, /**< description of IIS finder */
63 int priority, /**< priority of the IIS finder */
64 SCIP_DECL_IISFINDERCOPY ((*iisfindercopy)), /**< copy method of IIS finder or NULL if you don't want to copy your plugin into sub-SCIPs */
65 SCIP_DECL_IISFINDERFREE ((*iisfinderfree)), /**< destructor of IIS finder */
66 SCIP_DECL_IISFINDEREXEC ((*iisfinderexec)), /**< IIS finder execution method */
67 SCIP_IISFINDERDATA* iisfinderdata /**< IIS finder data */
68 );
69
70/** Creates an IIS finder and includes it in SCIP with its most fundamental callbacks.
71 *
72 * All non-fundamental (or optional) callbacks as, e.g., copy and free callbacks, will be set to NULL. Optional
73 * callbacks can be set via specific setter functions, see SCIPsetIISfinderCopy() and SCIPsetIISfinderFree(),
74 *
75 * @note if you want to set all callbacks with a single method call, consider using SCIPincludeIISfinder() instead
76 */
77SCIP_EXPORT
79 SCIP* scip, /**< SCIP data structure */
80 SCIP_IISFINDER** iisfinder, /**< reference to an IIS finder, or NULL */
81 const char* name, /**< name of IIS finder */
82 const char* desc, /**< description of IIS finder */
83 int priority, /**< priority of the IIS finder in standard mode */
84 SCIP_DECL_IISFINDEREXEC((*iisfinderexec)), /**< IIS finder execution method */
85 SCIP_IISFINDERDATA* iisfinderdata /**< IIS finder data */
86 );
87
88/** sets copy method of IIS finder */
89SCIP_EXPORT
91 SCIP* scip, /**< SCIP data structure */
92 SCIP_IISFINDER* iisfinder, /**< IIS finder */
93 SCIP_DECL_IISFINDERCOPY ((*iisfindercopy)) /**< copy method of IIS finder or NULL if you don't want to copy your plugin into sub-SCIPs */
94 );
95
96/** sets destructor method of IIS finder */
97SCIP_EXPORT
99 SCIP* scip, /**< SCIP data structure */
100 SCIP_IISFINDER* iisfinder, /**< IIS finder */
101 SCIP_DECL_IISFINDERFREE ((*iisfinderfree)) /**< destructor of IIS finder */
102 );
103
104/** the execution method that iterates over the IIS finder plugins */
105SCIP_EXPORT
107 SCIP* scip /**< SCIP data structure */
108 );
109
110/** returns the IIS finder of the given name, or NULL if not existing */
111SCIP_EXPORT
113 SCIP* scip, /**< SCIP data structure */
114 const char* name /**< name of IIS finder */
115 );
116
117/** returns the array of currently available IIS finders */
118SCIP_EXPORT
120 SCIP* scip /**< SCIP data structure */
121 );
122
123/** returns the number of currently available IIS finders */
124SCIP_EXPORT
126 SCIP* scip /**< SCIP data structure */
127 );
128
129/** sets the priority of an IIS finder */
130SCIP_EXPORT
132 SCIP* scip, /**< SCIP data structure */
133 SCIP_IISFINDER* iisfinder, /**< IIS finder */
134 int priority /**< new priority of the IIS finder */
135 );
136
137/** Gets the IIS storage.
138 *
139 * @return the \ref SCIP_IIS iis storage.
140 *
141 * @pre This method can be called if @p scip is in one of the following stages:
142 * - \ref SCIP_STAGE_INIT
143 * - \ref SCIP_STAGE_PROBLEM
144 * - \ref SCIP_STAGE_TRANSFORMING
145 * - \ref SCIP_STAGE_TRANSFORMED
146 * - \ref SCIP_STAGE_INITPRESOLVE
147 * - \ref SCIP_STAGE_PRESOLVING
148 * - \ref SCIP_STAGE_EXITPRESOLVE
149 * - \ref SCIP_STAGE_PRESOLVED
150 * - \ref SCIP_STAGE_INITSOLVE
151 * - \ref SCIP_STAGE_SOLVING
152 * - \ref SCIP_STAGE_SOLVED
153 * - \ref SCIP_STAGE_EXITSOLVE
154 * - \ref SCIP_STAGE_FREETRANS
155 *
156 * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
157 */
158SCIP_EXPORT
160 SCIP* scip /**< SCIP data structure */
161 );
162
163/** @} */
164
165#ifdef __cplusplus
166}
167#endif
168
169#endif
common defines and data types used in all packages of SCIP
SCIP_IISFINDER ** SCIPgetIISfinders(SCIP *scip)
SCIP_IISFINDER * SCIPfindIISfinder(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetIISfinderCopy(SCIP *scip, SCIP_IISFINDER *iisfinder, SCIP_DECL_IISFINDERCOPY((*iisfindercopy)))
int SCIPgetNIISfinders(SCIP *scip)
SCIP_RETCODE SCIPsetIISfinderPriority(SCIP *scip, SCIP_IISFINDER *iisfinder, int priority)
SCIP_RETCODE SCIPgenerateIIS(SCIP *scip)
SCIP_RETCODE SCIPincludeIISfinderBasic(SCIP *scip, SCIP_IISFINDER **iisfinder, const char *name, const char *desc, int priority, SCIP_DECL_IISFINDEREXEC((*iisfinderexec)), SCIP_IISFINDERDATA *iisfinderdata)
SCIP_RETCODE SCIPsetIISfinderFree(SCIP *scip, SCIP_IISFINDER *iisfinder, SCIP_DECL_IISFINDERFREE((*iisfinderfree)))
SCIP_RETCODE SCIPincludeIISfinder(SCIP *scip, const char *name, const char *desc, int priority, SCIP_DECL_IISFINDERCOPY((*iisfindercopy)), SCIP_DECL_IISFINDERFREE((*iisfinderfree)), SCIP_DECL_IISFINDEREXEC((*iisfinderexec)), SCIP_IISFINDERDATA *iisfinderdata)
SCIP_IIS * SCIPgetIIS(SCIP *scip)
type definitions for IIS
#define SCIP_DECL_IISFINDERFREE(x)
#define SCIP_DECL_IISFINDEREXEC(x)
struct SCIP_IISfinderData SCIP_IISFINDERDATA
#define SCIP_DECL_IISFINDERCOPY(x)
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 branch and bound tree