Scippy

SCIP

Solving Constraint Integer Programs

scip_lp.c
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.c
26  * @ingroup OTHER_CFILES
27  * @brief public methods for the LP relaxation, rows and columns
28  * @author Tobias Achterberg
29  * @author Timo Berthold
30  * @author Gerald Gamrath
31  * @author Leona Gottwald
32  * @author Stefan Heinz
33  * @author Gregor Hendel
34  * @author Thorsten Koch
35  * @author Alexander Martin
36  * @author Marc Pfetsch
37  * @author Michael Winkler
38  * @author Kati Wolter
39  *
40  * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
41  */
42 
43 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
44 
45 #include "blockmemshell/memory.h"
46 #include "lpi/lpi.h"
47 #include "scip/conflict.h"
48 #include "scip/debug.h"
49 #include "scip/lp.h"
50 #include "scip/prob.h"
51 #include "scip/pub_lp.h"
52 #include "scip/pub_message.h"
53 #include "scip/pub_tree.h"
54 #include "scip/scip_lp.h"
55 #include "scip/scip_mem.h"
56 #include "scip/scip_numerics.h"
57 #include "scip/scip_sol.h"
58 #include "scip/scip_solvingstats.h"
59 #include "scip/scip_tree.h"
60 #include "scip/scip_var.h"
61 #include "scip/set.h"
62 #include "scip/solve.h"
63 #include "scip/struct_lp.h"
64 #include "scip/struct_mem.h"
65 #include "scip/struct_primal.h"
66 #include "scip/struct_prob.h"
67 #include "scip/struct_scip.h"
68 #include "scip/struct_set.h"
69 #include "scip/struct_stat.h"
70 #include "scip/struct_tree.h"
71 #include "scip/tree.h"
72 #include "scip/var.h"
73 
74 /** returns, whether the LP was or is to be solved in the current node
75  *
76  * @return whether the LP was or is to be solved in the current node.
77  *
78  * @pre This method can be called if @p scip is in one of the following stages:
79  * - \ref SCIP_STAGE_SOLVING
80  *
81  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
82  */
84  SCIP* scip /**< SCIP data structure */
85  )
86 {
87  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPhasCurrentNodeLP", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
88 
89  return SCIPtreeHasCurrentNodeLP(scip->tree);
90 }
91 
92 /** returns, whether the LP of the current node is already constructed
93  *
94  * @return whether the LP of the current node is already constructed.
95  *
96  * @pre This method can be called if @p scip is in one of the following stages:
97  * - \ref SCIP_STAGE_SOLVING
98  *
99  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
100  */
102  SCIP* scip /**< SCIP data structure */
103  )
104 {
105  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisLPConstructed", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
106 
108 }
109 
110 /** makes sure that the LP of the current node is loaded and may be accessed through the LP information methods
111  *
112  * @warning Contructing the LP might change the amount of variables known in the transformed problem and therefore also
113  * the variables array of SCIP (returned by SCIPgetVars() and SCIPgetVarsData()), so it might be necessary to
114  * call one of the later method after this one
115  *
116  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
117  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
118  *
119  * @pre This method can be called if @p scip is in one of the following stages:
120  * - \ref SCIP_STAGE_SOLVING
121  *
122  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
123  */
125  SCIP* scip, /**< SCIP data structure */
126  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
127  )
128 {
129  SCIP_CALL( SCIPcheckStage(scip, "SCIPconstructLP", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
130 
131  SCIP_CALL( SCIPconstructCurrentLP(scip->mem->probmem, scip->set, scip->stat, scip->transprob, scip->origprob,
132  scip->tree, scip->reopt, scip->lp, scip->pricestore, scip->sepastore, scip->cutpool, scip->branchcand,
133  scip->eventqueue, scip->eventfilter, scip->cliquetable, FALSE, cutoff) );
134 
135  return SCIP_OKAY;
136 }
137 
138 /** makes sure that the LP of the current node is flushed
139  *
140  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
141  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
142  *
143  * @pre This method can be called if @p scip is in one of the following stages:
144  * - \ref SCIP_STAGE_SOLVING
145  *
146  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
147  */
149  SCIP* scip /**< SCIP data structure */
150  )
151 {
153 
154  SCIP_CALL( SCIPlpFlush(scip->lp, scip->mem->probmem, scip->set, scip->transprob, scip->eventqueue) );
155 
156  return SCIP_OKAY;
157 }
158 
159 /** gets solution status of current LP
160  *
161  * @return the solution status of current LP.
162  *
163  * @pre This method can be called if @p scip is in one of the following stages:
164  * - \ref SCIP_STAGE_SOLVING
165  *
166  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
167  */
169  SCIP* scip /**< SCIP data structure */
170  )
171 {
172  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLPSolstat", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
173 
175  return SCIPlpGetSolstat(scip->lp);
176  else
178 }
179 
180 /** returns whether the current LP solution passed the primal feasibility check
181  *
182  * @return whether the current LP solution passed the primal feasibility check.
183  *
184  * @pre This method can be called if @p scip is in one of the following stages:
185  * - \ref SCIP_STAGE_SOLVING
186  *
187  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
188  */
190  SCIP* scip /**< SCIP data structure */
191  )
192 {
193  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisLPPrimalReliable", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
194 
195  return SCIPlpIsPrimalReliable(scip->lp);
196 }
197 
198 /** returns whether the current LP solution passed the dual feasibility check
199  *
200  * @returns whether the current LP solution passed the dual feasibility check.
201  *
202  * @pre This method can be called if @p scip is in one of the following stages:
203  * - \ref SCIP_STAGE_SOLVING
204  *
205  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
206  */
208  SCIP* scip /**< SCIP data structure */
209  )
210 {
211  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisLPDualReliable", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
212 
213  return SCIPlpIsDualReliable(scip->lp);
214 }
215 
216 /** returns whether the current lp is a relaxation of the current problem and its optimal objective value is a local lower bound
217  *
218  * @return whether the current lp is a relaxation of the current problem and its optimal objective value is a local lower bound.
219  *
220  * @pre This method can be called if @p scip is in one of the following stages:
221  * - \ref SCIP_STAGE_SOLVING
222  *
223  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
224  */
226  SCIP* scip /**< SCIP data structure */
227  )
228 {
230 
231  return SCIPlpIsRelax(scip->lp);
232 }
233 
234 /** gets objective value of current LP (which is the sum of column and loose objective value)
235  *
236  * @return the objective value of current LP (which is the sum of column and loose objective value).
237  *
238  * @pre This method can be called if @p scip is in one of the following stages:
239  * - \ref SCIP_STAGE_SOLVING
240  *
241  * @note This method returns the objective value of the current LP solution, which might be primal or dual infeasible
242  * if a limit was hit during solving. It must not be used as a dual bound if the LP solution status returned by
243  * SCIPgetLPSolstat() is SCIP_LPSOLSTAT_ITERLIMIT or SCIP_LPSOLSTAT_TIMELIMIT.
244  *
245  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
246  */
248  SCIP* scip /**< SCIP data structure */
249  )
250 {
252 
253  return SCIPlpGetObjval(scip->lp, scip->set, scip->transprob);
254 }
255 
256 /** gets part of objective value of current LP that results from COLUMN variables only
257  *
258  * @return the part of objective value of current LP that results from COLUMN variables only.
259  *
260  * @pre This method can be called if @p scip is in one of the following stages:
261  * - \ref SCIP_STAGE_SOLVING
262  *
263  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
264  */
266  SCIP* scip /**< SCIP data structure */
267  )
268 {
269  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLPColumnObjval", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
270 
271  return SCIPlpGetColumnObjval(scip->lp);
272 }
273 
274 /** gets part of objective value of current LP that results from LOOSE variables only
275  *
276  * @return part of objective value of current LP that results from LOOSE variables only.
277  *
278  * @pre This method can be called if @p scip is in one of the following stages:
279  * - \ref SCIP_STAGE_SOLVING
280  *
281  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
282  */
284  SCIP* scip /**< SCIP data structure */
285  )
286 {
287  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLPLooseObjval", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
288 
289  return SCIPlpGetLooseObjval(scip->lp, scip->set, scip->transprob);
290 }
291 
292 /** gets the global pseudo objective value; that is all variables set to their best (w.r.t. the objective
293  * function) global bound
294  *
295  * @return the global pseudo objective value; that is all variables set to their best (w.r.t. the objective
296  * function) global bound.
297  *
298  * @pre This method can be called if @p scip is in one of the following stages:
299  * - \ref SCIP_STAGE_INITPRESOLVE
300  * - \ref SCIP_STAGE_PRESOLVING
301  * - \ref SCIP_STAGE_EXITPRESOLVE
302  * - \ref SCIP_STAGE_PRESOLVED
303  * - \ref SCIP_STAGE_INITSOLVE
304  * - \ref SCIP_STAGE_SOLVING
305  *
306  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
307  */
309  SCIP* scip /**< SCIP data structure */
310  )
311 {
312  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetGlobalPseudoObjval", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
313 
314  return SCIPlpGetGlobalPseudoObjval(scip->lp, scip->set, scip->transprob);
315 }
316 
317 /** gets the pseudo objective value for the current search node; that is all variables set to their best (w.r.t. the
318  * objective function) local bound
319  *
320  * @return the pseudo objective value for the current search node; that is all variables set to their best (w.r.t. the
321  * objective function) local bound.
322  *
323  * @pre This method can be called if @p scip is in one of the following stages:
324  * - \ref SCIP_STAGE_INITPRESOLVE
325  * - \ref SCIP_STAGE_PRESOLVING
326  * - \ref SCIP_STAGE_EXITPRESOLVE
327  * - \ref SCIP_STAGE_PRESOLVED
328  * - \ref SCIP_STAGE_INITSOLVE
329  * - \ref SCIP_STAGE_SOLVING
330  *
331  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
332  */
334  SCIP* scip /**< SCIP data structure */
335  )
336 {
337  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetPseudoObjval", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
338 
339  return SCIPlpGetPseudoObjval(scip->lp, scip->set, scip->transprob);
340 }
341 
342 /** returns whether the root lp is a relaxation of the problem and its optimal objective value is a global lower bound
343  *
344  * @return whether the root lp is a relaxation of the problem and its optimal objective value is a global lower bound.
345  *
346  * @pre This method can be called if @p scip is in one of the following stages:
347  * - \ref SCIP_STAGE_SOLVING
348  *
349  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
350  */
352  SCIP* scip /**< SCIP data structure */
353  )
354 {
355  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisRootLPRelax", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
356 
357  return SCIPlpIsRootLPRelax(scip->lp);
358 }
359 
360 /** gets the objective value of the root node LP or SCIP_INVALID if the root node LP was not (yet) solved
361  *
362  * @return the objective value of the root node LP or SCIP_INVALID if the root node LP was not (yet) solved.
363  *
364  * @pre This method can be called if @p scip is in one of the following stages:
365  * - \ref SCIP_STAGE_INITPRESOLVE
366  * - \ref SCIP_STAGE_PRESOLVING
367  * - \ref SCIP_STAGE_EXITPRESOLVE
368  * - \ref SCIP_STAGE_SOLVING
369  *
370  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
371  */
373  SCIP* scip /**< SCIP data structure */
374  )
375 {
376  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLPRootObjval", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
377 
378  return SCIPlpGetRootObjval(scip->lp);
379 }
380 
381 /** gets part of the objective value of the root node LP that results from COLUMN variables only;
382  * returns SCIP_INVALID if the root node LP was not (yet) solved
383  *
384  * @return the part of the objective value of the root node LP that results from COLUMN variables only;
385  * or SCIP_INVALID if the root node LP was not (yet) solved.
386  *
387  * @pre This method can be called if @p scip is in one of the following stages:
388  * - \ref SCIP_STAGE_INITPRESOLVE
389  * - \ref SCIP_STAGE_PRESOLVING
390  * - \ref SCIP_STAGE_EXITPRESOLVE
391  * - \ref SCIP_STAGE_SOLVING
392  *
393  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
394  */
396  SCIP* scip /**< SCIP data structure */
397  )
398 {
399  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLPRootColumnObjval", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
400 
401  return SCIPlpGetRootColumnObjval(scip->lp);
402 }
403 
404 /** gets part of the objective value of the root node LP that results from LOOSE variables only;
405  * returns SCIP_INVALID if the root node LP was not (yet) solved
406  *
407  * @return the part of the objective value of the root node LP that results from LOOSE variables only;
408  * or SCIP_INVALID if the root node LP was not (yet) solved.
409  *
410  * @pre This method can be called if @p scip is in one of the following stages:
411  * - \ref SCIP_STAGE_INITPRESOLVE
412  * - \ref SCIP_STAGE_PRESOLVING
413  * - \ref SCIP_STAGE_EXITPRESOLVE
414  * - \ref SCIP_STAGE_SOLVING
415  *
416  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
417  */
419  SCIP* scip /**< SCIP data structure */
420  )
421 {
422  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLPRootLooseObjval", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
423 
424  return SCIPlpGetRootLooseObjval(scip->lp);
425 }
426 
427 /** gets current primal feasibility tolerance of LP */
429  SCIP* scip /**< SCIP data structure */
430  )
431 {
432  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLPFeastol", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
433 
434  return SCIPlpGetFeastol(scip->lp);
435 }
436 
437 /** sets primal feasibility tolerance of LP */
439  SCIP* scip, /**< SCIP data structure */
440  SCIP_Real newfeastol /**< new primal feasibility tolerance for LP */
441  )
442 {
443  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPsetLPFeastol", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
444 
445  SCIPlpSetFeastol(scip->lp, scip->set, newfeastol);
446 }
447 
448 /** resets primal feasibility tolerance of LP
449  *
450  * Sets primal feasibility tolerance to min of numerics/lpfeastolfactor * numerics/feastol and relaxfeastol.
451  */
453  SCIP* scip /**< SCIP data structure */
454  )
455 {
456  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPresetLPFeastol", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
457 
458  SCIPlpResetFeastol(scip->lp, scip->set);
459 }
460 
461 /** gets current LP columns along with the current number of LP columns
462  *
463  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
464  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
465  *
466  * @pre This method can be called if @p scip is in one of the following stages:
467  * - \ref SCIP_STAGE_SOLVING
468  *
469  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
470  */
472  SCIP* scip, /**< SCIP data structure */
473  SCIP_COL*** cols, /**< pointer to store the array of LP columns, or NULL */
474  int* ncols /**< pointer to store the number of LP columns, or NULL */
475  )
476 {
477  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetLPColsData", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
478 
480  {
481  if( cols != NULL )
482  *cols = SCIPlpGetCols(scip->lp);
483  if( ncols != NULL )
484  *ncols = SCIPlpGetNCols(scip->lp);
485  }
486  else
487  {
488  if( cols != NULL )
489  *cols = NULL;
490  if( ncols != NULL )
491  *ncols = 0;
492  }
493 
494  return SCIP_OKAY;
495 }
496 
497 /** gets current LP columns
498  *
499  * @return the current LP columns.
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  */
507  SCIP* scip /**< SCIP data structure */
508  )
509 {
511 
513  return SCIPlpGetCols(scip->lp);
514  else
515  return NULL;
516 }
517 
518 /** gets current number of LP columns
519  *
520  * @return the current number of LP columns.
521  *
522  * @pre This method can be called if @p scip is in one of the following stages:
523  * - \ref SCIP_STAGE_SOLVING
524  *
525  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
526  */
528  SCIP* scip /**< SCIP data structure */
529  )
530 {
532 
534  return SCIPlpGetNCols(scip->lp);
535  else
536  return 0;
537 }
538 
539 /** gets current number of unfixed LP columns
540  *
541  * @return the current number of unfixed LP columns.
542  *
543  * @pre This method can be called if @p scip is in one of the following stages:
544  * - \ref SCIP_STAGE_SOLVING
545  *
546  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
547  */
549  SCIP* scip /**< SCIP data structure */
550  )
551 {
552  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNUnfixedLPCols", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
553 
555  return SCIPlpGetNUnfixedCols(scip->lp, scip->set->num_epsilon);
556  else
557  return 0;
558 }
559 
560 /** gets current LP rows along with the current number of LP rows
561  *
562  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
563  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
564  *
565  * @pre This method can be called if @p scip is in one of the following stages:
566  * - \ref SCIP_STAGE_SOLVING
567  *
568  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
569  */
571  SCIP* scip, /**< SCIP data structure */
572  SCIP_ROW*** rows, /**< pointer to store the array of LP rows, or NULL */
573  int* nrows /**< pointer to store the number of LP rows, or NULL */
574  )
575 {
576  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetLPRowsData", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
577 
579  {
580  if( rows != NULL )
581  *rows = SCIPlpGetRows(scip->lp);
582  if( nrows != NULL )
583  *nrows = SCIPlpGetNRows(scip->lp);
584  }
585  else
586  {
587  if( rows != NULL )
588  *rows = NULL;
589  if( nrows != NULL )
590  *nrows = 0;
591  }
592 
593  return SCIP_OKAY;
594 }
595 
596 /** gets current LP rows
597  *
598  * @return the current LP rows.
599  *
600  * @pre This method can be called if @p scip is in one of the following stages:
601  * - \ref SCIP_STAGE_SOLVING
602  *
603  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
604  */
606  SCIP* scip /**< SCIP data structure */
607  )
608 {
610 
612  return SCIPlpGetRows(scip->lp);
613  else
614  return NULL;
615 }
616 
617 /** gets current number of LP rows
618  *
619  * @return the current number of LP rows.
620  *
621  * @pre This method can be called if @p scip is in one of the following stages:
622  * - \ref SCIP_STAGE_SOLVING
623  *
624  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
625  */
627  SCIP* scip /**< SCIP data structure */
628  )
629 {
631 
633  return SCIPlpGetNRows(scip->lp);
634  else
635  return 0;
636 }
637 
638 /** returns TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
639  * in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing
640  *
641  * @return TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
642  * in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing.
643  *
644  * @pre This method can be called if @p scip is in one of the following stages:
645  * - \ref SCIP_STAGE_SOLVING
646  *
647  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
648  */
650  SCIP* scip /**< SCIP data structure */
651  )
652 {
654 
655  return SCIPprobAllColsInLP(scip->transprob, scip->set, scip->lp);
656 }
657 
658 /** returns whether the current LP solution is basic, i.e. is defined by a valid simplex basis
659  *
660  * @return whether the current LP solution is basic, i.e. is defined by a valid simplex basis.
661  *
662  * @pre This method can be called if @p scip is in one of the following stages:
663  * - \ref SCIP_STAGE_SOLVING
664  *
665  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
666  */
668  SCIP* scip /**< SCIP data structure */
669  )
670 {
671  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisLPSolBasic", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
672 
673  return SCIPlpIsSolBasic(scip->lp);
674 }
675 
676 /** gets all indices of basic columns and rows: index i >= 0 corresponds to column i, index i < 0 to row -i-1
677  *
678  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
679  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
680  *
681  * @pre This method can be called if @p scip is in one of the following stages:
682  * - \ref SCIP_STAGE_SOLVING
683  *
684  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
685  */
687  SCIP* scip, /**< SCIP data structure */
688  int* basisind /**< pointer to store basis indices ready to keep number of rows entries */
689  )
690 {
691  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetLPBasisInd", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
692 
693  if( !SCIPlpIsSolBasic(scip->lp) )
694  {
695  SCIPerrorMessage("current LP solution is not basic\n");
696  return SCIP_INVALIDCALL;
697  }
698 
699  SCIP_CALL( SCIPlpGetBasisInd(scip->lp, basisind) );
700 
701  return SCIP_OKAY;
702 }
703 
704 /** gets a row from the inverse basis matrix B^-1
705  *
706  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
707  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
708  *
709  * @pre This method can be called if @p scip is in one of the following stages:
710  * - \ref SCIP_STAGE_SOLVING
711  *
712  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
713  */
715  SCIP* scip, /**< SCIP data structure */
716  int r, /**< row number */
717  SCIP_Real* coefs, /**< array to store the coefficients of the row */
718  int* inds, /**< array to store the non-zero indices, or NULL */
719  int* ninds /**< pointer to store the number of non-zero indices, or NULL
720  * (-1: if we do not store sparsity informations) */
721  )
722 {
723  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetLPBInvRow", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
724 
725  if( !SCIPlpIsSolBasic(scip->lp) )
726  {
727  SCIPerrorMessage("current LP solution is not basic\n");
728  return SCIP_INVALIDCALL;
729  }
730 
731  SCIP_CALL( SCIPlpGetBInvRow(scip->lp, r, coefs, inds, ninds) );
732 
733  /* debug check if the coef is the r-th line of the inverse matrix B^-1 */
734  SCIP_CALL( SCIPdebugCheckBInvRow(scip, r, coefs) ); /*lint !e506 !e774*/
735 
736  return SCIP_OKAY;
737 }
738 
739 /** gets a column from the inverse basis matrix B^-1
740  *
741  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
742  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
743  *
744  * @pre This method can be called if @p scip is in one of the following stages:
745  * - \ref SCIP_STAGE_SOLVING
746  *
747  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
748  */
750  SCIP* scip, /**< SCIP data structure */
751  int c, /**< column number of B^-1; this is NOT the number of the column in the LP
752  * returned by SCIPcolGetLPPos(); you have to call SCIPgetBasisInd()
753  * to get the array which links the B^-1 column numbers to the row and
754  * column numbers of the LP! c must be between 0 and nrows-1, since the
755  * basis has the size nrows * nrows */
756  SCIP_Real* coefs, /**< array to store the coefficients of the column */
757  int* inds, /**< array to store the non-zero indices, or NULL */
758  int* ninds /**< pointer to store the number of non-zero indices, or NULL
759  * (-1: if we do not store sparsity informations) */
760  )
761 {
762  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetLPBInvCol", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
763 
764  if( !SCIPlpIsSolBasic(scip->lp) )
765  {
766  SCIPerrorMessage("current LP solution is not basic\n");
767  return SCIP_INVALIDCALL;
768  }
769 
770  SCIP_CALL( SCIPlpGetBInvCol(scip->lp, c, coefs, inds, ninds) );
771 
772  return SCIP_OKAY;
773 }
774 
775 /** gets a row from the product of inverse basis matrix B^-1 and coefficient matrix A (i.e. from B^-1 * A)
776  *
777  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
778  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
779  *
780  * @pre This method can be called if @p scip is in one of the following stages:
781  * - \ref SCIP_STAGE_SOLVING
782  *
783  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
784  */
786  SCIP* scip, /**< SCIP data structure */
787  int r, /**< row number */
788  SCIP_Real* binvrow, /**< row in B^-1 from prior call to SCIPgetLPBInvRow(), or NULL */
789  SCIP_Real* coefs, /**< array to store the coefficients of the row */
790  int* inds, /**< array to store the non-zero indices, or NULL */
791  int* ninds /**< pointer to store the number of non-zero indices, or NULL
792  * (-1: if we do not store sparsity informations) */
793  )
794 {
795  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetLPBInvARow", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
796 
797  if( !SCIPlpIsSolBasic(scip->lp) )
798  {
799  SCIPerrorMessage("current LP solution is not basic\n");
800  return SCIP_INVALIDCALL;
801  }
802 
803  SCIP_CALL( SCIPlpGetBInvARow(scip->lp, r, binvrow, coefs, inds, ninds) );
804 
805  return SCIP_OKAY;
806 }
807 
808 /** gets a column from the product of inverse basis matrix B^-1 and coefficient matrix A (i.e. from B^-1 * A),
809  * i.e., it computes B^-1 * A_c with A_c being the c'th column of A
810  *
811  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
812  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
813  *
814  * @pre This method can be called if @p scip is in one of the following stages:
815  * - \ref SCIP_STAGE_SOLVING
816  *
817  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
818  */
820  SCIP* scip, /**< SCIP data structure */
821  int c, /**< column number which can be accessed by SCIPcolGetLPPos() */
822  SCIP_Real* coefs, /**< array to store the coefficients of the column */
823  int* inds, /**< array to store the non-zero indices, or NULL */
824  int* ninds /**< pointer to store the number of non-zero indices, or NULL
825  * (-1: if we do not store sparsity informations) */
826  )
827 {
828  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetLPBInvACol", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
829 
830  if( !SCIPlpIsSolBasic(scip->lp) )
831  {
832  SCIPerrorMessage("current LP solution is not basic\n");
833  return SCIP_INVALIDCALL;
834  }
835 
836  SCIP_CALL( SCIPlpGetBInvACol(scip->lp, c, coefs, inds, ninds) );
837 
838  return SCIP_OKAY;
839 }
840 
841 /** calculates a weighted sum of all LP rows; for negative weights, the left and right hand side of the corresponding
842  * LP row are swapped in the summation
843  *
844  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
845  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
846  *
847  * @pre This method can be called if @p scip is in one of the following stages:
848  * - \ref SCIP_STAGE_SOLVING
849  *
850  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
851  */
853  SCIP* scip, /**< SCIP data structure */
854  SCIP_Real* weights, /**< row weights in row summation */
855  SCIP_REALARRAY* sumcoef, /**< array to store sum coefficients indexed by variables' probindex */
856  SCIP_Real* sumlhs, /**< pointer to store the left hand side of the row summation */
857  SCIP_Real* sumrhs /**< pointer to store the right hand side of the row summation */
858  )
859 {
860  SCIP_CALL( SCIPcheckStage(scip, "SCIPsumLPRows", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
861 
862  SCIP_CALL( SCIPlpSumRows(scip->lp, scip->set, scip->transprob, weights, sumcoef, sumlhs, sumrhs) );
863 
864  return SCIP_OKAY;
865 }
866 
867 /** interrupts or disables the interrupt of the currently ongoing lp solve; if the lp is not currently constructed just returns with no effect
868  *
869  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
870  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
871  *
872  * @pre This method can be called in any SCIP stage
873  */
875  SCIP* scip, /**< SCIP data structure */
876  SCIP_Bool interrupt /**< TRUE if interrupt should be set, FALSE if it should be disabled */
877  )
878 {
879  SCIP_CALL( SCIPcheckStage(scip, "SCIPinterruptLP", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE) );
880 
881  if( scip->lp == NULL )
882  return SCIP_OKAY;
883 
884  SCIP_CALL( SCIPlpInterrupt(scip->lp, interrupt) );
885  if( interrupt )
886  scip->stat->userinterrupt = TRUE;
887 
888  return SCIP_OKAY;
889 }
890 
891 /** writes current LP to a file
892  *
893  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
894  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
895  *
896  * @pre This method can be called if @p scip is in one of the following stages:
897  * - \ref SCIP_STAGE_SOLVING
898  *
899  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
900  */
902  SCIP* scip, /**< SCIP data structure */
903  const char* filename /**< file name */
904  )
905 {
906  SCIP_Bool cutoff;
907 
909 
911  {
912  SCIP_CALL( SCIPconstructCurrentLP(scip->mem->probmem, scip->set, scip->stat, scip->transprob, scip->origprob,
913  scip->tree, scip->reopt, scip->lp, scip->pricestore, scip->sepastore, scip->cutpool, scip->branchcand,
914  scip->eventqueue, scip->eventfilter, scip->cliquetable, FALSE, &cutoff) );
915  }
916 
917  /* we need a flushed lp to write the current lp */
918  SCIP_CALL( SCIPlpFlush(scip->lp, scip->mem->probmem, scip->set, scip->transprob, scip->eventqueue) );
919 
920  SCIP_CALL( SCIPlpWrite(scip->lp, filename) );
921 
922  return SCIP_OKAY;
923 }
924 
925 /** writes MIP relaxation of the current branch-and-bound node to a file
926  *
927  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
928  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
929  *
930  * @pre This method can be called if @p scip is in one of the following stages:
931  * - \ref SCIP_STAGE_SOLVING
932  *
933  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
934  */
936  SCIP* scip, /**< SCIP data structure */
937  const char* filename, /**< file name */
938  SCIP_Bool genericnames, /**< should generic names like x_i and row_j be used in order to avoid
939  * troubles with reserved symbols? */
940  SCIP_Bool origobj, /**< should the original objective function be used? */
941  SCIP_Bool lazyconss /**< output removable rows as lazy constraints? */
942  )
943 {
944  SCIP_CALL( SCIPcheckStage(scip, "SCIPwriteMIP", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
945 
946  /* we need a flushed lp to write the current mip */
947  SCIP_CALL( SCIPlpFlush(scip->lp, scip->mem->probmem, scip->set, scip->transprob, scip->eventqueue) );
948 
949  SCIP_CALL( SCIPlpWriteMip(scip->lp, scip->set, scip->messagehdlr, filename, genericnames,
950  origobj, scip->origprob->objsense, scip->transprob->objscale, scip->transprob->objoffset, lazyconss) );
951 
952  return SCIP_OKAY;
953 }
954 
955 /** gets the LP interface of SCIP;
956  * with the LPI you can use all of the methods defined in lpi/lpi.h;
957  *
958  * @warning You have to make sure, that the full internal state of the LPI does not change or is recovered completely
959  * after the end of the method that uses the LPI. In particular, if you manipulate the LP or its solution
960  * (e.g. by calling one of the SCIPlpiAdd...() or one of the SCIPlpiSolve...() methods), you have to check in
961  * advance with SCIPlpiWasSolved() whether the LP is currently solved. If this is the case, you have to make
962  * sure, the internal solution status is recovered completely at the end of your method. This can be achieved
963  * by getting the LPI state before applying any LPI manipulations with SCIPlpiGetState() and restoring it
964  * afterwards with SCIPlpiSetState() and SCIPlpiFreeState(). Additionally you have to resolve the LP with the
965  * appropriate SCIPlpiSolve...() call in order to reinstall the internal solution status.
966  *
967  * @warning Make also sure, that all parameter values that you have changed are set back to their original values.
968  *
969  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
970  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
971  *
972  * @pre This method can be called if @p scip is in one of the following stages:
973  * - \ref SCIP_STAGE_TRANSFORMED
974  * - \ref SCIP_STAGE_INITPRESOLVE
975  * - \ref SCIP_STAGE_PRESOLVING
976  * - \ref SCIP_STAGE_EXITPRESOLVE
977  * - \ref SCIP_STAGE_PRESOLVED
978  * - \ref SCIP_STAGE_INITSOLVE
979  * - \ref SCIP_STAGE_SOLVING
980  * - \ref SCIP_STAGE_SOLVED
981  * - \ref SCIP_STAGE_EXITSOLVE
982  *
983  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
984  */
986  SCIP* scip, /**< SCIP data structure */
987  SCIP_LPI** lpi /**< pointer to store the LP interface */
988  )
989 {
990  assert(lpi != NULL);
991 
992  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetLPI", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
993 
994  *lpi = SCIPlpGetLPI(scip->lp);
995 
996  return SCIP_OKAY;
997 }
998 
999 /** displays quality information about the current LP solution. An LP solution need to be available; information printed
1000  * is subject to what the LP solver supports
1001  *
1002  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1003  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1004  *
1005  * @pre This method can be called if @p scip is in one of the following stages:
1006  * - \ref SCIP_STAGE_INIT
1007  * - \ref SCIP_STAGE_PROBLEM
1008  * - \ref SCIP_STAGE_TRANSFORMED
1009  * - \ref SCIP_STAGE_INITPRESOLVE
1010  * - \ref SCIP_STAGE_PRESOLVING
1011  * - \ref SCIP_STAGE_EXITPRESOLVE
1012  * - \ref SCIP_STAGE_PRESOLVED
1013  * - \ref SCIP_STAGE_SOLVING
1014  * - \ref SCIP_STAGE_SOLVED
1015  * - \ref SCIP_STAGE_FREE
1016  *
1017  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1018  *
1019  * @note The printing process is done via the message handler system.
1020  */
1022  SCIP* scip, /**< SCIP data structure */
1023  FILE* file /**< output file (or NULL for standard output) */
1024  )
1025 {
1026  SCIP_LPI* lpi;
1027  SCIP_Real quality;
1028 
1029  SCIP_CALL( SCIPcheckStage(scip, "SCIPprintLPSolutionQuality", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE) );
1030 
1031  switch( scip->set->stage )
1032  {
1033  case SCIP_STAGE_INIT:
1034  case SCIP_STAGE_PROBLEM:
1037  case SCIP_STAGE_PRESOLVING:
1039  case SCIP_STAGE_PRESOLVED:
1040  SCIPmessageFPrintInfo(scip->messagehdlr, file, "Problem not solving yet, no LP available.\n");
1041  return SCIP_OKAY;
1042 
1043  case SCIP_STAGE_SOLVING:
1044  case SCIP_STAGE_SOLVED:
1045  break;
1046 
1047  default:
1048  SCIPerrorMessage("invalid SCIP stage <%d>\n", scip->set->stage);
1049  return SCIP_INVALIDCALL;
1050  } /*lint !e788*/
1051 
1052  /* note that after diving mode, the LPI may only have the basis information, but SCIPlpiWasSolved() can be false; in
1053  * this case, we will (depending on the LP solver) probably not obtain the quality measure; one solution would be to
1054  * store the results of SCIPlpiGetRealSolQuality() within the SCIP_LP after each LP solve; this would have the added
1055  * advantage, that we reduce direct access to the LPI, but it sounds potentially expensive
1056  */
1057  lpi = SCIPlpGetLPI(scip->lp);
1058  assert(lpi != NULL);
1059 
1061  SCIPmessageFPrintInfo(scip->messagehdlr, file, "Basis matrix condition (estimated): ");
1062  if( quality != SCIP_INVALID ) /*lint !e777*/
1063  SCIPmessageFPrintInfo(scip->messagehdlr, file, "%.6e\n", quality);
1064  else
1065  SCIPmessageFPrintInfo(scip->messagehdlr, file, "not available\n");
1066 
1068  SCIPmessageFPrintInfo(scip->messagehdlr, file, "Basis matrix condition (exact): ");
1069  if( quality != SCIP_INVALID ) /*lint !e777*/
1070  SCIPmessageFPrintInfo(scip->messagehdlr, file, "%.6e\n", quality);
1071  else
1072  SCIPmessageFPrintInfo(scip->messagehdlr, file, "not available\n");
1073 
1074  return SCIP_OKAY;
1075 }
1076 
1077 /** compute relative interior point to current LP
1078  * @see SCIPlpComputeRelIntPoint
1079  *
1080  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1081  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1082  *
1083  * @pre This method can be called if @p scip is in one of the following stages:
1084  * - \ref SCIP_STAGE_TRANSFORMED
1085  * - \ref SCIP_STAGE_INITPRESOLVE
1086  * - \ref SCIP_STAGE_PRESOLVING
1087  * - \ref SCIP_STAGE_EXITPRESOLVE
1088  * - \ref SCIP_STAGE_PRESOLVED
1089  * - \ref SCIP_STAGE_SOLVING
1090  * - \ref SCIP_STAGE_SOLVED
1091  *
1092  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
1093  */
1095  SCIP* scip, /**< SCIP data structure */
1096  SCIP_Bool relaxrows, /**< should the rows be relaxed */
1097  SCIP_Bool inclobjcutoff, /**< should a row for the objective cutoff be included */
1098  SCIP_Real timelimit, /**< time limit for LP solver */
1099  int iterlimit, /**< iteration limit for LP solver */
1100  SCIP_SOL** point /**< relative interior point on exit */
1101  )
1102 {
1103  SCIP_Real* pointvals;
1104  SCIP_Bool success;
1105 
1106  SCIP_CALL( SCIPcheckStage(scip, "SCIPcomputeLPRelIntPoint", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1107 
1108  assert(scip != NULL);
1109  assert(scip->lp != NULL);
1110  assert(point != NULL);
1111 
1112  *point = NULL;
1113 
1114  SCIP_CALL( SCIPallocBufferArray(scip, &pointvals, SCIPlpGetNCols(scip->lp)) );
1115 
1116  SCIP_CALL( SCIPlpComputeRelIntPoint(scip->set, scip->messagehdlr, scip->lp, scip->transprob,
1117  relaxrows, inclobjcutoff, timelimit, iterlimit, pointvals, &success) );
1118 
1119  /* if successful, create new solution with point values */
1120  if( success )
1121  {
1122  int i;
1123 
1124  SCIP_CALL( SCIPcreateSol(scip, point, NULL) );
1125 
1126  for( i = 0; i < SCIPlpGetNCols(scip->lp); ++i )
1127  {
1128  SCIP_CALL( SCIPsetSolVal(scip, *point, SCIPcolGetVar(SCIPlpGetCols(scip->lp)[i]), pointvals[i]) );
1129  }
1130  }
1131 
1132  SCIPfreeBufferArray(scip, &pointvals);
1133 
1134  return SCIP_OKAY;
1135 }
1136 
1137 /*
1138  * LP column methods
1139  */
1140 
1141 /** returns the reduced costs of a column in the last (feasible) LP
1142  *
1143  * @return the reduced costs of a column in the last (feasible) LP
1144  *
1145  * @pre this method can be called in one of the following stages of the SCIP solving process:
1146  * - \ref SCIP_STAGE_SOLVING
1147  * - \ref SCIP_STAGE_SOLVED
1148  *
1149  * @note calling this method in SCIP_STAGE_SOLVED is only recommended to experienced users and should only be called
1150  * for pure LP instances (without presolving)
1151  *
1152  * @note The return value of this method should be used carefully if the dual feasibility check was explictely disabled.
1153  */
1155  SCIP* scip, /**< SCIP data structure */
1156  SCIP_COL* col /**< LP column */
1157  )
1158 {
1159  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetColRedcost", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1160 
1161  if( !SCIPtreeHasCurrentNodeLP(scip->tree) )
1162  {
1163  SCIPerrorMessage("cannot get reduced costs, because node LP is not processed\n");
1164  SCIPABORT();
1165  return 0.0; /*lint !e527*/
1166  }
1167 
1168  return SCIPcolGetRedcost(col, scip->stat, scip->lp);
1169 }
1170 
1171 
1172 /** returns the Farkas coefficient of a column in the last (infeasible) LP
1173  *
1174  * @return the Farkas coefficient of a column in the last (infeasible) LP
1175  *
1176  * @pre this method can be called in one of the following stages of the SCIP solving process:
1177  * - \ref SCIP_STAGE_SOLVING
1178  * - \ref SCIP_STAGE_SOLVED
1179  */
1181  SCIP* scip, /**< SCIP data structure */
1182  SCIP_COL* col /**< LP column */
1183  )
1184 {
1185  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetColFarkasCoef", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1186 
1187  if( !SCIPtreeHasCurrentNodeLP(scip->tree) )
1188  {
1189  SCIPerrorMessage("cannot get Farkas coeff, because node LP is not processed\n");
1190  SCIPABORT();
1191  return 0.0; /*lint !e527*/
1192  }
1193 
1194  return SCIPcolGetFarkasCoef(col, scip->stat, scip->lp);
1195 }
1196 
1197 /** marks a column to be not removable from the LP in the current node
1198  *
1199  * @pre this method can be called in the following stage of the SCIP solving process:
1200  * - \ref SCIP_STAGE_SOLVING
1201  */
1203  SCIP* scip, /**< SCIP data structure */
1204  SCIP_COL* col /**< LP column */
1205  )
1206 {
1207  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPmarkColNotRemovableLocal", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1208 
1209  SCIPcolMarkNotRemovableLocal(col, scip->stat);
1210 }
1211 
1212 /*
1213  * LP row methods
1214  */
1215 
1216 /** creates and captures an LP row from a constraint handler
1217  *
1218  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1219  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1220  *
1221  * @pre this method can be called in one of the following stages of the SCIP solving process:
1222  * - \ref SCIP_STAGE_INITSOLVE
1223  * - \ref SCIP_STAGE_SOLVING
1224  */
1226  SCIP* scip, /**< SCIP data structure */
1227  SCIP_ROW** row, /**< pointer to row */
1228  SCIP_CONSHDLR* conshdlr, /**< constraint handler that creates the row */
1229  const char* name, /**< name of row */
1230  int len, /**< number of nonzeros in the row */
1231  SCIP_COL** cols, /**< array with columns of row entries */
1232  SCIP_Real* vals, /**< array with coefficients of row entries */
1233  SCIP_Real lhs, /**< left hand side of row */
1234  SCIP_Real rhs, /**< right hand side of row */
1235  SCIP_Bool local, /**< is row only valid locally? */
1236  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
1237  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
1238  )
1239 {
1240  assert(conshdlr != NULL);
1241 
1242  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateRowConshdlr", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1243 
1244  SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
1245  name, len, cols, vals, lhs, rhs, SCIP_ROWORIGINTYPE_CONSHDLR, (void*) conshdlr, local, modifiable, removable) );
1246 
1247  return SCIP_OKAY;
1248 }
1249 
1250 /** creates and captures an LP row from a constraint
1251  *
1252  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1253  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1254  *
1255  * @pre this method can be called in one of the following stages of the SCIP solving process:
1256  * - \ref SCIP_STAGE_INITSOLVE
1257  * - \ref SCIP_STAGE_SOLVING
1258  */
1260  SCIP* scip, /**< SCIP data structure */
1261  SCIP_ROW** row, /**< pointer to row */
1262  SCIP_CONS* cons, /**< constraint that creates the row */
1263  const char* name, /**< name of row */
1264  int len, /**< number of nonzeros in the row */
1265  SCIP_COL** cols, /**< array with columns of row entries */
1266  SCIP_Real* vals, /**< array with coefficients of row entries */
1267  SCIP_Real lhs, /**< left hand side of row */
1268  SCIP_Real rhs, /**< right hand side of row */
1269  SCIP_Bool local, /**< is row only valid locally? */
1270  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
1271  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
1272  )
1273 {
1274  assert(cons != NULL);
1275 
1276  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateRowCons", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1277 
1278  SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
1279  name, len, cols, vals, lhs, rhs, SCIP_ROWORIGINTYPE_CONS, (void*) cons, local, modifiable, removable) );
1280 
1281  return SCIP_OKAY;
1282 }
1283 
1284 /** creates and captures an LP row from a separator
1285  *
1286  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1287  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1288  *
1289  * @pre this method can be called in one of the following stages of the SCIP solving process:
1290  * - \ref SCIP_STAGE_INITSOLVE
1291  * - \ref SCIP_STAGE_SOLVING
1292  */
1294  SCIP* scip, /**< SCIP data structure */
1295  SCIP_ROW** row, /**< pointer to row */
1296  SCIP_SEPA* sepa, /**< separator that creates the row */
1297  const char* name, /**< name of row */
1298  int len, /**< number of nonzeros in the row */
1299  SCIP_COL** cols, /**< array with columns of row entries */
1300  SCIP_Real* vals, /**< array with coefficients of row entries */
1301  SCIP_Real lhs, /**< left hand side of row */
1302  SCIP_Real rhs, /**< right hand side of row */
1303  SCIP_Bool local, /**< is row only valid locally? */
1304  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
1305  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
1306  )
1307 {
1308  assert(sepa != NULL);
1309 
1310  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateRowSepa", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1311 
1312  SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
1313  name, len, cols, vals, lhs, rhs, SCIP_ROWORIGINTYPE_SEPA, (void*) sepa, local, modifiable, removable) );
1314 
1315  return SCIP_OKAY;
1316 }
1317 
1318 /** creates and captures an LP row from an unspecified source
1319  *
1320  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1321  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1322  *
1323  * @pre this method can be called in one of the following stages of the SCIP solving process:
1324  * - \ref SCIP_STAGE_INITSOLVE
1325  * - \ref SCIP_STAGE_SOLVING
1326  */
1328  SCIP* scip, /**< SCIP data structure */
1329  SCIP_ROW** row, /**< pointer to row */
1330  const char* name, /**< name of row */
1331  int len, /**< number of nonzeros in the row */
1332  SCIP_COL** cols, /**< array with columns of row entries */
1333  SCIP_Real* vals, /**< array with coefficients of row entries */
1334  SCIP_Real lhs, /**< left hand side of row */
1335  SCIP_Real rhs, /**< right hand side of row */
1336  SCIP_Bool local, /**< is row only valid locally? */
1337  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
1338  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
1339  )
1340 {
1341  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateRowUnspec", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1342 
1343  SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
1344  name, len, cols, vals, lhs, rhs, SCIP_ROWORIGINTYPE_UNSPEC, NULL, local, modifiable, removable) );
1345 
1346  return SCIP_OKAY;
1347 }
1348 
1349 /** creates and captures an LP row
1350  *
1351  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1352  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1353  *
1354  * @pre this method can be called in one of the following stages of the SCIP solving process:
1355  * - \ref SCIP_STAGE_INITSOLVE
1356  * - \ref SCIP_STAGE_SOLVING
1357  *
1358  * @deprecated Please use SCIPcreateRowConshdlr() or SCIPcreateRowSepa() when calling from a constraint handler or separator in order
1359  * to facilitate correct statistics. If the call is from neither a constraint handler or separator, use SCIPcreateRowUnspec().
1360  */
1362  SCIP* scip, /**< SCIP data structure */
1363  SCIP_ROW** row, /**< pointer to row */
1364  const char* name, /**< name of row */
1365  int len, /**< number of nonzeros in the row */
1366  SCIP_COL** cols, /**< array with columns of row entries */
1367  SCIP_Real* vals, /**< array with coefficients of row entries */
1368  SCIP_Real lhs, /**< left hand side of row */
1369  SCIP_Real rhs, /**< right hand side of row */
1370  SCIP_Bool local, /**< is row only valid locally? */
1371  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
1372  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
1373  )
1374 {
1375  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateRow", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1376 
1377  SCIP_CALL( SCIPcreateRowUnspec(scip, row, name, len, cols, vals, lhs, rhs, local, modifiable, removable) );
1378 
1379  return SCIP_OKAY;
1380 }
1381 
1382 /** creates and captures an LP row without any coefficients from a constraint handler
1383  *
1384  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1385  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1386  *
1387  * @pre this method can be called in one of the following stages of the SCIP solving process:
1388  * - \ref SCIP_STAGE_INITSOLVE
1389  * - \ref SCIP_STAGE_SOLVING
1390  */
1392  SCIP* scip, /**< SCIP data structure */
1393  SCIP_ROW** row, /**< pointer to row */
1394  SCIP_CONSHDLR* conshdlr, /**< constraint handler that creates the row */
1395  const char* name, /**< name of row */
1396  SCIP_Real lhs, /**< left hand side of row */
1397  SCIP_Real rhs, /**< right hand side of row */
1398  SCIP_Bool local, /**< is row only valid locally? */
1399  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
1400  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
1401  )
1402 {
1403  assert(conshdlr != NULL);
1404 
1405  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateEmptyRowConshdlr", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1406 
1407  SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
1408  name, 0, NULL, NULL, lhs, rhs, SCIP_ROWORIGINTYPE_CONSHDLR, (void*) conshdlr, local, modifiable, removable) );
1409 
1410  return SCIP_OKAY;
1411 }
1412 
1413 /** creates and captures an LP row without any coefficients from a constraint
1414  *
1415  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1416  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1417  *
1418  * @pre this method can be called in one of the following stages of the SCIP solving process:
1419  * - \ref SCIP_STAGE_INITSOLVE
1420  * - \ref SCIP_STAGE_SOLVING
1421  */
1423  SCIP* scip, /**< SCIP data structure */
1424  SCIP_ROW** row, /**< pointer to row */
1425  SCIP_CONS* cons, /**< constraint that creates the row */
1426  const char* name, /**< name of row */
1427  SCIP_Real lhs, /**< left hand side of row */
1428  SCIP_Real rhs, /**< right hand side of row */
1429  SCIP_Bool local, /**< is row only valid locally? */
1430  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
1431  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
1432  )
1433 {
1434  assert(cons != NULL);
1435 
1436  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateEmptyRowCons", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1437 
1438  SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
1439  name, 0, NULL, NULL, lhs, rhs, SCIP_ROWORIGINTYPE_CONS, (void*) cons, local, modifiable, removable) );
1440 
1441  return SCIP_OKAY;
1442 }
1443 
1444 /** creates and captures an LP row without any coefficients from a separator
1445  *
1446  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1447  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1448  *
1449  * @pre this method can be called in one of the following stages of the SCIP solving process:
1450  * - \ref SCIP_STAGE_INITSOLVE
1451  * - \ref SCIP_STAGE_SOLVING
1452  */
1454  SCIP* scip, /**< SCIP data structure */
1455  SCIP_ROW** row, /**< pointer to row */
1456  SCIP_SEPA* sepa, /**< separator that creates the row */
1457  const char* name, /**< name of row */
1458  SCIP_Real lhs, /**< left hand side of row */
1459  SCIP_Real rhs, /**< right hand side of row */
1460  SCIP_Bool local, /**< is row only valid locally? */
1461  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
1462  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
1463  )
1464 {
1465  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateEmptyRowSepa", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1466 
1467  SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
1468  name, 0, NULL, NULL, lhs, rhs, SCIP_ROWORIGINTYPE_SEPA, (void*) sepa, local, modifiable, removable) );
1469 
1470  return SCIP_OKAY;
1471 }
1472 
1473 /** creates and captures an LP row without any coefficients from an unspecified source
1474  *
1475  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1476  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1477  *
1478  * @pre this method can be called in one of the following stages of the SCIP solving process:
1479  * - \ref SCIP_STAGE_INITSOLVE
1480  * - \ref SCIP_STAGE_SOLVING
1481  */
1483  SCIP* scip, /**< SCIP data structure */
1484  SCIP_ROW** row, /**< pointer to row */
1485  const char* name, /**< name of row */
1486  SCIP_Real lhs, /**< left hand side of row */
1487  SCIP_Real rhs, /**< right hand side of row */
1488  SCIP_Bool local, /**< is row only valid locally? */
1489  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
1490  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
1491  )
1492 {
1493  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateEmptyRowUnspec", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1494 
1495  SCIP_CALL( SCIProwCreate(row, scip->mem->probmem, scip->set, scip->stat,
1496  name, 0, NULL, NULL, lhs, rhs, SCIP_ROWORIGINTYPE_UNSPEC, NULL, local, modifiable, removable) );
1497 
1498  return SCIP_OKAY;
1499 }
1500 
1501 /** creates and captures an LP row without any coefficients
1502  *
1503  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1504  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1505  *
1506  * @pre this method can be called in one of the following stages of the SCIP solving process:
1507  * - \ref SCIP_STAGE_INITSOLVE
1508  * - \ref SCIP_STAGE_SOLVING
1509  *
1510  * @deprecated Please use SCIPcreateEmptyRowConshdlr() or SCIPcreateEmptyRowSepa() when calling from a constraint handler or separator in order
1511  * to facilitate correct statistics. If the call is from neither a constraint handler or separator, use SCIPcreateEmptyRowUnspec().
1512  */
1514  SCIP* scip, /**< SCIP data structure */
1515  SCIP_ROW** row, /**< pointer to row */
1516  const char* name, /**< name of row */
1517  SCIP_Real lhs, /**< left hand side of row */
1518  SCIP_Real rhs, /**< right hand side of row */
1519  SCIP_Bool local, /**< is row only valid locally? */
1520  SCIP_Bool modifiable, /**< is row modifiable during node processing (subject to column generation)? */
1521  SCIP_Bool removable /**< should the row be removed from the LP due to aging or cleanup? */
1522  )
1523 {
1524  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateEmptyRow", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1525 
1526  SCIP_CALL( SCIPcreateEmptyRowUnspec(scip, row, name, lhs, rhs, local, modifiable, removable) );
1527 
1528  return SCIP_OKAY;
1529 }
1530 
1531 /** increases usage counter of LP row
1532  *
1533  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1534  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1535  *
1536  * @pre this method can be called in one of the following stages of the SCIP solving process:
1537  * - \ref SCIP_STAGE_INITSOLVE
1538  * - \ref SCIP_STAGE_SOLVING
1539  */
1541  SCIP* scip, /**< SCIP data structure */
1542  SCIP_ROW* row /**< row to capture */
1543  )
1544 {
1545  SCIP_CALL( SCIPcheckStage(scip, "SCIPcaptureRow", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1546 
1547  SCIProwCapture(row);
1548 
1549  return SCIP_OKAY;
1550 }
1551 
1552 /** decreases usage counter of LP row, and frees memory if necessary
1553  *
1554  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1555  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1556  *
1557  * @pre this method can be called in one of the following stages of the SCIP solving process:
1558  * - \ref SCIP_STAGE_INITSOLVE
1559  * - \ref SCIP_STAGE_SOLVING
1560  * - \ref SCIP_STAGE_EXITSOLVE
1561  */
1563  SCIP* scip, /**< SCIP data structure */
1564  SCIP_ROW** row /**< pointer to LP row */
1565  )
1566 {
1567  SCIP_CALL( SCIPcheckStage(scip, "SCIPreleaseRow", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE) );
1568 
1569  SCIP_CALL( SCIProwRelease(row, scip->mem->probmem, scip->set, scip->lp) );
1570 
1571  return SCIP_OKAY;
1572 }
1573 
1574 /** changes left hand side of LP row
1575  *
1576  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1577  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1578  *
1579  * @pre this method can be called in one of the following stages of the SCIP solving process:
1580  * - \ref SCIP_STAGE_INITSOLVE
1581  * - \ref SCIP_STAGE_SOLVING
1582  */
1584  SCIP* scip, /**< SCIP data structure */
1585  SCIP_ROW* row, /**< LP row */
1586  SCIP_Real lhs /**< new left hand side */
1587  )
1588 {
1589  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgRowLhs", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1590 
1591  assert(!SCIPlpDiving(scip->lp) || (row->lppos == -1));
1592 
1593  SCIP_CALL( SCIProwChgLhs(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->lp, lhs) );
1594 
1595  return SCIP_OKAY;
1596 }
1597 
1598 /** changes right hand side of LP row
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 in one of the following stages of the SCIP solving process:
1604  * - \ref SCIP_STAGE_INITSOLVE
1605  * - \ref SCIP_STAGE_SOLVING
1606  */
1608  SCIP* scip, /**< SCIP data structure */
1609  SCIP_ROW* row, /**< LP row */
1610  SCIP_Real rhs /**< new right hand side */
1611  )
1612 {
1613  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgRowRhs", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1614 
1615  assert(!SCIPlpDiving(scip->lp) || (row->lppos == -1));
1616 
1617  SCIP_CALL( SCIProwChgRhs(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->lp, rhs) );
1618 
1619  return SCIP_OKAY;
1620 }
1621 
1622 /** informs row, that all subsequent additions of variables to the row should be cached and not directly applied;
1623  * after all additions were applied, SCIPflushRowExtensions() must be called;
1624  * while the caching of row extensions is activated, information methods of the row give invalid results;
1625  * caching should be used, if a row is build with SCIPaddVarToRow() calls variable by variable to increase
1626  * the performance
1627  *
1628  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1629  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1630  *
1631  * @pre this method can be called in one of the following stages of the SCIP solving process:
1632  * - \ref SCIP_STAGE_INITSOLVE
1633  * - \ref SCIP_STAGE_SOLVING
1634  */
1636  SCIP* scip, /**< SCIP data structure */
1637  SCIP_ROW* row /**< LP row */
1638  )
1639 {
1640  SCIP_CALL( SCIPcheckStage(scip, "SCIPcacheRowExtensions", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1641 
1642  /* delay the row sorting */
1643  SCIProwDelaySort(row);
1644 
1645  return SCIP_OKAY;
1646 }
1647 
1648 /** flushes all cached row extensions after a call of SCIPcacheRowExtensions() and merges coefficients with
1649  * equal columns into a single coefficient
1650  *
1651  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1652  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1653  *
1654  * @pre this method can be called in one of the following stages of the SCIP solving process:
1655  * - \ref SCIP_STAGE_INITSOLVE
1656  * - \ref SCIP_STAGE_SOLVING
1657  */
1659  SCIP* scip, /**< SCIP data structure */
1660  SCIP_ROW* row /**< LP row */
1661  )
1662 {
1663  SCIP_CALL( SCIPcheckStage(scip, "SCIPflushRowExtensions", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1664 
1665  /* force the row sorting, and merge equal column entries */
1666  SCIProwForceSort(row, scip->set);
1667 
1668  return SCIP_OKAY;
1669 }
1670 
1671 /** resolves variable to columns and adds them with the coefficient to the row
1672  *
1673  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1674  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1675  *
1676  * @attention If the absolute value of val is below the SCIP epsilon tolerance, the variable will not added.
1677  *
1678  * @pre this method can be called in one of the following stages of the SCIP solving process:
1679  * - \ref SCIP_STAGE_INITSOLVE
1680  * - \ref SCIP_STAGE_SOLVING
1681  *
1682  * @note In case calling this method in the enforcement process of an lp solution, it might be that some variables,
1683  * that were not yet in the LP (e.g. dynamic columns) will change their lp solution value returned by SCIP.
1684  * For example, a variable, which has a negative objective value, that has no column in the lp yet, is in the lp solution
1685  * on its upper bound (variables with status SCIP_VARSTATUS_LOOSE are in an lp solution on it's best bound), but
1686  * creating the column, changes the solution value (variable than has status SCIP_VARSTATUS_COLUMN, and the
1687  * initialization sets the lp solution value) to 0.0. (This leads to the conclusion that, if a constraint was
1688  * violated, the linear relaxation might not be violated anymore.)
1689  *
1690  * @note If the variable being added is FIXED (as given by the status SCIP_VARSTATUS_FIXED), then the variable is not
1691  * added to the row, but the corresponding constant is added. Similarly, if the input variable is aggregated (as
1692  * given by the status SCIP_VARSTATUS_AGGREGATED), then the input variable is substituted with its aggregation.
1693  * For other cases, and to better understand the function behavior, please check the code of SCIPvarAddToRow.
1694  */
1696  SCIP* scip, /**< SCIP data structure */
1697  SCIP_ROW* row, /**< LP row */
1698  SCIP_VAR* var, /**< problem variable */
1699  SCIP_Real val /**< value of coefficient */
1700  )
1701 {
1702  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddVarToRow", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1703 
1704  SCIP_CALL( SCIPvarAddToRow(var, scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->transprob, scip->lp, row, val) );
1705 
1706  return SCIP_OKAY;
1707 }
1708 
1709 /** resolves variables to columns and adds them with the coefficients to the row;
1710  * this method caches the row extensions and flushes them afterwards to gain better performance
1711  *
1712  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1713  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1714  *
1715  * @attention If a coefficients absolute value is below the SCIP epsilon tolerance, the variable with its value is not added.
1716  *
1717  * @pre this method can be called in one of the following stages of the SCIP solving process:
1718  * - \ref SCIP_STAGE_INITSOLVE
1719  * - \ref SCIP_STAGE_SOLVING
1720  */
1722  SCIP* scip, /**< SCIP data structure */
1723  SCIP_ROW* row, /**< LP row */
1724  int nvars, /**< number of variables to add to the row */
1725  SCIP_VAR** vars, /**< problem variables to add */
1726  SCIP_Real* vals /**< values of coefficients */
1727  )
1728 {
1729  int v;
1730 
1731  assert(nvars == 0 || vars != NULL);
1732  assert(nvars == 0 || vals != NULL);
1733 
1734  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddVarsToRow", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1735 
1736  /* resize the row to be able to store all variables (at least, if they are COLUMN variables) */
1737  SCIP_CALL( SCIProwEnsureSize(row, scip->mem->probmem, scip->set, SCIProwGetNNonz(row) + nvars) );
1738 
1739  /* delay the row sorting */
1740  SCIProwDelaySort(row);
1741 
1742  /* add the variables to the row */
1743  for( v = 0; v < nvars; ++v )
1744  {
1745  SCIP_CALL( SCIPvarAddToRow(vars[v], scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->transprob, scip->lp,
1746  row, vals[v]) );
1747  }
1748 
1749  /* force the row sorting */
1750  SCIProwForceSort(row, scip->set);
1751 
1752  return SCIP_OKAY;
1753 }
1754 
1755 /** resolves variables to columns and adds them with the same single coefficient to the row;
1756  * this method caches the row extensions and flushes them afterwards to gain better performance
1757  *
1758  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1759  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1760  *
1761  * @attention If the absolute value of val is below the SCIP epsilon tolerance, the variables will not added.
1762  *
1763  * @pre this method can be called in one of the following stages of the SCIP solving process:
1764  * - \ref SCIP_STAGE_INITSOLVE
1765  * - \ref SCIP_STAGE_SOLVING
1766  */
1768  SCIP* scip, /**< SCIP data structure */
1769  SCIP_ROW* row, /**< LP row */
1770  int nvars, /**< number of variables to add to the row */
1771  SCIP_VAR** vars, /**< problem variables to add */
1772  SCIP_Real val /**< unique value of all coefficients */
1773  )
1774 {
1775  int v;
1776 
1777  assert(nvars == 0 || vars != NULL);
1778 
1779  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddVarsToRowSameCoef", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1780 
1781  /* resize the row to be able to store all variables (at least, if they are COLUMN variables) */
1782  SCIP_CALL( SCIProwEnsureSize(row, scip->mem->probmem, scip->set, SCIProwGetNNonz(row) + nvars) );
1783 
1784  /* delay the row sorting */
1785  SCIProwDelaySort(row);
1786 
1787  /* add the variables to the row */
1788  for( v = 0; v < nvars; ++v )
1789  {
1790  SCIP_CALL( SCIPvarAddToRow(vars[v], scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->transprob, scip->lp,
1791  row, val) );
1792  }
1793 
1794  /* force the row sorting */
1795  SCIProwForceSort(row, scip->set);
1796 
1797  return SCIP_OKAY;
1798 }
1799 
1800 /** tries to find a value, such that all row coefficients, if scaled with this value become integral
1801  *
1802  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1803  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1804  *
1805  * @pre this method can be called in one of the following stages of the SCIP solving process:
1806  * - \ref SCIP_STAGE_INITSOLVE
1807  * - \ref SCIP_STAGE_SOLVING
1808  */
1810  SCIP* scip, /**< SCIP data structure */
1811  SCIP_ROW* row, /**< LP row */
1812  SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
1813  SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
1814  SCIP_Longint maxdnom, /**< maximal denominator allowed in rational numbers */
1815  SCIP_Real maxscale, /**< maximal allowed scalar */
1816  SCIP_Bool usecontvars, /**< should the coefficients of the continuous variables also be made integral? */
1817  SCIP_Real* intscalar, /**< pointer to store scalar that would make the coefficients integral, or NULL */
1818  SCIP_Bool* success /**< stores whether returned value is valid */
1819  )
1820 {
1821  SCIP_CALL( SCIPcheckStage(scip, "SCIPcalcRowIntegralScalar", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1822 
1823  SCIP_CALL( SCIProwCalcIntegralScalar(row, scip->set, mindelta, maxdelta, maxdnom, maxscale,
1824  usecontvars, intscalar, success) );
1825 
1826  return SCIP_OKAY;
1827 }
1828 
1829 /** tries to scale row, s.t. all coefficients (of integer variables) become integral
1830  *
1831  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1832  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1833  *
1834  * @pre this method can be called in one of the following stages of the SCIP solving process:
1835  * - \ref SCIP_STAGE_INITSOLVE
1836  * - \ref SCIP_STAGE_SOLVING
1837  */
1839  SCIP* scip, /**< SCIP data structure */
1840  SCIP_ROW* row, /**< LP row */
1841  SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
1842  SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
1843  SCIP_Longint maxdnom, /**< maximal denominator allowed in rational numbers */
1844  SCIP_Real maxscale, /**< maximal value to scale row with */
1845  SCIP_Bool usecontvars, /**< should the coefficients of the continuous variables also be made integral? */
1846  SCIP_Bool* success /**< stores whether row could be made rational */
1847  )
1848 {
1849  SCIP_CALL( SCIPcheckStage(scip, "SCIPmakeRowIntegral", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1850 
1851  SCIP_CALL( SCIProwMakeIntegral(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->stat, scip->lp, mindelta, maxdelta, maxdnom, maxscale,
1852  usecontvars, success) );
1853 
1854  return SCIP_OKAY;
1855 }
1856 
1857 /** marks a row to be not removable from the LP in the current node
1858  *
1859  * @pre this method can be called in the following stage of the SCIP solving process:
1860  * - \ref SCIP_STAGE_SOLVING
1861  */
1863  SCIP* scip, /**< SCIP data structure */
1864  SCIP_ROW* row /**< LP row */
1865  )
1866 {
1867  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPmarkRowNotRemovableLocal", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1868 
1869  SCIProwMarkNotRemovableLocal(row, scip->stat);
1870 }
1871 
1872 /** returns number of integral columns in the row
1873  *
1874  * @return number of integral columns in the row
1875  *
1876  * @pre this method can be called in one of the following stages of the SCIP solving process:
1877  * - \ref SCIP_STAGE_INITSOLVE
1878  * - \ref SCIP_STAGE_SOLVING
1879  */
1881  SCIP* scip, /**< SCIP data structure */
1882  SCIP_ROW* row /**< LP row */
1883  )
1884 {
1885  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowNumIntCols", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1886 
1887  return SCIProwGetNumIntCols(row, scip->set);
1888 }
1889 
1890 /** returns minimal absolute value of row vector's non-zero coefficients
1891  *
1892  * @return minimal absolute value of row vector's non-zero coefficients
1893  *
1894  * @pre this method can be called in one of the following stages of the SCIP solving process:
1895  * - \ref SCIP_STAGE_INITSOLVE
1896  * - \ref SCIP_STAGE_SOLVING
1897  */
1899  SCIP* scip, /**< SCIP data structure */
1900  SCIP_ROW* row /**< LP row */
1901  )
1902 {
1903  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowMinCoef", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1904 
1905  return SCIProwGetMinval(row, scip->set);
1906 }
1907 
1908 /** returns maximal absolute value of row vector's non-zero coefficients
1909  *
1910  * @return maximal absolute value of row vector's non-zero coefficients
1911  *
1912  * @pre this method can be called in one of the following stages of the SCIP solving process:
1913  * - \ref SCIP_STAGE_INITSOLVE
1914  * - \ref SCIP_STAGE_SOLVING
1915  */
1917  SCIP* scip, /**< SCIP data structure */
1918  SCIP_ROW* row /**< LP row */
1919  )
1920 {
1921  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowMaxCoef", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1922 
1923  return SCIProwGetMaxval(row, scip->set);
1924 }
1925 
1926 /** returns the minimal activity of a row w.r.t. the column's bounds
1927  *
1928  * @return the minimal activity of a row w.r.t. the column's bounds
1929  *
1930  * @pre this method can be called in one of the following stages of the SCIP solving process:
1931  * - \ref SCIP_STAGE_SOLVING
1932  */
1934  SCIP* scip, /**< SCIP data structure */
1935  SCIP_ROW* row /**< LP row */
1936  )
1937 {
1938  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowMinActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1939 
1940  return SCIProwGetMinActivity(row, scip->set, scip->stat);
1941 }
1942 
1943 /** returns the maximal activity of a row w.r.t. the column's bounds
1944  *
1945  * @return the maximal activity of a row w.r.t. the column's bounds
1946  *
1947  * @pre this method can be called in one of the following stages of the SCIP solving process:
1948  * - \ref SCIP_STAGE_SOLVING
1949  */
1951  SCIP* scip, /**< SCIP data structure */
1952  SCIP_ROW* row /**< LP row */
1953  )
1954 {
1955  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowMaxActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1956 
1957  return SCIProwGetMaxActivity(row, scip->set, scip->stat);
1958 }
1959 
1960 /** recalculates the activity of a row in the last LP solution
1961  *
1962  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1963  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1964  *
1965  * @pre this method can be called in one of the following stages of the SCIP solving process:
1966  * - \ref SCIP_STAGE_SOLVING
1967  */
1969  SCIP* scip, /**< SCIP data structure */
1970  SCIP_ROW* row /**< LP row */
1971  )
1972 {
1973  SCIP_CALL( SCIPcheckStage(scip, "SCIPrecalcRowLPActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1974 
1975  SCIProwRecalcLPActivity(row, scip->stat);
1976 
1977  return SCIP_OKAY;
1978 }
1979 
1980 /** returns the activity of a row in the last LP solution
1981  *
1982  * @return activity of a row in the last LP solution
1983  *
1984  * @pre this method can be called in one of the following stages of the SCIP solving process:
1985  * - \ref SCIP_STAGE_SOLVING
1986  */
1988  SCIP* scip, /**< SCIP data structure */
1989  SCIP_ROW* row /**< LP row */
1990  )
1991 {
1992  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowLPActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1993 
1994  return SCIProwGetLPActivity(row, scip->set, scip->stat, scip->lp);
1995 }
1996 
1997 /** returns the feasibility of a row in the last LP solution
1998  *
1999  * @return the feasibility of a row in the last LP solution: negative value means infeasibility
2000  *
2001  * @pre this method can be called in one of the following stages of the SCIP solving process:
2002  * - \ref SCIP_STAGE_SOLVING
2003  */
2005  SCIP* scip, /**< SCIP data structure */
2006  SCIP_ROW* row /**< LP row */
2007  )
2008 {
2009  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowLPFeasibility", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2010 
2011  return SCIProwGetLPFeasibility(row, scip->set, scip->stat, scip->lp);
2012 }
2013 
2014 /** recalculates the activity of a row for the current pseudo solution
2015  *
2016  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2017  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2018  *
2019  * @pre this method can be called in one of the following stages of the SCIP solving process:
2020  * - \ref SCIP_STAGE_SOLVING
2021  */
2023  SCIP* scip, /**< SCIP data structure */
2024  SCIP_ROW* row /**< LP row */
2025  )
2026 {
2027  SCIP_CALL( SCIPcheckStage(scip, "SCIPrecalcRowPseudoActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2028 
2029  SCIProwRecalcPseudoActivity(row, scip->stat);
2030 
2031  return SCIP_OKAY;
2032 }
2033 
2034 /** returns the activity of a row for the current pseudo solution
2035  *
2036  * @return the activity of a row for the current pseudo solution
2037  *
2038  * @pre this method can be called in one of the following stages of the SCIP solving process:
2039  * - \ref SCIP_STAGE_SOLVING
2040  */
2042  SCIP* scip, /**< SCIP data structure */
2043  SCIP_ROW* row /**< LP row */
2044  )
2045 {
2046  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowPseudoActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2047 
2048  return SCIProwGetPseudoActivity(row, scip->set, scip->stat);
2049 }
2050 
2051 /** returns the feasibility of a row for the current pseudo solution: negative value means infeasibility
2052  *
2053  * @return the feasibility of a row for the current pseudo solution: negative value means infeasibility
2054  *
2055  * @pre this method can be called in one of the following stages of the SCIP solving process:
2056  * - \ref SCIP_STAGE_SOLVING
2057  */
2059  SCIP* scip, /**< SCIP data structure */
2060  SCIP_ROW* row /**< LP row */
2061  )
2062 {
2063  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowPseudoFeasibility", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2064 
2065  return SCIProwGetPseudoFeasibility(row, scip->set, scip->stat);
2066 }
2067 
2068 /** recalculates the activity of a row in the last LP or pseudo solution
2069  *
2070  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2071  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2072  *
2073  * @pre this method can be called in one of the following stages of the SCIP solving process:
2074  * - \ref SCIP_STAGE_SOLVING
2075  */
2077  SCIP* scip, /**< SCIP data structure */
2078  SCIP_ROW* row /**< LP row */
2079  )
2080 {
2081  SCIP_CALL( SCIPcheckStage(scip, "SCIPrecalcRowActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2082 
2083  if( SCIPtreeHasCurrentNodeLP(scip->tree) )
2084  SCIProwRecalcLPActivity(row, scip->stat);
2085  else
2086  SCIProwRecalcPseudoActivity(row, scip->stat);
2087 
2088  return SCIP_OKAY;
2089 }
2090 
2091 /** returns the activity of a row in the last LP or pseudo solution
2092  *
2093  * @return the activity of a row in the last LP or pseudo solution
2094  *
2095  * @pre this method can be called in one of the following stages of the SCIP solving process:
2096  * - \ref SCIP_STAGE_SOLVING
2097  */
2099  SCIP* scip, /**< SCIP data structure */
2100  SCIP_ROW* row /**< LP row */
2101  )
2102 {
2103  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2104 
2105  if( SCIPtreeHasCurrentNodeLP(scip->tree) )
2106  return SCIProwGetLPActivity(row, scip->set, scip->stat, scip->lp);
2107  else
2108  return SCIProwGetPseudoActivity(row, scip->set, scip->stat);
2109 }
2110 
2111 /** returns the feasibility of a row in the last LP or pseudo solution
2112  *
2113  * @return the feasibility of a row in the last LP or pseudo solution
2114  *
2115  * @pre this method can be called in one of the following stages of the SCIP solving process:
2116  * - \ref SCIP_STAGE_SOLVING
2117  */
2119  SCIP* scip, /**< SCIP data structure */
2120  SCIP_ROW* row /**< LP row */
2121  )
2122 {
2123  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowFeasibility", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2124 
2125  if( SCIPtreeHasCurrentNodeLP(scip->tree) )
2126  return SCIProwGetLPFeasibility(row, scip->set, scip->stat, scip->lp);
2127  else
2128  return SCIProwGetPseudoFeasibility(row, scip->set, scip->stat);
2129 }
2130 
2131 /** returns the activity of a row for the given primal solution
2132  *
2133  * @return the activitiy of a row for the given primal solution
2134  *
2135  * @pre this method can be called in one of the following stages of the SCIP solving process:
2136  * - \ref SCIP_STAGE_SOLVING
2137  */
2139  SCIP* scip, /**< SCIP data structure */
2140  SCIP_ROW* row, /**< LP row */
2141  SCIP_SOL* sol /**< primal CIP solution */
2142  )
2143 {
2144  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowSolActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2145 
2146  if( sol != NULL )
2147  return SCIProwGetSolActivity(row, scip->set, scip->stat, sol);
2148  else if( SCIPtreeHasCurrentNodeLP(scip->tree) )
2149  return SCIProwGetLPActivity(row, scip->set, scip->stat, scip->lp);
2150  else
2151  return SCIProwGetPseudoActivity(row, scip->set, scip->stat);
2152 }
2153 
2154 /** returns the feasibility of a row for the given primal solution
2155  *
2156  * @return the feasibility of a row for the given primal solution
2157  *
2158  * @pre this method can be called in one of the following stages of the SCIP solving process:
2159  * - \ref SCIP_STAGE_SOLVING
2160  */
2162  SCIP* scip, /**< SCIP data structure */
2163  SCIP_ROW* row, /**< LP row */
2164  SCIP_SOL* sol /**< primal CIP solution */
2165  )
2166 {
2167  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowSolFeasibility", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2168 
2169  if( sol != NULL )
2170  return SCIProwGetSolFeasibility(row, scip->set, scip->stat, sol);
2171  else if( SCIPtreeHasCurrentNodeLP(scip->tree) )
2172  return SCIProwGetLPFeasibility(row, scip->set, scip->stat, scip->lp);
2173  else
2174  return SCIProwGetPseudoFeasibility(row, scip->set, scip->stat);
2175 }
2176 
2177 /** returns the parallelism of row with objective function
2178  *
2179  * @return 1 is returned if the row is parallel to the objective function and 0 if it is orthogonal
2180  *
2181  * @pre this method can be called in one of the following stages of the SCIP solving process:
2182  * - \ref SCIP_STAGE_SOLVING
2183  */
2185  SCIP* scip, /**< SCIP data structure */
2186  SCIP_ROW* row /**< LP row */
2187  )
2188 {
2189  assert(row != NULL);
2190 
2191  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowObjParallelism", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2192 
2193  return SCIProwGetObjParallelism(row, scip->set, scip->lp);
2194 }
2195 
2196 /** output row to file stream via the message handler system
2197  *
2198  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2199  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2200  *
2201  * @pre this method can be called in one of the following stages of the SCIP solving process:
2202  * - \ref SCIP_STAGE_SOLVING
2203  * - \ref SCIP_STAGE_SOLVED
2204  * - \ref SCIP_STAGE_EXITSOLVE
2205  */
2207  SCIP* scip, /**< SCIP data structure */
2208  SCIP_ROW* row, /**< LP row */
2209  FILE* file /**< output file (or NULL for standard output) */
2210  )
2211 {
2212  assert(row != NULL);
2213 
2214  SCIP_CALL( SCIPcheckStage(scip, "SCIPprintRow", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
2215 
2216  SCIProwPrint(row, scip->messagehdlr, file);
2217 
2218  return SCIP_OKAY;
2219 }
2220 
2221 /** initiates LP diving, making methods SCIPchgVarObjDive(), SCIPchgVarLbDive(), and SCIPchgVarUbDive() available
2222  *
2223  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2224  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2225  *
2226  * @pre This method can be called if @p scip is in one of the following stages:
2227  * - \ref SCIP_STAGE_SOLVING
2228  *
2229  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2230  *
2231  * @note diving is allowed even if the current LP is not flushed, not solved, or not solved to optimality; be aware
2232  * that solving the (first) diving LP may take longer than expect and that the latter two cases could stem from
2233  * numerical troubles during the last LP solve; because of this, most users will want to call this method only if
2234  * SCIPgetLPSolstat(scip) == SCIP_LPSOLSTAT_OPTIMAL
2235  */
2237  SCIP* scip /**< SCIP data structure */
2238  )
2239 {
2240  assert(scip != NULL);
2241 
2242  SCIP_CALL( SCIPcheckStage(scip, "SCIPstartDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2244 
2245  if( SCIPlpDiving(scip->lp) )
2246  {
2247  SCIPerrorMessage("already in diving mode\n");
2248  return SCIP_INVALIDCALL;
2249  }
2250 
2251  if( SCIPtreeProbing(scip->tree) )
2252  {
2253  SCIPerrorMessage("cannot start diving while being in probing mode\n");
2254  return SCIP_INVALIDCALL;
2255  }
2256 
2258  {
2259  SCIPerrorMessage("cannot start diving if LP has not been constructed\n");
2260  return SCIP_INVALIDCALL;
2261  }
2262  assert(SCIPtreeHasCurrentNodeLP(scip->tree));
2263 
2264  SCIP_CALL( SCIPlpStartDive(scip->lp, scip->mem->probmem, scip->set, scip->stat) );
2265 
2266  /* remember the relaxation solution to reset it later */
2267  if( SCIPisRelaxSolValid(scip) )
2268  {
2269  SCIP_CALL( SCIPtreeStoreRelaxSol(scip->tree, scip->set, scip->relaxation, scip->transprob) );
2270  }
2271 
2272  return SCIP_OKAY;
2273 }
2274 
2275 /** quits LP diving and resets bounds and objective values of columns to the current node's values
2276  *
2277  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2278  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2279  *
2280  * @pre This method can be called if @p scip is in one of the following stages:
2281  * - \ref SCIP_STAGE_SOLVING
2282  *
2283  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2284  */
2286  SCIP* scip /**< SCIP data structure */
2287  )
2288 {
2289  assert(scip != NULL);
2290 
2291  SCIP_CALL( SCIPcheckStage(scip, "SCIPendDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2292 
2293  if( !SCIPlpDiving(scip->lp) )
2294  {
2295  SCIPerrorMessage("not in diving mode\n");
2296  return SCIP_INVALIDCALL;
2297  }
2298 
2299  /* unmark the diving flag in the LP and reset all variables' objective and bound values */
2300  SCIP_CALL( SCIPlpEndDive(scip->lp, scip->mem->probmem, scip->set, scip->messagehdlr, scip->stat, scip->eventqueue, scip->eventfilter,
2301  scip->transprob, scip->transprob->vars, scip->transprob->nvars) );
2302 
2303  /* the lower bound may have changed slightly due to LP resolve in SCIPlpEndDive() */
2304  if( !scip->lp->resolvelperror && scip->tree->focusnode != NULL && SCIPlpIsRelax(scip->lp) && SCIPlpIsSolved(scip->lp) )
2305  {
2306  assert(SCIPtreeIsFocusNodeLPConstructed(scip->tree));
2307  SCIP_CALL( SCIPnodeUpdateLowerboundLP(scip->tree->focusnode, scip->set, scip->stat, scip->tree, scip->transprob,
2308  scip->origprob, scip->lp) );
2309  }
2310  /* reset the probably changed LP's cutoff bound */
2311  SCIP_CALL( SCIPlpSetCutoffbound(scip->lp, scip->set, scip->transprob, scip->primal->cutoffbound) );
2312  assert(scip->lp->cutoffbound == scip->primal->cutoffbound); /*lint !e777*/
2313 
2314  /* if a new best solution was created, the cutoff of the tree was delayed due to diving;
2315  * the cutoff has to be done now.
2316  */
2317  if( scip->tree->cutoffdelayed )
2318  {
2319  SCIP_CALL( SCIPtreeCutoff(scip->tree, scip->reopt, scip->mem->probmem, scip->set, scip->stat, scip->eventfilter,
2320  scip->eventqueue, scip->lp, scip->primal->cutoffbound) );
2321  }
2322 
2323  /* if a relaxation was stored before diving, restore it now */
2324  if( scip->tree->probdiverelaxstored )
2325  {
2326  SCIP_CALL( SCIPtreeRestoreRelaxSol(scip->tree, scip->set, scip->relaxation, scip->transprob) );
2327  }
2328 
2329  return SCIP_OKAY;
2330 }
2331 
2332 /** changes cutoffbound in current dive
2333  *
2334  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2335  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2336  *
2337  * @pre This method can be called if @p scip is in one of the following stages:
2338  * - \ref SCIP_STAGE_SOLVING
2339  *
2340  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2341  */
2343  SCIP* scip, /**< SCIP data structure */
2344  SCIP_Real newcutoffbound /**< new cutoffbound */
2345  )
2346 {
2347  assert(scip != NULL);
2348 
2349  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgCutoffboundDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2350 
2351  if( !SCIPlpDiving(scip->lp) )
2352  {
2353  SCIPerrorMessage("not in diving mode\n");
2354  return SCIP_INVALIDCALL;
2355  }
2356 
2357  SCIP_CALL( SCIPlpSetCutoffbound(scip->lp, scip->set, scip->transprob, newcutoffbound) );
2358 
2359  return SCIP_OKAY;
2360 }
2361 
2362 /** changes variable's objective value in current dive
2363  *
2364  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2365  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2366  *
2367  * @pre This method can be called if @p scip is in one of the following stages:
2368  * - \ref SCIP_STAGE_SOLVING
2369  *
2370  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2371  */
2373  SCIP* scip, /**< SCIP data structure */
2374  SCIP_VAR* var, /**< variable to change the objective value for */
2375  SCIP_Real newobj /**< new objective value */
2376  )
2377 {
2378  assert(scip != NULL);
2379  assert(var != NULL);
2380 
2381  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgVarObjDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2382 
2383  if( !SCIPlpDiving(scip->lp) )
2384  {
2385  SCIPerrorMessage("not in diving mode\n");
2386  return SCIP_INVALIDCALL;
2387  }
2388 
2389  /* invalidate the LP's cutoff bound, since this has nothing to do with the current objective value anymore;
2390  * the cutoff bound is reset in SCIPendDive()
2391  */
2392  SCIP_CALL( SCIPlpSetCutoffbound(scip->lp, scip->set, scip->transprob, SCIPsetInfinity(scip->set)) );
2393 
2394  /* mark the LP's objective function invalid */
2396 
2397  /* change the objective value of the variable in the diving LP */
2398  SCIP_CALL( SCIPvarChgObjDive(var, scip->set, scip->lp, newobj) );
2399 
2400  return SCIP_OKAY;
2401 }
2402 
2403 /** changes variable's lower bound in current dive
2404  *
2405  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2406  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2407  *
2408  * @pre This method can be called if @p scip is in one of the following stages:
2409  * - \ref SCIP_STAGE_SOLVING
2410  *
2411  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2412  */
2414  SCIP* scip, /**< SCIP data structure */
2415  SCIP_VAR* var, /**< variable to change the bound for */
2416  SCIP_Real newbound /**< new value for bound */
2417  )
2418 {
2419  assert(scip != NULL);
2420  assert(var != NULL);
2421 
2422  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgVarLbDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2423 
2424  if( !SCIPlpDiving(scip->lp) )
2425  {
2426  SCIPerrorMessage("not in diving mode\n");
2427  return SCIP_INVALIDCALL;
2428  }
2429 
2430  SCIP_CALL( SCIPvarChgLbDive(var, scip->set, scip->lp, newbound) );
2431 
2432  return SCIP_OKAY;
2433 }
2434 
2435 /** changes variable's upper bound in current dive
2436  *
2437  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2438  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2439  *
2440  * @pre This method can be called if @p scip is in one of the following stages:
2441  * - \ref SCIP_STAGE_SOLVING
2442  *
2443  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2444  */
2446  SCIP* scip, /**< SCIP data structure */
2447  SCIP_VAR* var, /**< variable to change the bound for */
2448  SCIP_Real newbound /**< new value for bound */
2449  )
2450 {
2451  assert(scip != NULL);
2452  assert(var != NULL);
2453 
2454  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgVarUbDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2455 
2456  if( !SCIPlpDiving(scip->lp) )
2457  {
2458  SCIPerrorMessage("not in diving mode\n");
2459  return SCIP_INVALIDCALL;
2460  }
2461 
2462  SCIP_CALL( SCIPvarChgUbDive(var, scip->set, scip->lp, newbound) );
2463 
2464  return SCIP_OKAY;
2465 }
2466 
2467 /** adds a row to the LP in current dive
2468  *
2469  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2470  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2471  *
2472  * @pre This method can be called if @p scip is in one of the following stages:
2473  * - \ref SCIP_STAGE_SOLVING
2474  *
2475  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2476  */
2478  SCIP* scip, /**< SCIP data structure */
2479  SCIP_ROW* row /**< row to be added */
2480  )
2481 {
2482  SCIP_NODE* node;
2483  int depth;
2484 
2485  assert(scip != NULL);
2486  assert(row != NULL);
2487 
2488  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddRowDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2489 
2490  if( !SCIPlpDiving(scip->lp) )
2491  {
2492  SCIPerrorMessage("not in diving mode\n");
2493  return SCIP_INVALIDCALL;
2494  }
2495 
2496  /* get depth of current node */
2497  node = SCIPtreeGetCurrentNode(scip->tree);
2498  assert(node != NULL);
2499  depth = SCIPnodeGetDepth(node);
2500 
2501  SCIP_CALL( SCIPlpAddRow(scip->lp, scip->mem->probmem, scip->set, scip->eventqueue, scip->eventfilter, row, depth) );
2502 
2503  return SCIP_OKAY;
2504 }
2505 
2506 /** changes row lhs in current dive, change will be undone after diving ends, for permanent changes use SCIPchgRowLhs()
2507  *
2508  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2509  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2510  *
2511  * @pre This method can be called if @p scip is in one of the following stages:
2512  * - \ref SCIP_STAGE_SOLVING
2513  *
2514  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2515  */
2517  SCIP* scip, /**< SCIP data structure */
2518  SCIP_ROW* row, /**< row to change the lhs for */
2519  SCIP_Real newlhs /**< new value for lhs */
2520  )
2521 {
2522  assert(scip != NULL);
2523  assert(row != NULL);
2524 
2525  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgRowLhsDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2526 
2527  if( !SCIPlpDiving(scip->lp) )
2528  {
2529  SCIPerrorMessage("not in diving mode\n");
2530  return SCIP_INVALIDCALL;
2531  }
2532 
2534  SCIP_CALL( SCIProwChgLhs(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->lp, newlhs) );
2535 
2536  return SCIP_OKAY;
2537 }
2538 
2539 /** changes row rhs in current dive, change will be undone after diving ends, for permanent changes use SCIPchgRowRhs()
2540  *
2541  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2542  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2543  *
2544  * @pre This method can be called if @p scip is in one of the following stages:
2545  * - \ref SCIP_STAGE_SOLVING
2546  *
2547  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2548  */
2550  SCIP* scip, /**< SCIP data structure */
2551  SCIP_ROW* row, /**< row to change the lhs for */
2552  SCIP_Real newrhs /**< new value for rhs */
2553  )
2554 {
2555  assert(scip != NULL);
2556  assert(row != NULL);
2557 
2558  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgRowRhsDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2559 
2560  if( !SCIPlpDiving(scip->lp) )
2561  {
2562  SCIPerrorMessage("not in diving mode\n");
2563  return SCIP_INVALIDCALL;
2564  }
2565 
2567  SCIP_CALL( SCIProwChgRhs(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->lp, newrhs) );
2568 
2569  return SCIP_OKAY;
2570 }
2571 
2572 /** gets variable's objective value in current dive
2573  *
2574  * @return the variable's objective value in current dive.
2575  *
2576  * @pre This method can be called if @p scip is in one of the following stages:
2577  * - \ref SCIP_STAGE_SOLVING
2578  *
2579  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2580  */
2582  SCIP* scip, /**< SCIP data structure */
2583  SCIP_VAR* var /**< variable to get the bound for */
2584  )
2585 {
2586  assert(scip != NULL);
2587  assert(var != NULL);
2588 
2589  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetVarObjDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2590 
2591  if( !SCIPlpDiving(scip->lp) )
2592  {
2593  SCIPerrorMessage("not in diving mode\n");
2594  SCIPABORT();
2595  return SCIP_INVALID; /*lint !e527*/
2596  }
2597 
2598  return SCIPvarGetObjLP(var);
2599 }
2600 
2601 /** gets variable's lower bound in current dive
2602  *
2603  * @return the variable's lower bound in current dive.
2604  *
2605  * @pre This method can be called if @p scip is in one of the following stages:
2606  * - \ref SCIP_STAGE_SOLVING
2607  *
2608  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2609  */
2611  SCIP* scip, /**< SCIP data structure */
2612  SCIP_VAR* var /**< variable to get the bound for */
2613  )
2614 {
2615  assert(scip != NULL);
2616  assert(var != NULL);
2617 
2618  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetVarLbDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2619 
2620  if( !SCIPlpDiving(scip->lp) )
2621  {
2622  SCIPerrorMessage("not in diving mode\n");
2623  SCIPABORT();
2624  return SCIP_INVALID; /*lint !e527*/
2625  }
2626 
2627  return SCIPvarGetLbLP(var, scip->set);
2628 }
2629 
2630 /** gets variable's upper bound in current dive
2631  *
2632  * @return the variable's upper bound in current dive.
2633  *
2634  * @pre This method can be called if @p scip is in one of the following stages:
2635  * - \ref SCIP_STAGE_SOLVING
2636  *
2637  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2638  */
2640  SCIP* scip, /**< SCIP data structure */
2641  SCIP_VAR* var /**< variable to get the bound for */
2642  )
2643 {
2644  assert(scip != NULL);
2645  assert(var != NULL);
2646 
2647  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetVarUbDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2648 
2649  if( !SCIPlpDiving(scip->lp) )
2650  {
2651  SCIPerrorMessage("not in diving mode\n");
2652  SCIPABORT();
2653  return SCIP_INVALID; /*lint !e527*/
2654  }
2655 
2656  return SCIPvarGetUbLP(var, scip->set);
2657 }
2658 
2659 /** solves the LP of the current dive; no separation or pricing is applied
2660  *
2661  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2662  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2663  *
2664  * @pre This method can be called if @p scip is in one of the following stages:
2665  * - \ref SCIP_STAGE_SOLVING
2666  *
2667  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2668  *
2669  * @note be aware that the LP solve may take longer than expected if SCIPgetLPSolstat(scip) != SCIP_LPSOLSTAT_OPTIMAL,
2670  * compare the explanation of SCIPstartDive()
2671  */
2673  SCIP* scip, /**< SCIP data structure */
2674  int itlim, /**< maximal number of LP iterations to perform, or -1 for no limit */
2675  SCIP_Bool* lperror, /**< pointer to store whether an unresolved LP error occurred */
2676  SCIP_Bool* cutoff /**< pointer to store whether the diving LP was infeasible or the objective
2677  * limit was reached (or NULL, if not needed) */
2678  )
2679 {
2680  assert(scip != NULL);
2681 
2682  SCIP_CALL( SCIPcheckStage(scip, "SCIPsolveDiveLP", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2683 
2684  if( !SCIPlpDiving(scip->lp) )
2685  {
2686  SCIPerrorMessage("not in diving mode\n");
2687  return SCIP_INVALIDCALL;
2688  }
2689 
2690  if( cutoff != NULL )
2691  *cutoff = FALSE;
2692 
2693  /* solve diving LP */
2694  SCIP_CALL( SCIPlpSolveAndEval(scip->lp, scip->set, scip->messagehdlr, scip->mem->probmem, scip->stat,
2695  scip->eventqueue, scip->eventfilter, scip->transprob, (SCIP_Longint)itlim, FALSE, FALSE, FALSE, lperror) );
2696 
2697  /* the LP is infeasible or the objective limit was reached */
2699  || (SCIPlpGetSolstat(scip->lp) == SCIP_LPSOLSTAT_OPTIMAL &&
2700  SCIPisGE(scip, SCIPgetLPObjval(scip), SCIPgetCutoffbound(scip))) )
2701  {
2702  /* analyze the infeasible LP (only if the objective was not changed, all columns are in the LP, and no external
2703  * pricers exist) */
2704  if( !scip->set->misc_exactsolve && !(SCIPlpDivingObjChanged(scip->lp) || SCIPlpDivingRowsChanged(scip->lp))
2705  && SCIPprobAllColsInLP(scip->transprob, scip->set, scip->lp) )
2706  {
2707  SCIP_CALL( SCIPconflictAnalyzeLP(scip->conflict, scip->conflictstore, scip->mem->probmem, scip->set, scip->stat, scip->transprob,
2708  scip->origprob, scip->tree, scip->reopt, scip->lp, scip->branchcand, scip->eventqueue, scip->cliquetable, NULL) );
2709  }
2710 
2711  if( cutoff != NULL )
2712  *cutoff = TRUE;
2713  }
2714 
2715  return SCIP_OKAY;
2716 }
2717 
2718 /** returns the number of the node in the current branch and bound run, where the last LP was solved in diving
2719  * or probing mode
2720  *
2721  * @return the number of the node in the current branch and bound run, where the last LP was solved in diving
2722  * or probing mode.
2723  *
2724  * @pre This method can be called if @p scip is in one of the following stages:
2725  * - \ref SCIP_STAGE_TRANSFORMING
2726  * - \ref SCIP_STAGE_TRANSFORMED
2727  * - \ref SCIP_STAGE_INITPRESOLVE
2728  * - \ref SCIP_STAGE_PRESOLVING
2729  * - \ref SCIP_STAGE_EXITPRESOLVE
2730  * - \ref SCIP_STAGE_PRESOLVED
2731  * - \ref SCIP_STAGE_INITSOLVE
2732  * - \ref SCIP_STAGE_SOLVING
2733  * - \ref SCIP_STAGE_SOLVED
2734  * - \ref SCIP_STAGE_EXITSOLVE
2735  * - \ref SCIP_STAGE_FREETRANS
2736  *
2737  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2738  */
2740  SCIP* scip /**< SCIP data structure */
2741  )
2742 {
2743  assert(scip != NULL);
2744 
2745  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLastDivenode", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
2746 
2747  return scip->stat->lastdivenode;
2748 }
2749 
2750 /** returns whether we are in diving mode
2751  *
2752  * @return whether we are in diving mode.
2753  *
2754  * @pre This method can be called if @p scip is in one of the following stages:
2755  * - \ref SCIP_STAGE_TRANSFORMING
2756  * - \ref SCIP_STAGE_TRANSFORMED
2757  * - \ref SCIP_STAGE_INITPRESOLVE
2758  * - \ref SCIP_STAGE_PRESOLVING
2759  * - \ref SCIP_STAGE_EXITPRESOLVE
2760  * - \ref SCIP_STAGE_PRESOLVED
2761  * - \ref SCIP_STAGE_INITSOLVE
2762  * - \ref SCIP_STAGE_SOLVING
2763  * - \ref SCIP_STAGE_SOLVED
2764  * - \ref SCIP_STAGE_EXITSOLVE
2765  * - \ref SCIP_STAGE_FREETRANS
2766  *
2767  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2768  */
2770  SCIP* scip /**< SCIP data structure */
2771  )
2772 {
2773  assert(scip != NULL);
2774 
2775  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPinDive", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
2776 
2777  return SCIPlpDiving(scip->lp);
2778 }
2779 
2780 /** computes two measures for dual degeneracy (dual degeneracy rate and variable-constraint ratio)
2781  * based on the changes applied when reducing the problem to the optimal face
2782  *
2783  * returns the dual degeneracy rate, i.e., the share of nonbasic variables with reduced cost 0
2784  * and the variable-constraint ratio, i.e., the number of unfixed variables in relation to the basis size
2785  */
2787  SCIP* scip, /**< SCIP data structure */
2788  SCIP_Real* degeneracy, /**< pointer to store the dual degeneracy rate */
2789  SCIP_Real* varconsratio /**< pointer to store the variable-constraint ratio */
2790  )
2791 {
2792  assert(scip != NULL);
2793  assert(degeneracy != NULL);
2794  assert(varconsratio != NULL);
2795 
2796  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetLPDualDegeneracy", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2797 
2798  SCIP_CALL( SCIPlpGetDualDegeneracy(scip->lp, scip->set, scip->stat, degeneracy, varconsratio) );
2799 
2800  return SCIP_OKAY;
2801 }
SCIP_Real cutoffbound
Definition: struct_primal.h:55
SCIP_STAT * stat
Definition: struct_scip.h:79
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
void SCIPcolMarkNotRemovableLocal(SCIP_COL *col, SCIP_STAT *stat)
Definition: lp.c:4755
SCIP_Real SCIProwGetSolFeasibility(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
Definition: lp.c:6512
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
void SCIPlpResetFeastol(SCIP_LP *lp, SCIP_SET *set)
Definition: lp.c:10285
SCIP_RETCODE SCIPgetLPBInvRow(SCIP *scip, int r, SCIP_Real *coefs, int *inds, int *ninds)
Definition: scip_lp.c:714
SCIP_RETCODE SCIPconflictAnalyzeLP(SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *success)
Definition: conflict.c:8676
SCIP_Bool SCIPlpDivingRowsChanged(SCIP_LP *lp)
Definition: lp.c:17881
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
SCIP_Bool SCIPlpDiving(SCIP_LP *lp)
Definition: lp.c:17839
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
Definition: scip_tree.c:91
public methods for branch and bound tree
internal methods for branch and bound tree
SCIP_CONFLICT * conflict
Definition: struct_scip.h:96
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
SCIP_Real SCIProwGetMinval(SCIP_ROW *row, SCIP_SET *set)
Definition: lp.c:6691
void SCIPsetLPFeastol(SCIP *scip, SCIP_Real newfeastol)
Definition: scip_lp.c:438
SCIP_RETCODE SCIPlpComputeRelIntPoint(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_LP *lp, SCIP_PROB *prob, SCIP_Bool relaxrows, SCIP_Bool inclobjcutoff, SCIP_Real timelimit, int iterlimit, SCIP_Real *point, SCIP_Bool *success)
Definition: lp.c:18595
public methods for memory management
SCIP_RETCODE SCIPlpGetBInvCol(SCIP_LP *lp, int c, SCIP_Real *coef, int *inds, int *ninds)
Definition: lp.c:9876
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
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_Real SCIProwGetPseudoActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
Definition: lp.c:6426
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
void SCIProwRecalcLPActivity(SCIP_ROW *row, SCIP_STAT *stat)
Definition: lp.c:6176
SCIP_RETCODE SCIPlpInterrupt(SCIP_LP *lp, SCIP_Bool interrupt)
Definition: lp.c:10121
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
int SCIProwGetNNonz(SCIP_ROW *row)
Definition: lp.c:17205
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_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
void SCIProwCapture(SCIP_ROW *row)
Definition: lp.c:5343
SCIP_EVENTQUEUE * eventqueue
Definition: struct_scip.h:89
SCIP_PRIMAL * primal
Definition: struct_scip.h:94
interface methods for specific LP solvers
SCIP_RETCODE SCIPconstructCurrentLP(BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_PRICESTORE *pricestore, SCIP_SEPASTORE *sepastore, SCIP_CUTPOOL *cutpool, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool newinitconss, SCIP_Bool *cutoff)
Definition: solve.c:1281
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
Definition: set.c:6080
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
SCIP_Real SCIPlpGetGlobalPseudoObjval(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
Definition: lp.c:13273
SCIP_RETCODE SCIProwEnsureSize(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, int num)
Definition: lp.c:629
SCIP_Real SCIPvarGetLbLP(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:12940
SCIP_BRANCHCAND * branchcand
Definition: struct_scip.h:90
SCIP_Bool probdiverelaxstored
Definition: struct_tree.h:251
#define FALSE
Definition: def.h:96
SCIP_RETCODE SCIPlpWrite(SCIP_LP *lp, const char *fname)
Definition: lp.c:16519
SCIP_Bool SCIPlpIsSolBasic(SCIP_LP *lp)
Definition: lp.c:17829
SCIP_Real objoffset
Definition: struct_prob.h:50
SCIP_STAGE stage
Definition: struct_set.h:74
#define TRUE
Definition: def.h:95
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
SCIP_Real SCIPlpGetRootColumnObjval(SCIP_LP *lp)
Definition: lp.c:17744
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
SCIP_RETCODE SCIPvarChgLbDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newbound)
Definition: var.c:8254
SCIP_RETCODE SCIPlpEndDive(SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_PROB *prob, SCIP_VAR **vars, int nvars)
Definition: lp.c:16101
SCIP_RETCODE SCIProwMakeIntegral(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Bool usecontvars, SCIP_Bool *success)
Definition: lp.c:5985
SCIP_RETCODE SCIPlpSolveAndEval(SCIP_LP *lp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_PROB *prob, SCIP_Longint itlim, SCIP_Bool limitresolveiters, SCIP_Bool aging, SCIP_Bool keepsol, SCIP_Bool *lperror)
Definition: lp.c:12416
SCIP_ROW ** SCIPlpGetRows(SCIP_LP *lp)
Definition: lp.c:17604
SCIP_RETCODE SCIPrecalcRowActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2076
SCIP_Real SCIPlpGetPseudoObjval(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
Definition: lp.c:13305
SCIP_RETCODE SCIPlpiGetRealSolQuality(SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
Definition: lpi_clp.cpp:2940
SCIP_PROB * transprob
Definition: struct_scip.h:98
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
int SCIPnodeGetDepth(SCIP_NODE *node)
Definition: tree.c:7453
SCIP_RETCODE SCIPconstructLP(SCIP *scip, SCIP_Bool *cutoff)
Definition: scip_lp.c:124
#define SCIPfreeBufferArray(scip, ptr)
Definition: scip_mem.h:136
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
public methods for SCIP variables
SCIP_Bool SCIPisRootLPRelax(SCIP *scip)
Definition: scip_lp.c:351
SCIP_LPSOLSTAT SCIPlpGetSolstat(SCIP_LP *lp)
Definition: lp.c:13106
internal methods for LP management
SCIP_PROB * origprob
Definition: struct_scip.h:80
SCIP_Bool SCIPtreeIsFocusNodeLPConstructed(SCIP_TREE *tree)
Definition: tree.c:8366
SCIP_Real SCIPgetRowFeasibility(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2118
SCIP_Bool SCIPlpIsRootLPRelax(SCIP_LP *lp)
Definition: lp.c:17722
SCIP_RETCODE SCIPlpRecordOldRowSideDive(SCIP_LP *lp, SCIP_ROW *row, SCIP_SIDETYPE sidetype)
Definition: lp.c:16283
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
public methods for numerical tolerances
int SCIPlpGetNCols(SCIP_LP *lp)
Definition: lp.c:17567
SCIP_Real SCIPvarGetUbLP(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:13010
public methods for querying solving statistics
SCIP_PRICESTORE * pricestore
Definition: struct_scip.h:101
public methods for the branch-and-bound tree
SCIP_Bool SCIPisLPConstructed(SCIP *scip)
Definition: scip_lp.c:101
SCIP_Bool SCIPisLPRelax(SCIP *scip)
Definition: scip_lp.c:225
SCIP_Real SCIPlpGetRootObjval(SCIP_LP *lp)
Definition: lp.c:17732
SCIP_Bool SCIPisLPSolBasic(SCIP *scip)
Definition: scip_lp.c:667
int lppos
Definition: struct_lp.h:239
void SCIProwForceSort(SCIP_ROW *row, SCIP_SET *set)
Definition: lp.c:6163
SCIP_Real SCIPvarGetObjLP(SCIP_VAR *var)
Definition: var.c:12894
SCIP_MEM * mem
Definition: struct_scip.h:71
SCIP_RETCODE SCIPchgRowLhsDive(SCIP *scip, SCIP_ROW *row, SCIP_Real newlhs)
Definition: scip_lp.c:2516
SCIP_Bool SCIPtreeProbing(SCIP_TREE *tree)
Definition: tree.c:8285
SCIP_Real SCIPgetLPLooseObjval(SCIP *scip)
Definition: scip_lp.c:283
SCIP_Real SCIPgetVarUbDive(SCIP *scip, SCIP_VAR *var)
Definition: scip_lp.c:2639
SCIP_RETCODE SCIPlpStartDive(SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: lp.c:15995
void SCIPmarkRowNotRemovableLocal(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1862
SCIP_RETCODE SCIProwChgLhs(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Real lhs)
Definition: lp.c:5670
SCIP_RETCODE SCIPlpFlush(SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PROB *prob, SCIP_EVENTQUEUE *eventqueue)
Definition: lp.c:8675
SCIP_RETCODE SCIPlpWriteMip(SCIP_LP *lp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *fname, SCIP_Bool genericnames, SCIP_Bool origobj, SCIP_OBJSENSE objsense, SCIP_Real objscale, SCIP_Real objoffset, SCIP_Bool lazyconss)
Definition: lp.c:16534
SCIP_Real SCIPgetRowMinCoef(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1898
SCIP_Bool SCIPlpIsPrimalReliable(SCIP_LP *lp)
Definition: lp.c:17809
internal methods for storing and manipulating the main problem
#define SCIPerrorMessage
Definition: pub_message.h:64
SCIP_EVENTFILTER * eventfilter
Definition: struct_scip.h:88
SCIP_Bool SCIPlpIsDualReliable(SCIP_LP *lp)
Definition: lp.c:17819
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
SCIP_COL ** SCIPlpGetCols(SCIP_LP *lp)
Definition: lp.c:17557
SCIP_RETCODE SCIPchgCutoffboundDive(SCIP *scip, SCIP_Real newcutoffbound)
Definition: scip_lp.c:2342
SCIP_RETCODE SCIPvarChgObjDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newobj)
Definition: var.c:6459
SCIP_RETCODE SCIPcheckStage(SCIP *scip, const char *method, SCIP_Bool init, SCIP_Bool problem, SCIP_Bool transforming, SCIP_Bool transformed, SCIP_Bool initpresolve, SCIP_Bool presolving, SCIP_Bool exitpresolve, SCIP_Bool presolved, SCIP_Bool initsolve, SCIP_Bool solving, SCIP_Bool solved, SCIP_Bool exitsolve, SCIP_Bool freetrans, SCIP_Bool freescip)
Definition: debug.c:2186
SCIP_RETCODE SCIPlpSumRows(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob, SCIP_Real *weights, SCIP_REALARRAY *sumcoef, SCIP_Real *sumlhs, SCIP_Real *sumrhs)
Definition: lp.c:9951
SCIP_CONFLICTSTORE * conflictstore
Definition: struct_scip.h:104
SCIP_OBJSENSE objsense
Definition: struct_prob.h:86
SCIP_RETCODE SCIPsumLPRows(SCIP *scip, SCIP_Real *weights, SCIP_REALARRAY *sumcoef, SCIP_Real *sumlhs, SCIP_Real *sumrhs)
Definition: scip_lp.c:852
SCIP_REOPT * reopt
Definition: struct_scip.h:85
void SCIPresetLPFeastol(SCIP *scip)
Definition: scip_lp.c:452
void SCIProwDelaySort(SCIP_ROW *row)
Definition: lp.c:6152
SCIP_Real cutoffbound
Definition: struct_lp.h:284
SCIP_Real SCIProwGetPseudoFeasibility(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
Definition: lp.c:6454
SCIP_RETCODE SCIPlpAddRow(SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_ROW *row, int depth)
Definition: lp.c:9513
#define NULL
Definition: lpi_spx1.cpp:164
data structures for branch and bound tree
SCIP_Bool userinterrupt
Definition: struct_stat.h:278
int SCIPgetNLPRows(SCIP *scip)
Definition: scip_lp.c:626
internal methods for global SCIP settings
int SCIPgetNUnfixedLPCols(SCIP *scip)
Definition: scip_lp.c:548
#define SCIP_CALL(x)
Definition: def.h:393
void SCIPlpSetFeastol(SCIP_LP *lp, SCIP_SET *set, SCIP_Real newfeastol)
Definition: lp.c:10260
SCIP main data structure.
int SCIPlpGetNRows(SCIP_LP *lp)
Definition: lp.c:17614
void SCIPlpMarkDivingObjChanged(SCIP_LP *lp)
Definition: lp.c:17859
SCIP_Bool resolvelperror
Definition: struct_lp.h:383
SCIP_Real SCIPgetRowLPActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1987
#define SCIPdebugCheckBInvRow(scip, r, coef)
Definition: debug.h:324
SCIP_LPI * SCIPlpGetLPI(SCIP_LP *lp)
Definition: lp.c:17766
SCIP_Real SCIPlpGetObjval(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
Definition: lp.c:13122
void SCIProwPrint(SCIP_ROW *row, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
Definition: lp.c:5303
int SCIProwGetNumIntCols(SCIP_ROW *row, SCIP_SET *set)
Definition: lp.c:6739
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_RETCODE SCIProwRelease(SCIP_ROW **row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
Definition: lp.c:5356
SCIP_CUTPOOL * cutpool
Definition: struct_scip.h:105
SCIP_RETCODE SCIPlpGetDualDegeneracy(SCIP_LP *lp, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *degeneracy, SCIP_Real *varconsratio)
Definition: lp.c:18667
SCIP_CLIQUETABLE * cliquetable
Definition: struct_scip.h:97
SCIP_Real SCIProwGetSolActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
Definition: lp.c:6470
SCIP_Real SCIPlpGetFeastol(SCIP_LP *lp)
Definition: lp.c:10250
internal methods for problem variables
#define SCIPallocBufferArray(scip, ptr, num)
Definition: scip_mem.h:124
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
Definition: scip_sol.c:1221
SCIP_Real SCIPgetRowObjParallelism(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2184
SCIP_RETCODE SCIPlpGetBasisInd(SCIP_LP *lp, int *basisind)
Definition: lp.c:9820
SCIP_RETCODE SCIPgetLPBInvARow(SCIP *scip, int r, SCIP_Real *binvrow, SCIP_Real *coefs, int *inds, int *ninds)
Definition: scip_lp.c:785
SCIP_SEPASTORE * sepastore
Definition: struct_scip.h:102
SCIP_Real SCIPlpGetRootLooseObjval(SCIP_LP *lp)
Definition: lp.c:17756
#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 SCIPlpGetNUnfixedCols(SCIP_LP *lp, SCIP_Real eps)
Definition: lp.c:17577
int SCIPgetRowNumIntCols(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1880
SCIP_RETCODE SCIPlpGetBInvRow(SCIP_LP *lp, int r, SCIP_Real *coef, int *inds, int *ninds)
Definition: lp.c:9854
SCIP_RETCODE SCIPchgVarUbDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_lp.c:2445
SCIP_RETCODE SCIPvarChgUbDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newbound)
Definition: var.c:8344
SCIP_RETCODE SCIPcaptureRow(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1540
SCIP_Bool SCIPlpDivingObjChanged(SCIP_LP *lp)
Definition: lp.c:17849
SCIP_Bool SCIPisLPPrimalReliable(SCIP *scip)
Definition: scip_lp.c:189
methods for debugging
public methods for LP management
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_Longint lastdivenode
Definition: struct_stat.h:111
SCIP_RETCODE SCIPchgRowLhs(SCIP *scip, SCIP_ROW *row, SCIP_Real lhs)
Definition: scip_lp.c:1583
datastructures for block memory pools and memory buffers
SCIP_Bool SCIPprobAllColsInLP(SCIP_PROB *prob, SCIP_SET *set, SCIP_LP *lp)
Definition: prob.c:2309
SCIP_Real SCIPgetLPRootLooseObjval(SCIP *scip)
Definition: scip_lp.c:418
void SCIPmarkColNotRemovableLocal(SCIP *scip, SCIP_COL *col)
Definition: scip_lp.c:1202
SCIP_Bool SCIPtreeHasCurrentNodeLP(SCIP_TREE *tree)
Definition: tree.c:8420
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
datastructures for problem statistics
SCIP_Real SCIPgetRowSolActivity(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
Definition: scip_lp.c:2138
SCIP_Bool cutoffdelayed
Definition: struct_tree.h:238
SCIP_Real num_epsilon
Definition: struct_set.h:432
public methods for the LP relaxation, rows and columns
SCIP_Real SCIProwGetMaxActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
Definition: lp.c:6623
SCIP_Real SCIPlpGetLooseObjval(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
Definition: lp.c:13161
datastructures for storing and manipulating the main problem
SCIP_Real * r
Definition: circlepacking.c:59
SCIP_RETCODE SCIPvarAddToRow(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_PROB *prob, SCIP_LP *lp, SCIP_ROW *row, SCIP_Real val)
Definition: var.c:14278
SCIP_Bool SCIPinDive(SCIP *scip)
Definition: scip_lp.c:2769
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
Definition: scip_lp.c:1562
SCIP_Bool misc_exactsolve
Definition: struct_set.h:393
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
BMS_BLKMEM * probmem
Definition: struct_mem.h:49
SCIP_RETCODE SCIPinterruptLP(SCIP *scip, SCIP_Bool interrupt)
Definition: scip_lp.c:874
SCIP_Real SCIProwGetMinActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
Definition: lp.c:6602
SCIP_RETCODE SCIPchgVarObjDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
Definition: scip_lp.c:2372
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
Definition: lp.c:17034
public methods for solutions
internal methods for conflict analysis
SCIP_RETCODE SCIPlpSetCutoffbound(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob, SCIP_Real cutoffbound)
Definition: lp.c:10205
internal methods for main solving loop and node processing
SCIP_NODE * SCIPtreeGetCurrentNode(SCIP_TREE *tree)
Definition: tree.c:8386
SCIP_Bool SCIPisRelaxSolValid(SCIP *scip)
Definition: scip_var.c:2543
SCIP_SET * set
Definition: struct_scip.h:72
public methods for message output
SCIP_Real SCIPgetRowLPFeasibility(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2004
data structures for LP management
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
Definition: message.c:618
SCIP_Real SCIProwGetLPFeasibility(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
Definition: lp.c:6258
SCIP_MESSAGEHDLR * messagehdlr
Definition: struct_scip.h:75
SCIP_NODETYPE SCIPnodeGetType(SCIP_NODE *node)
Definition: tree.c:7433
#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_VAR ** vars
Definition: struct_prob.h:64
SCIP_Bool SCIPlpIsSolved(SCIP_LP *lp)
Definition: lp.c:17799
SCIP_Real SCIProwGetObjParallelism(SCIP_ROW *row, SCIP_SET *set, SCIP_LP *lp)
Definition: lp.c:7804
SCIP_RETCODE SCIPtreeStoreRelaxSol(SCIP_TREE *tree, SCIP_SET *set, SCIP_RELAXATION *relaxation, SCIP_PROB *transprob)
Definition: tree.c:7029
SCIP_Real SCIPgetRowMinActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1933
SCIP_RETCODE SCIProwCreate(SCIP_ROW **row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, const char *name, int len, SCIP_COL **cols, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_ROWORIGINTYPE origintype, void *origin, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
Definition: lp.c:5114
datastructures for collecting primal CIP solutions and primal informations
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
#define SCIP_INVALID
Definition: def.h:206
SCIP_RETCODE SCIProwChgRhs(SCIP_ROW *row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Real rhs)
Definition: lp.c:5702
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
SCIP_Bool SCIPlpIsRelax(SCIP_LP *lp)
Definition: lp.c:17789
#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 SCIProwCalcIntegralScalar(SCIP_ROW *row, SCIP_SET *set, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Bool usecontvars, SCIP_Real *intscalar, SCIP_Bool *success)
Definition: lp.c:5751
SCIP_RETCODE SCIPnodeUpdateLowerboundLP(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_LP *lp)
Definition: tree.c:2409
SCIP_TREE * tree
Definition: struct_scip.h:95
SCIP_RETCODE SCIPlpGetBInvARow(SCIP_LP *lp, int r, SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
Definition: lp.c:9902
void SCIProwMarkNotRemovableLocal(SCIP_ROW *row, SCIP_STAT *stat)
Definition: lp.c:7882
SCIP_RETCODE SCIPstartDive(SCIP *scip)
Definition: scip_lp.c:2236
SCIP_RELAXATION * relaxation
Definition: struct_scip.h:93
SCIP_Real SCIProwGetMaxval(SCIP_ROW *row, SCIP_SET *set)
Definition: lp.c:6675
SCIP_Real SCIPcolGetFarkasCoef(SCIP_COL *col, SCIP_STAT *stat, SCIP_LP *lp)
Definition: lp.c:4139
SCIP_Real SCIProwGetLPActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
Definition: lp.c:6228
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 SCIPtreeRestoreRelaxSol(SCIP_TREE *tree, SCIP_SET *set, SCIP_RELAXATION *relaxation, SCIP_PROB *transprob)
Definition: tree.c:7073
SCIP_RETCODE SCIPlpGetBInvACol(SCIP_LP *lp, int c, SCIP_Real *coef, int *inds, int *ninds)
Definition: lp.c:9927
SCIP_RETCODE SCIPgetLPRowsData(SCIP *scip, SCIP_ROW ***rows, int *nrows)
Definition: scip_lp.c:570
SCIP_Real SCIPgetPseudoObjval(SCIP *scip)
Definition: scip_lp.c:333
SCIP_RETCODE SCIPendDive(SCIP *scip)
Definition: scip_lp.c:2285
#define SCIP_CALL_ABORT(x)
Definition: def.h:372
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_Real SCIPcolGetRedcost(SCIP_COL *col, SCIP_STAT *stat, SCIP_LP *lp)
Definition: lp.c:3956
SCIP_LP * lp
Definition: struct_scip.h:91
SCIP_Real SCIPlpGetColumnObjval(SCIP_LP *lp)
Definition: lp.c:13150
void SCIProwRecalcPseudoActivity(SCIP_ROW *row, SCIP_STAT *stat)
Definition: lp.c:6399
#define SCIPABORT()
Definition: def.h:365
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
datastructures for global SCIP settings
SCIP_Real SCIPgetRowActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2098
SCIP_Real objscale
Definition: struct_prob.h:51
SCIP_Real SCIPgetLPColumnObjval(SCIP *scip)
Definition: scip_lp.c:265
SCIP_NODE * focusnode
Definition: struct_tree.h:191
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
Definition: scip_sol.c:328
SCIP_RETCODE SCIPtreeCutoff(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Real cutoffbound)
Definition: tree.c:5135
memory allocation routines