Scippy

SCIP

Solving Constraint Integer Programs

cons_abspower.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-2022 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 cons_abspower.h
17  * @ingroup CONSHDLRS
18  * @brief some API functions of removed constraint handler for absolute power constraints \f$\textrm{lhs} \leq \textrm{sign}(x+a) |x+a|^n + c z \leq \textrm{rhs}\f$
19  * @author Stefan Vigerske
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_CONS_ABSPOWER_H__
25 #define __SCIP_CONS_ABSPOWER_H__
26 
27 #include "scip/def.h"
28 #include "scip/type_cons.h"
29 #include "scip/type_retcode.h"
30 #include "scip/type_scip.h"
31 #include "scip/type_var.h"
32 #include "scip/type_nlp.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /**@addtogroup CONSHDLRS
39  *
40  * @{
41  *
42  * @name Abspower Constraints (deprecated)
43  *
44  * @{
45  *
46  */
47 
48 /** creates and captures an absolute power nonlinear constraint
49  *
50  * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
51  *
52  * @deprecated Use SCIPcreateConsNonlinear() instead.
53  */
54 SCIP_EXPORT
56  SCIP* scip, /**< SCIP data structure */
57  SCIP_CONS** cons, /**< pointer to hold the created constraint */
58  const char* name, /**< name of constraint */
59  SCIP_VAR* x, /**< nonlinear variable x in constraint */
60  SCIP_VAR* z, /**< linear variable z in constraint */
61  SCIP_Real exponent, /**< exponent n of |x+offset|^n term in constraint */
62  SCIP_Real xoffset, /**< offset in |x+offset|^n term in constraint */
63  SCIP_Real zcoef, /**< coefficient of z in constraint */
64  SCIP_Real lhs, /**< left hand side of constraint */
65  SCIP_Real rhs, /**< right hand side of constraint */
66  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
67  * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
68  SCIP_Bool separate, /**< should the constraint be separated during LP processing?
69  * Usually set to TRUE. */
70  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
71  * TRUE for model constraints, FALSE for additional, redundant constraints. */
72  SCIP_Bool check, /**< should the constraint be checked for feasibility?
73  * TRUE for model constraints, FALSE for additional, redundant constraints. */
74  SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
75  * Usually set to TRUE. */
76  SCIP_Bool local, /**< is constraint only valid locally?
77  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
78  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
79  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
80  * adds coefficients to this constraint. */
81  SCIP_Bool dynamic, /**< is constraint subject to aging?
82  * Usually set to FALSE. Set to TRUE for own cuts which
83  * are separated as constraints. */
84  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
85  * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
86  SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
87  * if it may be moved to a more global node?
88  * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
89  );
90 
91 /** creates and captures an absolute power nonlinear constraint
92  * in its most basic version, i.e., all constraint flags are set to their basic value
93  *
94  * All flags can be set via SCIPconsSetFLAGNAME-methods.
95  *
96  * @see SCIPcreateConsAbspower() for information about the basic constraint flag configuration
97  *
98  * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
99  *
100  * @deprecated Use SCIPcreateConsBasicNonlinear() instead.
101  */
102 SCIP_EXPORT
104  SCIP* scip, /**< SCIP data structure */
105  SCIP_CONS** cons, /**< pointer to hold the created constraint */
106  const char* name, /**< name of constraint */
107  SCIP_VAR* x, /**< nonlinear variable x in constraint */
108  SCIP_VAR* z, /**< linear variable z in constraint */
109  SCIP_Real exponent, /**< exponent n of |x+offset|^n term in constraint */
110  SCIP_Real xoffset, /**< offset in |x+offset|^n term in constraint */
111  SCIP_Real zcoef, /**< coefficient of z in constraint */
112  SCIP_Real lhs, /**< left hand side of constraint */
113  SCIP_Real rhs /**< right hand side of constraint */
114  );
115 
116 /** gets the absolute power constraint as a nonlinear row representation
117  *
118  * @deprecated Use SCIPgetNlRowNonlinear() instead.
119  */
120 SCIP_EXPORT
122  SCIP* scip, /**< SCIP data structure */
123  SCIP_CONS* cons, /**< constraint */
124  SCIP_NLROW** nlrow /**< a buffer where to store pointer to nonlinear row */
125  );
126 
127 /** @} */
128 
129 /** @} */
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif
type definitions for NLP management
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
type definitions for return codes for SCIP methods
SCIP_VAR ** x
Definition: circlepacking.c:54
SCIP_RETCODE SCIPcreateConsBasicAbspower(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *x, SCIP_VAR *z, SCIP_Real exponent, SCIP_Real xoffset, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs)
Definition: cons_abspower.c:97
type definitions for SCIP&#39;s main datastructure
type definitions for problem variables
#define SCIP_Bool
Definition: def.h:84
SCIP_RETCODE SCIPgetNlRowAbspower(SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow)
SCIP_RETCODE SCIPcreateConsAbspower(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *x, SCIP_VAR *z, SCIP_Real exponent, SCIP_Real xoffset, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
Definition: cons_abspower.c:34
#define SCIP_Real
Definition: def.h:177
common defines and data types used in all packages of SCIP
type definitions for constraints and constraint handlers