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