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   cuts.h
26   	 * @ingroup PUBLICCOREAPI
27   	 * @brief  methods for the aggregation rows
28   	 * @author Jakob Witzig
29   	 * @author Leona Gottwald
30   	 *
31   	 */
32   	
33   	/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34   	
35   	#ifndef __SCIP_CUTS_H__
36   	#define __SCIP_CUTS_H__
37   	
38   	#include "scip/def.h"
39   	#include "scip/struct_cuts.h"
40   	#include "scip/type_cuts.h"
41   	#include "scip/type_lp.h"
42   	#include "scip/type_misc.h"
43   	#include "scip/type_retcode.h"
44   	#include "scip/type_scip.h"
45   	#include "scip/type_sol.h"
46   	#include "scip/type_var.h"
47   	
48   	#ifdef __cplusplus
49   	extern "C" {
50   	#endif
51   	
52   	/**@addtogroup PublicCutMethods
53   	 *
54   	 * @{
55   	 */
56   	
57   	/** perform activity based coefficient tigthening on the given cut; returns TRUE if the cut was detected
58   	 *  to be redundant due to acitivity bounds
59   	 *
60   	 *  See also cons_linear.c:consdataTightenCoefs().
61   	 */
62   	SCIP_EXPORT
63   	SCIP_Bool SCIPcutsTightenCoefficients(
64   	   SCIP*                 scip,               /**< SCIP data structure */
65   	   SCIP_Bool             cutislocal,         /**< is the cut local? */
66   	   SCIP_Real*            cutcoefs,           /**< array of the non-zero coefficients in the cut */
67   	   SCIP_Real*            cutrhs,             /**< the right hand side of the cut */
68   	   int*                  cutinds,            /**< array of the problem indices of variables with a non-zero coefficient in the cut */
69   	   int*                  cutnnz,             /**< the number of non-zeros in the cut */
70   	   int*                  nchgcoefs           /**< number of changed coefficients */
71   	   );
72   	
73   	/** create an empty the aggregation row */
74   	SCIP_EXPORT
75   	SCIP_RETCODE SCIPaggrRowCreate(
76   	   SCIP*                 scip,               /**< SCIP data structure */
77   	   SCIP_AGGRROW**        aggrrow             /**< pointer to return the aggregation row */
78   	   );
79   	
80   	/** free a the aggregation row */
81   	SCIP_EXPORT
82   	void SCIPaggrRowFree(
83   	   SCIP*                 scip,               /**< SCIP data structure */
84   	   SCIP_AGGRROW**        aggrrow             /**< pointer to the aggregation row that should be freed */
85   	   );
86   	
87   	/** output aggregation row to file stream */
88   	SCIP_EXPORT
89   	void SCIPaggrRowPrint(
90   	   SCIP*                 scip,               /**< SCIP data structure */
91   	   SCIP_AGGRROW*         aggrrow,            /**< pointer to return aggregation row */
92   	   FILE*                 file                /**< output file (or NULL for standard output) */
93   	   );
94   	
95   	/** copy the aggregation row */
96   	SCIP_EXPORT
97   	SCIP_RETCODE SCIPaggrRowCopy(
98   	   SCIP*                 scip,               /**< SCIP data structure */
99   	   SCIP_AGGRROW**        aggrrow,            /**< pointer to return the aggregation row */
100  	   SCIP_AGGRROW*         source              /**< source the aggregation row */
101  	   );
102  	
103  	/** add weighted row to the aggregation row */
104  	SCIP_EXPORT
105  	SCIP_RETCODE SCIPaggrRowAddRow(
106  	   SCIP*                 scip,               /**< SCIP data structure */
107  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row */
108  	   SCIP_ROW*             row,                /**< row to add to the aggregation row */
109  	   SCIP_Real             weight,             /**< scale for adding given row to the aggregation row */
110  	   int                   sidetype            /**< specify row side type (-1 = lhs, 0 = automatic, 1 = rhs) */
111  	   );
112  	
113  	/** Removes a given variable @p var from position @p pos the aggregation row and updates the right-hand side according
114  	 *  to sign of the coefficient, i.e., rhs -= coef * bound, where bound = lb if coef >= 0 and bound = ub, otherwise.
115  	 *
116  	 *  @note: The choice of global or local bounds depend on the validity (global or local) of the aggregation row.
117  	 *
118  	 *  @note: The list of non-zero indices will be updated by swapping the last non-zero index to @p pos.
119  	 */
120  	SCIP_EXPORT
121  	void SCIPaggrRowCancelVarWithBound(
122  	   SCIP*                 scip,               /**< SCIP data structure */
123  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row */
124  	   SCIP_VAR*             var,                /**< variable that should be removed */
125  	   int                   pos,                /**< position of the variable in the aggregation row */
126  	   SCIP_Bool*            valid               /**< pointer to return whether the aggregation row is still valid */
127  	   );
128  	
129  	/** add the objective function with right-hand side @p rhs and scaled by @p scale to the aggregation row */
130  	SCIP_EXPORT
131  	SCIP_RETCODE SCIPaggrRowAddObjectiveFunction(
132  	   SCIP*                 scip,               /**< SCIP data structure */
133  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row */
134  	   SCIP_Real             rhs,                /**< right-hand side of the artificial row */
135  	   SCIP_Real             scale               /**< scalar */
136  	   );
137  	
138  	/** add weighted constraint to the aggregation row */
139  	SCIP_EXPORT
140  	SCIP_RETCODE SCIPaggrRowAddCustomCons(
141  	   SCIP*                 scip,               /**< SCIP data structure */
142  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row */
143  	   int*                  inds,               /**< variable problem indices in constraint to add to the aggregation row */
144  	   SCIP_Real*            vals,               /**< values of constraint to add to the aggregation row */
145  	   int                   len,                /**< length of constraint to add to the aggregation row */
146  	   SCIP_Real             rhs,                /**< right hand side of constraint to add to the aggregation row */
147  	   SCIP_Real             weight,             /**< (positive) scale for adding given constraint to the aggregation row */
148  	   int                   rank,               /**< rank to use for given constraint */
149  	   SCIP_Bool             local               /**< is constraint only valid locally */
150  	   );
151  	
152  	/** calculates the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
153  	 *
154  	 *  @return the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
155  	 */
156  	SCIP_EXPORT
157  	SCIP_Real SCIPaggrRowCalcEfficacyNorm(
158  	   SCIP*                 scip,               /**< SCIP data structure */
159  	   SCIP_AGGRROW*         aggrrow             /**< the aggregation row */
160  	   );
161  	
162  	/** clear all entries in the aggregation row but do not free the internal memory */
163  	SCIP_EXPORT
164  	void SCIPaggrRowClear(
165  	   SCIP_AGGRROW*         aggrrow             /**< the aggregation row */
166  	   );
167  	
168  	/** aggregate rows using the given weights; the current content of the aggregation
169  	 *  row, \p aggrrow, gets overwritten
170  	 */
171  	SCIP_EXPORT
172  	SCIP_RETCODE SCIPaggrRowSumRows(
173  	   SCIP*                 scip,               /**< SCIP data structure */
174  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row */
175  	   SCIP_Real*            weights,            /**< row weights in row summation */
176  	   int*                  rowinds,            /**< array to store indices of non-zero entries of the weights array, or NULL */
177  	   int                   nrowinds,           /**< number of non-zero entries in weights array, -1 if rowinds is NULL */
178  	   SCIP_Bool             sidetypebasis,      /**< choose sidetypes of row (lhs/rhs) based on basis information? */
179  	   SCIP_Bool             allowlocal,         /**< should local rows be used? */
180  	   int                   negslack,           /**< should negative slack variables be used? (0: no, 1: only for integral rows, 2: yes) */
181  	   int                   maxaggrlen,         /**< maximal number of non-zeros in the aggregation row */
182  	   SCIP_Bool*            valid               /**< is the aggregation valid */
183  	   );
184  	
185  	/** removes all (close enough to) zero entries in the aggregation row */
186  	SCIP_EXPORT
187  	void SCIPaggrRowRemoveZeros(
188  	   SCIP*                 scip,               /**< SCIP datastructure */
189  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row */
190  	   SCIP_Bool             useglbbounds,       /**< consider global bound although the cut is local? */
191  	   SCIP_Bool*            valid               /**< pointer to return whether the aggregation row is still valid */
192  	   );
193  	
194  	/** get array with lp positions of aggregated rows */
195  	SCIP_EXPORT
196  	int* SCIPaggrRowGetRowInds(
197  	   SCIP_AGGRROW*         aggrrow             /**< the aggregation row */
198  	   );
199  	
200  	/** get array with weights of aggregated rows */
201  	SCIP_EXPORT
202  	SCIP_Real* SCIPaggrRowGetRowWeights(
203  	   SCIP_AGGRROW*         aggrrow             /**< the aggregation row */
204  	   );
205  	
206  	/** checks whether a given row has been added to the aggregation row */
207  	SCIP_EXPORT
208  	SCIP_Bool SCIPaggrRowHasRowBeenAdded(
209  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row */
210  	   SCIP_ROW*             row                 /**< row for which it is checked whether it has been added to the aggregation */
211  	   );
212  	
213  	/** gets the min and max absolute value of the weights used to aggregate the rows;
214  	 *  must not be called for empty aggregation rows
215  	 */
216  	SCIP_EXPORT
217  	void SCIPaggrRowGetAbsWeightRange(
218  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row */
219  	   SCIP_Real*            minabsrowweight,    /**< pointer to store smallest absolute value of weights used for aggregating rows */
220  	   SCIP_Real*            maxabsrowweight     /**< pointer to store largest absolute value of weights used for aggregating rows */
221  	   );
222  	
223  	/** gets the array of corresponding variable problem indices for each non-zero in the aggregation row */
224  	SCIP_EXPORT
225  	int* SCIPaggrRowGetInds(
226  	    SCIP_AGGRROW*        aggrrow
227  	   );
228  	
229  	/** gets the number of non-zeros in the aggregation row */
230  	SCIP_EXPORT
231  	int SCIPaggrRowGetNNz(
232  	   SCIP_AGGRROW*         aggrrow             /**< the aggregation row */
233  	   );
234  	
235  	/** gets the non-zero value for the given non-zero index */
236  	static INLINE
237  	SCIP_Real SCIPaggrRowGetValue(
238  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row */
239  	   int                   i                   /**< non-zero index; must be between 0 and SCIPaggrRowGetNNz(aggrrow) - 1 */
240  	   )
241  	{
242  	   SCIP_Real QUAD(val);
243  	
244  	   QUAD_ARRAY_LOAD(val, aggrrow->vals, aggrrow->inds[i]);
245  	
246  	   return QUAD_TO_DBL(val);
247  	}
248  	
249  	/** gets the non-zero value for the given problem index of a variable */
250  	static INLINE
251  	SCIP_Real SCIPaggrRowGetProbvarValue(
252  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row */
253  	   int                   probindex           /**< problem index of variable; must be between 0 and SCIPgetNVars(scip) - 1 */
254  	   )
255  	{
256  	   SCIP_Real QUAD(val);
257  	
258  	   QUAD_ARRAY_LOAD(val, aggrrow->vals, probindex);
259  	
260  	   return QUAD_TO_DBL(val);
261  	}
262  	
263  	/** gets the rank of the aggregation row */
264  	SCIP_EXPORT
265  	int SCIPaggrRowGetRank(
266  	   SCIP_AGGRROW*         aggrrow             /**< the aggregation row */
267  	   );
268  	
269  	/** checks if the aggregation row is only valid locally */
270  	SCIP_EXPORT
271  	SCIP_Bool SCIPaggrRowIsLocal(
272  	   SCIP_AGGRROW*         aggrrow             /**< the aggregation row */
273  	   );
274  	
275  	/** gets the right hand side of the aggregation row */
276  	SCIP_EXPORT
277  	SCIP_Real SCIPaggrRowGetRhs(
278  	   SCIP_AGGRROW*         aggrrow             /**< the aggregation row */
279  	   );
280  	
281  	/** gets the number of row aggregations */
282  	SCIP_EXPORT
283  	int SCIPaggrRowGetNRows(
284  	   SCIP_AGGRROW*         aggrrow             /**< aggregation row */
285  	   );
286  	
287  	/** calculates an MIR cut out of the weighted sum of LP rows given by an aggregation row; the
288  	 *  aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
289  	 *  participate in an MIR cut.
290  	 *
291  	 *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
292  	 *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
293  	 *
294  	 *  @pre This method can be called if @p scip is in one of the following stages:
295  	 *       - \ref SCIP_STAGE_SOLVING
296  	 *
297  	 *  See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
298  	 */
299  	SCIP_EXPORT
300  	SCIP_RETCODE SCIPcalcMIR(
301  	   SCIP*                 scip,               /**< SCIP data structure */
302  	   SCIP_SOL*             sol,                /**< the solution that should be separated, or NULL for LP solution */
303  	   SCIP_Bool             postprocess,        /**< apply a post-processing step to the resulting cut? */
304  	   SCIP_Real             boundswitch,        /**< fraction of domain up to which lower bound is used in transformation */
305  	   SCIP_Bool             usevbds,            /**< should variable bounds be used in bound transformation? */
306  	   SCIP_Bool             allowlocal,         /**< should local information allowed to be used, resulting in a local cut? */
307  	   SCIP_Bool             fixintegralrhs,     /**< should complementation tried to be adjusted such that rhs gets fractional? */
308  	   int*                  boundsfortrans,     /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
309  	                                              *   -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound;
310  	                                              *   NULL for using closest bound for all variables */
311  	   SCIP_BOUNDTYPE*       boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
312  	                                              *   NULL for using closest bound for all variables */
313  	   SCIP_Real             minfrac,            /**< minimal fractionality of rhs to produce MIR cut for */
314  	   SCIP_Real             maxfrac,            /**< maximal fractionality of rhs to produce MIR cut for */
315  	   SCIP_Real             scale,              /**< additional scaling factor multiplied to the aggrrow; must be positive */
316  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row to compute an MIR cut for */
317  	   SCIP_Real*            cutcoefs,           /**< array to store the non-zero coefficients in the cut */
318  	   SCIP_Real*            cutrhs,             /**< pointer to store the right hand side of the cut */
319  	   int*                  cutinds,            /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
320  	   int*                  cutnnz,             /**< pointer to store the number of non-zeros in the cut */
321  	   SCIP_Real*            cutefficacy,        /**< pointer to store the efficacy of the cut, or NULL */
322  	   int*                  cutrank,            /**< pointer to return rank of generated cut */
323  	   SCIP_Bool*            cutislocal,         /**< pointer to store whether the generated cut is only valid locally */
324  	   SCIP_Bool*            success             /**< pointer to store whether the returned coefficients are a valid MIR cut */
325  	   );
326  	
327  	/** calculates an MIR cut out of the weighted sum of LP rows given by an aggregation row; the
328  	 *  aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
329  	 *  participate in an MIR cut. The function uses a cut generation heuristic which tries different scaling
330  	 *  factors and complementations of the variables to improve the cut's efficacy.
331  	 *  For further details we refer to:
332  	 *
333  	 *  Marchand, H., & Wolsey, L. A. (2001). Aggregation and mixed integer rounding to solve MIPs.
334  	 *  Operations research, 49(3), 363-371.
335  	 *
336  	 *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
337  	 *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
338  	 *
339  	 *  @pre This method can be called if @p scip is in one of the following stages:
340  	 *       - \ref SCIP_STAGE_SOLVING
341  	 *
342  	 *  See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
343  	 */
344  	SCIP_EXPORT
345  	SCIP_RETCODE SCIPcutGenerationHeuristicCMIR(
346  	   SCIP*                 scip,               /**< SCIP data structure */
347  	   SCIP_SOL*             sol,                /**< the solution that should be separated, or NULL for LP solution */
348  	   SCIP_Bool             postprocess,        /**< apply a post-processing step to the resulting cut? */
349  	   SCIP_Real             boundswitch,        /**< fraction of domain up to which lower bound is used in transformation */
350  	   SCIP_Bool             usevbds,            /**< should variable bounds be used in bound transformation? */
351  	   SCIP_Bool             allowlocal,         /**< should local information allowed to be used, resulting in a local cut? */
352  	   int                   maxtestdelta,       /**< maximum number of deltas to test */
353  	   int*                  boundsfortrans,     /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
354  	                                              *   -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound;
355  	                                              *   NULL for using closest bound for all variables */
356  	   SCIP_BOUNDTYPE*       boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
357  	                                              *   NULL for using closest bound for all variables */
358  	   SCIP_Real             minfrac,            /**< minimal fractionality of rhs to produce MIR cut for */
359  	   SCIP_Real             maxfrac,            /**< maximal fractionality of rhs to produce MIR cut for */
360  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row to compute MIR cut for */
361  	   SCIP_Real*            cutcoefs,           /**< array to store the non-zero coefficients in the cut */
362  	   SCIP_Real*            cutrhs,             /**< pointer to store the right hand side of the cut */
363  	   int*                  cutinds,            /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
364  	   int*                  cutnnz,             /**< pointer to store the number of non-zeros in the cut */
365  	   SCIP_Real*            cutefficacy,        /**< pointer to store efficacy of best cut; only cuts that are strictly better than the value of
366  	                                              *   this efficacy on input to this function are returned */
367  	   int*                  cutrank,            /**< pointer to return rank of generated cut */
368  	   SCIP_Bool*            cutislocal,         /**< pointer to store whether the generated cut is only valid locally */
369  	   SCIP_Bool*            success             /**< pointer to store whether a valid and efficacious cut was returned */
370  	   );
371  	
372  	/** calculates a lifted simple generalized flow cover cut out of the weighted sum of LP rows given by an aggregation row; the
373  	 *  aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
374  	 *  participate in the cut.
375  	 *  For further details we refer to:
376  	 *
377  	 *  Gu, Z., Nemhauser, G. L., & Savelsbergh, M. W. (1999). Lifted flow cover inequalities for mixed 0-1 integer programs.
378  	 *  Mathematical Programming, 85(3), 439-467.
379  	 *
380  	 *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
381  	 *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
382  	 *
383  	 *  @pre This method can be called if @p scip is in one of the following stages:
384  	 *       - \ref SCIP_STAGE_SOLVING
385  	 *
386  	 *  See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
387  	 */
388  	SCIP_EXPORT
389  	SCIP_RETCODE SCIPcalcFlowCover(
390  	   SCIP*                 scip,               /**< SCIP data structure */
391  	   SCIP_SOL*             sol,                /**< the solution that should be separated, or NULL for LP solution */
392  	   SCIP_Bool             postprocess,        /**< apply a post-processing step to the resulting cut? */
393  	   SCIP_Real             boundswitch,        /**< fraction of domain up to which lower bound is used in transformation */
394  	   SCIP_Bool             allowlocal,         /**< should local information allowed to be used, resulting in a local cut? */
395  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row to compute flow cover cut for */
396  	   SCIP_Real*            cutcoefs,           /**< array to store the non-zero coefficients in the cut */
397  	   SCIP_Real*            cutrhs,             /**< pointer to store the right hand side of the cut */
398  	   int*                  cutinds,            /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
399  	   int*                  cutnnz,             /**< pointer to store the number of non-zeros in the cut */
400  	   SCIP_Real*            cutefficacy,        /**< pointer to store the efficacy of the cut, or NULL */
401  	   int*                  cutrank,            /**< pointer to return rank of generated cut */
402  	   SCIP_Bool*            cutislocal,         /**< pointer to store whether the generated cut is only valid locally */
403  	   SCIP_Bool*            success             /**< pointer to store whether a valid cut was returned */
404  	   );
405  	
406  	/** calculates a lifted knapsack cover cut out of the weighted sum of LP rows given by an aggregation row; the
407  	 *  aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
408  	 *  participate in the cut.
409  	 *  For further details we refer to:
410  	 *
411  	 *  Letchford, A. N., & Souli, G. (2019). On lifted cover inequalities: A new lifting procedure with unusual properties.
412  	 *  Operations Research Letters, 47(2), 83-87.
413  	 *
414  	 *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
415  	 *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
416  	 *
417  	 *  @pre This method can be called if @p scip is in one of the following stages:
418  	 *       - \ref SCIP_STAGE_SOLVING
419  	 *
420  	 *  See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
421  	 */
422  	SCIP_EXPORT
423  	SCIP_RETCODE SCIPcalcKnapsackCover(
424  	   SCIP*                 scip,               /**< SCIP data structure */
425  	   SCIP_SOL*             sol,                /**< the solution that should be separated, or NULL for LP solution */
426  	   SCIP_Bool             allowlocal,         /**< should local information allowed to be used, resulting in a local cut? */
427  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row to compute flow cover cut for */
428  	   SCIP_Real*            cutcoefs,           /**< array to store the non-zero coefficients in the cut */
429  	   SCIP_Real*            cutrhs,             /**< pointer to store the right hand side of the cut */
430  	   int*                  cutinds,            /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
431  	   int*                  cutnnz,             /**< pointer to store the number of non-zeros in the cut */
432  	   SCIP_Real*            cutefficacy,        /**< pointer to store the efficacy of the cut, or NULL */
433  	   int*                  cutrank,            /**< pointer to return rank of generated cut */
434  	   SCIP_Bool*            cutislocal,         /**< pointer to store whether the generated cut is only valid locally */
435  	   SCIP_Bool*            success             /**< pointer to store whether a valid cut was returned */
436  	   );
437  	
438  	/** calculates a strong CG cut out of the weighted sum of LP rows given by an aggregation row; the
439  	 *  aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
440  	 *  participate in a strongcg cut
441  	 *
442  	 *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
443  	 *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
444  	 *
445  	 *  @pre This method can be called if @p scip is in one of the following stages:
446  	 *       - \ref SCIP_STAGE_SOLVING
447  	 *
448  	 *  See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
449  	 */
450  	SCIP_EXPORT
451  	SCIP_RETCODE SCIPcalcStrongCG(
452  	   SCIP*                 scip,               /**< SCIP data structure */
453  	   SCIP_SOL*             sol,                /**< the solution that should be separated, or NULL for LP solution */
454  	   SCIP_Bool             postprocess,        /**< apply a post-processing step to the resulting cut? */
455  	   SCIP_Real             boundswitch,        /**< fraction of domain up to which lower bound is used in transformation */
456  	   SCIP_Bool             usevbds,            /**< should variable bounds be used in bound transformation? */
457  	   SCIP_Bool             allowlocal,         /**< should local information allowed to be used, resulting in a local cut? */
458  	   SCIP_Real             minfrac,            /**< minimal fractionality of rhs to produce strong CG cut for */
459  	   SCIP_Real             maxfrac,            /**< maximal fractionality of rhs to produce strong CG cut for */
460  	   SCIP_Real             scale,              /**< additional scaling factor multiplied to all rows */
461  	   SCIP_AGGRROW*         aggrrow,            /**< the aggregation row to compute a strong CG cut for */
462  	   SCIP_Real*            cutcoefs,           /**< array to store the non-zero coefficients in the cut */
463  	   SCIP_Real*            cutrhs,             /**< pointer to store the right hand side of the cut */
464  	   int*                  cutinds,            /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
465  	   int*                  cutnnz,             /**< pointer to store the number of non-zeros in the cut */
466  	   SCIP_Real*            cutefficacy,        /**< pointer to store the efficacy of the cut, or NULL */
467  	   int*                  cutrank,            /**< pointer to return rank of generated cut */
468  	   SCIP_Bool*            cutislocal,         /**< pointer to store whether the generated cut is only valid locally */
469  	   SCIP_Bool*            success             /**< pointer to store whether a valid cut was returned */
470  	   );
471  	
472  	/** @} */
473  	
474  	#ifdef __cplusplus
475  	}
476  	#endif
477  	
478  	#endif
479