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_indicator.h
26   	 * @ingroup CONSHDLRS
27   	 * @brief  constraint handler for indicator constraints
28   	 * @author Marc Pfetsch
29   	 *
30   	 */
31   	
32   	/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33   	
34   	#ifndef __SCIP_CONS_INDICATOR_H__
35   	#define __SCIP_CONS_INDICATOR_H__
36   	
37   	
38   	#include "scip/def.h"
39   	#include "scip/type_cons.h"
40   	#include "scip/type_lp.h"
41   	#include "scip/type_retcode.h"
42   	#include "scip/type_scip.h"
43   	#include "scip/type_sol.h"
44   	#include "scip/type_var.h"
45   	
46   	#ifdef __cplusplus
47   	extern "C" {
48   	#endif
49   	
50   	/** creates the handler for indicator constraints and includes it in SCIP
51   	 *
52   	 * @ingroup ConshdlrIncludes
53   	 * */
54   	SCIP_EXPORT
55   	SCIP_RETCODE SCIPincludeConshdlrIndicator(
56   	   SCIP*                 scip                /**< SCIP data structure */
57   	   );
58   	
59   	/**@addtogroup CONSHDLRS
60   	 *
61   	 * @{
62   	 *
63   	 * @name Indicator Constraints
64   	 *
65   	 * @{
66   	 *
67   	 * An indicator constraint is given by a binary variable \f$z\f$ and an inequality \f$ax \leq
68   	 * b\f$. It states that if \f$z = 1\f$ then \f$ax \leq b\f$ holds.
69   	 *
70   	 * This constraint is handled by adding a slack variable \f$s:\; ax - s \leq b\f$ with \f$s \geq
71   	 * 0\f$. The constraint is enforced by fixing \f$s\f$ to 0 if \f$z = 1\f$.
72   	 *
73   	 * @note The constraint only implements an implication not an equivalence, i.e., it does not ensure
74   	 * that \f$z = 1\f$ if \f$ax \leq b\f$ or equivalently if \f$s = 0\f$ holds.
75   	 *
76   	 * This constraint is equivalent to a linear constraint \f$ax - s \leq b\f$ and an SOS1 constraint on
77   	 * \f$z\f$ and \f$s\f$ (at most one should be nonzero). In the indicator context we can, however,
78   	 * separate more inequalities.
79   	 */
80   	
81   	/** creates and captures an indicator constraint
82   	 *
83   	 *  @note @a binvar is checked to be binary only later. This enables a change of the type in
84   	 *  procedures reading an instance.
85   	 *
86   	 *  @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
87   	 */
88   	SCIP_EXPORT
89   	SCIP_RETCODE SCIPcreateConsIndicator(
90   	   SCIP*                 scip,               /**< SCIP data structure */
91   	   SCIP_CONS**           cons,               /**< pointer to hold the created constraint (indicator or quadratic) */
92   	   const char*           name,               /**< name of constraint */
93   	   SCIP_VAR*             binvar,             /**< binary indicator variable (or NULL) */
94   	   int                   nvars,              /**< number of variables in the inequality */
95   	   SCIP_VAR**            vars,               /**< array with variables of inequality (or NULL) */
96   	   SCIP_Real*            vals,               /**< values of variables in inequality (or NULL) */
97   	   SCIP_Real             rhs,                /**< rhs of the inequality */
98   	   SCIP_Bool             initial,            /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
99   	   SCIP_Bool             separate,           /**< should the constraint be separated during LP processing?
100  	                                              *   Usually set to TRUE. */
101  	   SCIP_Bool             enforce,            /**< should the constraint be enforced during node processing?
102  	                                              *   TRUE for model constraints, FALSE for additional, redundant constraints. */
103  	   SCIP_Bool             check,              /**< should the constraint be checked for feasibility?
104  	                                              *   TRUE for model constraints, FALSE for additional, redundant constraints. */
105  	   SCIP_Bool             propagate,          /**< should the constraint be propagated during node processing?
106  	                                              *   Usually set to TRUE. */
107  	   SCIP_Bool             local,              /**< is constraint only valid locally?
108  	                                              *   Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
109  	   SCIP_Bool             dynamic,            /**< is constraint subject to aging?
110  	                                              *   Usually set to FALSE. Set to TRUE for own cuts which
111  	                                              *   are separated as constraints. */
112  	   SCIP_Bool             removable,          /**< should the relaxation be removed from the LP due to aging or cleanup?
113  	                                              *   Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
114  	   SCIP_Bool             stickingatnode      /**< should the constraint always be kept at the node where it was added, even
115  	                                              *   if it may be moved to a more global node?
116  	                                              *   Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
117  	   );
118  	
119  	/** creates and captures an indicator constraint in its most basic version, i. e., all constraint flags are set to their
120  	 *  basic value as explained for the method SCIPcreateConsIndicator(); all flags can be set via
121  	 *  SCIPsetConsFLAGNAME-methods in scip.h
122  	 *
123  	 *  @see SCIPcreateConsIndicator() for information about the basic constraint flag configuration
124  	 *
125  	 *  @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
126  	 */
127  	SCIP_EXPORT
128  	SCIP_RETCODE SCIPcreateConsBasicIndicator(
129  	   SCIP*                 scip,               /**< SCIP data structure */
130  	   SCIP_CONS**           cons,               /**< pointer to hold the created constraint (indicator or quadratic) */
131  	   const char*           name,               /**< name of constraint */
132  	   SCIP_VAR*             binvar,             /**< binary indicator variable (or NULL) */
133  	   int                   nvars,              /**< number of variables in the inequality */
134  	   SCIP_VAR**            vars,               /**< array with variables of inequality (or NULL) */
135  	   SCIP_Real*            vals,               /**< values of variables in inequality (or NULL) */
136  	   SCIP_Real             rhs                 /**< rhs of the inequality */
137  	   );
138  	
139  	/** creates and captures a indicator constraint in a more generic version.
140  	 *
141  	 *  The key difference from SCIPcreateConsIndicator() is the activeone and lessthanineq Booleans.
142  	 *  If \f$z = o\f$, with \f$o\f$ the activeone flag, then:
143  	 *  if lessthanineq then \f$a^T x \leq b\f$ holds, else the passed vectors are assumed to be of the form \f$a^T x \geq b\f$.
144  	 *  The underlying linear constraint is always created as a less-than inequality.
145  	 */
146  	SCIP_EXPORT
147  	SCIP_RETCODE SCIPcreateConsIndicatorGeneric(
148  	   SCIP*                 scip,               /**< SCIP data structure */
149  	   SCIP_CONS**           cons,               /**< pointer to hold the created constraint (indicator or quadratic) */
150  	   const char*           name,               /**< name of constraint */
151  	   SCIP_VAR*             binvar,             /**< binary indicator variable (or NULL) */
152  	   int                   nvars,              /**< number of variables in the inequality */
153  	   SCIP_VAR**            vars,               /**< array with variables of inequality (or NULL) */
154  	   SCIP_Real*            vals,               /**< values of variables in inequality (or NULL) */
155  	   SCIP_Real             rhs,                /**< rhs of the inequality */
156  	   SCIP_Bool             activeone,          /**< is the constraint active when the binary is 1? */
157  	   SCIP_Bool             lessthanineq,       /**< is the linear constraint a less than RHS (TRUE) or greater than RHS (FALSE)? */
158  	   SCIP_Bool             initial,            /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
159  	   SCIP_Bool             separate,           /**< should the constraint be separated during LP processing?
160  	                                              *   Usually set to TRUE. */
161  	   SCIP_Bool             enforce,            /**< should the constraint be enforced during node processing?
162  	                                              *   TRUE for model constraints, FALSE for additional, redundant constraints. */
163  	   SCIP_Bool             check,              /**< should the constraint be checked for feasibility?
164  	                                              *   TRUE for model constraints, FALSE for additional, redundant constraints. */
165  	   SCIP_Bool             propagate,          /**< should the constraint be propagated during node processing?
166  	                                              *   Usually set to TRUE. */
167  	   SCIP_Bool             local,              /**< is constraint only valid locally?
168  	                                              *   Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
169  	   SCIP_Bool             dynamic,            /**< is constraint subject to aging?
170  	                                              *   Usually set to FALSE. Set to TRUE for own cuts which
171  	                                              *   are separated as constraints. */
172  	   SCIP_Bool             removable,          /**< should the relaxation be removed from the LP due to aging or cleanup?
173  	                                              *   Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
174  	   SCIP_Bool             stickingatnode      /**< should the constraint always be kept at the node where it was added, even
175  	                                              *   if it may be moved to a more global node?
176  	                                              *   Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
177  	   );
178  	
179  	/** creates and captures an indicator constraint with given linear constraint and slack variable
180  	 *
181  	 *  @note @a binvar is checked to be binary only later. This enables a change of the type in
182  	 *  procedures reading an instance.
183  	 *
184  	 *  @note we assume that @a slackvar actually appears in @a lincons and we also assume that it takes
185  	 *  the role of a slack variable!
186  	 *
187  	 *  @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
188  	 */
189  	SCIP_EXPORT
190  	SCIP_RETCODE SCIPcreateConsIndicatorLinCons(
191  	   SCIP*                 scip,               /**< SCIP data structure */
192  	   SCIP_CONS**           cons,               /**< pointer to hold the created constraint */
193  	   const char*           name,               /**< name of constraint */
194  	   SCIP_VAR*             binvar,             /**< binary indicator variable */
195  	   SCIP_CONS*            lincons,            /**< linear constraint */
196  	   SCIP_VAR*             slackvar,           /**< slack variable */
197  	   SCIP_Bool             initial,            /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
198  	   SCIP_Bool             separate,           /**< should the constraint be separated during LP processing?
199  	                                              *   Usually set to TRUE. */
200  	   SCIP_Bool             enforce,            /**< should the constraint be enforced during node processing?
201  	                                              *   TRUE for model constraints, FALSE for additional, redundant constraints. */
202  	   SCIP_Bool             check,              /**< should the constraint be checked for feasibility?
203  	                                              *   TRUE for model constraints, FALSE for additional, redundant constraints. */
204  	   SCIP_Bool             propagate,          /**< should the constraint be propagated during node processing?
205  	                                              *   Usually set to TRUE. */
206  	   SCIP_Bool             local,              /**< is constraint only valid locally?
207  	                                              *   Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
208  	   SCIP_Bool             dynamic,            /**< is constraint subject to aging?
209  	                                              *   Usually set to FALSE. Set to TRUE for own cuts which
210  	                                              *   are separated as constraints. */
211  	   SCIP_Bool             removable,          /**< should the relaxation be removed from the LP due to aging or cleanup?
212  	                                              *   Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
213  	   SCIP_Bool             stickingatnode      /**< should the constraint always be kept at the node where it was added, even
214  	                                              *   if it may be moved to a more global node?
215  	                                              *   Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
216  	   );
217  	
218  	/** creates and captures an indicator constraint with given linear constraint and slack variable
219  	 *  in a generic version, i. e., with a flag activeone indicating whether the constraint is active on
220  	 *  value 1 or 0 of the binary variable.
221  	
222  	 *  @note @a binvar is checked to be binary only later. This enables a change of the type in
223  	 *  procedures reading an instance.
224  	 *
225  	 *  @note we assume that @a slackvar actually appears in @a lincons and we also assume that it takes
226  	 *  the role of a slack variable!
227  	 *
228  	 *  @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
229  	 *
230  	 *  @see SCIPcreateConsIndicatorLinCons() for information about the basic constraint flag configuration
231  	 */
232  	SCIP_EXPORT
233  	SCIP_RETCODE SCIPcreateConsIndicatorGenericLinCons(
234  	   SCIP*                 scip,               /**< SCIP data structure */
235  	   SCIP_CONS**           cons,               /**< pointer to hold the created constraint */
236  	   const char*           name,               /**< name of constraint */
237  	   SCIP_VAR*             binvar,             /**< binary indicator variable */
238  	   SCIP_CONS*            lincons,            /**< linear constraint */
239  	   SCIP_VAR*             slackvar,           /**< slack variable */
240  	   SCIP_Bool             activeone,          /**< is the constraint active when the binary is 1? */
241  	   SCIP_Bool             initial,            /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
242  	   SCIP_Bool             separate,           /**< should the constraint be separated during LP processing?
243  	                                              *   Usually set to TRUE. */
244  	   SCIP_Bool             enforce,            /**< should the constraint be enforced during node processing?
245  	                                              *   TRUE for model constraints, FALSE for additional, redundant constraints. */
246  	   SCIP_Bool             check,              /**< should the constraint be checked for feasibility?
247  	                                              *   TRUE for model constraints, FALSE for additional, redundant constraints. */
248  	   SCIP_Bool             propagate,          /**< should the constraint be propagated during node processing?
249  	                                              *   Usually set to TRUE. */
250  	   SCIP_Bool             local,              /**< is constraint only valid locally?
251  	                                              *   Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
252  	   SCIP_Bool             dynamic,            /**< is constraint subject to aging?
253  	                                              *   Usually set to FALSE. Set to TRUE for own cuts which
254  	                                              *   are separated as constraints. */
255  	   SCIP_Bool             removable,          /**< should the relaxation be removed from the LP due to aging or cleanup?
256  	                                              *   Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
257  	   SCIP_Bool             stickingatnode      /**< should the constraint always be kept at the node where it was added, even
258  	                                              *   if it may be moved to a more global node?
259  	                                              *   Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
260  	   );
261  	
262  	/** creates and captures an indicator constraint with given linear constraint and slack variable
263  	 *  in its most basic version, i. e., all constraint flags are set to their basic value as explained for the
264  	 *  method SCIPcreateConsIndicator(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
265  	
266  	 *  @note @a binvar is checked to be binary only later. This enables a change of the type in
267  	 *  procedures reading an instance.
268  	 *
269  	 *  @note we assume that @a slackvar actually appears in @a lincons and we also assume that it takes
270  	 *  the role of a slack variable!
271  	 *
272  	 *  @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
273  	 *
274  	 *  @see SCIPcreateConsIndicatorLinCons() for information about the basic constraint flag configuration
275  	 *
276  	 *  @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
277  	 */
278  	SCIP_EXPORT
279  	SCIP_RETCODE SCIPcreateConsBasicIndicatorLinCons(
280  	   SCIP*                 scip,               /**< SCIP data structure */
281  	   SCIP_CONS**           cons,               /**< pointer to hold the created constraint */
282  	   const char*           name,               /**< name of constraint */
283  	   SCIP_VAR*             binvar,             /**< binary indicator variable */
284  	   SCIP_CONS*            lincons,            /**< linear constraint */
285  	   SCIP_VAR*             slackvar            /**< slack variable */
286  	   );
287  	
288  	/** creates and captures an indicator constraint with given linear constraint in a generic version, i. e., with a flag
289  	 *  activeone indicating whether the constraint is active on value 1 or 0 of the binary variable; no slack variable is
290  	 *  specified
291  	
292  	 *  @note @a binvar is checked to be binary only later. This enables a change of the type in
293  	 *  procedures reading an instance.
294  	 *
295  	 *  @note The linear constraint has to be single sided only, i.e., either rhs or lhs have to be infinite.
296  	 *
297  	 *  @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
298  	 *
299  	 *  @see SCIPcreateConsIndicatorLinCons() for information about the basic constraint flag configuration
300  	 */
301  	SCIP_EXPORT
302  	SCIP_RETCODE SCIPcreateConsIndicatorGenericLinConsPure(
303  	   SCIP*                 scip,               /**< SCIP data structure */
304  	   SCIP_CONS**           cons,               /**< pointer to hold the created constraint */
305  	   const char*           name,               /**< name of constraint */
306  	   SCIP_VAR*             binvar,             /**< binary indicator variable */
307  	   SCIP_CONS*            lincons,            /**< linear constraint */
308  	   SCIP_Bool             activeone,          /**< is the constraint active when the binary is 1? */
309  	   SCIP_Bool             initial,            /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
310  	   SCIP_Bool             separate,           /**< should the constraint be separated during LP processing?
311  	                                              *   Usually set to TRUE. */
312  	   SCIP_Bool             enforce,            /**< should the constraint be enforced during node processing?
313  	                                              *   TRUE for model constraints, FALSE for additional, redundant constraints. */
314  	   SCIP_Bool             check,              /**< should the constraint be checked for feasibility?
315  	                                              *   TRUE for model constraints, FALSE for additional, redundant constraints. */
316  	   SCIP_Bool             propagate,          /**< should the constraint be propagated during node processing?
317  	                                              *   Usually set to TRUE. */
318  	   SCIP_Bool             local,              /**< is constraint only valid locally?
319  	                                              *   Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
320  	   SCIP_Bool             dynamic,            /**< is constraint subject to aging?
321  	                                              *   Usually set to FALSE. Set to TRUE for own cuts which
322  	                                              *   are separated as constraints. */
323  	   SCIP_Bool             removable,          /**< should the relaxation be removed from the LP due to aging or cleanup?
324  	                                              *   Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
325  	   SCIP_Bool             stickingatnode      /**< should the constraint always be kept at the node where it was added, even
326  	                                              *   if it may be moved to a more global node?
327  	                                              *   Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
328  	   );
329  	
330  	/** creates and captures an indicator constraint with given linear constraint; no slack variable is specified
331  	 *
332  	 *  @note @a binvar is checked to be binary only later. This enables a change of the type in
333  	 *  procedures reading an instance.
334  	 *
335  	 *  @note The linear constraint has to be single sided only, i.e., either rhs or lhs have to be infinite.
336  	 *
337  	 *  @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
338  	 */
339  	SCIP_EXPORT
340  	SCIP_RETCODE SCIPcreateConsIndicatorLinConsPure(
341  	   SCIP*                 scip,               /**< SCIP data structure */
342  	   SCIP_CONS**           cons,               /**< pointer to hold the created constraint */
343  	   const char*           name,               /**< name of constraint */
344  	   SCIP_VAR*             binvar,             /**< binary indicator variable */
345  	   SCIP_CONS*            lincons,            /**< linear constraint */
346  	   SCIP_Bool             initial,            /**< should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. */
347  	   SCIP_Bool             separate,           /**< should the constraint be separated during LP processing?
348  	                                              *   Usually set to TRUE. */
349  	   SCIP_Bool             enforce,            /**< should the constraint be enforced during node processing?
350  	                                              *   TRUE for model constraints, FALSE for additional, redundant constraints. */
351  	   SCIP_Bool             check,              /**< should the constraint be checked for feasibility?
352  	                                              *   TRUE for model constraints, FALSE for additional, redundant constraints. */
353  	   SCIP_Bool             propagate,          /**< should the constraint be propagated during node processing?
354  	                                              *   Usually set to TRUE. */
355  	   SCIP_Bool             local,              /**< is constraint only valid locally?
356  	                                              *   Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
357  	   SCIP_Bool             dynamic,            /**< is constraint subject to aging?
358  	                                              *   Usually set to FALSE. Set to TRUE for own cuts which
359  	                                              *   are separated as constraints. */
360  	   SCIP_Bool             removable,          /**< should the relaxation be removed from the LP due to aging or cleanup?
361  	                                              *   Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
362  	   SCIP_Bool             stickingatnode      /**< should the constraint always be kept at the node where it was added, even
363  	                                              *   if it may be moved to a more global node?
364  	                                              *   Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
365  	   );
366  	
367  	/** adds variable to the inequality of the indicator constraint */
368  	SCIP_EXPORT
369  	SCIP_RETCODE SCIPaddVarIndicator(
370  	   SCIP*                 scip,               /**< SCIP data structure */
371  	   SCIP_CONS*            cons,               /**< indicator constraint */
372  	   SCIP_VAR*             var,                /**< variable to add to the inequality */
373  	   SCIP_Real             val                 /**< value of variable */
374  	   );
375  	
376  	/** gets the linear constraint corresponding to the indicator constraint (may be NULL) */
377  	SCIP_EXPORT
378  	SCIP_CONS* SCIPgetLinearConsIndicator(
379  	   SCIP_CONS*            cons                /**< indicator constraint */
380  	   );
381  	
382  	/** sets the linear constraint corresponding to the indicator constraint (may be NULL) */
383  	SCIP_EXPORT
384  	SCIP_RETCODE SCIPsetLinearConsIndicator(
385  	   SCIP*                 scip,               /**< SCIP data structure */
386  	   SCIP_CONS*            cons,               /**< indicator constraint */
387  	   SCIP_CONS*            lincons             /**< linear constraint */
388  	   );
389  	
390  	/** sets binary indicator variable for indicator constraint */
391  	SCIP_EXPORT
392  	SCIP_RETCODE SCIPsetBinaryVarIndicator(
393  	   SCIP*                 scip,               /**< SCIP data structure */
394  	   SCIP_CONS*            cons,               /**< indicator constraint */
395  	   SCIP_VAR*             binvar              /**< binary variable to add to the inequality */
396  	   );
397  	
398  	/** gets activation value of an indicator constraint, TRUE for active on 1, FALSE for active on 0 */
399  	SCIP_EXPORT
400  	SCIP_Bool SCIPgetActiveOnIndicator(
401  	   SCIP_CONS*            cons                /**< indicator constraint */
402  	   );
403  	
404  	/** gets binary variable corresponding to indicator constraint. Returns the negative of the original binary variable if activeone was set to false */
405  	SCIP_EXPORT
406  	SCIP_VAR* SCIPgetBinaryVarIndicator(
407  	   SCIP_CONS*            cons                /**< indicator constraint */
408  	   );
409  	
410  	/** similar to SCIPgetBinaryVarIndicator but returns the original binary variable passed by the user. */
411  	SCIP_EXPORT
412  	SCIP_VAR* SCIPgetBinaryVarIndicatorGeneric(
413  	   SCIP_CONS*            cons                /**< indicator constraint */
414  	   );
415  	
416  	/** gets slack variable corresponding to indicator constraint */
417  	SCIP_EXPORT
418  	SCIP_VAR* SCIPgetSlackVarIndicator(
419  	   SCIP_CONS*            cons                /**< indicator constraint */
420  	   );
421  	
422  	/** sets upper bound for slack variable corresponding to indicator constraint
423  	 *
424  	 *  Use with care if you know that the maximal violation of the corresponding constraint is at most @p ub. This bound
425  	 *  might be improved automatically during the solution process.
426  	 *
427  	 *  @pre This method should only be called if SCIP is in one of the following stages:
428  	 *       - \ref SCIP_STAGE_INIT
429  	 *       - \ref SCIP_STAGE_PROBLEM
430  	 */
431  	SCIP_EXPORT
432  	SCIP_RETCODE SCIPsetSlackVarUb(
433  	   SCIP*                 scip,               /**< SCIP data structure */
434  	   SCIP_CONS*            cons,               /**< indicator constraint */
435  	   SCIP_Real             ub                  /**< upper bound for slack variable */
436  	   );
437  	
438  	/** checks whether indicator constraint is violated w.r.t. sol */
439  	SCIP_EXPORT
440  	SCIP_Bool SCIPisViolatedIndicator(
441  	   SCIP*                 scip,               /**< SCIP data structure */
442  	   SCIP_CONS*            cons,               /**< indicator constraint */
443  	   SCIP_SOL*             sol                 /**< solution, or NULL to use current node's solution */
444  	   );
445  	
446  	/** based on values of other variables, computes slack and binary variable to turn constraint feasible */
447  	SCIP_EXPORT
448  	SCIP_RETCODE SCIPmakeIndicatorFeasible(
449  	   SCIP*                 scip,               /**< SCIP data structure */
450  	   SCIP_CONS*            cons,               /**< indicator constraint */
451  	   SCIP_SOL*             sol,                /**< solution */
452  	   SCIP_Bool*            changed             /**< pointer to store whether the solution has been changed */
453  	   );
454  	
455  	/** based on values of other variables, computes slack and binary variable to turn all constraints feasible */
456  	SCIP_EXPORT
457  	SCIP_RETCODE SCIPmakeIndicatorsFeasible(
458  	   SCIP*                 scip,               /**< SCIP data structure */
459  	   SCIP_CONSHDLR*        conshdlr,           /**< indicator constraint handler */
460  	   SCIP_SOL*             sol,                /**< solution */
461  	   SCIP_Bool*            changed             /**< pointer to store whether the solution has been changed */
462  	   );
463  	
464  	/** adds additional linear constraint that is not connected with an indicator constraint, but can be used for separation */
465  	SCIP_EXPORT
466  	SCIP_RETCODE SCIPaddLinearConsIndicator(
467  	   SCIP*                 scip,               /**< SCIP data structure */
468  	   SCIP_CONSHDLR*        conshdlr,           /**< indicator constraint handler */
469  	   SCIP_CONS*            lincons             /**< linear constraint */
470  	   );
471  	
472  	/** adds additional globally valid row that is not connected with an indicator constraint, but can be used for separation */
473  	SCIP_EXPORT
474  	SCIP_RETCODE SCIPaddRowIndicator(
475  	   SCIP*                 scip,               /**< SCIP data structure */
476  	   SCIP_CONSHDLR*        conshdlr,           /**< indicator constraint handler */
477  	   SCIP_ROW*             row                 /**< row to add */
478  	   );
479  	
480  	/** @} */
481  	
482  	/** @} */
483  	
484  	#ifdef __cplusplus
485  	}
486  	#endif
487  	
488  	#endif
489