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