Scippy

SCIP

Solving Constraint Integer Programs

scip_lp.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 scip_lp.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for the LP relaxation, rows and columns
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Thorsten Koch
22  * @author Alexander Martin
23  * @author Marc Pfetsch
24  * @author Kati Wolter
25  * @author Gregor Hendel
26  * @author Leona Gottwald
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_SCIP_LP_H__
32 #define __SCIP_SCIP_LP_H__
33 
34 
35 #include "lpi/type_lpi.h"
36 #include "scip/def.h"
37 #include "scip/type_cons.h"
38 #include "scip/type_lp.h"
39 #include "scip/type_misc.h"
40 #include "scip/type_retcode.h"
41 #include "scip/type_scip.h"
42 #include "scip/type_sepa.h"
43 #include "scip/type_sol.h"
44 #include "scip/type_var.h"
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 /**@addtogroup PublicLPMethods
51  *
52  * @{
53  */
54 
55 /** returns, whether the LP was or is to be solved in the current node
56  *
57  * @return whether the LP was or is to be solved in the current node.
58  *
59  * @pre This method can be called if @p scip is in one of the following stages:
60  * - \ref SCIP_STAGE_SOLVING
61  *
62  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
63  */
64 SCIP_EXPORT
66  SCIP* scip /**< SCIP data structure */
67  );
68 
69 /** returns, whether the LP of the current node is already constructed
70  *
71  * @return whether the LP of the current node is already constructed.
72  *
73  * @pre This method can be called if @p scip is in one of the following stages:
74  * - \ref SCIP_STAGE_SOLVING
75  *
76  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
77  */
78 SCIP_EXPORT
80  SCIP* scip /**< SCIP data structure */
81  );
82 
83 /** makes sure that the LP of the current node is loaded and may be accessed through the LP information methods
84  *
85  * @warning Contructing the LP might change the amount of variables known in the transformed problem and therefore also
86  * the variables array of SCIP (returned by SCIPgetVars() and SCIPgetVarsData()), so it might be necessary to
87  * call one of the later method after this one
88  *
89  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
90  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
91  *
92  * @pre This method can be called if @p scip is in one of the following stages:
93  * - \ref SCIP_STAGE_SOLVING
94  *
95  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
96  */
97 SCIP_EXPORT
99  SCIP* scip, /**< SCIP data structure */
100  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
101  );
102 
103 /** makes sure that the LP of the current node is flushed
104  *
105  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
106  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
107  *
108  * @pre This method can be called if @p scip is in one of the following stages:
109  * - \ref SCIP_STAGE_SOLVING
110  *
111  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
112  */
113 SCIP_EXPORT
115  SCIP* scip /**< SCIP data structure */
116  );
117 
118 /** gets solution status of current LP
119  *
120  * @return the solution status of current LP.
121  *
122  * @pre This method can be called if @p scip is in one of the following stages:
123  * - \ref SCIP_STAGE_SOLVING
124  *
125  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
126  */
127 SCIP_EXPORT
129  SCIP* scip /**< SCIP data structure */
130  );
131 
132 /** returns whether the current LP solution passed the primal feasibility check
133  *
134  * @returns whether the current LP solution passed the primal feasibility check.
135  *
136  * @pre This method can be called if @p scip is in one of the following stages:
137  * - \ref SCIP_STAGE_SOLVING
138  *
139  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
140  */
141 SCIP_EXPORT
143  SCIP* scip /**< SCIP data structure */
144  );
145 
146 /** returns whether the current LP solution passed the dual feasibility check
147  *
148  * @returns whether the current LP solution passed the dual feasibility check.
149  *
150  * @pre This method can be called if @p scip is in one of the following stages:
151  * - \ref SCIP_STAGE_SOLVING
152  *
153  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
154  */
155 SCIP_EXPORT
157  SCIP* scip /**< SCIP data structure */
158  );
159 
160 /** returns whether the current lp is a relaxation of the current problem and its optimal objective value is a local lower bound
161  *
162  * @return whether the current lp is a relaxation of the current problem and its optimal objective value is a local lower bound.
163  *
164  * @pre This method can be called if @p scip is in one of the following stages:
165  * - \ref SCIP_STAGE_SOLVING
166  *
167  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
168  */
169 SCIP_EXPORT
171  SCIP* scip /**< SCIP data structure */
172  );
173 
174 /** gets objective value of current LP (which is the sum of column and loose objective value)
175  *
176  * @return the objective value of current LP (which is the sum of column and loose objective value).
177  *
178  * @pre This method can be called if @p scip is in one of the following stages:
179  * - \ref SCIP_STAGE_SOLVING
180  *
181  * @note This method returns the objective value of the current LP solution, which might be primal or dual infeasible
182  * if a limit was hit during solving. It must not be used as a dual bound if the LP solution status returned by
183  * SCIPgetLPSolstat() is SCIP_LPSOLSTAT_ITERLIMIT or SCIP_LPSOLSTAT_TIMELIMIT.
184  *
185  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
186  */
187 SCIP_EXPORT
189  SCIP* scip /**< SCIP data structure */
190  );
191 
192 /** gets part of objective value of current LP that results from COLUMN variables only
193  *
194  * @return the part of objective value of current LP that results from COLUMN variables only.
195  *
196  * @pre This method can be called if @p scip is in one of the following stages:
197  * - \ref SCIP_STAGE_SOLVING
198  *
199  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
200  */
201 SCIP_EXPORT
203  SCIP* scip /**< SCIP data structure */
204  );
205 
206 /** gets part of objective value of current LP that results from LOOSE variables only
207  *
208  * @return part of objective value of current LP that results from LOOSE variables only.
209  *
210  * @pre This method can be called if @p scip is in one of the following stages:
211  * - \ref SCIP_STAGE_SOLVING
212  *
213  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
214  */
215 SCIP_EXPORT
217  SCIP* scip /**< SCIP data structure */
218  );
219 
220 /** gets the global pseudo objective value; that is all variables set to their best (w.r.t. the objective
221  * function) global bound
222  *
223  * @return the global pseudo objective value; that is all variables set to their best (w.r.t. the objective
224  * function) global bound.
225  *
226  * @pre This method can be called if @p scip is in one of the following stages:
227  * - \ref SCIP_STAGE_INITPRESOLVE
228  * - \ref SCIP_STAGE_PRESOLVING
229  * - \ref SCIP_STAGE_EXITPRESOLVE
230  * - \ref SCIP_STAGE_PRESOLVED
231  * - \ref SCIP_STAGE_INITSOLVE
232  * - \ref SCIP_STAGE_SOLVING
233  *
234  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
235  */
236 SCIP_EXPORT
238  SCIP* scip /**< SCIP data structure */
239  );
240 
241 /** gets the pseudo objective value for the current search node; that is all variables set to their best (w.r.t. the
242  * objective function) local bound
243  *
244  * @return the pseudo objective value for the current search node; that is all variables set to their best (w.r.t. the
245  * objective function) local bound.
246  *
247  * @pre This method can be called if @p scip is in one of the following stages:
248  * - \ref SCIP_STAGE_INITPRESOLVE
249  * - \ref SCIP_STAGE_PRESOLVING
250  * - \ref SCIP_STAGE_EXITPRESOLVE
251  * - \ref SCIP_STAGE_PRESOLVED
252  * - \ref SCIP_STAGE_INITSOLVE
253  * - \ref SCIP_STAGE_SOLVING
254  *
255  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
256  */
257 SCIP_EXPORT
259  SCIP* scip /**< SCIP data structure */
260  );
261 
262 /** returns whether the root lp is a relaxation of the problem and its optimal objective value is a global lower bound
263  *
264  * @return whether the root lp is a relaxation of the problem and its optimal objective value is a global lower bound.
265  *
266  * @pre This method can be called if @p scip is in one of the following stages:
267  * - \ref SCIP_STAGE_SOLVING
268  *
269  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
270  */
271 SCIP_EXPORT
273  SCIP* scip /**< SCIP data structure */
274  );
275 
276 /** gets the objective value of the root node LP or SCIP_INVALID if the root node LP was not (yet) solved
277  *
278  * @return the objective value of the root node LP or SCIP_INVALID if the root node LP was not (yet) solved.
279  *
280  * @pre This method can be called if @p scip is in one of the following stages:
281  * - \ref SCIP_STAGE_INITPRESOLVE
282  * - \ref SCIP_STAGE_PRESOLVING
283  * - \ref SCIP_STAGE_EXITPRESOLVE
284  * - \ref SCIP_STAGE_SOLVING
285  *
286  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
287  */
288 SCIP_EXPORT
290  SCIP* scip /**< SCIP data structure */
291  );
292 
293 /** gets part of the objective value of the root node LP that results from COLUMN variables only;
294  * returns SCIP_INVALID if the root node LP was not (yet) solved
295  *
296  * @return the part of the objective value of the root node LP that results from COLUMN variables only;
297  * or SCIP_INVALID if the root node LP was not (yet) solved.
298  *
299  * @pre This method can be called if @p scip is in one of the following stages:
300  * - \ref SCIP_STAGE_INITPRESOLVE
301  * - \ref SCIP_STAGE_PRESOLVING
302  * - \ref SCIP_STAGE_EXITPRESOLVE
303  * - \ref SCIP_STAGE_SOLVING
304  *
305  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
306  */
307 SCIP_EXPORT
309  SCIP* scip /**< SCIP data structure */
310  );
311 
312 /** gets part of the objective value of the root node LP that results from LOOSE variables only;
313  * returns SCIP_INVALID if the root node LP was not (yet) solved
314  *
315  * @return the part of the objective value of the root node LP that results from LOOSE variables only;
316  * or SCIP_INVALID if the root node LP was not (yet) solved.
317  *
318  * @pre This method can be called if @p scip is in one of the following stages:
319  * - \ref SCIP_STAGE_INITPRESOLVE
320  * - \ref SCIP_STAGE_PRESOLVING
321  * - \ref SCIP_STAGE_EXITPRESOLVE
322  * - \ref SCIP_STAGE_SOLVING
323  *
324  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
325  */
326 SCIP_EXPORT
328  SCIP* scip /**< SCIP data structure */
329  );
330 
331 /** gets current primal feasibility tolerance of LP */
332 SCIP_EXPORT
334  SCIP* scip /**< SCIP data structure */
335  );
336 
337 /** sets primal feasibility tolerance of LP */
338 SCIP_EXPORT
339 void SCIPsetLPFeastol(
340  SCIP* scip, /**< SCIP data structure */
341  SCIP_Real newfeastol /**< new primal feasibility tolerance for LP */
342  );
343 
344 /** resets primal feasibility tolerance of LP
345  *
346  * Sets primal feasibility tolerance to min of numerics/lpfeastolfactor * numerics/feastol and relaxfeastol.
347  */
348 SCIP_EXPORT
349 void SCIPresetLPFeastol(
350  SCIP* scip /**< SCIP data structure */
351  );
352 
353 /** gets current LP columns along with the current number of LP columns
354  *
355  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
356  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
357  *
358  * @pre This method can be called if @p scip is in one of the following stages:
359  * - \ref SCIP_STAGE_SOLVING
360  *
361  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
362  */
363 SCIP_EXPORT
365  SCIP* scip, /**< SCIP data structure */
366  SCIP_COL*** cols, /**< pointer to store the array of LP columns, or NULL */
367  int* ncols /**< pointer to store the number of LP columns, or NULL */
368  );
369 
370 /** gets current LP columns
371  *
372  * @return the current LP columns.
373  *
374  * @pre This method can be called if @p scip is in one of the following stages:
375  * - \ref SCIP_STAGE_SOLVING
376  *
377  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
378  */
379 SCIP_EXPORT
381  SCIP* scip /**< SCIP data structure */
382  );
383 
384 /** gets current number of LP columns
385  *
386  * @return the current number of LP columns.
387  *
388  * @pre This method can be called if @p scip is in one of the following stages:
389  * - \ref SCIP_STAGE_SOLVING
390  *
391  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
392  */
393 SCIP_EXPORT
394 int SCIPgetNLPCols(
395  SCIP* scip /**< SCIP data structure */
396  );
397 
398 /** gets current number of unfixed LP columns
399  *
400  * @return the current number of unfixed LP columns.
401  *
402  * @pre This method can be called if @p scip is in one of the following stages:
403  * - \ref SCIP_STAGE_SOLVING
404  *
405  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
406  */
407 SCIP_EXPORT
409  SCIP* scip /**< SCIP data structure */
410  );
411 
412 /** gets current LP rows along with the current number of LP rows
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
424  SCIP* scip, /**< SCIP data structure */
425  SCIP_ROW*** rows, /**< pointer to store the array of LP rows, or NULL */
426  int* nrows /**< pointer to store the number of LP rows, or NULL */
427  );
428 
429 /** gets current LP rows
430  *
431  * @return the current LP rows.
432  *
433  * @pre This method can be called if @p scip is in one of the following stages:
434  * - \ref SCIP_STAGE_SOLVING
435  *
436  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
437  */
438 SCIP_EXPORT
440  SCIP* scip /**< SCIP data structure */
441  );
442 
443 /** gets current number of LP rows
444  *
445  * @return the current number of LP rows.
446  *
447  * @pre This method can be called if @p scip is in one of the following stages:
448  * - \ref SCIP_STAGE_SOLVING
449  *
450  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
451  */
452 SCIP_EXPORT
453 int SCIPgetNLPRows(
454  SCIP* scip /**< SCIP data structure */
455  );
456 
457 /** returns TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
458  * in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing
459  *
460  * @return TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
461  * in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing.
462  *
463  * @pre This method can be called if @p scip is in one of the following stages:
464  * - \ref SCIP_STAGE_SOLVING
465  *
466  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
467  */
468 SCIP_EXPORT
470  SCIP* scip /**< SCIP data structure */
471  );
472 
473 /** returns whether the current LP solution is basic, i.e. is defined by a valid simplex basis
474  *
475  * @return whether the current LP solution is basic, i.e. is defined by a valid simplex basis.
476  *
477  * @pre This method can be called if @p scip is in one of the following stages:
478  * - \ref SCIP_STAGE_SOLVING
479  *
480  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
481  */
482 SCIP_EXPORT
484  SCIP* scip /**< SCIP data structure */
485  );
486 
487 /** gets all indices of basic columns and rows: index i >= 0 corresponds to column i, index i < 0 to row -i-1
488  *
489  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
490  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
491  *
492  * @pre This method can be called if @p scip is in one of the following stages:
493  * - \ref SCIP_STAGE_SOLVING
494  *
495  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
496  */
497 SCIP_EXPORT
499  SCIP* scip, /**< SCIP data structure */
500  int* basisind /**< pointer to store basis indices ready to keep number of rows entries */
501  );
502 
503 /** gets a row from the inverse basis matrix B^-1
504  *
505  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
506  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
507  *
508  * @pre This method can be called if @p scip is in one of the following stages:
509  * - \ref SCIP_STAGE_SOLVING
510  *
511  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
512  */
513 SCIP_EXPORT
515  SCIP* scip, /**< SCIP data structure */
516  int r, /**< row number */
517  SCIP_Real* coefs, /**< array to store the coefficients of the row */
518  int* inds, /**< array to store the non-zero indices, or NULL */
519  int* ninds /**< pointer to store the number of non-zero indices, or NULL
520  * (-1: if we do not store sparsity informations) */
521  );
522 
523 /** gets a column from the inverse basis matrix B^-1
524  *
525  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
526  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
527  *
528  * @pre This method can be called if @p scip is in one of the following stages:
529  * - \ref SCIP_STAGE_SOLVING
530  *
531  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
532  */
533 SCIP_EXPORT
535  SCIP* scip, /**< SCIP data structure */
536  int c, /**< column number of B^-1; this is NOT the number of the column in the LP
537  * returned by SCIPcolGetLPPos(); you have to call SCIPgetBasisInd()
538  * to get the array which links the B^-1 column numbers to the row and
539  * column numbers of the LP! c must be between 0 and nrows-1, since the
540  * basis has the size nrows * nrows */
541  SCIP_Real* coefs, /**< array to store the coefficients of the column */
542  int* inds, /**< array to store the non-zero indices, or NULL */
543  int* ninds /**< pointer to store the number of non-zero indices, or NULL
544  * (-1: if we do not store sparsity informations) */
545  );
546 
547 /** gets a row from the product of inverse basis matrix B^-1 and coefficient matrix A (i.e. from B^-1 * A)
548  *
549  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
550  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
551  *
552  * @pre This method can be called if @p scip is in one of the following stages:
553  * - \ref SCIP_STAGE_SOLVING
554  *
555  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
556  */
557 SCIP_EXPORT
559  SCIP* scip, /**< SCIP data structure */
560  int r, /**< row number */
561  SCIP_Real* binvrow, /**< row in B^-1 from prior call to SCIPgetLPBInvRow(), or NULL */
562  SCIP_Real* coefs, /**< array to store the coefficients of the row */
563  int* inds, /**< array to store the non-zero indices, or NULL */
564  int* ninds /**< pointer to store the number of non-zero indices, or NULL
565  * (-1: if we do not store sparsity informations) */
566  );
567 
568 /** gets a column from the product of inverse basis matrix B^-1 and coefficient matrix A (i.e. from B^-1 * A),
569  * i.e., it computes B^-1 * A_c with A_c being the c'th column of A
570  *
571  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
572  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
573  *
574  * @pre This method can be called if @p scip is in one of the following stages:
575  * - \ref SCIP_STAGE_SOLVING
576  *
577  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
578  */
579 SCIP_EXPORT
581  SCIP* scip, /**< SCIP data structure */
582  int c, /**< column number which can be accessed by SCIPcolGetLPPos() */
583  SCIP_Real* coefs, /**< array to store the coefficients of the column */
584  int* inds, /**< array to store the non-zero indices, or NULL */
585  int* ninds /**< pointer to store the number of non-zero indices, or NULL
586  * (-1: if we do not store sparsity informations) */
587  );
588 
589 /** calculates a weighted sum of all LP rows; for negative weights, the left and right hand side of the corresponding
590  * LP row are swapped in the summation
591  *
592  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
593  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
594  *
595  * @pre This method can be called if @p scip is in one of the following stages:
596  * - \ref SCIP_STAGE_SOLVING
597  *
598  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
599  */
600 SCIP_EXPORT
602  SCIP* scip, /**< SCIP data structure */
603  SCIP_Real* weights, /**< row weights in row summation */
604  SCIP_REALARRAY* sumcoef, /**< array to store sum coefficients indexed by variables' probindex */
605  SCIP_Real* sumlhs, /**< pointer to store the left hand side of the row summation */
606  SCIP_Real* sumrhs /**< pointer to store the right hand side of the row summation */
607  );
608 
609 /** interrupts or disables the interrupt of the currently ongoing lp solve; if the lp is not currently constructed just returns with no effect
610  *
611  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
612  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
613  *
614  * @pre This method can be called if @p scip is in one of the following stages:
615  * - \ref SCIP_STAGE_SOLVING
616  *
617  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
618  */
619 SCIP_EXPORT
621  SCIP* scip, /**< SCIP data structure */
622  SCIP_Bool interrupt /**< TRUE if interrupt should be set, FALSE if it should be disabled */
623  );
624 
625 /** writes current LP to a file
626  *
627  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
628  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
629  *
630  * @pre This method can be called if @p scip is in one of the following stages:
631  * - \ref SCIP_STAGE_SOLVING
632  *
633  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
634  */
635 SCIP_EXPORT
637  SCIP* scip, /**< SCIP data structure */
638  const char* filename /**< file name */
639  );
640 
641 /** writes MIP relaxation of the current branch-and-bound node to a file
642  *
643  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
644  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
645  *
646  * @pre This method can be called if @p scip is in one of the following stages:
647  * - \ref SCIP_STAGE_SOLVING
648  *
649  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
650  */
651 SCIP_EXPORT
653  SCIP* scip, /**< SCIP data structure */
654  const char* filename, /**< file name */
655  SCIP_Bool genericnames, /**< should generic names like x_i and row_j be used in order to avoid
656  * troubles with reserved symbols? */
657  SCIP_Bool origobj, /**< should the original objective function be used? */
658  SCIP_Bool lazyconss /**< output removable rows as lazy constraints? */
659  );
660 
661 /** gets the LP interface of SCIP;
662  * with the LPI you can use all of the methods defined in lpi/lpi.h;
663  *
664  * @warning You have to make sure, that the full internal state of the LPI does not change or is recovered completely
665  * after the end of the method that uses the LPI. In particular, if you manipulate the LP or its solution
666  * (e.g. by calling one of the SCIPlpiAdd...() or one of the SCIPlpiSolve...() methods), you have to check in
667  * advance with SCIPlpiWasSolved() whether the LP is currently solved. If this is the case, you have to make
668  * sure, the internal solution status is recovered completely at the end of your method. This can be achieved
669  * by getting the LPI state before applying any LPI manipulations with SCIPlpiGetState() and restoring it
670  * afterwards with SCIPlpiSetState() and SCIPlpiFreeState(). Additionally you have to resolve the LP with the
671  * appropriate SCIPlpiSolve...() call in order to reinstall the internal solution status.
672  *
673  * @warning Make also sure, that all parameter values that you have changed are set back to their original values.
674  *
675  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
676  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
677  *
678  * @pre This method can be called if @p scip is in one of the following stages:
679  * - \ref SCIP_STAGE_TRANSFORMED
680  * - \ref SCIP_STAGE_INITPRESOLVE
681  * - \ref SCIP_STAGE_PRESOLVING
682  * - \ref SCIP_STAGE_EXITPRESOLVE
683  * - \ref SCIP_STAGE_PRESOLVED
684  * - \ref SCIP_STAGE_INITSOLVE
685  * - \ref SCIP_STAGE_SOLVING
686  * - \ref SCIP_STAGE_SOLVED
687  * - \ref SCIP_STAGE_EXITSOLVE
688  *
689  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
690  */
691 SCIP_EXPORT
693  SCIP* scip, /**< SCIP data structure */
694  SCIP_LPI** lpi /**< pointer to store the LP interface */
695  );
696 
697 /** Displays quality information about the current LP solution. An LP solution need to be available. Information printed
698  * is subject to what the LP solver supports
699  *
700  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
701  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
702  *
703  * @pre This method can be called if @p scip is in one of the following stages:
704  * - \ref SCIP_STAGE_INIT
705  * - \ref SCIP_STAGE_PROBLEM
706  * - \ref SCIP_STAGE_TRANSFORMED
707  * - \ref SCIP_STAGE_INITPRESOLVE
708  * - \ref SCIP_STAGE_PRESOLVING
709  * - \ref SCIP_STAGE_EXITPRESOLVE
710  * - \ref SCIP_STAGE_PRESOLVED
711  * - \ref SCIP_STAGE_SOLVING
712  * - \ref SCIP_STAGE_SOLVED
713  * - \ref SCIP_STAGE_FREE
714  *
715  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
716  *
717  * @note The printing process is done via the message handler system.
718  */
719 SCIP_EXPORT
721  SCIP* scip, /**< SCIP data structure */
722  FILE* file /**< output file (or NULL for standard output) */
723  );
724 
725 /** compute relative interior point to current LP
726  * @see SCIPlpComputeRelIntPoint
727  *
728  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
729  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
730  *
731  * @pre This method can be called if @p scip is in one of the following stages:
732  * - \ref SCIP_STAGE_TRANSFORMED
733  * - \ref SCIP_STAGE_INITPRESOLVE
734  * - \ref SCIP_STAGE_PRESOLVING
735  * - \ref SCIP_STAGE_EXITPRESOLVE
736  * - \ref SCIP_STAGE_PRESOLVED
737  * - \ref SCIP_STAGE_SOLVING
738  * - \ref SCIP_STAGE_SOLVED
739  *
740  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
741  */
742 SCIP_EXPORT
744  SCIP* scip, /**< SCIP data structure */
745  SCIP_Bool relaxrows, /**< should the rows be relaxed */
746  SCIP_Bool inclobjcutoff, /**< should a row for the objective cutoff be included */
747  SCIP_Real timelimit, /**< time limit for LP solver */
748  int iterlimit, /**< iteration limit for LP solver */
749  SCIP_SOL** point /**< relative interior point on exit */
750  );
751 
752 /**@} */
753 
754 /**@addtogroup PublicColumnMethods
755  *
756  * @{
757  */
758 
759 /** returns the reduced costs of a column in the last (feasible) LP
760  *
761  * @return the reduced costs of a column in the last (feasible) LP
762  *
763  * @pre this method can be called in one of the following stages of the SCIP solving process:
764  * - \ref SCIP_STAGE_SOLVING
765  * - \ref SCIP_STAGE_SOLVED
766  *
767  * @note calling this method in SCIP_STAGE_SOLVED is only recommended to experienced users and should only be called
768  * for pure LP instances (without presolving)
769  *
770  * @note The return value of this method should be used carefully if the dual feasibility check was explictely disabled.
771  */
772 SCIP_EXPORT
774  SCIP* scip, /**< SCIP data structure */
775  SCIP_COL* col /**< LP column */
776  );
777 
778 /** returns the Farkas coefficient of a column in the last (infeasible) LP
779  *
780  * @return the Farkas coefficient of a column in the last (infeasible) LP
781  *
782  * @pre this method can be called in one of the following stages of the SCIP solving process:
783  * - \ref SCIP_STAGE_SOLVING
784  */
785 SCIP_EXPORT
787  SCIP* scip, /**< SCIP data structure */
788  SCIP_COL* col /**< LP column */
789  );
790 
791 /** marks a column to be not removable from the LP in the current node
792  *
793  * @pre this method can be called in the following stage of the SCIP solving process:
794  * - \ref SCIP_STAGE_SOLVING
795  */
796 SCIP_EXPORT
798  SCIP* scip, /**< SCIP data structure */
799  SCIP_COL* col /**< LP column */
800  );
801 
802 /**@} */
803 
804 /**@addtogroup PublicRowMethods
805  *
806  * @{
807  */
808 
809 /** creates and captures an LP row from a constraint handler
810  *
811  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
812  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
813  *
814  * @pre this method can be called in one of the following stages of the SCIP solving process:
815  * - \ref SCIP_STAGE_INITSOLVE
816  * - \ref SCIP_STAGE_SOLVING
817  */
818 SCIP_EXPORT
820  SCIP* scip, /**< SCIP data structure */
821  SCIP_ROW** row, /**< pointer to row */
822  SCIP_CONSHDLR* conshdlr, /**< constraint handler that creates the row */
823  const char* name, /**< name of row */
824  int len, /**< number of nonzeros in the row */
825  SCIP_COL** cols, /**< array with columns of row entries */
826  SCIP_Real* vals, /**< array with coefficients of row entries */
827  SCIP_Real lhs, /**< left hand side of row */
828  SCIP_Real rhs, /**< right hand side of row */
829  SCIP_Bool local, /**< is row only valid locally? */
830  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
831  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
832  );
833 
834 /** creates and captures an LP row from a constraint
835  *
836  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
837  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
838  *
839  * @pre this method can be called in one of the following stages of the SCIP solving process:
840  * - \ref SCIP_STAGE_INITSOLVE
841  * - \ref SCIP_STAGE_SOLVING
842  */
843 SCIP_EXPORT
845  SCIP* scip, /**< SCIP data structure */
846  SCIP_ROW** row, /**< pointer to row */
847  SCIP_CONS* cons, /**< constraint that creates the row */
848  const char* name, /**< name of row */
849  int len, /**< number of nonzeros in the row */
850  SCIP_COL** cols, /**< array with columns of row entries */
851  SCIP_Real* vals, /**< array with coefficients of row entries */
852  SCIP_Real lhs, /**< left hand side of row */
853  SCIP_Real rhs, /**< right hand side of row */
854  SCIP_Bool local, /**< is row only valid locally? */
855  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
856  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
857  );
858 
859 /** creates and captures an LP row from a separator
860  *
861  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
862  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
863  *
864  * @pre this method can be called in one of the following stages of the SCIP solving process:
865  * - \ref SCIP_STAGE_INITSOLVE
866  * - \ref SCIP_STAGE_SOLVING
867  */
868 SCIP_EXPORT
870  SCIP* scip, /**< SCIP data structure */
871  SCIP_ROW** row, /**< pointer to row */
872  SCIP_SEPA* sepa, /**< separator that creates the row */
873  const char* name, /**< name of row */
874  int len, /**< number of nonzeros in the row */
875  SCIP_COL** cols, /**< array with columns of row entries */
876  SCIP_Real* vals, /**< array with coefficients of row entries */
877  SCIP_Real lhs, /**< left hand side of row */
878  SCIP_Real rhs, /**< right hand side of row */
879  SCIP_Bool local, /**< is row only valid locally? */
880  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
881  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
882  );
883 
884 /** creates and captures an LP row from an unspecified source
885  *
886  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
887  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
888  *
889  * @pre this method can be called in one of the following stages of the SCIP solving process:
890  * - \ref SCIP_STAGE_INITSOLVE
891  * - \ref SCIP_STAGE_SOLVING
892  */
893 SCIP_EXPORT
895  SCIP* scip, /**< SCIP data structure */
896  SCIP_ROW** row, /**< pointer to row */
897  const char* name, /**< name of row */
898  int len, /**< number of nonzeros in the row */
899  SCIP_COL** cols, /**< array with columns of row entries */
900  SCIP_Real* vals, /**< array with coefficients of row entries */
901  SCIP_Real lhs, /**< left hand side of row */
902  SCIP_Real rhs, /**< right hand side of row */
903  SCIP_Bool local, /**< is row only valid locally? */
904  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
905  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
906  );
907 
908 /** creates and captures an LP row
909  *
910  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
911  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
912  *
913  * @pre this method can be called in one of the following stages of the SCIP solving process:
914  * - \ref SCIP_STAGE_INITSOLVE
915  * - \ref SCIP_STAGE_SOLVING
916  *
917  * @deprecated Please use SCIPcreateRowConshdlr() or SCIPcreateRowSepa() when calling from a constraint handler or separator in order
918  * to facilitate correct statistics. If the call is from neither a constraint handler or separator, use SCIPcreateRowUnspec().
919  */
920 SCIP_EXPORT
922  SCIP* scip, /**< SCIP data structure */
923  SCIP_ROW** row, /**< pointer to row */
924  const char* name, /**< name of row */
925  int len, /**< number of nonzeros in the row */
926  SCIP_COL** cols, /**< array with columns of row entries */
927  SCIP_Real* vals, /**< array with coefficients of row entries */
928  SCIP_Real lhs, /**< left hand side of row */
929  SCIP_Real rhs, /**< right hand side of row */
930  SCIP_Bool local, /**< is row only valid locally? */
931  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
932  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
933  );
934 
935 /** creates and captures an LP row without any coefficients from a constraint handler
936  *
937  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
938  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
939  *
940  * @pre this method can be called in one of the following stages of the SCIP solving process:
941  * - \ref SCIP_STAGE_INITSOLVE
942  * - \ref SCIP_STAGE_SOLVING
943  */
944 SCIP_EXPORT
946  SCIP* scip, /**< SCIP data structure */
947  SCIP_ROW** row, /**< pointer to row */
948  SCIP_CONSHDLR* conshdlr, /**< constraint handler that creates the row */
949  const char* name, /**< name of row */
950  SCIP_Real lhs, /**< left hand side of row */
951  SCIP_Real rhs, /**< right hand side of row */
952  SCIP_Bool local, /**< is row only valid locally? */
953  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
954  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
955  );
956 
957 /** creates and captures an LP row without any coefficients from a constraint
958  *
959  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
960  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
961  *
962  * @pre this method can be called in one of the following stages of the SCIP solving process:
963  * - \ref SCIP_STAGE_INITSOLVE
964  * - \ref SCIP_STAGE_SOLVING
965  */
966 SCIP_EXPORT
968  SCIP* scip, /**< SCIP data structure */
969  SCIP_ROW** row, /**< pointer to row */
970  SCIP_CONS* cons, /**< constraint that creates the row */
971  const char* name, /**< name of row */
972  SCIP_Real lhs, /**< left hand side of row */
973  SCIP_Real rhs, /**< right hand side of row */
974  SCIP_Bool local, /**< is row only valid locally? */
975  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
976  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
977  );
978 
979 /** creates and captures an LP row without any coefficients from a separator
980  *
981  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
982  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
983  *
984  * @pre this method can be called in one of the following stages of the SCIP solving process:
985  * - \ref SCIP_STAGE_INITSOLVE
986  * - \ref SCIP_STAGE_SOLVING
987  */
988 SCIP_EXPORT
990  SCIP* scip, /**< SCIP data structure */
991  SCIP_ROW** row, /**< pointer to row */
992  SCIP_SEPA* sepa, /**< separator that creates the row */
993  const char* name, /**< name of row */
994  SCIP_Real lhs, /**< left hand side of row */
995  SCIP_Real rhs, /**< right hand side of row */
996  SCIP_Bool local, /**< is row only valid locally? */
997  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
998  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
999  );
1000 
1001 /** creates and captures an LP row without any coefficients from an unspecified source
1002  *
1003  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1004  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1005  *
1006  * @pre this method can be called in one of the following stages of the SCIP solving process:
1007  * - \ref SCIP_STAGE_INITSOLVE
1008  * - \ref SCIP_STAGE_SOLVING
1009  */
1010 SCIP_EXPORT
1012  SCIP* scip, /**< SCIP data structure */
1013  SCIP_ROW** row, /**< pointer to row */
1014  const char* name, /**< name of row */
1015  SCIP_Real lhs, /**< left hand side of row */
1016  SCIP_Real rhs, /**< right hand side of row */
1017  SCIP_Bool local, /**< is row only valid locally? */
1018  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
1019  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
1020  );
1021 
1022 /** creates and captures an LP row without any coefficients
1023  *
1024  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1025  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1026  *
1027  * @pre this method can be called in one of the following stages of the SCIP solving process:
1028  * - \ref SCIP_STAGE_INITSOLVE
1029  * - \ref SCIP_STAGE_SOLVING
1030  *
1031  * @deprecated Please use SCIPcreateEmptyRowConshdlr() or SCIPcreateEmptyRowSepa() when calling from a constraint handler or separator in order
1032  * to facilitate correct statistics. If the call is from neither a constraint handler or separator, use SCIPcreateEmptyRowUnspec().
1033  */
1034 SCIP_EXPORT
1036  SCIP* scip, /**< SCIP data structure */
1037  SCIP_ROW** row, /**< pointer to row */
1038  const char* name, /**< name of row */
1039  SCIP_Real lhs, /**< left hand side of row */
1040  SCIP_Real rhs, /**< right hand side of row */
1041  SCIP_Bool local, /**< is row only valid locally? */
1042  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
1043  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
1044  );
1045 
1046 /** increases usage counter of LP row
1047  *
1048  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1049  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1050  *
1051  * @pre this method can be called in one of the following stages of the SCIP solving process:
1052  * - \ref SCIP_STAGE_INITSOLVE
1053  * - \ref SCIP_STAGE_SOLVING
1054  */
1055 SCIP_EXPORT
1057  SCIP* scip, /**< SCIP data structure */
1058  SCIP_ROW* row /**< row to capture */
1059  );
1060 
1061 /** decreases usage counter of LP row, and frees memory if necessary
1062  *
1063  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1064  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1065  *
1066  * @pre this method can be called in one of the following stages of the SCIP solving process:
1067  * - \ref SCIP_STAGE_INITSOLVE
1068  * - \ref SCIP_STAGE_SOLVING
1069  * - \ref SCIP_STAGE_EXITSOLVE
1070  */
1071 SCIP_EXPORT
1073  SCIP* scip, /**< SCIP data structure */
1074  SCIP_ROW** row /**< pointer to LP row */
1075  );
1076 
1077 /** changes left hand side of LP row
1078  *
1079  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1080  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1081  *
1082  * @pre this method can be called in one of the following stages of the SCIP solving process:
1083  * - \ref SCIP_STAGE_INITSOLVE
1084  * - \ref SCIP_STAGE_SOLVING
1085  */
1086 SCIP_EXPORT
1088  SCIP* scip, /**< SCIP data structure */
1089  SCIP_ROW* row, /**< LP row */
1090  SCIP_Real lhs /**< new left hand side */
1091  );
1092 
1093 /** changes right hand side of LP row
1094  *
1095  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1096  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1097  *
1098  * @pre this method can be called in one of the following stages of the SCIP solving process:
1099  * - \ref SCIP_STAGE_INITSOLVE
1100  * - \ref SCIP_STAGE_SOLVING
1101  */
1102 SCIP_EXPORT
1104  SCIP* scip, /**< SCIP data structure */
1105  SCIP_ROW* row, /**< LP row */
1106  SCIP_Real rhs /**< new right hand side */
1107  );
1108 
1109 /** informs row, that all subsequent additions of variables to the row should be cached and not directly applied;
1110  * after all additions were applied, SCIPflushRowExtensions() must be called;
1111  * while the caching of row extensions is activated, information methods of the row give invalid results;
1112  * caching should be used, if a row is build with SCIPaddVarToRow() calls variable by variable to increase
1113  * the performance
1114  *
1115  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1116  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1117  *
1118  * @pre this method can be called in one of the following stages of the SCIP solving process:
1119  * - \ref SCIP_STAGE_INITSOLVE
1120  * - \ref SCIP_STAGE_SOLVING
1121  */
1122 SCIP_EXPORT
1124  SCIP* scip, /**< SCIP data structure */
1125  SCIP_ROW* row /**< LP row */
1126  );
1127 
1128 /** flushes all cached row extensions after a call of SCIPcacheRowExtensions() and merges coefficients with
1129  * equal columns into a single coefficient
1130  *
1131  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1132  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1133  *
1134  * @pre this method can be called in one of the following stages of the SCIP solving process:
1135  * - \ref SCIP_STAGE_INITSOLVE
1136  * - \ref SCIP_STAGE_SOLVING
1137  */
1138 SCIP_EXPORT
1140  SCIP* scip, /**< SCIP data structure */
1141  SCIP_ROW* row /**< LP row */
1142  );
1143 
1144 /** resolves variable to columns and adds them with the coefficient to the row
1145  *
1146  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1147  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1148  *
1149  * @attention If the absolute value of val is below the SCIP epsilon tolerance, the variable will not added.
1150  *
1151  * @pre this method can be called in one of the following stages of the SCIP solving process:
1152  * - \ref SCIP_STAGE_INITSOLVE
1153  * - \ref SCIP_STAGE_SOLVING
1154  *
1155  * @note In case calling this method in the enforcement process of an lp solution, it might be that some variables,
1156  * that were not yet in the LP (e.g. dynamic columns) will change their lp solution value returned by SCIP.
1157  * For example, a variable, which has a negative objective value, that has no column in the lp yet, is in the lp solution
1158  * on its upper bound (variables with status SCIP_VARSTATUS_LOOSE are in an lp solution on it's best bound), but
1159  * creating the column, changes the solution value (variable than has status SCIP_VARSTATUS_COLUMN, and the
1160  * initialization sets the lp solution value) to 0.0. (This leads to the conclusion that, if a constraint was
1161  * violated, the linear relaxation might not be violated anymore.)
1162  */
1163 SCIP_EXPORT
1165  SCIP* scip, /**< SCIP data structure */
1166  SCIP_ROW* row, /**< LP row */
1167  SCIP_VAR* var, /**< problem variable */
1168  SCIP_Real val /**< value of coefficient */
1169  );
1170 
1171 /** resolves variables to columns and adds them with the coefficients to the row;
1172  * this method caches the row extensions and flushes them afterwards to gain better performance
1173  *
1174  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1175  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1176  *
1177  * @attention If a coefficients absolute value is below the SCIP epsilon tolerance, the variable with its value is not added.
1178  *
1179  * @pre this method can be called in one of the following stages of the SCIP solving process:
1180  * - \ref SCIP_STAGE_INITSOLVE
1181  * - \ref SCIP_STAGE_SOLVING
1182  */
1183 SCIP_EXPORT
1185  SCIP* scip, /**< SCIP data structure */
1186  SCIP_ROW* row, /**< LP row */
1187  int nvars, /**< number of variables to add to the row */
1188  SCIP_VAR** vars, /**< problem variables to add */
1189  SCIP_Real* vals /**< values of coefficients */
1190  );
1191 
1192 /** resolves variables to columns and adds them with the same single coefficient to the row;
1193  * this method caches the row extensions and flushes them afterwards to gain better performance
1194  *
1195  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1196  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1197  *
1198  * @attention If the absolute value of val is below the SCIP epsilon tolerance, the variables will not added.
1199  *
1200  * @pre this method can be called in one of the following stages of the SCIP solving process:
1201  * - \ref SCIP_STAGE_INITSOLVE
1202  * - \ref SCIP_STAGE_SOLVING
1203  */
1204 SCIP_EXPORT
1206  SCIP* scip, /**< SCIP data structure */
1207  SCIP_ROW* row, /**< LP row */
1208  int nvars, /**< number of variables to add to the row */
1209  SCIP_VAR** vars, /**< problem variables to add */
1210  SCIP_Real val /**< unique value of all coefficients */
1211  );
1212 
1213 /** tries to find a value, such that all row coefficients, if scaled with this value become integral
1214  *
1215  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1216  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1217  *
1218  * @pre this method can be called in one of the following stages of the SCIP solving process:
1219  * - \ref SCIP_STAGE_INITSOLVE
1220  * - \ref SCIP_STAGE_SOLVING
1221  */
1222 SCIP_EXPORT
1224  SCIP* scip, /**< SCIP data structure */
1225  SCIP_ROW* row, /**< LP row */
1226  SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
1227  SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
1228  SCIP_Longint maxdnom, /**< maximal denominator allowed in rational numbers */
1229  SCIP_Real maxscale, /**< maximal allowed scalar */
1230  SCIP_Bool usecontvars, /**< should the coefficients of the continuous variables also be made integral? */
1231  SCIP_Real* intscalar, /**< pointer to store scalar that would make the coefficients integral, or NULL */
1232  SCIP_Bool* success /**< stores whether returned value is valid */
1233  );
1234 
1235 /** tries to scale row, s.t. all coefficients (of integer variables) become integral
1236  *
1237  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1238  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1239  *
1240  * @pre this method can be called in one of the following stages of the SCIP solving process:
1241  * - \ref SCIP_STAGE_INITSOLVE
1242  * - \ref SCIP_STAGE_SOLVING
1243  */
1244 SCIP_EXPORT
1246  SCIP* scip, /**< SCIP data structure */
1247  SCIP_ROW* row, /**< LP row */
1248  SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
1249  SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
1250  SCIP_Longint maxdnom, /**< maximal denominator allowed in rational numbers */
1251  SCIP_Real maxscale, /**< maximal value to scale row with */
1252  SCIP_Bool usecontvars, /**< should the coefficients of the continuous variables also be made integral? */
1253  SCIP_Bool* success /**< stores whether row could be made rational */
1254  );
1255 
1256 /** marks a row to be not removable from the LP in the current node
1257  *
1258  * @pre this method can be called in the following stage of the SCIP solving process:
1259  * - \ref SCIP_STAGE_SOLVING
1260  */
1261 SCIP_EXPORT
1263  SCIP* scip, /**< SCIP data structure */
1264  SCIP_ROW* row /**< LP row */
1265  );
1266 
1267 /** returns number of integral columns in the row
1268  *
1269  * @return number of integral columns in the row
1270  *
1271  * @pre this method can be called in one of the following stages of the SCIP solving process:
1272  * - \ref SCIP_STAGE_INITSOLVE
1273  * - \ref SCIP_STAGE_SOLVING
1274  */
1275 SCIP_EXPORT
1277  SCIP* scip, /**< SCIP data structure */
1278  SCIP_ROW* row /**< LP row */
1279  );
1280 
1281 /** returns minimal absolute value of row vector's non-zero coefficients
1282  *
1283  * @return minimal absolute value of row vector's non-zero coefficients
1284  *
1285  * @pre this method can be called in one of the following stages of the SCIP solving process:
1286  * - \ref SCIP_STAGE_INITSOLVE
1287  * - \ref SCIP_STAGE_SOLVING
1288  */
1289 SCIP_EXPORT
1291  SCIP* scip, /**< SCIP data structure */
1292  SCIP_ROW* row /**< LP row */
1293  );
1294 
1295 /** returns maximal absolute value of row vector's non-zero coefficients
1296  *
1297  * @return maximal absolute value of row vector's non-zero coefficients
1298  *
1299  * @pre this method can be called in one of the following stages of the SCIP solving process:
1300  * - \ref SCIP_STAGE_INITSOLVE
1301  * - \ref SCIP_STAGE_SOLVING
1302  */
1303 SCIP_EXPORT
1305  SCIP* scip, /**< SCIP data structure */
1306  SCIP_ROW* row /**< LP row */
1307  );
1308 
1309 /** returns the minimal activity of a row w.r.t. the column's bounds
1310  *
1311  * @return the minimal activity of a row w.r.t. the column's bounds
1312  *
1313  * @pre this method can be called in one of the following stages of the SCIP solving process:
1314  * - \ref SCIP_STAGE_SOLVING
1315  */
1316 SCIP_EXPORT
1318  SCIP* scip, /**< SCIP data structure */
1319  SCIP_ROW* row /**< LP row */
1320  );
1321 
1322 /** returns the maximal activity of a row w.r.t. the column's bounds
1323  *
1324  * @return the maximal activity of a row w.r.t. the column's bounds
1325  *
1326  * @pre this method can be called in one of the following stages of the SCIP solving process:
1327  * - \ref SCIP_STAGE_SOLVING
1328  */
1329 SCIP_EXPORT
1331  SCIP* scip, /**< SCIP data structure */
1332  SCIP_ROW* row /**< LP row */
1333  );
1334 
1335 /** recalculates the activity of a row in the last LP solution
1336  *
1337  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1338  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1339  *
1340  * @pre this method can be called in one of the following stages of the SCIP solving process:
1341  * - \ref SCIP_STAGE_SOLVING
1342  */
1343 SCIP_EXPORT
1345  SCIP* scip, /**< SCIP data structure */
1346  SCIP_ROW* row /**< LP row */
1347  );
1348 
1349 /** returns the activity of a row in the last LP solution
1350  *
1351  * @return activity of a row in the last LP solution
1352  *
1353  * @pre this method can be called in one of the following stages of the SCIP solving process:
1354  * - \ref SCIP_STAGE_SOLVING
1355  */
1356 SCIP_EXPORT
1358  SCIP* scip, /**< SCIP data structure */
1359  SCIP_ROW* row /**< LP row */
1360  );
1361 
1362 /** returns the feasibility of a row in the last LP solution
1363  *
1364  * @return the feasibility of a row in the last LP solution: negative value means infeasibility
1365  *
1366  * @pre this method can be called in one of the following stages of the SCIP solving process:
1367  * - \ref SCIP_STAGE_SOLVING
1368  */
1369 SCIP_EXPORT
1371  SCIP* scip, /**< SCIP data structure */
1372  SCIP_ROW* row /**< LP row */
1373  );
1374 
1375 /** recalculates the activity of a row for the current pseudo solution
1376  *
1377  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1378  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1379  *
1380  * @pre this method can be called in one of the following stages of the SCIP solving process:
1381  * - \ref SCIP_STAGE_SOLVING
1382  */
1383 SCIP_EXPORT
1385  SCIP* scip, /**< SCIP data structure */
1386  SCIP_ROW* row /**< LP row */
1387  );
1388 
1389 /** returns the activity of a row for the current pseudo solution
1390  *
1391  * @return the activity of a row for the current pseudo solution
1392  *
1393  * @pre this method can be called in one of the following stages of the SCIP solving process:
1394  * - \ref SCIP_STAGE_SOLVING
1395  */
1396 SCIP_EXPORT
1398  SCIP* scip, /**< SCIP data structure */
1399  SCIP_ROW* row /**< LP row */
1400  );
1401 
1402 /** returns the feasibility of a row for the current pseudo solution: negative value means infeasibility
1403  *
1404  * @return the feasibility of a row for the current pseudo solution: negative value means infeasibility
1405  *
1406  * @pre this method can be called in one of the following stages of the SCIP solving process:
1407  * - \ref SCIP_STAGE_SOLVING
1408  */
1409 SCIP_EXPORT
1411  SCIP* scip, /**< SCIP data structure */
1412  SCIP_ROW* row /**< LP row */
1413  );
1414 
1415 /** recalculates the activity of a row in the last LP or pseudo solution
1416  *
1417  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1418  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1419  *
1420  * @pre this method can be called in one of the following stages of the SCIP solving process:
1421  * - \ref SCIP_STAGE_SOLVING
1422  */
1423 SCIP_EXPORT
1425  SCIP* scip, /**< SCIP data structure */
1426  SCIP_ROW* row /**< LP row */
1427  );
1428 
1429 /** returns the activity of a row in the last LP or pseudo solution
1430  *
1431  * @return the activity of a row in the last LP or pseudo solution
1432  *
1433  * @pre this method can be called in one of the following stages of the SCIP solving process:
1434  * - \ref SCIP_STAGE_SOLVING
1435  */
1436 SCIP_EXPORT
1438  SCIP* scip, /**< SCIP data structure */
1439  SCIP_ROW* row /**< LP row */
1440  );
1441 
1442 /** returns the feasibility of a row in the last LP or pseudo solution
1443  *
1444  * @return the feasibility of a row in the last LP or pseudo solution
1445  *
1446  * @pre this method can be called in one of the following stages of the SCIP solving process:
1447  * - \ref SCIP_STAGE_SOLVING
1448  */
1449 SCIP_EXPORT
1451  SCIP* scip, /**< SCIP data structure */
1452  SCIP_ROW* row /**< LP row */
1453  );
1454 
1455 /** returns the activity of a row for the given primal solution
1456  *
1457  * @return the activitiy of a row for the given primal solution
1458  *
1459  * @pre this method can be called in one of the following stages of the SCIP solving process:
1460  * - \ref SCIP_STAGE_SOLVING
1461  */
1462 SCIP_EXPORT
1464  SCIP* scip, /**< SCIP data structure */
1465  SCIP_ROW* row, /**< LP row */
1466  SCIP_SOL* sol /**< primal CIP solution */
1467  );
1468 
1469 /** returns the feasibility of a row for the given primal solution
1470  *
1471  * @return the feasibility of a row for the given primal solution
1472  *
1473  * @pre this method can be called in one of the following stages of the SCIP solving process:
1474  * - \ref SCIP_STAGE_SOLVING
1475  */
1476 SCIP_EXPORT
1478  SCIP* scip, /**< SCIP data structure */
1479  SCIP_ROW* row, /**< LP row */
1480  SCIP_SOL* sol /**< primal CIP solution */
1481  );
1482 
1483 /** returns the parallelism of row with objective function
1484  *
1485  * @return 1 is returned if the row is parallel to the objective function and 0 if it is orthogonal
1486  *
1487  * @pre this method can be called in one of the following stages of the SCIP solving process:
1488  * - \ref SCIP_STAGE_SOLVING
1489  */
1490 SCIP_EXPORT
1492  SCIP* scip, /**< SCIP data structure */
1493  SCIP_ROW* row /**< LP row */
1494  );
1495 
1496 /** output row to file stream via the message handler system
1497  *
1498  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1499  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1500  *
1501  * @pre this method can be called in one of the following stages of the SCIP solving process:
1502  * - \ref SCIP_STAGE_INITSOLVE
1503  * - \ref SCIP_STAGE_SOLVING
1504  * - \ref SCIP_STAGE_SOLVED
1505  * - \ref SCIP_STAGE_EXITSOLVE
1506  */
1507 SCIP_EXPORT
1509  SCIP* scip, /**< SCIP data structure */
1510  SCIP_ROW* row, /**< LP row */
1511  FILE* file /**< output file (or NULL for standard output) */
1512  );
1513 
1514 /**@} */
1515 
1516 /**@addtogroup PublicLPDivingMethods
1517  *
1518  * @{
1519  */
1520 
1521 /** initiates LP diving, making methods SCIPchgVarObjDive(), SCIPchgVarLbDive(), and SCIPchgVarUbDive() available
1522  *
1523  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1524  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1525  *
1526  * @pre This method can be called if @p scip is in one of the following stages:
1527  * - \ref SCIP_STAGE_SOLVING
1528  *
1529  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1530  *
1531  * @note diving is allowed even if the current LP is not flushed, not solved, or not solved to optimality; be aware
1532  * that solving the (first) diving LP may take longer than expect and that the latter two cases could stem from
1533  * numerical troubles during the last LP solve; because of this, most users will want to call this method only if
1534  * SCIPgetLPSolstat(scip) == SCIP_LPSOLSTAT_OPTIMAL
1535  */
1536 SCIP_EXPORT
1538  SCIP* scip /**< SCIP data structure */
1539  );
1540 
1541 /** quits LP diving and resets bounds and objective values of columns to the current node's values
1542  *
1543  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1544  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1545  *
1546  * @pre This method can be called if @p scip is in one of the following stages:
1547  * - \ref SCIP_STAGE_SOLVING
1548  *
1549  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1550  */
1551 SCIP_EXPORT
1553  SCIP* scip /**< SCIP data structure */
1554  );
1555 
1556 /** changes cutoffbound in current dive
1557  *
1558  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1559  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1560  *
1561  * @pre This method can be called if @p scip is in one of the following stages:
1562  * - \ref SCIP_STAGE_SOLVING
1563  *
1564  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1565  */
1566 SCIP_EXPORT
1568  SCIP* scip, /**< SCIP data structure */
1569  SCIP_Real newcutoffbound /**< new cutoffbound */
1570  );
1571 
1572 /** changes variable's objective value in current dive
1573  *
1574  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1575  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1576  *
1577  * @pre This method can be called if @p scip is in one of the following stages:
1578  * - \ref SCIP_STAGE_SOLVING
1579  *
1580  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1581  */
1582 SCIP_EXPORT
1584  SCIP* scip, /**< SCIP data structure */
1585  SCIP_VAR* var, /**< variable to change the objective value for */
1586  SCIP_Real newobj /**< new objective value */
1587  );
1588 
1589 /** changes variable's lower bound in current dive
1590  *
1591  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1592  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1593  *
1594  * @pre This method can be called if @p scip is in one of the following stages:
1595  * - \ref SCIP_STAGE_SOLVING
1596  *
1597  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1598  */
1599 SCIP_EXPORT
1601  SCIP* scip, /**< SCIP data structure */
1602  SCIP_VAR* var, /**< variable to change the bound for */
1603  SCIP_Real newbound /**< new value for bound */
1604  );
1605 
1606 /** changes variable's upper bound in current dive
1607  *
1608  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1609  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1610  *
1611  * @pre This method can be called if @p scip is in one of the following stages:
1612  * - \ref SCIP_STAGE_SOLVING
1613  *
1614  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1615  */
1616 SCIP_EXPORT
1618  SCIP* scip, /**< SCIP data structure */
1619  SCIP_VAR* var, /**< variable to change the bound for */
1620  SCIP_Real newbound /**< new value for bound */
1621  );
1622 
1623 /** adds a row to the LP in current dive
1624  *
1625  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1626  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1627  *
1628  * @pre This method can be called if @p scip is in one of the following stages:
1629  * - \ref SCIP_STAGE_SOLVING
1630  *
1631  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1632  */
1633 SCIP_EXPORT
1635  SCIP* scip, /**< SCIP data structure */
1636  SCIP_ROW* row /**< row to be added */
1637  );
1638 
1639 /** changes row lhs in current dive, change will be undone after diving ends, for permanent changes use SCIPchgRowLhs()
1640  *
1641  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1642  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1643  *
1644  * @pre This method can be called if @p scip is in one of the following stages:
1645  * - \ref SCIP_STAGE_SOLVING
1646  *
1647  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1648  */
1649 SCIP_EXPORT
1651  SCIP* scip, /**< SCIP data structure */
1652  SCIP_ROW* row, /**< row to change the lhs for */
1653  SCIP_Real newlhs /**< new value for lhs */
1654  );
1655 
1656 /** changes row rhs in current dive, change will be undone after diving ends, for permanent changes use SCIPchgRowRhs()
1657  *
1658  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1659  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1660  *
1661  * @pre This method can be called if @p scip is in one of the following stages:
1662  * - \ref SCIP_STAGE_SOLVING
1663  *
1664  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1665  */
1666 SCIP_EXPORT
1668  SCIP* scip, /**< SCIP data structure */
1669  SCIP_ROW* row, /**< row to change the lhs for */
1670  SCIP_Real newrhs /**< new value for rhs */
1671  );
1672 
1673 /** gets variable's objective value in current dive
1674  *
1675  * @return the variable's objective value in current dive.
1676  *
1677  * @pre This method can be called if @p scip is in one of the following stages:
1678  * - \ref SCIP_STAGE_SOLVING
1679  *
1680  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1681  */
1682 SCIP_EXPORT
1684  SCIP* scip, /**< SCIP data structure */
1685  SCIP_VAR* var /**< variable to get the bound for */
1686  );
1687 
1688 /** gets variable's lower bound in current dive
1689  *
1690  * @return the variable's lower bound in current dive.
1691  *
1692  * @pre This method can be called if @p scip is in one of the following stages:
1693  * - \ref SCIP_STAGE_SOLVING
1694  *
1695  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1696  */
1697 SCIP_EXPORT
1699  SCIP* scip, /**< SCIP data structure */
1700  SCIP_VAR* var /**< variable to get the bound for */
1701  );
1702 
1703 /** gets variable's upper bound in current dive
1704  *
1705  * @return the variable's upper bound in current dive.
1706  *
1707  * @pre This method can be called if @p scip is in one of the following stages:
1708  * - \ref SCIP_STAGE_SOLVING
1709  *
1710  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1711  */
1712 SCIP_EXPORT
1714  SCIP* scip, /**< SCIP data structure */
1715  SCIP_VAR* var /**< variable to get the bound for */
1716  );
1717 /** solves the LP of the current dive; no separation or pricing is applied
1718  *
1719  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1720  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1721  *
1722  * @pre This method can be called if @p scip is in one of the following stages:
1723  * - \ref SCIP_STAGE_SOLVING
1724  *
1725  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1726  *
1727  * @note be aware that the LP solve may take longer than expected if SCIPgetLPSolstat(scip) != SCIP_LPSOLSTAT_OPTIMAL,
1728  * compare the explanation of SCIPstartDive()
1729  */
1730 SCIP_EXPORT
1732  SCIP* scip, /**< SCIP data structure */
1733  int itlim, /**< maximal number of LP iterations to perform, or -1 for no limit */
1734  SCIP_Bool* lperror, /**< pointer to store whether an unresolved LP error occurred */
1735  SCIP_Bool* cutoff /**< pointer to store whether the diving LP was infeasible or the objective
1736  * limit was reached (or NULL, if not needed) */
1737  );
1738 
1739 /** returns the number of the node in the current branch and bound run, where the last LP was solved in diving
1740  * or probing mode
1741  *
1742  * @return the number of the node in the current branch and bound run, where the last LP was solved in diving
1743  * or probing mode.
1744  *
1745  * @pre This method can be called if @p scip is in one of the following stages:
1746  * - \ref SCIP_STAGE_TRANSFORMING
1747  * - \ref SCIP_STAGE_TRANSFORMED
1748  * - \ref SCIP_STAGE_INITPRESOLVE
1749  * - \ref SCIP_STAGE_PRESOLVING
1750  * - \ref SCIP_STAGE_EXITPRESOLVE
1751  * - \ref SCIP_STAGE_PRESOLVED
1752  * - \ref SCIP_STAGE_INITSOLVE
1753  * - \ref SCIP_STAGE_SOLVING
1754  * - \ref SCIP_STAGE_SOLVED
1755  * - \ref SCIP_STAGE_EXITSOLVE
1756  * - \ref SCIP_STAGE_FREETRANS
1757  *
1758  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1759  */
1760 SCIP_EXPORT
1762  SCIP* scip /**< SCIP data structure */
1763  );
1764 
1765 /** returns whether we are in diving mode
1766  *
1767  * @return whether we are in diving mode.
1768  *
1769  * @pre This method can be called if @p scip is in one of the following stages:
1770  * - \ref SCIP_STAGE_TRANSFORMING
1771  * - \ref SCIP_STAGE_TRANSFORMED
1772  * - \ref SCIP_STAGE_INITPRESOLVE
1773  * - \ref SCIP_STAGE_PRESOLVING
1774  * - \ref SCIP_STAGE_EXITPRESOLVE
1775  * - \ref SCIP_STAGE_PRESOLVED
1776  * - \ref SCIP_STAGE_INITSOLVE
1777  * - \ref SCIP_STAGE_SOLVING
1778  * - \ref SCIP_STAGE_SOLVED
1779  * - \ref SCIP_STAGE_EXITSOLVE
1780  * - \ref SCIP_STAGE_FREETRANS
1781  *
1782  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1783  */
1784 SCIP_EXPORT
1786  SCIP* scip /**< SCIP data structure */
1787  );
1788 
1789 /** computes two measures for dual degeneracy (dual degeneracy rate and variable-constraint ratio)
1790  * based on the changes applied when reducing the problem to the optimal face
1791  *
1792  * returns the dual degeneracy rate, i.e., the share of nonbasic variables with reduced cost 0
1793  * and the variable-constraint ratio, i.e., the number of unfixed variables in relation to the basis size
1794  */
1795 SCIP_EXPORT
1797  SCIP* scip, /**< SCIP data structure */
1798  SCIP_Real* degeneracy, /**< pointer to store the dual degeneracy rate */
1799  SCIP_Real* varconsratio /**< pointer to store the variable constraint ratio */
1800  );
1801 
1802 /**@} */
1803 
1804 #ifdef __cplusplus
1805 }
1806 #endif
1807 
1808 #endif
SCIP_RETCODE SCIPaddVarsToRowSameCoef(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real val)
Definition: scip_lp.c:1758
SCIP_ROW ** SCIPgetLPRows(SCIP *scip)
Definition: scip_lp.c:596
SCIP_RETCODE SCIPcreateRowSepa(SCIP *scip, SCIP_ROW **row, SCIP_SEPA *sepa, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: scip_lp.c:1284
SCIP_RETCODE SCIPcreateEmptyRow(SCIP *scip, SCIP_ROW **row, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: scip_lp.c:1504
SCIP_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONS *cons, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: scip_lp.c:1413
SCIP_RETCODE SCIPgetLPBInvRow(SCIP *scip, int r, SCIP_Real *coefs, int *inds, int *ninds)
Definition: scip_lp.c:705
SCIP_RETCODE SCIPcomputeLPRelIntPoint(SCIP *scip, SCIP_Bool relaxrows, SCIP_Bool inclobjcutoff, SCIP_Real timelimit, int iterlimit, SCIP_SOL **point)
Definition: scip_lp.c:1085
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1626
type definitions for miscellaneous datastructures
SCIP_RETCODE SCIPcreateEmptyRowUnspec(SCIP *scip, SCIP_ROW **row, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: scip_lp.c:1473
SCIP_RETCODE SCIPrecalcRowLPActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1959
void SCIPsetLPFeastol(SCIP *scip, SCIP_Real newfeastol)
Definition: scip_lp.c:429
SCIP_RETCODE SCIPwriteLP(SCIP *scip, const char *filename)
Definition: scip_lp.c:892
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1649
SCIP_RETCODE SCIPcreateRowUnspec(SCIP *scip, SCIP_ROW **row, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: scip_lp.c:1318
SCIP_RETCODE SCIPcreateRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONS *cons, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: scip_lp.c:1250
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
Definition: scip_lp.c:1686
SCIP_Real SCIPgetRowPseudoFeasibility(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2049
SCIP_RETCODE SCIPgetLPDualDegeneracy(SCIP *scip, SCIP_Real *degeneracy, SCIP_Real *varconsratio)
Definition: scip_lp.c:2777
SCIP_Real SCIPgetColRedcost(SCIP *scip, SCIP_COL *col)
Definition: scip_lp.c:1145
SCIP_RETCODE SCIPaddRowDive(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2468
SCIP_RETCODE SCIPgetLPI(SCIP *scip, SCIP_LPI **lpi)
Definition: scip_lp.c:976
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_RETCODE SCIPchgVarLbDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_lp.c:2404
SCIP_RETCODE SCIPgetLPBInvCol(SCIP *scip, int c, SCIP_Real *coefs, int *inds, int *ninds)
Definition: scip_lp.c:740
SCIP_Real SCIPgetLPFeastol(SCIP *scip)
Definition: scip_lp.c:419
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPrecalcRowActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2067
SCIP_RETCODE SCIPcreateRow(SCIP *scip, SCIP_ROW **row, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: scip_lp.c:1352
SCIP_Bool SCIPisLPDualReliable(SCIP *scip)
Definition: scip_lp.c:198
SCIP_RETCODE SCIPconstructLP(SCIP *scip, SCIP_Bool *cutoff)
Definition: scip_lp.c:115
enum SCIP_LPSolStat SCIP_LPSOLSTAT
Definition: type_lp.h:42
SCIP_RETCODE SCIPgetLPColsData(SCIP *scip, SCIP_COL ***cols, int *ncols)
Definition: scip_lp.c:462
SCIP_Bool SCIPisRootLPRelax(SCIP *scip)
Definition: scip_lp.c:342
SCIP_Real SCIPgetRowFeasibility(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2109
SCIP_Real SCIPgetRowMaxCoef(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1907
SCIP_Real SCIPgetRowMaxActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1941
type definitions for LP management
SCIP_Bool SCIPisLPConstructed(SCIP *scip)
Definition: scip_lp.c:92
SCIP_Bool SCIPisLPRelax(SCIP *scip)
Definition: scip_lp.c:216
SCIP_Bool SCIPisLPSolBasic(SCIP *scip)
Definition: scip_lp.c:658
SCIP_RETCODE SCIPchgRowLhsDive(SCIP *scip, SCIP_ROW *row, SCIP_Real newlhs)
Definition: scip_lp.c:2507
SCIP_Real SCIPgetLPLooseObjval(SCIP *scip)
Definition: scip_lp.c:274
SCIP_Real SCIPgetVarUbDive(SCIP *scip, SCIP_VAR *var)
Definition: scip_lp.c:2630
void SCIPmarkRowNotRemovableLocal(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1853
SCIP_Real SCIPgetRowMinCoef(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1889
SCIP_RETCODE SCIPsolveDiveLP(SCIP *scip, int itlim, SCIP_Bool *lperror, SCIP_Bool *cutoff)
Definition: scip_lp.c:2663
SCIP_RETCODE SCIPrecalcRowPseudoActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2013
type definitions for SCIP&#39;s main datastructure
SCIP_RETCODE SCIPchgCutoffboundDive(SCIP *scip, SCIP_Real newcutoffbound)
Definition: scip_lp.c:2333
SCIP_RETCODE SCIPsumLPRows(SCIP *scip, SCIP_Real *weights, SCIP_REALARRAY *sumcoef, SCIP_Real *sumlhs, SCIP_Real *sumrhs)
Definition: scip_lp.c:843
void SCIPresetLPFeastol(SCIP *scip)
Definition: scip_lp.c:443
type definitions for specific LP solvers interface
int SCIPgetNLPRows(SCIP *scip)
Definition: scip_lp.c:617
int SCIPgetNUnfixedLPCols(SCIP *scip)
Definition: scip_lp.c:539
type definitions for problem variables
SCIP_Real SCIPgetRowLPActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1978
SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)
Definition: scip_lp.c:74
SCIP_RETCODE SCIPgetLPBInvACol(SCIP *scip, int c, SCIP_Real *coefs, int *inds, int *ninds)
Definition: scip_lp.c:810
SCIP_Longint SCIPgetLastDivenode(SCIP *scip)
Definition: scip_lp.c:2730
SCIP_Real SCIPgetRowObjParallelism(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2175
SCIP_RETCODE SCIPgetLPBInvARow(SCIP *scip, int r, SCIP_Real *binvrow, SCIP_Real *coefs, int *inds, int *ninds)
Definition: scip_lp.c:776
#define SCIP_Bool
Definition: def.h:84
SCIP_RETCODE SCIPchgRowRhs(SCIP *scip, SCIP_ROW *row, SCIP_Real rhs)
Definition: scip_lp.c:1598
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
Definition: scip_lp.c:159
SCIP_Real SCIPgetRowPseudoActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2032
int SCIPgetRowNumIntCols(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1871
SCIP_RETCODE SCIPchgVarUbDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_lp.c:2436
SCIP_RETCODE SCIPcaptureRow(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1531
SCIP_Bool SCIPisLPPrimalReliable(SCIP *scip)
Definition: scip_lp.c:180
SCIP_RETCODE SCIPcreateEmptyRowSepa(SCIP *scip, SCIP_ROW **row, SCIP_SEPA *sepa, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: scip_lp.c:1444
SCIP_RETCODE SCIPchgRowLhs(SCIP *scip, SCIP_ROW *row, SCIP_Real lhs)
Definition: scip_lp.c:1574
SCIP_Real SCIPgetLPRootLooseObjval(SCIP *scip)
Definition: scip_lp.c:409
void SCIPmarkColNotRemovableLocal(SCIP *scip, SCIP_COL *col)
Definition: scip_lp.c:1193
SCIP_Real SCIPgetLPRootColumnObjval(SCIP *scip)
Definition: scip_lp.c:386
SCIP_RETCODE SCIPgetLPBasisInd(SCIP *scip, int *basisind)
Definition: scip_lp.c:677
SCIP_COL ** SCIPgetLPCols(SCIP *scip)
Definition: scip_lp.c:497
SCIP_RETCODE SCIPflushLP(SCIP *scip)
Definition: scip_lp.c:139
SCIP_Real SCIPgetRowSolActivity(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
Definition: scip_lp.c:2129
type definitions for storing primal CIP solutions
SCIP_Real * r
Definition: circlepacking.c:50
SCIP_Bool SCIPinDive(SCIP *scip)
Definition: scip_lp.c:2760
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
Definition: scip_lp.c:1553
SCIP_RETCODE SCIPprintLPSolutionQuality(SCIP *scip, FILE *file)
Definition: scip_lp.c:1012
SCIP_Real SCIPgetLPObjval(SCIP *scip)
Definition: scip_lp.c:238
SCIP_RETCODE SCIPwriteMIP(SCIP *scip, const char *filename, SCIP_Bool genericnames, SCIP_Bool origobj, SCIP_Bool lazyconss)
Definition: scip_lp.c:926
SCIP_RETCODE SCIPinterruptLP(SCIP *scip, SCIP_Bool interrupt)
Definition: scip_lp.c:865
SCIP_RETCODE SCIPchgVarObjDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
Definition: scip_lp.c:2363
type definitions for separators
SCIP_Real SCIPgetRowLPFeasibility(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1995
#define SCIP_Real
Definition: def.h:177
SCIP_RETCODE SCIPaddVarsToRow(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
Definition: scip_lp.c:1712
SCIP_Real SCIPgetRowMinActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1924
SCIP_Real SCIPgetGlobalPseudoObjval(SCIP *scip)
Definition: scip_lp.c:299
SCIP_RETCODE SCIPcreateRowConshdlr(SCIP *scip, SCIP_ROW **row, SCIP_CONSHDLR *conshdlr, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: scip_lp.c:1216
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
Definition: scip_lp.c:2197
SCIP_RETCODE SCIPcalcRowIntegralScalar(SCIP *scip, SCIP_ROW *row, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Bool usecontvars, SCIP_Real *intscalar, SCIP_Bool *success)
Definition: scip_lp.c:1800
#define SCIP_Longint
Definition: def.h:162
SCIP_Bool SCIPallColsInLP(SCIP *scip)
Definition: scip_lp.c:640
SCIP_Real SCIPgetRowSolFeasibility(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
Definition: scip_lp.c:2152
SCIP_Real SCIPgetVarLbDive(SCIP *scip, SCIP_VAR *var)
Definition: scip_lp.c:2601
SCIP_RETCODE SCIPstartDive(SCIP *scip)
Definition: scip_lp.c:2227
SCIP_Real SCIPgetLPRootObjval(SCIP *scip)
Definition: scip_lp.c:363
SCIP_Real SCIPgetColFarkasCoef(SCIP *scip, SCIP_COL *col)
Definition: scip_lp.c:1171
int SCIPgetNLPCols(SCIP *scip)
Definition: scip_lp.c:518
SCIP_RETCODE SCIPgetLPRowsData(SCIP *scip, SCIP_ROW ***rows, int *nrows)
Definition: scip_lp.c:561
common defines and data types used in all packages of SCIP
SCIP_Real SCIPgetPseudoObjval(SCIP *scip)
Definition: scip_lp.c:324
SCIP_RETCODE SCIPendDive(SCIP *scip)
Definition: scip_lp.c:2276
SCIP_RETCODE SCIPcreateEmptyRowConshdlr(SCIP *scip, SCIP_ROW **row, SCIP_CONSHDLR *conshdlr, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: scip_lp.c:1382
SCIP_RETCODE SCIPchgRowRhsDive(SCIP *scip, SCIP_ROW *row, SCIP_Real newrhs)
Definition: scip_lp.c:2540
SCIP_RETCODE SCIPmakeRowIntegral(SCIP *scip, SCIP_ROW *row, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Bool usecontvars, SCIP_Bool *success)
Definition: scip_lp.c:1829
SCIP_Real SCIPgetVarObjDive(SCIP *scip, SCIP_VAR *var)
Definition: scip_lp.c:2572
type definitions for constraints and constraint handlers
SCIP_Real SCIPgetRowActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2089
SCIP_Real SCIPgetLPColumnObjval(SCIP *scip)
Definition: scip_lp.c:256