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-2023 Zuse Institute Berlin (ZIB) */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file 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  * @note When several variables are added to a row with the use of this function, performance can be improved by
1173  * calling SCIPcacheRowExtensions() before these additions and SCIPflushRowExtensions() after.
1174  */
1175 SCIP_EXPORT
1177  SCIP* scip, /**< SCIP data structure */
1178  SCIP_ROW* row, /**< LP row */
1179  SCIP_VAR* var, /**< problem variable */
1180  SCIP_Real val /**< value of coefficient */
1181  );
1182 
1183 /** resolves variables to columns and adds them with the coefficients to the row;
1184  * this method caches the row extensions and flushes them afterwards to gain better performance
1185  *
1186  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1187  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1188  *
1189  * @attention If a coefficients absolute value is below the SCIP epsilon tolerance, the variable with its value is not added.
1190  *
1191  * @pre this method can be called in one of the following stages of the SCIP solving process:
1192  * - \ref SCIP_STAGE_INITSOLVE
1193  * - \ref SCIP_STAGE_SOLVING
1194  */
1195 SCIP_EXPORT
1197  SCIP* scip, /**< SCIP data structure */
1198  SCIP_ROW* row, /**< LP row */
1199  int nvars, /**< number of variables to add to the row */
1200  SCIP_VAR** vars, /**< problem variables to add */
1201  SCIP_Real* vals /**< values of coefficients */
1202  );
1203 
1204 /** resolves variables to columns and adds them with the same single coefficient to the row;
1205  * this method caches the row extensions and flushes them afterwards to gain better performance
1206  *
1207  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1208  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1209  *
1210  * @attention If the absolute value of val is below the SCIP epsilon tolerance, the variables will not added.
1211  *
1212  * @pre this method can be called in one of the following stages of the SCIP solving process:
1213  * - \ref SCIP_STAGE_INITSOLVE
1214  * - \ref SCIP_STAGE_SOLVING
1215  */
1216 SCIP_EXPORT
1218  SCIP* scip, /**< SCIP data structure */
1219  SCIP_ROW* row, /**< LP row */
1220  int nvars, /**< number of variables to add to the row */
1221  SCIP_VAR** vars, /**< problem variables to add */
1222  SCIP_Real val /**< unique value of all coefficients */
1223  );
1224 
1225 /** tries to find a value, such that all row coefficients, if scaled with this value become integral
1226  *
1227  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1228  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1229  *
1230  * @pre this method can be called in one of the following stages of the SCIP solving process:
1231  * - \ref SCIP_STAGE_INITSOLVE
1232  * - \ref SCIP_STAGE_SOLVING
1233  */
1234 SCIP_EXPORT
1236  SCIP* scip, /**< SCIP data structure */
1237  SCIP_ROW* row, /**< LP row */
1238  SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
1239  SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
1240  SCIP_Longint maxdnom, /**< maximal denominator allowed in rational numbers */
1241  SCIP_Real maxscale, /**< maximal allowed scalar */
1242  SCIP_Bool usecontvars, /**< should the coefficients of the continuous variables also be made integral? */
1243  SCIP_Real* intscalar, /**< pointer to store scalar that would make the coefficients integral, or NULL */
1244  SCIP_Bool* success /**< stores whether returned value is valid */
1245  );
1246 
1247 /** tries to scale row, s.t. all coefficients (of integer variables) become integral
1248  *
1249  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1250  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1251  *
1252  * @pre this method can be called in one of the following stages of the SCIP solving process:
1253  * - \ref SCIP_STAGE_INITSOLVE
1254  * - \ref SCIP_STAGE_SOLVING
1255  */
1256 SCIP_EXPORT
1258  SCIP* scip, /**< SCIP data structure */
1259  SCIP_ROW* row, /**< LP row */
1260  SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
1261  SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
1262  SCIP_Longint maxdnom, /**< maximal denominator allowed in rational numbers */
1263  SCIP_Real maxscale, /**< maximal value to scale row with */
1264  SCIP_Bool usecontvars, /**< should the coefficients of the continuous variables also be made integral? */
1265  SCIP_Bool* success /**< stores whether row could be made rational */
1266  );
1267 
1268 /** marks a row to be not removable from the LP in the current node
1269  *
1270  * @pre this method can be called in the following stage of the SCIP solving process:
1271  * - \ref SCIP_STAGE_SOLVING
1272  */
1273 SCIP_EXPORT
1275  SCIP* scip, /**< SCIP data structure */
1276  SCIP_ROW* row /**< LP row */
1277  );
1278 
1279 /** returns number of integral columns in the row
1280  *
1281  * @return number of integral columns in the row
1282  *
1283  * @pre this method can be called in one of the following stages of the SCIP solving process:
1284  * - \ref SCIP_STAGE_INITSOLVE
1285  * - \ref SCIP_STAGE_SOLVING
1286  */
1287 SCIP_EXPORT
1289  SCIP* scip, /**< SCIP data structure */
1290  SCIP_ROW* row /**< LP row */
1291  );
1292 
1293 /** returns minimal absolute value of row vector's non-zero coefficients
1294  *
1295  * @return minimal absolute value of row vector's non-zero coefficients
1296  *
1297  * @pre this method can be called in one of the following stages of the SCIP solving process:
1298  * - \ref SCIP_STAGE_INITSOLVE
1299  * - \ref SCIP_STAGE_SOLVING
1300  */
1301 SCIP_EXPORT
1303  SCIP* scip, /**< SCIP data structure */
1304  SCIP_ROW* row /**< LP row */
1305  );
1306 
1307 /** returns maximal absolute value of row vector's non-zero coefficients
1308  *
1309  * @return maximal absolute value of row vector's non-zero coefficients
1310  *
1311  * @pre this method can be called in one of the following stages of the SCIP solving process:
1312  * - \ref SCIP_STAGE_INITSOLVE
1313  * - \ref SCIP_STAGE_SOLVING
1314  */
1315 SCIP_EXPORT
1317  SCIP* scip, /**< SCIP data structure */
1318  SCIP_ROW* row /**< LP row */
1319  );
1320 
1321 /** returns the minimal activity of a row w.r.t. the column's bounds
1322  *
1323  * @return the minimal activity of a row w.r.t. the column's bounds
1324  *
1325  * @pre this method can be called in one of the following stages of the SCIP solving process:
1326  * - \ref SCIP_STAGE_SOLVING
1327  */
1328 SCIP_EXPORT
1330  SCIP* scip, /**< SCIP data structure */
1331  SCIP_ROW* row /**< LP row */
1332  );
1333 
1334 /** returns the maximal activity of a row w.r.t. the column's bounds
1335  *
1336  * @return the maximal activity of a row w.r.t. the column's bounds
1337  *
1338  * @pre this method can be called in one of the following stages of the SCIP solving process:
1339  * - \ref SCIP_STAGE_SOLVING
1340  */
1341 SCIP_EXPORT
1343  SCIP* scip, /**< SCIP data structure */
1344  SCIP_ROW* row /**< LP row */
1345  );
1346 
1347 /** recalculates the activity of a row in the last LP solution
1348  *
1349  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1350  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1351  *
1352  * @pre this method can be called in one of the following stages of the SCIP solving process:
1353  * - \ref SCIP_STAGE_SOLVING
1354  */
1355 SCIP_EXPORT
1357  SCIP* scip, /**< SCIP data structure */
1358  SCIP_ROW* row /**< LP row */
1359  );
1360 
1361 /** returns the activity of a row in the last LP solution
1362  *
1363  * @return activity of a row in the last LP solution
1364  *
1365  * @pre this method can be called in one of the following stages of the SCIP solving process:
1366  * - \ref SCIP_STAGE_SOLVING
1367  */
1368 SCIP_EXPORT
1370  SCIP* scip, /**< SCIP data structure */
1371  SCIP_ROW* row /**< LP row */
1372  );
1373 
1374 /** returns the feasibility of a row in the last LP solution
1375  *
1376  * @return the feasibility of a row in the last LP solution: negative value means infeasibility
1377  *
1378  * @pre this method can be called in one of the following stages of the SCIP solving process:
1379  * - \ref SCIP_STAGE_SOLVING
1380  */
1381 SCIP_EXPORT
1383  SCIP* scip, /**< SCIP data structure */
1384  SCIP_ROW* row /**< LP row */
1385  );
1386 
1387 /** recalculates the activity of a row for the current pseudo solution
1388  *
1389  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1390  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1391  *
1392  * @pre this method can be called in one of the following stages of the SCIP solving process:
1393  * - \ref SCIP_STAGE_SOLVING
1394  */
1395 SCIP_EXPORT
1397  SCIP* scip, /**< SCIP data structure */
1398  SCIP_ROW* row /**< LP row */
1399  );
1400 
1401 /** returns the activity of a row for the current pseudo solution
1402  *
1403  * @return the activity of a row for the current pseudo solution
1404  *
1405  * @pre this method can be called in one of the following stages of the SCIP solving process:
1406  * - \ref SCIP_STAGE_SOLVING
1407  */
1408 SCIP_EXPORT
1410  SCIP* scip, /**< SCIP data structure */
1411  SCIP_ROW* row /**< LP row */
1412  );
1413 
1414 /** returns the feasibility of a row for the current pseudo solution: negative value means infeasibility
1415  *
1416  * @return the feasibility of a row for the current pseudo solution: negative value means infeasibility
1417  *
1418  * @pre this method can be called in one of the following stages of the SCIP solving process:
1419  * - \ref SCIP_STAGE_SOLVING
1420  */
1421 SCIP_EXPORT
1423  SCIP* scip, /**< SCIP data structure */
1424  SCIP_ROW* row /**< LP row */
1425  );
1426 
1427 /** recalculates the activity of a row in the last LP or pseudo solution
1428  *
1429  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1430  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1431  *
1432  * @pre this method can be called in one of the following stages of the SCIP solving process:
1433  * - \ref SCIP_STAGE_SOLVING
1434  */
1435 SCIP_EXPORT
1437  SCIP* scip, /**< SCIP data structure */
1438  SCIP_ROW* row /**< LP row */
1439  );
1440 
1441 /** returns the activity of a row in the last LP or pseudo solution
1442  *
1443  * @return the activity of a row in the last LP or pseudo solution
1444  *
1445  * @pre this method can be called in one of the following stages of the SCIP solving process:
1446  * - \ref SCIP_STAGE_SOLVING
1447  */
1448 SCIP_EXPORT
1450  SCIP* scip, /**< SCIP data structure */
1451  SCIP_ROW* row /**< LP row */
1452  );
1453 
1454 /** returns the feasibility of a row in the last LP or pseudo solution
1455  *
1456  * @return the feasibility of a row in the last LP or pseudo solution
1457  *
1458  * @pre this method can be called in one of the following stages of the SCIP solving process:
1459  * - \ref SCIP_STAGE_SOLVING
1460  */
1461 SCIP_EXPORT
1463  SCIP* scip, /**< SCIP data structure */
1464  SCIP_ROW* row /**< LP row */
1465  );
1466 
1467 /** returns the activity of a row for the given primal solution
1468  *
1469  * @return the activitiy of a row for the given primal solution
1470  *
1471  * @pre this method can be called in one of the following stages of the SCIP solving process:
1472  * - \ref SCIP_STAGE_SOLVING
1473  */
1474 SCIP_EXPORT
1476  SCIP* scip, /**< SCIP data structure */
1477  SCIP_ROW* row, /**< LP row */
1478  SCIP_SOL* sol /**< primal CIP solution */
1479  );
1480 
1481 /** returns the feasibility of a row for the given primal solution
1482  *
1483  * @return the feasibility of a row for the given primal solution
1484  *
1485  * @pre this method can be called in one of the following stages of the SCIP solving process:
1486  * - \ref SCIP_STAGE_SOLVING
1487  */
1488 SCIP_EXPORT
1490  SCIP* scip, /**< SCIP data structure */
1491  SCIP_ROW* row, /**< LP row */
1492  SCIP_SOL* sol /**< primal CIP solution */
1493  );
1494 
1495 /** returns the parallelism of row with objective function
1496  *
1497  * @return 1 is returned if the row is parallel to the objective function and 0 if it is orthogonal
1498  *
1499  * @pre this method can be called in one of the following stages of the SCIP solving process:
1500  * - \ref SCIP_STAGE_SOLVING
1501  */
1502 SCIP_EXPORT
1504  SCIP* scip, /**< SCIP data structure */
1505  SCIP_ROW* row /**< LP row */
1506  );
1507 
1508 /** output row to file stream via the message handler system
1509  *
1510  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1511  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1512  *
1513  * @pre this method can be called in one of the following stages of the SCIP solving process:
1514  * - \ref SCIP_STAGE_INITSOLVE
1515  * - \ref SCIP_STAGE_SOLVING
1516  * - \ref SCIP_STAGE_SOLVED
1517  * - \ref SCIP_STAGE_EXITSOLVE
1518  */
1519 SCIP_EXPORT
1521  SCIP* scip, /**< SCIP data structure */
1522  SCIP_ROW* row, /**< LP row */
1523  FILE* file /**< output file (or NULL for standard output) */
1524  );
1525 
1526 /**@} */
1527 
1528 /**@addtogroup PublicLPDivingMethods
1529  *
1530  * @{
1531  */
1532 
1533 /** initiates LP diving, making methods SCIPchgVarObjDive(), SCIPchgVarLbDive(), and SCIPchgVarUbDive() available
1534  *
1535  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1536  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1537  *
1538  * @pre This method can be called if @p scip is in one of the following stages:
1539  * - \ref SCIP_STAGE_SOLVING
1540  *
1541  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1542  *
1543  * @note diving is allowed even if the current LP is not flushed, not solved, or not solved to optimality; be aware
1544  * that solving the (first) diving LP may take longer than expect and that the latter two cases could stem from
1545  * numerical troubles during the last LP solve; because of this, most users will want to call this method only if
1546  * SCIPgetLPSolstat(scip) == SCIP_LPSOLSTAT_OPTIMAL
1547  */
1548 SCIP_EXPORT
1550  SCIP* scip /**< SCIP data structure */
1551  );
1552 
1553 /** quits LP diving and resets bounds and objective values of columns to the current node's values
1554  *
1555  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1556  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1557  *
1558  * @pre This method can be called if @p scip is in one of the following stages:
1559  * - \ref SCIP_STAGE_SOLVING
1560  *
1561  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1562  */
1563 SCIP_EXPORT
1565  SCIP* scip /**< SCIP data structure */
1566  );
1567 
1568 /** changes cutoffbound in current dive
1569  *
1570  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1571  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1572  *
1573  * @pre This method can be called if @p scip is in one of the following stages:
1574  * - \ref SCIP_STAGE_SOLVING
1575  *
1576  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1577  */
1578 SCIP_EXPORT
1580  SCIP* scip, /**< SCIP data structure */
1581  SCIP_Real newcutoffbound /**< new cutoffbound */
1582  );
1583 
1584 /** changes variable's objective value in current dive
1585  *
1586  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1587  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1588  *
1589  * @pre This method can be called if @p scip is in one of the following stages:
1590  * - \ref SCIP_STAGE_SOLVING
1591  *
1592  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1593  */
1594 SCIP_EXPORT
1596  SCIP* scip, /**< SCIP data structure */
1597  SCIP_VAR* var, /**< variable to change the objective value for */
1598  SCIP_Real newobj /**< new objective value */
1599  );
1600 
1601 /** changes variable's lower bound in current dive
1602  *
1603  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1604  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1605  *
1606  * @pre This method can be called if @p scip is in one of the following stages:
1607  * - \ref SCIP_STAGE_SOLVING
1608  *
1609  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1610  */
1611 SCIP_EXPORT
1613  SCIP* scip, /**< SCIP data structure */
1614  SCIP_VAR* var, /**< variable to change the bound for */
1615  SCIP_Real newbound /**< new value for bound */
1616  );
1617 
1618 /** changes variable's upper bound in current dive
1619  *
1620  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1621  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1622  *
1623  * @pre This method can be called if @p scip is in one of the following stages:
1624  * - \ref SCIP_STAGE_SOLVING
1625  *
1626  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1627  */
1628 SCIP_EXPORT
1630  SCIP* scip, /**< SCIP data structure */
1631  SCIP_VAR* var, /**< variable to change the bound for */
1632  SCIP_Real newbound /**< new value for bound */
1633  );
1634 
1635 /** adds a row to the LP in current dive
1636  *
1637  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1638  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1639  *
1640  * @pre This method can be called if @p scip is in one of the following stages:
1641  * - \ref SCIP_STAGE_SOLVING
1642  *
1643  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1644  */
1645 SCIP_EXPORT
1647  SCIP* scip, /**< SCIP data structure */
1648  SCIP_ROW* row /**< row to be added */
1649  );
1650 
1651 /** changes row lhs in current dive, change will be undone after diving ends, for permanent changes use SCIPchgRowLhs()
1652  *
1653  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1654  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1655  *
1656  * @pre This method can be called if @p scip is in one of the following stages:
1657  * - \ref SCIP_STAGE_SOLVING
1658  *
1659  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1660  */
1661 SCIP_EXPORT
1663  SCIP* scip, /**< SCIP data structure */
1664  SCIP_ROW* row, /**< row to change the lhs for */
1665  SCIP_Real newlhs /**< new value for lhs */
1666  );
1667 
1668 /** changes row rhs in current dive, change will be undone after diving ends, for permanent changes use SCIPchgRowRhs()
1669  *
1670  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1671  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1672  *
1673  * @pre This method can be called if @p scip is in one of the following stages:
1674  * - \ref SCIP_STAGE_SOLVING
1675  *
1676  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1677  */
1678 SCIP_EXPORT
1680  SCIP* scip, /**< SCIP data structure */
1681  SCIP_ROW* row, /**< row to change the lhs for */
1682  SCIP_Real newrhs /**< new value for rhs */
1683  );
1684 
1685 /** gets variable's objective value in current dive
1686  *
1687  * @return the variable's objective value in current dive.
1688  *
1689  * @pre This method can be called if @p scip is in one of the following stages:
1690  * - \ref SCIP_STAGE_SOLVING
1691  *
1692  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1693  */
1694 SCIP_EXPORT
1696  SCIP* scip, /**< SCIP data structure */
1697  SCIP_VAR* var /**< variable to get the bound for */
1698  );
1699 
1700 /** gets variable's lower bound in current dive
1701  *
1702  * @return the variable's lower bound in current dive.
1703  *
1704  * @pre This method can be called if @p scip is in one of the following stages:
1705  * - \ref SCIP_STAGE_SOLVING
1706  *
1707  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1708  */
1709 SCIP_EXPORT
1711  SCIP* scip, /**< SCIP data structure */
1712  SCIP_VAR* var /**< variable to get the bound for */
1713  );
1714 
1715 /** gets variable's upper bound in current dive
1716  *
1717  * @return the variable's upper bound in current dive.
1718  *
1719  * @pre This method can be called if @p scip is in one of the following stages:
1720  * - \ref SCIP_STAGE_SOLVING
1721  *
1722  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1723  */
1724 SCIP_EXPORT
1726  SCIP* scip, /**< SCIP data structure */
1727  SCIP_VAR* var /**< variable to get the bound for */
1728  );
1729 /** solves the LP of the current dive; no separation or pricing is applied
1730  *
1731  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1732  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1733  *
1734  * @pre This method can be called if @p scip is in one of the following stages:
1735  * - \ref SCIP_STAGE_SOLVING
1736  *
1737  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1738  *
1739  * @note be aware that the LP solve may take longer than expected if SCIPgetLPSolstat(scip) != SCIP_LPSOLSTAT_OPTIMAL,
1740  * compare the explanation of SCIPstartDive()
1741  */
1742 SCIP_EXPORT
1744  SCIP* scip, /**< SCIP data structure */
1745  int itlim, /**< maximal number of LP iterations to perform, or -1 for no limit */
1746  SCIP_Bool* lperror, /**< pointer to store whether an unresolved LP error occurred */
1747  SCIP_Bool* cutoff /**< pointer to store whether the diving LP was infeasible or the objective
1748  * limit was reached (or NULL, if not needed) */
1749  );
1750 
1751 /** returns 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  * @return the number of the node in the current branch and bound run, where the last LP was solved in diving
1755  * or probing mode.
1756  *
1757  * @pre This method can be called if @p scip is in one of the following stages:
1758  * - \ref SCIP_STAGE_TRANSFORMING
1759  * - \ref SCIP_STAGE_TRANSFORMED
1760  * - \ref SCIP_STAGE_INITPRESOLVE
1761  * - \ref SCIP_STAGE_PRESOLVING
1762  * - \ref SCIP_STAGE_EXITPRESOLVE
1763  * - \ref SCIP_STAGE_PRESOLVED
1764  * - \ref SCIP_STAGE_INITSOLVE
1765  * - \ref SCIP_STAGE_SOLVING
1766  * - \ref SCIP_STAGE_SOLVED
1767  * - \ref SCIP_STAGE_EXITSOLVE
1768  * - \ref SCIP_STAGE_FREETRANS
1769  *
1770  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1771  */
1772 SCIP_EXPORT
1774  SCIP* scip /**< SCIP data structure */
1775  );
1776 
1777 /** returns whether we are in diving mode
1778  *
1779  * @return whether we are in diving mode.
1780  *
1781  * @pre This method can be called if @p scip is in one of the following stages:
1782  * - \ref SCIP_STAGE_TRANSFORMING
1783  * - \ref SCIP_STAGE_TRANSFORMED
1784  * - \ref SCIP_STAGE_INITPRESOLVE
1785  * - \ref SCIP_STAGE_PRESOLVING
1786  * - \ref SCIP_STAGE_EXITPRESOLVE
1787  * - \ref SCIP_STAGE_PRESOLVED
1788  * - \ref SCIP_STAGE_INITSOLVE
1789  * - \ref SCIP_STAGE_SOLVING
1790  * - \ref SCIP_STAGE_SOLVED
1791  * - \ref SCIP_STAGE_EXITSOLVE
1792  * - \ref SCIP_STAGE_FREETRANS
1793  *
1794  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1795  */
1796 SCIP_EXPORT
1798  SCIP* scip /**< SCIP data structure */
1799  );
1800 
1801 /** computes two measures for dual degeneracy (dual degeneracy rate and variable-constraint ratio)
1802  * based on the changes applied when reducing the problem to the optimal face
1803  *
1804  * returns the dual degeneracy rate, i.e., the share of nonbasic variables with reduced cost 0
1805  * and the variable-constraint ratio, i.e., the number of unfixed variables in relation to the basis size
1806  */
1807 SCIP_EXPORT
1809  SCIP* scip, /**< SCIP data structure */
1810  SCIP_Real* degeneracy, /**< pointer to store the dual degeneracy rate */
1811  SCIP_Real* varconsratio /**< pointer to store the variable constraint ratio */
1812  );
1813 
1814 /**@} */
1815 
1816 #ifdef __cplusplus
1817 }
1818 #endif
1819 
1820 #endif
SCIP_RETCODE SCIPaddVarsToRowSameCoef(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real val)
Definition: scip_lp.c:1773
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:1974
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:1701
SCIP_Real SCIPgetRowPseudoFeasibility(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2064
SCIP_RETCODE SCIPgetLPDualDegeneracy(SCIP *scip, SCIP_Real *degeneracy, SCIP_Real *varconsratio)
Definition: scip_lp.c:2792
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:2483
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:2419
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:2082
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:2124
SCIP_Real SCIPgetRowMaxCoef(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1922
SCIP_Real SCIPgetRowMaxActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1956
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:2522
SCIP_Real SCIPgetLPLooseObjval(SCIP *scip)
Definition: scip_lp.c:283
SCIP_Real SCIPgetVarUbDive(SCIP *scip, SCIP_VAR *var)
Definition: scip_lp.c:2645
void SCIPmarkRowNotRemovableLocal(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1868
SCIP_Real SCIPgetRowMinCoef(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1904
SCIP_RETCODE SCIPsolveDiveLP(SCIP *scip, int itlim, SCIP_Bool *lperror, SCIP_Bool *cutoff)
Definition: scip_lp.c:2678
SCIP_RETCODE SCIPrecalcRowPseudoActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2028
type definitions for SCIP&#39;s main datastructure
SCIP_RETCODE SCIPchgCutoffboundDive(SCIP *scip, SCIP_Real newcutoffbound)
Definition: scip_lp.c:2348
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:1993
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:2745
SCIP_Real SCIPgetRowObjParallelism(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2190
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:2047
int SCIPgetRowNumIntCols(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1886
SCIP_RETCODE SCIPchgVarUbDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_lp.c:2451
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:2144
type definitions for storing primal CIP solutions
SCIP_Real * r
Definition: circlepacking.c:59
SCIP_Bool SCIPinDive(SCIP *scip)
Definition: scip_lp.c:2775
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:2378
type definitions for separators
SCIP_Real SCIPgetRowLPFeasibility(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2010
#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:1727
SCIP_Real SCIPgetRowMinActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1939
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:2212
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:1815
#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:2167
SCIP_Real SCIPgetVarLbDive(SCIP *scip, SCIP_VAR *var)
Definition: scip_lp.c:2616
SCIP_RETCODE SCIPstartDive(SCIP *scip)
Definition: scip_lp.c:2242
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:2291
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:2555
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:1844
SCIP_Real SCIPgetVarObjDive(SCIP *scip, SCIP_VAR *var)
Definition: scip_lp.c:2587
type definitions for constraints and constraint handlers
SCIP_Real SCIPgetRowActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2104
SCIP_Real SCIPgetLPColumnObjval(SCIP *scip)
Definition: scip_lp.c:265