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 (c) 2002-2023 Zuse Institute Berlin (ZIB) */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file scip_lp.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  *
1695  * @note When several variables are added to a row with the use of this function, performance can be improved by
1696  * calling SCIPcacheRowExtensions() before these additions and SCIPflushRowExtensions() after.
1697  */
1699  SCIP* scip, /**< SCIP data structure */
1700  SCIP_ROW* row, /**< LP row */
1701  SCIP_VAR* var, /**< problem variable */
1702  SCIP_Real val /**< value of coefficient */
1703  )
1704 {
1705  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddVarToRow", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1706 
1707  SCIP_CALL( SCIPvarAddToRow(var, scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->transprob, scip->lp, row, val) );
1708 
1709  return SCIP_OKAY;
1710 }
1711 
1712 /** resolves variables to columns and adds them with the coefficients to the row;
1713  * this method caches the row extensions and flushes them afterwards to gain better performance
1714  *
1715  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1716  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1717  *
1718  * @attention If a coefficients absolute value is below the SCIP epsilon tolerance, the variable with its value is not added.
1719  *
1720  * @pre this method can be called in one of the following stages of the SCIP solving process:
1721  * - \ref SCIP_STAGE_INITSOLVE
1722  * - \ref SCIP_STAGE_SOLVING
1723  */
1725  SCIP* scip, /**< SCIP data structure */
1726  SCIP_ROW* row, /**< LP row */
1727  int nvars, /**< number of variables to add to the row */
1728  SCIP_VAR** vars, /**< problem variables to add */
1729  SCIP_Real* vals /**< values of coefficients */
1730  )
1731 {
1732  int v;
1733 
1734  assert(nvars == 0 || vars != NULL);
1735  assert(nvars == 0 || vals != NULL);
1736 
1737  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddVarsToRow", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1738 
1739  /* resize the row to be able to store all variables (at least, if they are COLUMN variables) */
1740  SCIP_CALL( SCIProwEnsureSize(row, scip->mem->probmem, scip->set, SCIProwGetNNonz(row) + nvars) );
1741 
1742  /* delay the row sorting */
1743  SCIProwDelaySort(row);
1744 
1745  /* add the variables to the row */
1746  for( v = 0; v < nvars; ++v )
1747  {
1748  SCIP_CALL( SCIPvarAddToRow(vars[v], scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->transprob, scip->lp,
1749  row, vals[v]) );
1750  }
1751 
1752  /* force the row sorting */
1753  SCIProwForceSort(row, scip->set);
1754 
1755  return SCIP_OKAY;
1756 }
1757 
1758 /** resolves variables to columns and adds them with the same single coefficient to the row;
1759  * this method caches the row extensions and flushes them afterwards to gain better performance
1760  *
1761  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1762  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1763  *
1764  * @attention If the absolute value of val is below the SCIP epsilon tolerance, the variables will not added.
1765  *
1766  * @pre this method can be called in one of the following stages of the SCIP solving process:
1767  * - \ref SCIP_STAGE_INITSOLVE
1768  * - \ref SCIP_STAGE_SOLVING
1769  */
1771  SCIP* scip, /**< SCIP data structure */
1772  SCIP_ROW* row, /**< LP row */
1773  int nvars, /**< number of variables to add to the row */
1774  SCIP_VAR** vars, /**< problem variables to add */
1775  SCIP_Real val /**< unique value of all coefficients */
1776  )
1777 {
1778  int v;
1779 
1780  assert(nvars == 0 || vars != NULL);
1781 
1782  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddVarsToRowSameCoef", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1783 
1784  /* resize the row to be able to store all variables (at least, if they are COLUMN variables) */
1785  SCIP_CALL( SCIProwEnsureSize(row, scip->mem->probmem, scip->set, SCIProwGetNNonz(row) + nvars) );
1786 
1787  /* delay the row sorting */
1788  SCIProwDelaySort(row);
1789 
1790  /* add the variables to the row */
1791  for( v = 0; v < nvars; ++v )
1792  {
1793  SCIP_CALL( SCIPvarAddToRow(vars[v], scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->transprob, scip->lp,
1794  row, val) );
1795  }
1796 
1797  /* force the row sorting */
1798  SCIProwForceSort(row, scip->set);
1799 
1800  return SCIP_OKAY;
1801 }
1802 
1803 /** tries to find a value, such that all row coefficients, if scaled with this value become integral
1804  *
1805  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1806  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1807  *
1808  * @pre this method can be called in one of the following stages of the SCIP solving process:
1809  * - \ref SCIP_STAGE_INITSOLVE
1810  * - \ref SCIP_STAGE_SOLVING
1811  */
1813  SCIP* scip, /**< SCIP data structure */
1814  SCIP_ROW* row, /**< LP row */
1815  SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
1816  SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
1817  SCIP_Longint maxdnom, /**< maximal denominator allowed in rational numbers */
1818  SCIP_Real maxscale, /**< maximal allowed scalar */
1819  SCIP_Bool usecontvars, /**< should the coefficients of the continuous variables also be made integral? */
1820  SCIP_Real* intscalar, /**< pointer to store scalar that would make the coefficients integral, or NULL */
1821  SCIP_Bool* success /**< stores whether returned value is valid */
1822  )
1823 {
1824  SCIP_CALL( SCIPcheckStage(scip, "SCIPcalcRowIntegralScalar", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1825 
1826  SCIP_CALL( SCIProwCalcIntegralScalar(row, scip->set, mindelta, maxdelta, maxdnom, maxscale,
1827  usecontvars, intscalar, success) );
1828 
1829  return SCIP_OKAY;
1830 }
1831 
1832 /** tries to scale row, s.t. all coefficients (of integer variables) become integral
1833  *
1834  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1835  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1836  *
1837  * @pre this method can be called in one of the following stages of the SCIP solving process:
1838  * - \ref SCIP_STAGE_INITSOLVE
1839  * - \ref SCIP_STAGE_SOLVING
1840  */
1842  SCIP* scip, /**< SCIP data structure */
1843  SCIP_ROW* row, /**< LP row */
1844  SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
1845  SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
1846  SCIP_Longint maxdnom, /**< maximal denominator allowed in rational numbers */
1847  SCIP_Real maxscale, /**< maximal value to scale row with */
1848  SCIP_Bool usecontvars, /**< should the coefficients of the continuous variables also be made integral? */
1849  SCIP_Bool* success /**< stores whether row could be made rational */
1850  )
1851 {
1852  SCIP_CALL( SCIPcheckStage(scip, "SCIPmakeRowIntegral", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1853 
1854  SCIP_CALL( SCIProwMakeIntegral(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->stat, scip->lp, mindelta, maxdelta, maxdnom, maxscale,
1855  usecontvars, success) );
1856 
1857  return SCIP_OKAY;
1858 }
1859 
1860 /** marks a row to be not removable from the LP in the current node
1861  *
1862  * @pre this method can be called in the following stage of the SCIP solving process:
1863  * - \ref SCIP_STAGE_SOLVING
1864  */
1866  SCIP* scip, /**< SCIP data structure */
1867  SCIP_ROW* row /**< LP row */
1868  )
1869 {
1870  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPmarkRowNotRemovableLocal", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1871 
1872  SCIProwMarkNotRemovableLocal(row, scip->stat);
1873 }
1874 
1875 /** returns number of integral columns in the row
1876  *
1877  * @return number of integral columns in the row
1878  *
1879  * @pre this method can be called in one of the following stages of the SCIP solving process:
1880  * - \ref SCIP_STAGE_INITSOLVE
1881  * - \ref SCIP_STAGE_SOLVING
1882  */
1884  SCIP* scip, /**< SCIP data structure */
1885  SCIP_ROW* row /**< LP row */
1886  )
1887 {
1888  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowNumIntCols", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1889 
1890  return SCIProwGetNumIntCols(row, scip->set);
1891 }
1892 
1893 /** returns minimal absolute value of row vector's non-zero coefficients
1894  *
1895  * @return minimal absolute value of row vector's non-zero coefficients
1896  *
1897  * @pre this method can be called in one of the following stages of the SCIP solving process:
1898  * - \ref SCIP_STAGE_INITSOLVE
1899  * - \ref SCIP_STAGE_SOLVING
1900  */
1902  SCIP* scip, /**< SCIP data structure */
1903  SCIP_ROW* row /**< LP row */
1904  )
1905 {
1906  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowMinCoef", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1907 
1908  return SCIProwGetMinval(row, scip->set);
1909 }
1910 
1911 /** returns maximal absolute value of row vector's non-zero coefficients
1912  *
1913  * @return maximal absolute value of row vector's non-zero coefficients
1914  *
1915  * @pre this method can be called in one of the following stages of the SCIP solving process:
1916  * - \ref SCIP_STAGE_INITSOLVE
1917  * - \ref SCIP_STAGE_SOLVING
1918  */
1920  SCIP* scip, /**< SCIP data structure */
1921  SCIP_ROW* row /**< LP row */
1922  )
1923 {
1924  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowMaxCoef", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1925 
1926  return SCIProwGetMaxval(row, scip->set);
1927 }
1928 
1929 /** returns the minimal activity of a row w.r.t. the column's bounds
1930  *
1931  * @return the minimal activity of a row w.r.t. the column's bounds
1932  *
1933  * @pre this method can be called in one of the following stages of the SCIP solving process:
1934  * - \ref SCIP_STAGE_SOLVING
1935  */
1937  SCIP* scip, /**< SCIP data structure */
1938  SCIP_ROW* row /**< LP row */
1939  )
1940 {
1941  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowMinActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1942 
1943  return SCIProwGetMinActivity(row, scip->set, scip->stat);
1944 }
1945 
1946 /** returns the maximal activity of a row w.r.t. the column's bounds
1947  *
1948  * @return the maximal activity of a row w.r.t. the column's bounds
1949  *
1950  * @pre this method can be called in one of the following stages of the SCIP solving process:
1951  * - \ref SCIP_STAGE_SOLVING
1952  */
1954  SCIP* scip, /**< SCIP data structure */
1955  SCIP_ROW* row /**< LP row */
1956  )
1957 {
1958  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowMaxActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1959 
1960  return SCIProwGetMaxActivity(row, scip->set, scip->stat);
1961 }
1962 
1963 /** recalculates the activity of a row in the last LP solution
1964  *
1965  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1966  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1967  *
1968  * @pre this method can be called in one of the following stages of the SCIP solving process:
1969  * - \ref SCIP_STAGE_SOLVING
1970  */
1972  SCIP* scip, /**< SCIP data structure */
1973  SCIP_ROW* row /**< LP row */
1974  )
1975 {
1976  SCIP_CALL( SCIPcheckStage(scip, "SCIPrecalcRowLPActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1977 
1978  SCIProwRecalcLPActivity(row, scip->stat);
1979 
1980  return SCIP_OKAY;
1981 }
1982 
1983 /** returns the activity of a row in the last LP solution
1984  *
1985  * @return activity of a row in the last LP solution
1986  *
1987  * @pre this method can be called in one of the following stages of the SCIP solving process:
1988  * - \ref SCIP_STAGE_SOLVING
1989  */
1991  SCIP* scip, /**< SCIP data structure */
1992  SCIP_ROW* row /**< LP row */
1993  )
1994 {
1995  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowLPActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1996 
1997  return SCIProwGetLPActivity(row, scip->set, scip->stat, scip->lp);
1998 }
1999 
2000 /** returns the feasibility of a row in the last LP solution
2001  *
2002  * @return the feasibility of a row in the last LP solution: negative value means infeasibility
2003  *
2004  * @pre this method can be called in one of the following stages of the SCIP solving process:
2005  * - \ref SCIP_STAGE_SOLVING
2006  */
2008  SCIP* scip, /**< SCIP data structure */
2009  SCIP_ROW* row /**< LP row */
2010  )
2011 {
2012  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowLPFeasibility", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2013 
2014  return SCIProwGetLPFeasibility(row, scip->set, scip->stat, scip->lp);
2015 }
2016 
2017 /** recalculates the activity of a row for the current pseudo solution
2018  *
2019  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2020  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2021  *
2022  * @pre this method can be called in one of the following stages of the SCIP solving process:
2023  * - \ref SCIP_STAGE_SOLVING
2024  */
2026  SCIP* scip, /**< SCIP data structure */
2027  SCIP_ROW* row /**< LP row */
2028  )
2029 {
2030  SCIP_CALL( SCIPcheckStage(scip, "SCIPrecalcRowPseudoActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2031 
2032  SCIProwRecalcPseudoActivity(row, scip->stat);
2033 
2034  return SCIP_OKAY;
2035 }
2036 
2037 /** returns the activity of a row for the current pseudo solution
2038  *
2039  * @return the activity of a row for the current pseudo solution
2040  *
2041  * @pre this method can be called in one of the following stages of the SCIP solving process:
2042  * - \ref SCIP_STAGE_SOLVING
2043  */
2045  SCIP* scip, /**< SCIP data structure */
2046  SCIP_ROW* row /**< LP row */
2047  )
2048 {
2049  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowPseudoActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2050 
2051  return SCIProwGetPseudoActivity(row, scip->set, scip->stat);
2052 }
2053 
2054 /** returns the feasibility of a row for the current pseudo solution: negative value means infeasibility
2055  *
2056  * @return the feasibility of a row for the current pseudo solution: negative value means infeasibility
2057  *
2058  * @pre this method can be called in one of the following stages of the SCIP solving process:
2059  * - \ref SCIP_STAGE_SOLVING
2060  */
2062  SCIP* scip, /**< SCIP data structure */
2063  SCIP_ROW* row /**< LP row */
2064  )
2065 {
2066  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowPseudoFeasibility", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2067 
2068  return SCIProwGetPseudoFeasibility(row, scip->set, scip->stat);
2069 }
2070 
2071 /** recalculates the activity of a row in the last LP or pseudo solution
2072  *
2073  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2074  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2075  *
2076  * @pre this method can be called in one of the following stages of the SCIP solving process:
2077  * - \ref SCIP_STAGE_SOLVING
2078  */
2080  SCIP* scip, /**< SCIP data structure */
2081  SCIP_ROW* row /**< LP row */
2082  )
2083 {
2084  SCIP_CALL( SCIPcheckStage(scip, "SCIPrecalcRowActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2085 
2086  if( SCIPtreeHasCurrentNodeLP(scip->tree) )
2087  SCIProwRecalcLPActivity(row, scip->stat);
2088  else
2089  SCIProwRecalcPseudoActivity(row, scip->stat);
2090 
2091  return SCIP_OKAY;
2092 }
2093 
2094 /** returns the activity of a row in the last LP or pseudo solution
2095  *
2096  * @return the activity of a row in the last LP or pseudo solution
2097  *
2098  * @pre this method can be called in one of the following stages of the SCIP solving process:
2099  * - \ref SCIP_STAGE_SOLVING
2100  */
2102  SCIP* scip, /**< SCIP data structure */
2103  SCIP_ROW* row /**< LP row */
2104  )
2105 {
2106  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2107 
2108  if( SCIPtreeHasCurrentNodeLP(scip->tree) )
2109  return SCIProwGetLPActivity(row, scip->set, scip->stat, scip->lp);
2110  else
2111  return SCIProwGetPseudoActivity(row, scip->set, scip->stat);
2112 }
2113 
2114 /** returns the feasibility of a row in the last LP or pseudo solution
2115  *
2116  * @return the feasibility of a row in the last LP or pseudo solution
2117  *
2118  * @pre this method can be called in one of the following stages of the SCIP solving process:
2119  * - \ref SCIP_STAGE_SOLVING
2120  */
2122  SCIP* scip, /**< SCIP data structure */
2123  SCIP_ROW* row /**< LP row */
2124  )
2125 {
2126  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowFeasibility", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2127 
2128  if( SCIPtreeHasCurrentNodeLP(scip->tree) )
2129  return SCIProwGetLPFeasibility(row, scip->set, scip->stat, scip->lp);
2130  else
2131  return SCIProwGetPseudoFeasibility(row, scip->set, scip->stat);
2132 }
2133 
2134 /** returns the activity of a row for the given primal solution
2135  *
2136  * @return the activitiy of a row for the given primal solution
2137  *
2138  * @pre this method can be called in one of the following stages of the SCIP solving process:
2139  * - \ref SCIP_STAGE_SOLVING
2140  */
2142  SCIP* scip, /**< SCIP data structure */
2143  SCIP_ROW* row, /**< LP row */
2144  SCIP_SOL* sol /**< primal CIP solution */
2145  )
2146 {
2147  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowSolActivity", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2148 
2149  if( sol != NULL )
2150  return SCIProwGetSolActivity(row, scip->set, scip->stat, sol);
2151  else if( SCIPtreeHasCurrentNodeLP(scip->tree) )
2152  return SCIProwGetLPActivity(row, scip->set, scip->stat, scip->lp);
2153  else
2154  return SCIProwGetPseudoActivity(row, scip->set, scip->stat);
2155 }
2156 
2157 /** returns the feasibility of a row for the given primal solution
2158  *
2159  * @return the feasibility of a row for the given primal solution
2160  *
2161  * @pre this method can be called in one of the following stages of the SCIP solving process:
2162  * - \ref SCIP_STAGE_SOLVING
2163  */
2165  SCIP* scip, /**< SCIP data structure */
2166  SCIP_ROW* row, /**< LP row */
2167  SCIP_SOL* sol /**< primal CIP solution */
2168  )
2169 {
2170  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowSolFeasibility", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2171 
2172  if( sol != NULL )
2173  return SCIProwGetSolFeasibility(row, scip->set, scip->stat, sol);
2174  else if( SCIPtreeHasCurrentNodeLP(scip->tree) )
2175  return SCIProwGetLPFeasibility(row, scip->set, scip->stat, scip->lp);
2176  else
2177  return SCIProwGetPseudoFeasibility(row, scip->set, scip->stat);
2178 }
2179 
2180 /** returns the parallelism of row with objective function
2181  *
2182  * @return 1 is returned if the row is parallel to the objective function and 0 if it is orthogonal
2183  *
2184  * @pre this method can be called in one of the following stages of the SCIP solving process:
2185  * - \ref SCIP_STAGE_SOLVING
2186  */
2188  SCIP* scip, /**< SCIP data structure */
2189  SCIP_ROW* row /**< LP row */
2190  )
2191 {
2192  assert(row != NULL);
2193 
2194  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetRowObjParallelism", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2195 
2196  return SCIProwGetObjParallelism(row, scip->set, scip->lp);
2197 }
2198 
2199 /** output row to file stream via the message handler system
2200  *
2201  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2202  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2203  *
2204  * @pre this method can be called in one of the following stages of the SCIP solving process:
2205  * - \ref SCIP_STAGE_SOLVING
2206  * - \ref SCIP_STAGE_SOLVED
2207  * - \ref SCIP_STAGE_EXITSOLVE
2208  */
2210  SCIP* scip, /**< SCIP data structure */
2211  SCIP_ROW* row, /**< LP row */
2212  FILE* file /**< output file (or NULL for standard output) */
2213  )
2214 {
2215  assert(row != NULL);
2216 
2217  SCIP_CALL( SCIPcheckStage(scip, "SCIPprintRow", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
2218 
2219  SCIProwPrint(row, scip->messagehdlr, file);
2220 
2221  return SCIP_OKAY;
2222 }
2223 
2224 /** initiates LP diving, making methods SCIPchgVarObjDive(), SCIPchgVarLbDive(), and SCIPchgVarUbDive() available
2225  *
2226  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2227  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2228  *
2229  * @pre This method can be called if @p scip is in one of the following stages:
2230  * - \ref SCIP_STAGE_SOLVING
2231  *
2232  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2233  *
2234  * @note diving is allowed even if the current LP is not flushed, not solved, or not solved to optimality; be aware
2235  * that solving the (first) diving LP may take longer than expect and that the latter two cases could stem from
2236  * numerical troubles during the last LP solve; because of this, most users will want to call this method only if
2237  * SCIPgetLPSolstat(scip) == SCIP_LPSOLSTAT_OPTIMAL
2238  */
2240  SCIP* scip /**< SCIP data structure */
2241  )
2242 {
2243  assert(scip != NULL);
2244 
2245  SCIP_CALL( SCIPcheckStage(scip, "SCIPstartDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2247 
2248  if( SCIPlpDiving(scip->lp) )
2249  {
2250  SCIPerrorMessage("already in diving mode\n");
2251  return SCIP_INVALIDCALL;
2252  }
2253 
2254  if( SCIPtreeProbing(scip->tree) )
2255  {
2256  SCIPerrorMessage("cannot start diving while being in probing mode\n");
2257  return SCIP_INVALIDCALL;
2258  }
2259 
2261  {
2262  SCIPerrorMessage("cannot start diving if LP has not been constructed\n");
2263  return SCIP_INVALIDCALL;
2264  }
2265  assert(SCIPtreeHasCurrentNodeLP(scip->tree));
2266 
2267  SCIP_CALL( SCIPlpStartDive(scip->lp, scip->mem->probmem, scip->set, scip->stat) );
2268 
2269  /* remember the relaxation solution to reset it later */
2270  if( SCIPisRelaxSolValid(scip) )
2271  {
2272  SCIP_CALL( SCIPtreeStoreRelaxSol(scip->tree, scip->set, scip->relaxation, scip->transprob) );
2273  }
2274 
2275  return SCIP_OKAY;
2276 }
2277 
2278 /** quits LP diving and resets bounds and objective values of columns to the current node's values
2279  *
2280  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2281  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2282  *
2283  * @pre This method can be called if @p scip is in one of the following stages:
2284  * - \ref SCIP_STAGE_SOLVING
2285  *
2286  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2287  */
2289  SCIP* scip /**< SCIP data structure */
2290  )
2291 {
2292  assert(scip != NULL);
2293 
2294  SCIP_CALL( SCIPcheckStage(scip, "SCIPendDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2295 
2296  if( !SCIPlpDiving(scip->lp) )
2297  {
2298  SCIPerrorMessage("not in diving mode\n");
2299  return SCIP_INVALIDCALL;
2300  }
2301 
2302  /* unmark the diving flag in the LP and reset all variables' objective and bound values */
2303  SCIP_CALL( SCIPlpEndDive(scip->lp, scip->mem->probmem, scip->set, scip->messagehdlr, scip->stat, scip->eventqueue, scip->eventfilter,
2304  scip->transprob, scip->transprob->vars, scip->transprob->nvars) );
2305 
2306  /* the lower bound may have changed slightly due to LP resolve in SCIPlpEndDive() */
2307  if( !scip->lp->resolvelperror && scip->tree->focusnode != NULL && SCIPlpIsRelax(scip->lp) && SCIPlpIsSolved(scip->lp) )
2308  {
2309  assert(SCIPtreeIsFocusNodeLPConstructed(scip->tree));
2310  SCIP_CALL( SCIPnodeUpdateLowerboundLP(scip->tree->focusnode, scip->set, scip->stat, scip->tree, scip->transprob,
2311  scip->origprob, scip->lp) );
2312  }
2313  /* reset the probably changed LP's cutoff bound */
2314  SCIP_CALL( SCIPlpSetCutoffbound(scip->lp, scip->set, scip->transprob, scip->primal->cutoffbound) );
2315  assert(scip->lp->cutoffbound == scip->primal->cutoffbound); /*lint !e777*/
2316 
2317  /* if a new best solution was created, the cutoff of the tree was delayed due to diving;
2318  * the cutoff has to be done now.
2319  */
2320  if( scip->tree->cutoffdelayed )
2321  {
2322  SCIP_CALL( SCIPtreeCutoff(scip->tree, scip->reopt, scip->mem->probmem, scip->set, scip->stat, scip->eventfilter,
2323  scip->eventqueue, scip->lp, scip->primal->cutoffbound) );
2324  }
2325 
2326  /* if a relaxation was stored before diving, restore it now */
2327  if( scip->tree->probdiverelaxstored )
2328  {
2329  SCIP_CALL( SCIPtreeRestoreRelaxSol(scip->tree, scip->set, scip->relaxation, scip->transprob) );
2330  }
2331 
2332  return SCIP_OKAY;
2333 }
2334 
2335 /** changes cutoffbound in current dive
2336  *
2337  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2338  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2339  *
2340  * @pre This method can be called if @p scip is in one of the following stages:
2341  * - \ref SCIP_STAGE_SOLVING
2342  *
2343  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2344  */
2346  SCIP* scip, /**< SCIP data structure */
2347  SCIP_Real newcutoffbound /**< new cutoffbound */
2348  )
2349 {
2350  assert(scip != NULL);
2351 
2352  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgCutoffboundDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2353 
2354  if( !SCIPlpDiving(scip->lp) )
2355  {
2356  SCIPerrorMessage("not in diving mode\n");
2357  return SCIP_INVALIDCALL;
2358  }
2359 
2360  SCIP_CALL( SCIPlpSetCutoffbound(scip->lp, scip->set, scip->transprob, newcutoffbound) );
2361 
2362  return SCIP_OKAY;
2363 }
2364 
2365 /** changes variable's objective value in current dive
2366  *
2367  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2368  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2369  *
2370  * @pre This method can be called if @p scip is in one of the following stages:
2371  * - \ref SCIP_STAGE_SOLVING
2372  *
2373  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2374  */
2376  SCIP* scip, /**< SCIP data structure */
2377  SCIP_VAR* var, /**< variable to change the objective value for */
2378  SCIP_Real newobj /**< new objective value */
2379  )
2380 {
2381  assert(scip != NULL);
2382  assert(var != NULL);
2383 
2384  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgVarObjDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2385 
2386  if( !SCIPlpDiving(scip->lp) )
2387  {
2388  SCIPerrorMessage("not in diving mode\n");
2389  return SCIP_INVALIDCALL;
2390  }
2391 
2392  /* invalidate the LP's cutoff bound, since this has nothing to do with the current objective value anymore;
2393  * the cutoff bound is reset in SCIPendDive()
2394  */
2395  SCIP_CALL( SCIPlpSetCutoffbound(scip->lp, scip->set, scip->transprob, SCIPsetInfinity(scip->set)) );
2396 
2397  /* mark the LP's objective function invalid */
2399 
2400  /* change the objective value of the variable in the diving LP */
2401  SCIP_CALL( SCIPvarChgObjDive(var, scip->set, scip->lp, newobj) );
2402 
2403  return SCIP_OKAY;
2404 }
2405 
2406 /** changes variable's lower bound in current dive
2407  *
2408  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2409  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2410  *
2411  * @pre This method can be called if @p scip is in one of the following stages:
2412  * - \ref SCIP_STAGE_SOLVING
2413  *
2414  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2415  */
2417  SCIP* scip, /**< SCIP data structure */
2418  SCIP_VAR* var, /**< variable to change the bound for */
2419  SCIP_Real newbound /**< new value for bound */
2420  )
2421 {
2422  assert(scip != NULL);
2423  assert(var != NULL);
2424 
2425  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgVarLbDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2426 
2427  if( !SCIPlpDiving(scip->lp) )
2428  {
2429  SCIPerrorMessage("not in diving mode\n");
2430  return SCIP_INVALIDCALL;
2431  }
2432 
2433  SCIP_CALL( SCIPvarChgLbDive(var, scip->set, scip->lp, newbound) );
2434 
2435  return SCIP_OKAY;
2436 }
2437 
2438 /** changes variable's upper bound in current dive
2439  *
2440  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2441  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2442  *
2443  * @pre This method can be called if @p scip is in one of the following stages:
2444  * - \ref SCIP_STAGE_SOLVING
2445  *
2446  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2447  */
2449  SCIP* scip, /**< SCIP data structure */
2450  SCIP_VAR* var, /**< variable to change the bound for */
2451  SCIP_Real newbound /**< new value for bound */
2452  )
2453 {
2454  assert(scip != NULL);
2455  assert(var != NULL);
2456 
2457  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgVarUbDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2458 
2459  if( !SCIPlpDiving(scip->lp) )
2460  {
2461  SCIPerrorMessage("not in diving mode\n");
2462  return SCIP_INVALIDCALL;
2463  }
2464 
2465  SCIP_CALL( SCIPvarChgUbDive(var, scip->set, scip->lp, newbound) );
2466 
2467  return SCIP_OKAY;
2468 }
2469 
2470 /** adds a row to the LP in current dive
2471  *
2472  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2473  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2474  *
2475  * @pre This method can be called if @p scip is in one of the following stages:
2476  * - \ref SCIP_STAGE_SOLVING
2477  *
2478  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2479  */
2481  SCIP* scip, /**< SCIP data structure */
2482  SCIP_ROW* row /**< row to be added */
2483  )
2484 {
2485  SCIP_NODE* node;
2486  int depth;
2487 
2488  assert(scip != NULL);
2489  assert(row != NULL);
2490 
2491  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddRowDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2492 
2493  if( !SCIPlpDiving(scip->lp) )
2494  {
2495  SCIPerrorMessage("not in diving mode\n");
2496  return SCIP_INVALIDCALL;
2497  }
2498 
2499  /* get depth of current node */
2500  node = SCIPtreeGetCurrentNode(scip->tree);
2501  assert(node != NULL);
2502  depth = SCIPnodeGetDepth(node);
2503 
2504  SCIP_CALL( SCIPlpAddRow(scip->lp, scip->mem->probmem, scip->set, scip->eventqueue, scip->eventfilter, row, depth) );
2505 
2506  return SCIP_OKAY;
2507 }
2508 
2509 /** changes row lhs in current dive, change will be undone after diving ends, for permanent changes use SCIPchgRowLhs()
2510  *
2511  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2512  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2513  *
2514  * @pre This method can be called if @p scip is in one of the following stages:
2515  * - \ref SCIP_STAGE_SOLVING
2516  *
2517  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2518  */
2520  SCIP* scip, /**< SCIP data structure */
2521  SCIP_ROW* row, /**< row to change the lhs for */
2522  SCIP_Real newlhs /**< new value for lhs */
2523  )
2524 {
2525  assert(scip != NULL);
2526  assert(row != NULL);
2527 
2528  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgRowLhsDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2529 
2530  if( !SCIPlpDiving(scip->lp) )
2531  {
2532  SCIPerrorMessage("not in diving mode\n");
2533  return SCIP_INVALIDCALL;
2534  }
2535 
2537  SCIP_CALL( SCIProwChgLhs(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->lp, newlhs) );
2538 
2539  return SCIP_OKAY;
2540 }
2541 
2542 /** changes row rhs in current dive, change will be undone after diving ends, for permanent changes use SCIPchgRowRhs()
2543  *
2544  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2545  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2546  *
2547  * @pre This method can be called if @p scip is in one of the following stages:
2548  * - \ref SCIP_STAGE_SOLVING
2549  *
2550  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2551  */
2553  SCIP* scip, /**< SCIP data structure */
2554  SCIP_ROW* row, /**< row to change the lhs for */
2555  SCIP_Real newrhs /**< new value for rhs */
2556  )
2557 {
2558  assert(scip != NULL);
2559  assert(row != NULL);
2560 
2561  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgRowRhsDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2562 
2563  if( !SCIPlpDiving(scip->lp) )
2564  {
2565  SCIPerrorMessage("not in diving mode\n");
2566  return SCIP_INVALIDCALL;
2567  }
2568 
2570  SCIP_CALL( SCIProwChgRhs(row, scip->mem->probmem, scip->set, scip->eventqueue, scip->lp, newrhs) );
2571 
2572  return SCIP_OKAY;
2573 }
2574 
2575 /** gets variable's objective value in current dive
2576  *
2577  * @return the variable's objective value in current dive.
2578  *
2579  * @pre This method can be called if @p scip is in one of the following stages:
2580  * - \ref SCIP_STAGE_SOLVING
2581  *
2582  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2583  */
2585  SCIP* scip, /**< SCIP data structure */
2586  SCIP_VAR* var /**< variable to get the bound for */
2587  )
2588 {
2589  assert(scip != NULL);
2590  assert(var != NULL);
2591 
2592  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetVarObjDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2593 
2594  if( !SCIPlpDiving(scip->lp) )
2595  {
2596  SCIPerrorMessage("not in diving mode\n");
2597  SCIPABORT();
2598  return SCIP_INVALID; /*lint !e527*/
2599  }
2600 
2601  return SCIPvarGetObjLP(var);
2602 }
2603 
2604 /** gets variable's lower bound in current dive
2605  *
2606  * @return the variable's lower bound in current dive.
2607  *
2608  * @pre This method can be called if @p scip is in one of the following stages:
2609  * - \ref SCIP_STAGE_SOLVING
2610  *
2611  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2612  */
2614  SCIP* scip, /**< SCIP data structure */
2615  SCIP_VAR* var /**< variable to get the bound for */
2616  )
2617 {
2618  assert(scip != NULL);
2619  assert(var != NULL);
2620 
2621  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetVarLbDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2622 
2623  if( !SCIPlpDiving(scip->lp) )
2624  {
2625  SCIPerrorMessage("not in diving mode\n");
2626  SCIPABORT();
2627  return SCIP_INVALID; /*lint !e527*/
2628  }
2629 
2630  return SCIPvarGetLbLP(var, scip->set);
2631 }
2632 
2633 /** gets variable's upper bound in current dive
2634  *
2635  * @return the variable's upper bound in current dive.
2636  *
2637  * @pre This method can be called if @p scip is in one of the following stages:
2638  * - \ref SCIP_STAGE_SOLVING
2639  *
2640  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2641  */
2643  SCIP* scip, /**< SCIP data structure */
2644  SCIP_VAR* var /**< variable to get the bound for */
2645  )
2646 {
2647  assert(scip != NULL);
2648  assert(var != NULL);
2649 
2650  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetVarUbDive", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2651 
2652  if( !SCIPlpDiving(scip->lp) )
2653  {
2654  SCIPerrorMessage("not in diving mode\n");
2655  SCIPABORT();
2656  return SCIP_INVALID; /*lint !e527*/
2657  }
2658 
2659  return SCIPvarGetUbLP(var, scip->set);
2660 }
2661 
2662 /** solves the LP of the current dive; no separation or pricing is applied
2663  *
2664  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2665  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2666  *
2667  * @pre This method can be called if @p scip is in one of the following stages:
2668  * - \ref SCIP_STAGE_SOLVING
2669  *
2670  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2671  *
2672  * @note be aware that the LP solve may take longer than expected if SCIPgetLPSolstat(scip) != SCIP_LPSOLSTAT_OPTIMAL,
2673  * compare the explanation of SCIPstartDive()
2674  */
2676  SCIP* scip, /**< SCIP data structure */
2677  int itlim, /**< maximal number of LP iterations to perform, or -1 for no limit */
2678  SCIP_Bool* lperror, /**< pointer to store whether an unresolved LP error occurred */
2679  SCIP_Bool* cutoff /**< pointer to store whether the diving LP was infeasible or the objective
2680  * limit was reached (or NULL, if not needed) */
2681  )
2682 {
2683  assert(scip != NULL);
2684 
2685  SCIP_CALL( SCIPcheckStage(scip, "SCIPsolveDiveLP", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2686 
2687  if( !SCIPlpDiving(scip->lp) )
2688  {
2689  SCIPerrorMessage("not in diving mode\n");
2690  return SCIP_INVALIDCALL;
2691  }
2692 
2693  if( cutoff != NULL )
2694  *cutoff = FALSE;
2695 
2696  /* solve diving LP */
2697  SCIP_CALL( SCIPlpSolveAndEval(scip->lp, scip->set, scip->messagehdlr, scip->mem->probmem, scip->stat,
2698  scip->eventqueue, scip->eventfilter, scip->transprob, (SCIP_Longint)itlim, FALSE, FALSE, FALSE, lperror) );
2699 
2700  /* the LP is infeasible or the objective limit was reached */
2702  || (SCIPlpGetSolstat(scip->lp) == SCIP_LPSOLSTAT_OPTIMAL &&
2703  SCIPisGE(scip, SCIPgetLPObjval(scip), SCIPgetCutoffbound(scip))) )
2704  {
2705  /* analyze the infeasible LP (only if the objective was not changed, all columns are in the LP, and no external
2706  * pricers exist) */
2707  if( !scip->set->misc_exactsolve && !(SCIPlpDivingObjChanged(scip->lp) || SCIPlpDivingRowsChanged(scip->lp))
2708  && SCIPprobAllColsInLP(scip->transprob, scip->set, scip->lp) )
2709  {
2710  SCIP_CALL( SCIPconflictAnalyzeLP(scip->conflict, scip->conflictstore, scip->mem->probmem, scip->set, scip->stat, scip->transprob,
2711  scip->origprob, scip->tree, scip->reopt, scip->lp, scip->branchcand, scip->eventqueue, scip->cliquetable, NULL) );
2712  }
2713 
2714  if( cutoff != NULL )
2715  *cutoff = TRUE;
2716  }
2717 
2718  return SCIP_OKAY;
2719 }
2720 
2721 /** returns 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  * @return the number of the node in the current branch and bound run, where the last LP was solved in diving
2725  * or probing mode.
2726  *
2727  * @pre This method can be called if @p scip is in one of the following stages:
2728  * - \ref SCIP_STAGE_TRANSFORMING
2729  * - \ref SCIP_STAGE_TRANSFORMED
2730  * - \ref SCIP_STAGE_INITPRESOLVE
2731  * - \ref SCIP_STAGE_PRESOLVING
2732  * - \ref SCIP_STAGE_EXITPRESOLVE
2733  * - \ref SCIP_STAGE_PRESOLVED
2734  * - \ref SCIP_STAGE_INITSOLVE
2735  * - \ref SCIP_STAGE_SOLVING
2736  * - \ref SCIP_STAGE_SOLVED
2737  * - \ref SCIP_STAGE_EXITSOLVE
2738  * - \ref SCIP_STAGE_FREETRANS
2739  *
2740  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2741  */
2743  SCIP* scip /**< SCIP data structure */
2744  )
2745 {
2746  assert(scip != NULL);
2747 
2748  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLastDivenode", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
2749 
2750  return scip->stat->lastdivenode;
2751 }
2752 
2753 /** returns whether we are in diving mode
2754  *
2755  * @return whether we are in diving mode.
2756  *
2757  * @pre This method can be called if @p scip is in one of the following stages:
2758  * - \ref SCIP_STAGE_TRANSFORMING
2759  * - \ref SCIP_STAGE_TRANSFORMED
2760  * - \ref SCIP_STAGE_INITPRESOLVE
2761  * - \ref SCIP_STAGE_PRESOLVING
2762  * - \ref SCIP_STAGE_EXITPRESOLVE
2763  * - \ref SCIP_STAGE_PRESOLVED
2764  * - \ref SCIP_STAGE_INITSOLVE
2765  * - \ref SCIP_STAGE_SOLVING
2766  * - \ref SCIP_STAGE_SOLVED
2767  * - \ref SCIP_STAGE_EXITSOLVE
2768  * - \ref SCIP_STAGE_FREETRANS
2769  *
2770  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
2771  */
2773  SCIP* scip /**< SCIP data structure */
2774  )
2775 {
2776  assert(scip != NULL);
2777 
2778  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPinDive", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
2779 
2780  return SCIPlpDiving(scip->lp);
2781 }
2782 
2783 /** computes two measures for dual degeneracy (dual degeneracy rate and variable-constraint ratio)
2784  * based on the changes applied when reducing the problem to the optimal face
2785  *
2786  * returns the dual degeneracy rate, i.e., the share of nonbasic variables with reduced cost 0
2787  * and the variable-constraint ratio, i.e., the number of unfixed variables in relation to the basis size
2788  */
2790  SCIP* scip, /**< SCIP data structure */
2791  SCIP_Real* degeneracy, /**< pointer to store the dual degeneracy rate */
2792  SCIP_Real* varconsratio /**< pointer to store the variable-constraint ratio */
2793  )
2794 {
2795  assert(scip != NULL);
2796  assert(degeneracy != NULL);
2797  assert(varconsratio != NULL);
2798 
2799  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetLPDualDegeneracy", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2800 
2801  SCIP_CALL( SCIPlpGetDualDegeneracy(scip->lp, scip->set, scip->stat, degeneracy, varconsratio) );
2802 
2803  return SCIP_OKAY;
2804 }
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:1770
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:8684
SCIP_Bool SCIPlpDivingRowsChanged(SCIP_LP *lp)
Definition: lp.c:17892
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:17850
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:1971
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:18606
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:1698
int SCIProwGetNNonz(SCIP_ROW *row)
Definition: lp.c:17216
SCIP_Real SCIPgetRowPseudoFeasibility(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2061
SCIP_RETCODE SCIPgetLPDualDegeneracy(SCIP *scip, SCIP_Real *degeneracy, SCIP_Real *varconsratio)
Definition: scip_lp.c:2789
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:2480
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:12944
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:16530
SCIP_Bool SCIPlpIsSolBasic(SCIP_LP *lp)
Definition: lp.c:17840
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:17755
SCIP_RETCODE SCIPchgVarLbDive(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_lp.c:2416
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:8258
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:16112
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:17615
SCIP_RETCODE SCIPrecalcRowActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2079
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:7446
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:8359
SCIP_Real SCIPgetRowFeasibility(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2121
SCIP_Bool SCIPlpIsRootLPRelax(SCIP_LP *lp)
Definition: lp.c:17733
SCIP_RETCODE SCIPlpRecordOldRowSideDive(SCIP_LP *lp, SCIP_ROW *row, SCIP_SIDETYPE sidetype)
Definition: lp.c:16294
SCIP_Real SCIPgetRowMaxCoef(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1919
SCIP_Real SCIPgetRowMaxActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1953
public methods for numerical tolerances
int SCIPlpGetNCols(SCIP_LP *lp)
Definition: lp.c:17578
SCIP_Real SCIPvarGetUbLP(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:13014
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:17743
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:12898
SCIP_MEM * mem
Definition: struct_scip.h:71
SCIP_RETCODE SCIPchgRowLhsDive(SCIP *scip, SCIP_ROW *row, SCIP_Real newlhs)
Definition: scip_lp.c:2519
SCIP_Bool SCIPtreeProbing(SCIP_TREE *tree)
Definition: tree.c:8278
SCIP_Real SCIPgetLPLooseObjval(SCIP *scip)
Definition: scip_lp.c:283
SCIP_Real SCIPgetVarUbDive(SCIP *scip, SCIP_VAR *var)
Definition: scip_lp.c:2642
SCIP_RETCODE SCIPlpStartDive(SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: lp.c:16006
void SCIPmarkRowNotRemovableLocal(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1865
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:16545
SCIP_Real SCIPgetRowMinCoef(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1901
SCIP_Bool SCIPlpIsPrimalReliable(SCIP_LP *lp)
Definition: lp.c:17820
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:17830
SCIP_RETCODE SCIPsolveDiveLP(SCIP *scip, int itlim, SCIP_Bool *lperror, SCIP_Bool *cutoff)
Definition: scip_lp.c:2675
SCIP_RETCODE SCIPrecalcRowPseudoActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2025
SCIP_COL ** SCIPlpGetCols(SCIP_LP *lp)
Definition: lp.c:17568
SCIP_RETCODE SCIPchgCutoffboundDive(SCIP *scip, SCIP_Real newcutoffbound)
Definition: scip_lp.c:2345
SCIP_RETCODE SCIPvarChgObjDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newobj)
Definition: var.c:6463
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:2187
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:394
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:17625
void SCIPlpMarkDivingObjChanged(SCIP_LP *lp)
Definition: lp.c:17870
SCIP_Bool resolvelperror
Definition: struct_lp.h:383
SCIP_Real SCIPgetRowLPActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1990
#define SCIPdebugCheckBInvRow(scip, r, coef)
Definition: debug.h:324
SCIP_LPI * SCIPlpGetLPI(SCIP_LP *lp)
Definition: lp.c:17777
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:2742
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:18678
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:2187
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:17767
#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:2044
int SCIPlpGetNUnfixedCols(SCIP_LP *lp, SCIP_Real eps)
Definition: lp.c:17588
int SCIPgetRowNumIntCols(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1883
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:2448
SCIP_RETCODE SCIPvarChgUbDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newbound)
Definition: var.c:8348
SCIP_RETCODE SCIPcaptureRow(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1540
SCIP_Bool SCIPlpDivingObjChanged(SCIP_LP *lp)
Definition: lp.c:17860
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:8413
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:2141
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:14282
SCIP_Bool SCIPinDive(SCIP *scip)
Definition: scip_lp.c:2772
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:2375
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
Definition: lp.c:17045
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:8379
SCIP_Bool SCIPisRelaxSolValid(SCIP *scip)
Definition: scip_var.c:2537
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:2007
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:7426
#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:1724
SCIP_VAR ** vars
Definition: struct_prob.h:64
SCIP_Bool SCIPlpIsSolved(SCIP_LP *lp)
Definition: lp.c:17810
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:7022
SCIP_Real SCIPgetRowMinActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1936
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:2209
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:1812
SCIP_Bool SCIPlpIsRelax(SCIP_LP *lp)
Definition: lp.c:17800
#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:2164
SCIP_Real SCIPgetVarLbDive(SCIP *scip, SCIP_VAR *var)
Definition: scip_lp.c:2613
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:2239
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:7066
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:2288
#define SCIP_CALL_ABORT(x)
Definition: def.h:373
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:2552
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:366
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:1841
SCIP_Real SCIPgetVarObjDive(SCIP *scip, SCIP_VAR *var)
Definition: scip_lp.c:2584
datastructures for global SCIP settings
SCIP_Real SCIPgetRowActivity(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2101
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:5128
memory allocation routines