Scippy

SCIP

Solving Constraint Integer Programs

pub_benderscut.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-2019 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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file pub_benderscut.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for Benders' decomposition cuts
19  * @author Stephen J. Maher
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PUB_BENDERSCUT_H__
25 #define __SCIP_PUB_BENDERSCUT_H__
26 
27 #include "scip/def.h"
28 #include "scip/type_benderscut.h"
29 #include "scip/type_cons.h"
30 #include "scip/type_lp.h"
31 #include "scip/type_misc.h"
32 #include "scip/type_retcode.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /**@addtogroup PublicBenderscutsMethods
39  *
40  * @{
41  */
42 
43 /** compares two Benders' decomposition cuts w. r. to their priority */
45 SCIP_DECL_SORTPTRCOMP(SCIPbenderscutComp);
46 
47 /** comparison method for sorting Benders' decomposition cuts w.r.t. to their name */
49 SCIP_DECL_SORTPTRCOMP(SCIPbenderscutCompName);
50 
51 /** gets user data of the Benders' decomposition cut */
54  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
55  );
56 
57 /** sets user data of the Benders' decomposition cut; user has to free old data in advance! */
60  SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
61  SCIP_BENDERSCUTDATA* benderscutdata /**< new Benders' decomposition cut user data */
62  );
63 
64 /** gets name of the Benders' decomposition cut */
66 const char* SCIPbenderscutGetName(
67  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
68  );
69 
70 /** gets description of the Benders' decomposition cut */
72 const char* SCIPbenderscutGetDesc(
73  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
74  );
75 
76 /** gets priority of the Benders' decomposition cut */
79  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
80  );
81 
82 /** gets the number of times, the Benders' decomposition cut was called and tried to find a violated cut */
85  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
86  );
87 
88 /** gets the number of the cuts found by this Benders' decomposition cut */
91  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
92  );
93 
94 /** is the Benders' decomposition cut initialized? */
97  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
98  );
99 
100 /** gets time in seconds used in this Benders' decomposition cut for setting up for next stages */
103  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
104  );
105 
106 /** gets time in seconds used in this Benders' decomposition cut */
109  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
110  );
111 
112 /** returns the number of cuts that have been added for storage */
115  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
116  );
117 
118 /** returns the data for the cuts that have been added by the Benders' cut plugin */
121  SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
122  int cutidx, /**< the index for the cut data that is requested */
123  SCIP_VAR*** vars, /**< the variables that have non-zero coefficients in the cut */
124  SCIP_Real** vals, /**< the coefficients of the variables in the cut */
125  SCIP_Real* lhs, /**< the left hand side of the cut */
126  SCIP_Real* rhs, /**< the right hand side of the cut */
127  int* nvars /**< the number of variables with non-zero coefficients in the cut */
128  );
129 
130 /** returns whether the Benders' cut uses the LP information */
133  SCIP_BENDERSCUT* benderscut /**< Benders' decomposition cut */
134  );
135 
136 /** sets the enabled flag of the Benders' decomposition cut method */
139  SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
140  SCIP_Bool enabled /**< flag to indicate whether the Benders' decomposition cut is enabled */
141  );
142 
143 /* @} */
144 
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 #endif
SCIP_EXPORT int SCIPbenderscutGetNAddedCuts(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:599
SCIP_EXPORT void SCIPbenderscutSetEnabled(SCIP_BENDERSCUT *benderscut, SCIP_Bool enabled)
Definition: benderscut.c:695
SCIP_EXPORT SCIP_Longint SCIPbenderscutGetNCalls(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:549
type definitions for miscellaneous datastructures
struct SCIP_BenderscutData SCIP_BENDERSCUTDATA
SCIP_EXPORT SCIP_Real SCIPbenderscutGetSetupTime(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:579
#define SCIP_EXPORT
Definition: def.h:98
SCIP_EXPORT SCIP_Longint SCIPbenderscutGetNFound(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:559
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for return codes for SCIP methods
type definitions for LP management
SCIP_EXPORT const char * SCIPbenderscutGetName(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:508
SCIP_EXPORT SCIP_RETCODE SCIPbenderscutGetAddedCutData(SCIP_BENDERSCUT *benderscut, int cutidx, SCIP_VAR ***vars, SCIP_Real **vals, SCIP_Real *lhs, SCIP_Real *rhs, int *nvars)
Definition: benderscut.c:609
SCIP_EXPORT void SCIPbenderscutSetData(SCIP_BENDERSCUT *benderscut, SCIP_BENDERSCUTDATA *benderscutdata)
Definition: benderscut.c:429
SCIP_EXPORT int SCIPbenderscutGetPriority(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:528
#define SCIP_Bool
Definition: def.h:70
SCIP_EXPORT SCIP_Bool SCIPbenderscutIsLPCut(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:685
type definitions for Benders&#39; decomposition cut
SCIP_EXPORT SCIP_Real SCIPbenderscutGetTime(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:589
SCIP_EXPORT SCIP_DECL_SORTPTRCOMP(SCIPbenderscutComp)
Definition: benderscut.c:45
#define SCIP_Real
Definition: def.h:164
SCIP_EXPORT SCIP_BENDERSCUTDATA * SCIPbenderscutGetData(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:419
#define SCIP_Longint
Definition: def.h:149
SCIP_EXPORT const char * SCIPbenderscutGetDesc(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:518
common defines and data types used in all packages of SCIP
SCIP_EXPORT SCIP_Bool SCIPbenderscutIsInitialized(SCIP_BENDERSCUT *benderscut)
Definition: benderscut.c:569
type definitions for constraints and constraint handlers