Scippy

SCIP

Solving Constraint Integer Programs

conflict_general.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-2025 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 conflict_general.c
26 * @ingroup OTHER_CFILES
27 * @brief methods and datastructures for conflict analysis
28 * @author Tobias Achterberg
29 * @author Timo Berthold
30 * @author Stefan Heinz
31 * @author Marc Pfetsch
32 * @author Michael Winkler
33 * @author Jakob Witzig
34 * @author Sander Borst
35 *
36 * SCIP contains two kinds of conflict analysis:
37 * - In graph based conflict analysis, the graph consisting of derived
38 * is analysed. Code and documentation is available in conflict_graphanalysis.h
39 * - In dual proof analysis, an infeasible LP relaxation is analysed.
40 * Using the dual solution, a valid constraint is derived that is violated
41 * by all values in the domain. This constraint is added to the problem
42 * and can then be used for domain propagation.
43 * Code is available in conflict_dualproofanalysis.h
44 * This file contains the methods that are shared by both kinds of conflict analysis.
45 */
46
47/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
48#include "lpi/lpi.h"
49#include "scip/clock.h"
50#include "scip/conflict.h"
51#include "scip/conflictstore.h"
52#include "scip/certificate.h"
53#include "scip/cons.h"
54#include "scip/cons_linear.h"
55#include "scip/cuts.h"
56#include "scip/history.h"
57#include "scip/lp.h"
58#include "scip/lpexact.h"
59#include "scip/presolve.h"
60#include "scip/prob.h"
61#include "scip/prop.h"
62#include "scip/pub_conflict.h"
63#include "scip/pub_cons.h"
64#include "scip/pub_lp.h"
65#include "scip/pub_message.h"
66#include "scip/pub_misc.h"
67#include "scip/pub_misc_sort.h"
68#include "scip/pub_paramset.h"
69#include "scip/pub_prop.h"
70#include "scip/pub_tree.h"
71#include "scip/pub_var.h"
73#include "scip/scip_conflict.h"
74#include "scip/scip_cons.h"
75#include "scip/scip_exact.h"
76#include "scip/scip_mem.h"
77#include "scip/scip_numerics.h"
78#include "scip/scip_sol.h"
79#include "scip/scip_var.h"
80#include "scip/scip_prob.h"
81#include "scip/scip_lp.h"
82#include "scip/scip_lpexact.h"
84#include "scip/set.h"
85#include "scip/sol.h"
87#include "scip/struct_lp.h"
88#include "scip/struct_prob.h"
89#include "scip/struct_scip.h"
90#include "scip/struct_set.h"
92#include "scip/struct_stat.h"
93#include "scip/struct_tree.h"
94#include "scip/struct_lpexact.h"
95#include "scip/struct_var.h"
96#include "scip/tree.h"
97#include "scip/cuts.h"
98#include "scip/var.h"
99#include "scip/visual.h"
100#include <string.h>
101#ifndef _WIN32
102#include <strings.h> /*lint --e{766}*/
103#endif
104
105/* because calculations might cancel out some values, we stop the infeasibility analysis if a value is bigger than
106 * 2^53 = 9007199254740992
107 */
108#define NUMSTOP 9007199254740992.0
109/* because row violations might be magnified, we stop the infeasibility analysis if a dual weight is bigger than
110 * 10^7 = 10000000
111 */
112#define SOLSTOP 10000000.0
113
114/** return TRUE if conflict analysis is applicable; In case the function returns FALSE there is no need to initialize the
115 * conflict analysis since it will not be applied
116 */
118 SCIP_SET* set /**< global SCIP settings */
119 )
120{
121 assert(set != NULL);
122 /* check, if resolution or propagation conflict analysis is enabled */
123 if( !set->conf_enable || !( set->conf_useprop || set->conf_usegenres ) )
124 return FALSE;
125
126 return TRUE;
127}
128
129/** returns the current number of conflict sets in the conflict set storage */
131 SCIP_CONFLICT* conflict /**< conflict analysis data */
132 )
133{
134 assert(conflict != NULL);
135
136 return conflict->nconflictsets;
137}
138
139/** returns the total number of conflict constraints that were added to the problem */
141 SCIP_CONFLICT* conflict /**< conflict analysis data */
142 )
143{
144 assert(conflict != NULL);
145
146 return conflict->nappliedglbconss + conflict->nappliedlocconss;
147}
148
149/** returns the total number of resolution conflict constraints that were added to the problem */
151 SCIP_CONFLICT* conflict /**< conflict analysis data */
152 )
153{
154 assert(conflict != NULL);
155
156 return conflict->nappliedglbresconss;
157}
158
159/** returns the total number of literals in conflict constraints that were added to the problem */
161 SCIP_CONFLICT* conflict /**< conflict analysis data */
162 )
163{
164 assert(conflict != NULL);
165
166 return conflict->nappliedglbliterals + conflict->nappliedlocliterals;
167}
168
169/** returns the total number of global bound changes applied by the conflict analysis */
171 SCIP_CONFLICT* conflict /**< conflict analysis data */
172 )
173{
174 assert(conflict != NULL);
175
176 return conflict->nglbchgbds;
177}
178
179/** returns the total number of conflict constraints that were added globally to the problem */
181 SCIP_CONFLICT* conflict /**< conflict analysis data */
182 )
183{
184 assert(conflict != NULL);
185
186 return conflict->nappliedglbconss;
187}
188
189/** returns the total number of literals in conflict constraints that were added globally to the problem */
191 SCIP_CONFLICT* conflict /**< conflict analysis data */
192 )
193{
194 assert(conflict != NULL);
195
196 return conflict->nappliedglbliterals;
197}
198
199/** returns the total number of local bound changes applied by the conflict analysis */
201 SCIP_CONFLICT* conflict /**< conflict analysis data */
202 )
203{
204 assert(conflict != NULL);
205
206 return conflict->nlocchgbds;
207}
208
209/** returns the total number of conflict constraints that were added locally to the problem */
211 SCIP_CONFLICT* conflict /**< conflict analysis data */
212 )
213{
214 assert(conflict != NULL);
215
216 return conflict->nappliedlocconss;
217}
218
219/** returns the total number of literals in conflict constraints that were added locally to the problem */
221 SCIP_CONFLICT* conflict /**< conflict analysis data */
222 )
223{
224 assert(conflict != NULL);
225
226 return conflict->nappliedlocliterals;
227}
228
229/** compares two conflict set entries, such that bound changes inferred later are
230 * ordered prior to ones that were inferred earlier
231 */
232static
233SCIP_DECL_SORTPTRCOMP(conflictBdchginfoComp)
234{ /*lint --e{715}*/
235 SCIP_BDCHGINFO* bdchginfo1;
236 SCIP_BDCHGINFO* bdchginfo2;
237
238 bdchginfo1 = (SCIP_BDCHGINFO*)elem1;
239 bdchginfo2 = (SCIP_BDCHGINFO*)elem2;
240 assert(bdchginfo1 != NULL);
241 assert(bdchginfo2 != NULL);
242 assert(!SCIPbdchginfoIsRedundant(bdchginfo1));
243 assert(!SCIPbdchginfoIsRedundant(bdchginfo2));
244
245 if( bdchginfo1 == bdchginfo2 )
246 return 0;
247
249 return -1;
250 else
251 return +1;
252}
253
254/** enables or disables all clocks of \p conflict, depending on the value of the flag */
256 SCIP_CONFLICT* conflict, /**< the conflict analysis data for which all clocks should be enabled or disabled */
257 SCIP_Bool enable /**< should the clocks of the conflict analysis data be enabled? */
258 )
259{
260 assert(conflict != NULL);
261
263 SCIPclockEnableOrDisable(conflict->dIBclock, enable);
265 SCIPclockEnableOrDisable(conflict->propanalyzetime, enable);
266 SCIPclockEnableOrDisable(conflict->resanalyzetime, enable);
268 SCIPclockEnableOrDisable(conflict->sbanalyzetime, enable);
269}
270
271/** creates conflict analysis data for propagation conflicts */
273 SCIP_CONFLICT** conflict, /**< pointer to conflict analysis data */
274 BMS_BLKMEM* blkmem, /**< block memory of transformed problem */
275 SCIP_SET* set /**< global SCIP settings */
276 )
277{
278 assert(conflict != NULL);
279
280 SCIP_ALLOC( BMSallocMemory(conflict) );
281
282 SCIP_CALL( SCIPclockCreate(&(*conflict)->dIBclock, SCIP_CLOCKTYPE_DEFAULT) );
283 SCIP_CALL( SCIPclockCreate(&(*conflict)->propanalyzetime, SCIP_CLOCKTYPE_DEFAULT) );
284 SCIP_CALL( SCIPclockCreate(&(*conflict)->resanalyzetime, SCIP_CLOCKTYPE_DEFAULT) );
285 SCIP_CALL( SCIPclockCreate(&(*conflict)->inflpanalyzetime, SCIP_CLOCKTYPE_DEFAULT) );
286 SCIP_CALL( SCIPclockCreate(&(*conflict)->boundlpanalyzetime, SCIP_CLOCKTYPE_DEFAULT) );
287 SCIP_CALL( SCIPclockCreate(&(*conflict)->sbanalyzetime, SCIP_CLOCKTYPE_DEFAULT) );
288 SCIP_CALL( SCIPclockCreate(&(*conflict)->pseudoanalyzetime, SCIP_CLOCKTYPE_DEFAULT) );
289
290 /* enable or disable timing depending on the parameter statistic timing */
291 SCIPconflictEnableOrDisableClocks((*conflict), set->time_statistictiming);
292
293 SCIP_CALL( SCIPpqueueCreate(&(*conflict)->bdchgqueue, set->mem_arraygrowinit, set->mem_arraygrowfac,
294 conflictBdchginfoComp, NULL) );
295 SCIP_CALL( SCIPpqueueCreate(&(*conflict)->forcedbdchgqueue, set->mem_arraygrowinit, set->mem_arraygrowfac,
296 conflictBdchginfoComp, NULL) );
297 SCIP_CALL( SCIPpqueueCreate(&(*conflict)->resbdchgqueue, set->mem_arraygrowinit, set->mem_arraygrowfac,
298 conflictBdchginfoComp, NULL) );
299 SCIP_CALL( SCIPpqueueCreate(&(*conflict)->continuousbdchgqueue, set->mem_arraygrowinit, set->mem_arraygrowfac,
300 conflictBdchginfoComp, NULL) );
301 SCIP_CALL( SCIPconflictsetCreate(&(*conflict)->conflictset, blkmem) );
302 (*conflict)->conflictsets = NULL;
303 (*conflict)->conflictsetscores = NULL;
304 (*conflict)->conflictvarslbs = NULL;
305 (*conflict)->conflictvarsubs = NULL;
306 (*conflict)->tmpbdchginfos = NULL;
307 (*conflict)->conflictprobnvars = 0;
308 (*conflict)->conflictsetssize = 0;
309 (*conflict)->nconflictsets = 0;
310 (*conflict)->conflictrows = NULL;
311 (*conflict)->nconflictrows = 0;
312 (*conflict)->proofsets = NULL;
313 (*conflict)->proofsetssize = 0;
314 (*conflict)->nproofsets = 0;
315 (*conflict)->tmpbdchginfossize = 0;
316 (*conflict)->ntmpbdchginfos = 0;
317 (*conflict)->count = 0;
318 (*conflict)->nglbchgbds = 0;
319 (*conflict)->nappliedglbconss = 0;
320 (*conflict)->nappliedglbresconss = 0;
321 (*conflict)->nappliedglbliterals = 0;
322 (*conflict)->nlocchgbds = 0;
323 (*conflict)->nappliedlocconss = 0;
324 (*conflict)->nappliedlocliterals = 0;
325 (*conflict)->npropcalls = 0;
326 (*conflict)->npropsuccess = 0;
327 (*conflict)->npropconfconss = 0;
328 (*conflict)->npropconfliterals = 0;
329 (*conflict)->npropreconvconss = 0;
330 (*conflict)->npropreconvliterals = 0;
331 (*conflict)->ninflpcalls = 0;
332 (*conflict)->ninflpsuccess = 0;
333 (*conflict)->ninflpconfconss = 0;
334 (*conflict)->ninflpconfliterals = 0;
335 (*conflict)->ninflpreconvconss = 0;
336 (*conflict)->ninflpreconvliterals = 0;
337 (*conflict)->ninflpiterations = 0;
338 (*conflict)->nboundlpcalls = 0;
339 (*conflict)->nboundlpsuccess = 0;
340 (*conflict)->nboundlpconfconss = 0;
341 (*conflict)->nboundlpconfliterals = 0;
342 (*conflict)->nboundlpreconvconss = 0;
343 (*conflict)->nboundlpreconvliterals = 0;
344 (*conflict)->nboundlpiterations = 0;
345 (*conflict)->nsbcalls = 0;
346 (*conflict)->nsbsuccess = 0;
347 (*conflict)->nsbconfconss = 0;
348 (*conflict)->nsbconfliterals = 0;
349 (*conflict)->nsbreconvconss = 0;
350 (*conflict)->nsbreconvliterals = 0;
351 (*conflict)->nsbiterations = 0;
352 (*conflict)->npseudocalls = 0;
353 (*conflict)->npseudosuccess = 0;
354 (*conflict)->npseudoconfconss = 0;
355 (*conflict)->npseudoconfliterals = 0;
356 (*conflict)->npseudoreconvconss = 0;
357 (*conflict)->npseudoreconvliterals = 0;
358 (*conflict)->ndualproofsinfglobal = 0;
359 (*conflict)->ndualproofsinflocal = 0;
360 (*conflict)->ndualproofsinfsuccess = 0;
361 (*conflict)->dualproofsinfnnonzeros = 0;
362 (*conflict)->ndualproofsbndglobal = 0;
363 (*conflict)->ndualproofsbndlocal = 0;
364 (*conflict)->ndualproofsbndsuccess = 0;
365 (*conflict)->dualproofsbndnnonzeros = 0;
366 (*conflict)->nrescalls = 0;
367 (*conflict)->nressuccess = 0;
368 (*conflict)->nreslargecoefs = 0;
369 (*conflict)->nreslongconfs = 0;
370 (*conflict)->nresconfconss = 0;
371 (*conflict)->nresconfvariables = 0;
372 (*conflict)->conflictrowssize = 0;
373 (*conflict)->bdchgonlyresqueue = FALSE;
374 (*conflict)->bdchgonlyconfqueue = FALSE;
375
376 SCIP_CALL( SCIPconflictInitRows((*conflict), blkmem) );
377
378 SCIP_CALL( SCIPconflictInitProofset((*conflict), blkmem) );
379
380 return SCIP_OKAY;
381}
382
383/** frees conflict analysis data for propagation conflicts */
385 SCIP_CONFLICT** conflict, /**< pointer to conflict analysis data */
386 BMS_BLKMEM* blkmem /**< block memory of transformed problem */
387 )
388{
389 assert(conflict != NULL);
390 assert(*conflict != NULL);
391 assert((*conflict)->nconflictsets == 0);
392 assert((*conflict)->ntmpbdchginfos == 0);
393
394#if defined(SCIP_CONFGRAPH) || defined(SCIP_CONFGRAPH_DOT)
395 confgraphFree();
396#endif
397
398 SCIPclockFree(&(*conflict)->dIBclock);
399 SCIPclockFree(&(*conflict)->propanalyzetime);
400 SCIPclockFree(&(*conflict)->resanalyzetime);
401 SCIPclockFree(&(*conflict)->inflpanalyzetime);
402 SCIPclockFree(&(*conflict)->boundlpanalyzetime);
403 SCIPclockFree(&(*conflict)->sbanalyzetime);
404 SCIPclockFree(&(*conflict)->pseudoanalyzetime);
405 SCIPpqueueFree(&(*conflict)->bdchgqueue);
406 SCIPpqueueFree(&(*conflict)->forcedbdchgqueue);
407 SCIPpqueueFree(&(*conflict)->resbdchgqueue);
408 SCIPpqueueFree(&(*conflict)->continuousbdchgqueue);
409 SCIPconflictsetFree(&(*conflict)->conflictset, blkmem);
410 SCIPconflictRowFree(&(*conflict)->conflictrow, blkmem);
411 SCIPconflictRowFree(&(*conflict)->resolvedconflictrow, blkmem);
412 SCIPconflictRowFree(&(*conflict)->reasonrow, blkmem);
413 SCIPconflictRowFree(&(*conflict)->reducedreasonrow, blkmem);
414 SCIPproofsetFree(&(*conflict)->proofset, blkmem);
415
416 BMSfreeMemoryArrayNull(&(*conflict)->conflictsets);
417 BMSfreeMemoryArrayNull(&(*conflict)->conflictsetscores);
418 BMSfreeMemoryArrayNull(&(*conflict)->conflictvarslbs);
419 BMSfreeMemoryArrayNull(&(*conflict)->conflictvarsubs);
420 BMSfreeMemoryArrayNull(&(*conflict)->proofsets);
421 BMSfreeMemoryArrayNull(&(*conflict)->conflictrows);
422 BMSfreeMemoryArrayNull(&(*conflict)->tmpbdchginfos);
423 BMSfreeMemory(conflict);
424
425 return SCIP_OKAY;
426}
427
428/** clears conflict analysis bound changes queues for propagation conflicts */
430 SCIP_CONFLICT* conflict /**< pointer to conflict analysis data */
431 )
432{
433 assert(conflict != NULL);
434
435 SCIPpqueueClear(conflict->bdchgqueue);
437
438 return SCIP_OKAY;
439}
440
441/** returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
442 * bound
443 */
445 SCIP_CONFLICT* conflict, /**< conflict analysis data */
446 SCIP_VAR* var /**< problem variable */
447 )
448{
449 if( var->conflictlbcount == conflict->count )
450 {
451 assert(EPSGE(var->conflictlb, var->conflictrelaxedlb, 1e-09));
452 return var->conflictrelaxedlb;
453 }
454
455 return SCIPvarGetLbGlobal(var);
456}
457
458/** returns the conflict upper bound if the variable is present in the current conflict set; otherwise the global upper
459 * bound
460 */
462 SCIP_CONFLICT* conflict, /**< conflict analysis data */
463 SCIP_VAR* var /**< problem variable */
464 )
465{
466 if( var->conflictubcount == conflict->count )
467 {
468 assert(EPSLE(var->conflictub, var->conflictrelaxedub, 1e-09));
469 return var->conflictrelaxedub;
470 }
471
472 return SCIPvarGetUbGlobal(var);
473}
474
475/** gets time in seconds used for preprocessing global conflict constraint before appliance */
477 SCIP_CONFLICT* conflict /**< conflict analysis data */
478 )
479{
480 assert(conflict != NULL);
481
482 return SCIPclockGetTime(conflict->dIBclock);
483}
484
485/** gets time in seconds used for analyzing propagation conflicts */
487 SCIP_CONFLICT* conflict /**< conflict analysis data */
488 )
489{
490 assert(conflict != NULL);
491
492 return SCIPclockGetTime(conflict->propanalyzetime);
493}
494
495/** gets time in seconds used for analyzing propagation conflicts with generalized resolution */
497 SCIP_CONFLICT* conflict /**< conflict analysis data */
498 )
499{
500 assert(conflict != NULL);
501
502 return SCIPclockGetTime(conflict->resanalyzetime);
503}
504
505/** gets number of calls to propagation conflict analysis */
507 SCIP_CONFLICT* conflict /**< conflict analysis data */
508 )
509{
510 assert(conflict != NULL);
511
512 return conflict->npropcalls;
513}
514
515/** gets number of calls to propagation conflict analysis that yield at least one conflict constraint */
517 SCIP_CONFLICT* conflict /**< conflict analysis data */
518 )
519{
520 assert(conflict != NULL);
521
522 return conflict->npropsuccess;
523}
524
525/** gets number of conflict constraints detected in propagation conflict analysis */
527 SCIP_CONFLICT* conflict /**< conflict analysis data */
528 )
529{
530 assert(conflict != NULL);
531
532 return conflict->npropconfconss;
533}
534
535/** gets total number of literals in conflict constraints created in propagation conflict analysis */
537 SCIP_CONFLICT* conflict /**< conflict analysis data */
538 )
539{
540 assert(conflict != NULL);
541
542 return conflict->npropconfliterals;
543}
544
545/** returns total number of variables in resolution conflict constraints created in propagation conflict analysis */
547 SCIP_CONFLICT* conflict /**< conflict analysis data */
548 )
549{
550 assert(conflict != NULL);
551
552 return conflict->nresconfvariables;
553}
554
555/** gets number of reconvergence constraints detected in propagation conflict analysis */
557 SCIP_CONFLICT* conflict /**< conflict analysis data */
558 )
559{
560 assert(conflict != NULL);
561
562 return conflict->npropreconvconss;
563}
564
565/** gets total number of literals in reconvergence constraints created in propagation conflict analysis */
567 SCIP_CONFLICT* conflict /**< conflict analysis data */
568 )
569{
570 assert(conflict != NULL);
571
572 return conflict->npropreconvliterals;
573}
574
575/** gets time in seconds used for analyzing infeasible LP conflicts */
577 SCIP_CONFLICT* conflict /**< conflict analysis data */
578 )
579{
580 assert(conflict != NULL);
581
582 return SCIPclockGetTime(conflict->inflpanalyzetime);
583}
584
585/** gets number of calls to infeasible LP conflict analysis */
587 SCIP_CONFLICT* conflict /**< conflict analysis data */
588 )
589{
590 assert(conflict != NULL);
591
592 return conflict->ninflpcalls;
593}
594
595/** gets number of calls to infeasible LP conflict analysis that yield at least one conflict constraint */
597 SCIP_CONFLICT* conflict /**< conflict analysis data */
598 )
599{
600 assert(conflict != NULL);
601
602 return conflict->ninflpsuccess;
603}
604
605/** gets number of conflict constraints detected in infeasible LP conflict analysis */
607 SCIP_CONFLICT* conflict /**< conflict analysis data */
608 )
609{
610 assert(conflict != NULL);
611
612 return conflict->ninflpconfconss;
613}
614
615/** gets total number of literals in conflict constraints created in infeasible LP conflict analysis */
617 SCIP_CONFLICT* conflict /**< conflict analysis data */
618 )
619{
620 assert(conflict != NULL);
621
622 return conflict->ninflpconfliterals;
623}
624
625/** gets number of reconvergence constraints detected in infeasible LP conflict analysis */
627 SCIP_CONFLICT* conflict /**< conflict analysis data */
628 )
629{
630 assert(conflict != NULL);
631
632 return conflict->ninflpreconvconss;
633}
634
635/** gets total number of literals in reconvergence constraints created in infeasible LP conflict analysis */
637 SCIP_CONFLICT* conflict /**< conflict analysis data */
638 )
639{
640 assert(conflict != NULL);
641
642 return conflict->ninflpreconvliterals;
643}
644
645/** gets number of LP iterations in infeasible LP conflict analysis */
647 SCIP_CONFLICT* conflict /**< conflict analysis data */
648 )
649{
650 assert(conflict != NULL);
651
652 return conflict->ninflpiterations;
653}
654
655/** gets time in seconds used for analyzing bound exceeding LP conflicts */
657 SCIP_CONFLICT* conflict /**< conflict analysis data */
658 )
659{
660 assert(conflict != NULL);
661
662 return SCIPclockGetTime(conflict->boundlpanalyzetime);
663}
664
665/** gets number of calls to bound exceeding LP conflict analysis */
667 SCIP_CONFLICT* conflict /**< conflict analysis data */
668 )
669{
670 assert(conflict != NULL);
671
672 return conflict->nboundlpcalls;
673}
674
675/** gets number of calls to bound exceeding LP conflict analysis that yield at least one conflict constraint */
677 SCIP_CONFLICT* conflict /**< conflict analysis data */
678 )
679{
680 assert(conflict != NULL);
681
682 return conflict->nboundlpsuccess;
683}
684
685/** gets number of conflict constraints detected in bound exceeding LP conflict analysis */
687 SCIP_CONFLICT* conflict /**< conflict analysis data */
688 )
689{
690 assert(conflict != NULL);
691
692 return conflict->nboundlpconfconss;
693}
694
695/** gets total number of literals in conflict constraints created in bound exceeding LP conflict analysis */
697 SCIP_CONFLICT* conflict /**< conflict analysis data */
698 )
699{
700 assert(conflict != NULL);
701
702 return conflict->nboundlpconfliterals;
703}
704
705/** gets number of reconvergence constraints detected in bound exceeding LP conflict analysis */
707 SCIP_CONFLICT* conflict /**< conflict analysis data */
708 )
709{
710 assert(conflict != NULL);
711
712 return conflict->nboundlpreconvconss;
713}
714
715/** gets total number of literals in reconvergence constraints created in bound exceeding LP conflict analysis */
717 SCIP_CONFLICT* conflict /**< conflict analysis data */
718 )
719{
720 assert(conflict != NULL);
721
722 return conflict->nboundlpreconvliterals;
723}
724
725/** gets number of LP iterations in bound exceeding LP conflict analysis */
727 SCIP_CONFLICT* conflict /**< conflict analysis data */
728 )
729{
730 assert(conflict != NULL);
731
732 return conflict->nboundlpiterations;
733}
734
735/** gets time in seconds used for analyzing infeasible strong branching conflicts */
737 SCIP_CONFLICT* conflict /**< conflict analysis data */
738 )
739{
740 assert(conflict != NULL);
741
742 return SCIPclockGetTime(conflict->sbanalyzetime);
743}
744
745/** gets number of successful calls to dual proof analysis derived from infeasible LPs */
747 SCIP_CONFLICT* conflict /**< conflict analysis data */
748 )
749{
750 assert(conflict != NULL);
751
752 return conflict->ndualproofsinfsuccess;
753}
754
755/** gets number of globally valid dual proof constraints derived from infeasible LPs */
757 SCIP_CONFLICT* conflict /**< conflict analysis data */
758 )
759{
760 assert(conflict != NULL);
761
762 return conflict->ndualproofsinfglobal;
763}
764
765/** gets number of locally valid dual proof constraints derived from infeasible LPs */
767 SCIP_CONFLICT* conflict /**< conflict analysis data */
768 )
769{
770 assert(conflict != NULL);
771
772 return conflict->ndualproofsinflocal;
773}
774
775/** gets average length of dual proof constraints derived from infeasible LPs */
777 SCIP_CONFLICT* conflict /**< conflict analysis data */
778 )
779{
780 assert(conflict != NULL);
781
782 return conflict->dualproofsinfnnonzeros;
783}
784
785/** gets number of successfully analyzed dual proofs derived from bound exceeding LPs */
787 SCIP_CONFLICT* conflict /**< conflict analysis data */
788 )
789{
790 assert(conflict != NULL);
791
792 return conflict->ndualproofsbndsuccess;
793}
794
795/** gets number of globally applied dual proofs derived from bound exceeding LPs */
797 SCIP_CONFLICT* conflict /**< conflict analysis data */
798 )
799{
800 assert(conflict != NULL);
801
802 return conflict->ndualproofsbndglobal;
803}
804
805/** gets number of locally applied dual proofs derived from bound exceeding LPs */
807 SCIP_CONFLICT* conflict /**< conflict analysis data */
808 )
809{
810 assert(conflict != NULL);
811
812 return conflict->ndualproofsbndlocal;
813}
814
815/** gets average length of dual proofs derived from bound exceeding LPs */
817 SCIP_CONFLICT* conflict /**< conflict analysis data */
818 )
819{
820 assert(conflict != NULL);
821
822 return conflict->dualproofsbndnnonzeros;
823}
824
825/** gets number of calls to infeasible strong branching conflict analysis */
827 SCIP_CONFLICT* conflict /**< conflict analysis data */
828 )
829{
830 assert(conflict != NULL);
831
832 return conflict->nsbcalls;
833}
834
835/** gets number of calls to infeasible strong branching conflict analysis that yield at least one conflict constraint */
837 SCIP_CONFLICT* conflict /**< conflict analysis data */
838 )
839{
840 assert(conflict != NULL);
841
842 return conflict->nsbsuccess;
843}
844
845/** gets number of conflict constraints detected in infeasible strong branching conflict analysis */
847 SCIP_CONFLICT* conflict /**< conflict analysis data */
848 )
849{
850 assert(conflict != NULL);
851
852 return conflict->nsbconfconss;
853}
854
855/** gets total number of literals in conflict constraints created in infeasible strong branching conflict analysis */
857 SCIP_CONFLICT* conflict /**< conflict analysis data */
858 )
859{
860 assert(conflict != NULL);
861
862 return conflict->nsbconfliterals;
863}
864
865/** gets number of reconvergence constraints detected in infeasible strong branching conflict analysis */
867 SCIP_CONFLICT* conflict /**< conflict analysis data */
868 )
869{
870 assert(conflict != NULL);
871
872 return conflict->nsbreconvconss;
873}
874
875/** gets total number of literals in reconvergence constraints created in infeasible strong branching conflict analysis */
877 SCIP_CONFLICT* conflict /**< conflict analysis data */
878 )
879{
880 assert(conflict != NULL);
881
882 return conflict->nsbreconvliterals;
883}
884
885/** gets number of LP iterations in infeasible strong branching conflict analysis */
887 SCIP_CONFLICT* conflict /**< conflict analysis data */
888 )
889{
890 assert(conflict != NULL);
891
892 return conflict->nsbiterations;
893}
894
895/** adds a weighted LP row to an aggregation row */
896static
898 SCIP_SET* set, /**< global SCIP settings */
899 SCIP_ROW* row, /**< LP row */
900 SCIP_Real weight, /**< weight for scaling */
901 SCIP_AGGRROW* aggrrow, /**< aggregation row */
902 SCIP_Bool safely, /**< should the addition be performed safely? */
903 SCIP_Bool* success /**< was adding the row successful? */
904 )
905{
906 SCIP_Bool negated;
907
908 assert(set != NULL);
909 assert(row != NULL);
910 assert(weight != 0.0);
911 assert(safely == set->exact_enable);
912 assert(success != NULL);
913
914 /* add minimal value to dual row's left hand side: y_i < 0 -> lhs, y_i > 0 -> rhs */
915 negated = weight < 0.0;
916
917 assert(!negated || !SCIPsetIsInfinity(set, -row->lhs));
918 assert(negated || !SCIPsetIsInfinity(set, row->rhs));
919
920 if( !safely )
921 {
922 *success = TRUE;
923 SCIP_CALL( SCIPaggrRowAddRow(set->scip, aggrrow, row, weight, negated ? -1 : 1) );
924 }
925 else
926 {
927 *success = FALSE;
928 SCIP_CALL( SCIPaggrRowAddRowSafely(set->scip, aggrrow, row, weight, negated ? -1 : 1, success) );
929 }
930
931 SCIPsetDebugMsg(set, " -> add %s row <%s>[%g,%g](lp depth: %d): dual=%g -> dualrhs=%g\n",
932 row->local ? "local" : "global",
933 SCIProwGetName(row), row->lhs - row->constant, row->rhs - row->constant,
934 row->lpdepth, weight, SCIPaggrRowGetRhs(aggrrow));
935
936 return SCIP_OKAY;
937}
938
939/** checks validity of an LP row and a corresponding weight */
940static
942 SCIP_SET* set, /**< global SCIP settings */
943 SCIP_ROW* row, /**< LP row */
944 SCIP_Real weight, /**< weight for scaling */
945 SCIP_Bool* zerocontribution /**< pointer to store whether every row entry is zero within tolerances */
946 )
947{
948 SCIP_Bool valid = TRUE;
949
950 *zerocontribution = TRUE;
951
952 /* dual solution values of 0.0 are always valid */
953 if( REALABS(weight) > QUAD_EPSILON )
954 {
955 *zerocontribution = FALSE;
956
957 /* check dual feasibility */
958 if( (SCIPsetIsInfinity(set, -row->lhs) && weight > 0.0) || (SCIPsetIsInfinity(set, row->rhs) && weight < 0.0) )
959 {
960 int i;
961
962 /* ignore slight numerical violations if the contribution of every component of the row is close to zero */
963 if( weight > 0.0 )
964 *zerocontribution = SCIPsetIsDualfeasZero(set, row->rhs * weight);
965 else
966 *zerocontribution = SCIPsetIsDualfeasZero(set, row->lhs * weight);
967
968 for( i = 0; i < row->len && *zerocontribution; i++ )
969 {
970 if( !SCIPsetIsDualfeasZero(set, weight * row->vals[i]) )
971 *zerocontribution = FALSE;
972 }
973
974 if( !(*zerocontribution) )
975 {
976 SCIPsetDebugMsg(set, " -> invalid dual solution value %g for row <%s>: lhs=%g, rhs=%g\n",
977 weight, SCIProwGetName(row), row->lhs, row->rhs);
978
979 valid = FALSE;
980 }
981 }
982 }
983
984 return valid;
985}
986
987/** calculates the minimal activity of a given aggregation row */
988static
990 SCIP_SET* set, /**< global SCIP settings */
991 SCIP_PROB* transprob, /**< transformed problem data */
992 SCIP_AGGRROW* aggrrow, /**< aggregation row */
993 SCIP_Real* curvarlbs, /**< current lower bounds of active problem variables (or NULL for global bounds) */
994 SCIP_Real* curvarubs, /**< current upper bounds of active problem variables (or NULL for global bounds) */
995 SCIP_Bool* infdelta /**< pointer to store whether at least one variable contributes with an infinite value */
996 )
997{
998 SCIP_VAR** vars;
999 SCIP_Real minact;
1000 int* inds;
1001 int nnz;
1002 int i;
1003 SCIP_ROUNDMODE roundmode;
1004
1005 vars = SCIPprobGetVars(transprob);
1006 assert(vars != NULL);
1007
1008 nnz = SCIPaggrRowGetNNz(aggrrow);
1009 inds = SCIPaggrRowGetInds(aggrrow);
1010
1011 minact = 0;
1012
1013 roundmode = SCIPintervalGetRoundingMode();
1015
1016 if( infdelta != NULL )
1017 *infdelta = FALSE;
1018
1019 for( i = 0; i < nnz; i++ )
1020 {
1021 SCIP_Real val;
1022 SCIP_Real delta;
1023 int v = inds[i];
1024
1025 assert(SCIPvarGetProbindex(vars[v]) == v);
1026
1027 val = aggrrow->vals[v];
1028 delta = 0.0;
1029
1030 if( val > 0.0 )
1031 {
1032 SCIP_Real bnd = (curvarlbs == NULL ? SCIPvarGetLbGlobal(vars[v]) : curvarlbs[v]);
1033 if( infdelta != NULL && SCIPsetIsInfinity(set, -bnd) )
1034 {
1035 *infdelta = TRUE;
1036 goto TERMINATE;
1037 }
1038 delta += val * bnd;
1039 }
1040 else
1041 {
1042 SCIP_Real bnd = (curvarubs == NULL ? SCIPvarGetUbGlobal(vars[v]) : curvarubs[v]);
1043 if( infdelta != NULL && SCIPsetIsInfinity(set, bnd) )
1044 {
1045 *infdelta = TRUE;
1046 goto TERMINATE;
1047 }
1048 delta += val * bnd;
1049 }
1050
1051 /* update minimal activity */
1052 minact += delta;
1053
1054 if( infdelta != NULL && SCIPsetIsInfinity(set, REALABS(delta)) )
1055 {
1056 *infdelta = TRUE;
1057 goto TERMINATE;
1058 }
1059 }
1060
1061 TERMINATE:
1062 SCIPintervalSetRoundingMode(roundmode);
1063 /* check whether the minimal activity is infinite */
1064 if( SCIPsetIsInfinity(set, minact) )
1065 return SCIPsetInfinity(set);
1066 if( SCIPsetIsInfinity(set, -minact) )
1067 return -SCIPsetInfinity(set);
1068
1069 return minact;
1070}
1071
1072/** calculates the minimal activity of a given aggregation row
1073 *
1074 * @note in exact solving mode, this returns a safe underestimation of the minimal activity
1075 */
1077 SCIP_SET* set, /**< global SCIP settings */
1078 SCIP_PROB* transprob, /**< transformed problem data */
1079 SCIP_AGGRROW* aggrrow, /**< aggregation row */
1080 SCIP_Real* curvarlbs, /**< current lower bounds of active problem variables (or NULL for global bounds) */
1081 SCIP_Real* curvarubs, /**< current upper bounds of active problem variables (or NULL for global bounds) */
1082 SCIP_Bool* infdelta /**< pointer to store whether at least one variable contributes with an infinite value */
1083 )
1084{
1085 SCIP_VAR** vars;
1086 SCIP_Real QUAD(minact);
1087 int* inds;
1088 int nnz;
1089 int i;
1090
1091 if( set->exact_enable )
1092 return aggrRowGetMinActivitySafely(set, transprob, aggrrow, curvarlbs, curvarubs, infdelta);
1093
1094 vars = SCIPprobGetVars(transprob);
1095 assert(vars != NULL);
1096
1097 nnz = SCIPaggrRowGetNNz(aggrrow);
1098 inds = SCIPaggrRowGetInds(aggrrow);
1099
1100 QUAD_ASSIGN(minact, 0.0);
1101
1102 if( infdelta != NULL )
1103 *infdelta = FALSE;
1104
1105 for( i = 0; i < nnz; i++ )
1106 {
1107 SCIP_Real val;
1108 SCIP_Real QUAD(delta);
1109 int v = inds[i];
1110
1111 assert(SCIPvarGetProbindex(vars[v]) == v);
1112
1113 val = SCIPaggrRowGetProbvarValue(aggrrow, v);
1114
1115 if( val > 0.0 )
1116 {
1117 SCIP_Real bnd = (curvarlbs == NULL ? SCIPvarGetLbGlobal(vars[v]) : curvarlbs[v]);
1118
1119 if( SCIPsetIsInfinity(set, -bnd) )
1120 {
1121 if( infdelta != NULL )
1122 *infdelta = TRUE;
1123
1124 return -SCIPsetInfinity(set);
1125 }
1126
1127 SCIPquadprecProdDD(delta, val, bnd);
1128 }
1129 else
1130 {
1131 SCIP_Real bnd = (curvarubs == NULL ? SCIPvarGetUbGlobal(vars[v]) : curvarubs[v]);
1132
1133 if( SCIPsetIsInfinity(set, bnd) )
1134 {
1135 if( infdelta != NULL )
1136 *infdelta = TRUE;
1137
1138 return -SCIPsetInfinity(set);
1139 }
1140
1141 SCIPquadprecProdDD(delta, val, bnd);
1142 }
1143
1144 /* update minimal activity */
1145 SCIPquadprecSumQQ(minact, minact, delta);
1146 }
1147
1148 /* check whether the minimal activity is infinite */
1149 if( SCIPsetIsInfinity(set, QUAD_TO_DBL(minact)) )
1150 return SCIPsetInfinity(set);
1151 if( SCIPsetIsInfinity(set, -QUAD_TO_DBL(minact)) )
1152 return -SCIPsetInfinity(set);
1153
1154 return QUAD_TO_DBL(minact);
1155}
1156
1157/** sort local rows by increasing depth and number of nonzeros as tie-breaker */
1158static
1160 SCIP_SET* set, /**< global SCIP settings */
1161 SCIP_AGGRROW* aggrrow, /**< aggregation row */
1162 SCIP_ROW** rows, /**< array of local rows */
1163 int* rowinds, /**< array of row indices */
1164 int* rowdepth, /**< array of LP depths */
1165 int nrows /**< number of local rows */
1166 )
1167{
1168 int* rownnz;
1169 int i;
1170
1171 assert(aggrrow != NULL);
1172 assert(rows != NULL);
1173 assert(nrows > 0);
1174 assert(rowinds != NULL);
1175 assert(rowdepth != NULL);
1176
1177 /* sort row indices by increasing depth */
1178 SCIPsortIntInt(rowdepth, rowinds, nrows);
1179 assert(rowdepth[0] <= rowdepth[nrows-1]);
1180
1181 SCIP_CALL( SCIPsetAllocBufferArray(set, &rownnz, nrows) );
1182
1183 /* get number of nonzero entries for every row */
1184 for( i = 0; i < nrows; i++ )
1185 {
1186 SCIP_ROW* row = rows[rowinds[i]];
1187 assert(row != NULL);
1188
1189 rownnz[i] = row->len;
1190 }
1191
1192 /* since SCIP has no stable sorting function we sort each bucket separately */
1193 for( i = 0; i < nrows; i++ )
1194 {
1195 int j = i;
1196 int d = rowdepth[i];
1197
1198 /* search for the next row with a greater depth */
1199 while( j+1 < nrows && rowdepth[j+1] == d )
1200 j++;
1201
1202 /* the bucket has size one */
1203 if( j == i )
1204 continue;
1205
1206 assert(j-i+1 <= nrows);
1207
1208 /* sort row indices by increasing number of nonzero elements */
1209 SCIPsortIntIntInt(&rownnz[i], &rowdepth[i], &rowinds[i], j-i+1);
1210 assert(rownnz[i] <= rownnz[j]);
1211
1212 i = j;
1213 } /*lint --e{850} i is modified in the body of the for loop */
1214
1215#ifndef NDEBUG
1216 for( i = 0; i < nrows-1; i++ )
1217 assert(rowdepth[i] < rowdepth[i+1] || (rowdepth[i] == rowdepth[i+1] && rownnz[i] <= rownnz[i+1]));
1218#endif
1219
1220 SCIPsetFreeBufferArray(set, &rownnz);
1221
1222 return SCIP_OKAY;
1223}
1224
1225/** adds locally valid rows to the proof constraint */
1226static
1228 SCIP_SET* set, /**< global SCIP settings */
1229 SCIP_PROB* transprob, /**< transformed problem */
1230 SCIP_LP* lp, /**< LP data */
1231 SCIP_AGGRROW* proofrow, /**< aggregated row representing the proof */
1232 SCIP_ROW** rows, /**< array if locally valid rows */
1233 SCIP_Real* dualsols, /**< dual solution vector */
1234 int* localrowinds, /**< array of row indecies */
1235 int* localrowdepth, /**< array of row depths */
1236 int nlocalrows, /**< number of local rows stored in rows array */
1237 SCIP_Real* proofact, /**< pointer to store the activity of the proof constraint */
1238 int* validdepth, /**< pointer to store the depth where the proof constraint is valid */
1239 SCIP_Real* curvarlbs, /**< current lower bounds of active problem variables */
1240 SCIP_Real* curvarubs, /**< current upper bounds of active problem variables */
1241 SCIP_Bool* valid /**< pointer store whether the proof constraint is valid */
1242 )
1243{
1244 SCIP_Bool infdelta;
1245 int i;
1246
1247 assert(set != NULL);
1248 assert(lp != NULL);
1249
1250 *validdepth = 0;
1251
1252 if( !set->conf_uselocalrows )
1253 return SCIP_OKAY;
1254
1255 SCIPsetDebugMsg(set, "add local rows to dual proof:\n");
1256
1257 /* check whether the proof is already valid, e.g., violated within the local bounds */
1258 *proofact = SCIPaggrRowGetMinActivity(set, transprob, proofrow, curvarlbs, curvarubs, &infdelta);
1259
1260 /* we stop if the minimal activity is infinite but all variables have a finite activity delta (bad numerics) */
1261 if( !infdelta && SCIPsetIsInfinity(set, REALABS(*proofact)) )
1262 {
1263 *valid = FALSE;
1264 return SCIP_OKAY;
1265 }
1266
1267 /* break if the proof is valid w.r.t local bounds
1268 * note: it can happen that the proof contains a variable with an infinite activity delta.
1269 * here, we don't break immediately because we might be able to fix it by adding local rows
1270 */
1271 if( !infdelta && SCIPsetIsGT(set, *proofact, SCIPaggrRowGetRhs(proofrow)) )
1272 {
1273 *valid = TRUE;
1274 return SCIP_OKAY;
1275 }
1276
1277 /* sort local rows by depth */
1278 SCIP_CALL( sortLocalRows(set, proofrow, rows, localrowinds, localrowdepth, nlocalrows) );
1279
1280 /* add successively local rows */
1281 for( i = 0; i < nlocalrows; ++i )
1282 {
1283 SCIP_ROW* row;
1284 int r;
1285
1286 r = localrowinds[i];
1287 row = rows[r];
1288
1289 assert(row != NULL);
1290 assert(row->len == 0 || row->cols != NULL);
1291 assert(row->len == 0 || row->vals != NULL);
1292 assert(row == lp->lpirows[r]);
1293 assert(row->local);
1294 assert(row->lpdepth == localrowdepth[i]);
1295
1296 /* ignore dual solution values of 0.0 (in this case: y_i == 0) */
1297 if( REALABS(dualsols[r]) > 0.0 )
1298 {
1299#ifndef NDEBUG
1300 SCIP_Bool zerocontribution;
1301
1302 /* check dual feasibility */
1303 *valid = checkDualFeasibility(set, row, dualsols[r], &zerocontribution);
1304 assert(*valid);
1305 assert(!zerocontribution);
1306#endif
1307
1308 if( SCIPsetIsDualfeasZero(set, dualsols[r]) )
1309 continue;
1310
1311 /* add row to dual proof */
1312 SCIP_CALL( addRowToAggrRow(set, row, -dualsols[r], proofrow, set->exact_enable, valid) );
1313 if( !(*valid) )
1314 goto TERMINATE;
1315
1316 /* update depth where the proof is valid */
1317 if( *validdepth < localrowdepth[i] )
1318 *validdepth = localrowdepth[i];
1319
1320 /* get the new minimal activity */
1321 *proofact = SCIPaggrRowGetMinActivity(set, transprob, proofrow, curvarlbs, curvarubs, &infdelta);
1322
1323 /* we stop if the minimal activity is infinite but all variables have a finite activity delta (bad numerics) */
1324 if( !infdelta && SCIPsetIsInfinity(set, REALABS(*proofact)) )
1325 {
1326 *valid = FALSE;
1327 goto TERMINATE;
1328 }
1329
1330 /* break if the proof is valid w.r.t local bounds */
1331 if( !infdelta && SCIPsetIsGT(set, *proofact, SCIPaggrRowGetRhs(proofrow)) )
1332 {
1333 *valid = TRUE;
1334 break;
1335 }
1336 }
1337 }
1338
1339 /* remove all nearly zero coefficients */
1340 /**@todo check whether it gives better performance to keep them in exact mode */
1341 SCIPaggrRowRemoveZeros(set->scip, proofrow, TRUE, valid);
1342
1343 TERMINATE:
1344 if( !(*valid) )
1345 {
1346 SCIPsetDebugMsg(set, " -> proof is not valid: %g <= %g\n", *proofact, SCIPaggrRowGetRhs(proofrow));
1347 SCIPsetDebugMsg(set, " -> stop due to numerical troubles\n");
1348 }
1349 else
1350 {
1351 *proofact = SCIPaggrRowGetMinActivity(set, transprob, proofrow, curvarlbs, curvarubs, &infdelta);
1352
1353 /* we stop if the minimal activity is infinite but all variables have a finite activity delta (bad numerics) */
1354 if( !infdelta && SCIPsetIsInfinity(set, REALABS(*proofact)) )
1355 {
1356 *valid = FALSE;
1357 SCIPsetDebugMsg(set, " -> proof is not valid: %g <= %g [infdelta: %u]\n", *proofact, SCIPaggrRowGetRhs(proofrow), infdelta);
1358 }
1359 else if( infdelta || SCIPsetIsLE(set, *proofact, SCIPaggrRowGetRhs(proofrow)) )
1360 {
1361 *valid = FALSE;
1362 SCIPsetDebugMsg(set, " -> proof is not valid: %g <= %g [infdelta: %u]\n", *proofact, SCIPaggrRowGetRhs(proofrow), infdelta);
1363 }
1364 }
1365
1366 return SCIP_OKAY;
1367}
1368
1369/** calculates a Farkas proof from the current dual LP solution */
1371 SCIP_SET* set, /**< global SCIP settings */
1372 SCIP_PROB* prob, /**< transformed problem */
1373 SCIP_LP* lp, /**< LP data */
1374 SCIP_LPI* lpi, /**< LPI data */
1375 SCIP_TREE* tree, /**< tree data */
1376 SCIP_AGGRROW* farkasrow, /**< aggregated row representing the proof */
1377 SCIP_Real* farkasact, /**< maximal activity of the proof constraint */
1378 int* validdepth, /**< pointer to store the valid depth of the proof constraint */
1379 SCIP_Real* curvarlbs, /**< current lower bounds of active problem variables */
1380 SCIP_Real* curvarubs, /**< current upper bounds of active problem variables */
1381 SCIP_Bool* valid /**< pointer store whether the proof constraint is valid */
1382 )
1383{
1384 SCIP_ROW** rows;
1385 SCIP_Real* dualfarkas;
1386 SCIP_ROW* row;
1387 int* localrowinds;
1388 int* localrowdepth;
1389 SCIP_Bool infdelta;
1390 int nlocalrows;
1391 int nrows;
1392 int r;
1393
1394 assert(set != NULL);
1395 assert(prob != NULL);
1396 assert(lp != NULL);
1397 assert(lp->flushed);
1398 assert(lp->solved);
1399 assert(curvarlbs != NULL);
1400 assert(curvarubs != NULL);
1401 assert(valid != NULL);
1402
1405
1406 /* get LP rows and problem variables */
1407 rows = SCIPlpGetRows(lp);
1408 nrows = SCIPlpGetNRows(lp);
1409 assert(nrows == 0 || rows != NULL);
1410 assert(nrows == lp->nlpirows);
1411
1412 /* it can happen that infeasibility is detetected within LP presolve. in that case, the LP solver may not be able to
1413 * to return the dual ray.
1414 */
1415 if( !SCIPlpiHasDualRay(lpi) )
1416 {
1417 *valid = FALSE;
1418 return SCIP_OKAY;
1419 }
1420
1421 assert(farkasrow != NULL);
1422
1423 /* allocate temporary memory */
1424 SCIP_CALL( SCIPsetAllocBufferArray(set, &dualfarkas, nrows) );
1425 BMSclearMemoryArray(dualfarkas, nrows);
1426 localrowinds = NULL;
1427 localrowdepth = NULL;
1428 nlocalrows = 0;
1429
1430 /* get dual Farkas values of rows */
1431 SCIP_CALL( SCIPlpiGetDualfarkas(lpi, dualfarkas) );
1432
1433 /* check whether the Farkas solution is numerically stable */
1434 for( r = 0; r < nrows; ++r )
1435 {
1436 if( REALABS(dualfarkas[r]) > SOLSTOP )
1437 {
1438 *valid = FALSE;
1439 goto TERMINATE;
1440 }
1441 }
1442
1443 /* calculate the Farkas row */
1444 *valid = TRUE;
1445 *validdepth = 0;
1446
1447 for( r = 0; r < nrows; ++r )
1448 {
1449 row = rows[r];
1450 assert(row != NULL);
1451 assert(row->len == 0 || row->cols != NULL);
1452 assert(row->len == 0 || row->vals != NULL);
1453 assert(row == lp->lpirows[r]);
1454
1455 /* ignore dual ray values of 0.0 (in this case: y_i == z_i == 0) */
1456 if( REALABS(dualfarkas[r]) > 0.0 )
1457 {
1458 SCIP_Bool zerocontribution;
1459
1460 /* check dual feasibility */
1461 *valid = checkDualFeasibility(set, row, dualfarkas[r], &zerocontribution);
1462
1463 if( !(*valid) )
1464 goto TERMINATE;
1465
1466 if( zerocontribution )
1467 continue;
1468
1469 if( SCIPsetIsDualfeasZero(set, dualfarkas[r]) )
1470 continue;
1471
1472 if( !row->local )
1473 {
1474 if( set->exact_enable && SCIPisCertified(set->scip) )
1475 {
1476 SCIP_Longint certificate_index;
1477
1478 /* ensure each row used in the aggregation is certified */
1479 certificate_index = SCIPhashmapGetImageLong(SCIPgetCertificate(set->scip)->rowdatahash, row->rowexact);
1480 if( certificate_index == LONG_MAX && SCIProwGetOrigintype(row) == SCIP_ROWORIGINTYPE_SEPA )
1481 {
1482 SCIP_CALL( SCIPcertificatePrintMirCut(set, lp, SCIPgetCertificate(set->scip), prob, row, 'L') );
1483 certificate_index = SCIPcertificateGetRowIndex(SCIPgetCertificate(set->scip), row->rowexact, dualfarkas[r] > 0);
1484 }
1485 assert(certificate_index != LONG_MAX);
1486 }
1487
1488 SCIP_CALL( addRowToAggrRow(set, row, -dualfarkas[r], farkasrow, set->exact_enable, valid) );
1489 if( !(*valid) )
1490 goto TERMINATE;
1491
1492 /* due to numerical reasons we want to stop */
1493 if( REALABS(SCIPaggrRowGetRhs(farkasrow)) > NUMSTOP )
1494 {
1495 *valid = FALSE;
1496 goto TERMINATE;
1497 }
1498 }
1499 else
1500 {
1501 int lpdepth = SCIProwGetLPDepth(row);
1502
1503 if( nlocalrows == 0 && lpdepth < SCIPtreeGetFocusDepth(tree) )
1504 {
1505 SCIP_CALL( SCIPsetAllocBufferArray(set, &localrowinds, nrows-r) );
1506 SCIP_CALL( SCIPsetAllocBufferArray(set, &localrowdepth, nrows-r) );
1507 }
1508
1509 if( lpdepth < SCIPtreeGetFocusDepth(tree) )
1510 {
1511 assert(localrowinds != NULL);
1512 assert(localrowdepth != NULL);
1513
1514 localrowinds[nlocalrows] = r;
1515 localrowdepth[nlocalrows++] = lpdepth;
1516 }
1517 }
1518 }
1519 }
1520
1521 /* remove all coefficients that are too close to zero */
1522 SCIPaggrRowRemoveZeros(set->scip, farkasrow, TRUE, valid);
1523
1524 if( !(*valid) )
1525 goto TERMINATE;
1526
1527 infdelta = FALSE;
1528
1529 /* calculate the current Farkas activity, always using the best bound w.r.t. the Farkas coefficient */
1530 *farkasact = SCIPaggrRowGetMinActivity(set, prob, farkasrow, curvarlbs, curvarubs, &infdelta);
1531
1532 SCIPsetDebugMsg(set, " -> farkasact=%g farkasrhs=%g [infdelta: %u], \n",
1533 (*farkasact), SCIPaggrRowGetRhs(farkasrow), infdelta);
1534
1535 /* The constructed proof is not valid, this can happen due to numerical reasons,
1536 * e.g., we only consider rows r with !SCIPsetIsZero(set, dualfarkas[r]),
1537 * or because of local rows were ignored so far.
1538 * Due to the latter case, it might happen at least one variable contributes
1539 * with an infinite value to the activity (see: https://git.zib.de/integer/scip/issues/2743)
1540 */
1541 if( infdelta || SCIPsetIsFeasLE(set, *farkasact, SCIPaggrRowGetRhs(farkasrow)))
1542 {
1543 /* add contribution of local rows */
1544 if( nlocalrows > 0 && set->conf_uselocalrows > 0 )
1545 {
1546 SCIP_CALL( addLocalRows(set, prob, lp, farkasrow, rows, dualfarkas, localrowinds, localrowdepth,
1547 nlocalrows, farkasact, validdepth, curvarlbs, curvarubs, valid) );
1548 }
1549 else
1550 {
1551 *valid = FALSE;
1552 SCIPsetDebugMsg(set, " -> proof is not valid to due infinite activity delta\n");
1553 }
1554 }
1555
1556 if( set->exact_enable )
1557 {
1558 for( int i = 0; i < farkasrow->nnz; i++ )
1559 {
1560 if( SCIPsetIsInfinity(set, ABS(farkasrow->vals[farkasrow->inds[i]])) )
1561 {
1562 (*valid) = FALSE;
1563 goto TERMINATE;
1564 }
1565 }
1566
1567 /* certify final Farkas row */
1568 if( SCIPisCertified(set->scip) )
1569 {
1570 SCIP_ROW** usedrows;
1571 SCIP_CALL( SCIPallocBufferArray(set->scip, &usedrows, farkasrow->nrows) );
1572 for( int i = 0; i < farkasrow->nrows; i++ )
1573 {
1574 usedrows[i] = SCIPgetLPRows(set->scip)[farkasrow->rowsinds[i]];
1575 }
1577 farkasrow, usedrows, farkasrow->rowweights, farkasrow->nrows, FALSE, &farkasrow->certificateline) );
1578 SCIPfreeBufferArray(set->scip, &usedrows);
1579 }
1580 }
1581
1582 TERMINATE:
1583 SCIPfreeBufferArrayNull(set->scip, &localrowdepth);
1584 SCIPfreeBufferArrayNull(set->scip, &localrowinds);
1585 SCIPsetFreeBufferArray(set, &dualfarkas);
1586
1587 return SCIP_OKAY;
1588}
1589
1590
1591/** creates a numerically safe row (with corresponding exact row) from the objective, provided rhs is an exactly valid cutoffbound */
1592static
1594 SCIP* scip, /**< SCIP data structure */
1595 SCIP_ROW** row, /**< pointer to store the row */
1596 SCIP_Real rhs, /**< right-hand side of the artificial row */
1597 SCIP_Bool* success /**< pointer to store whether adding the row was successful */
1598 )
1599{
1600 SCIP_Real* vals;
1601 SCIP_COL** cols;
1602 SCIP_COLEXACT** colsexact;
1603 int nvals;
1604 SCIP_RATIONAL** valsexact;
1605 SCIP_RATIONAL* lhsexact;
1606 SCIP_RATIONAL* rhsexact;
1607 SCIP_ROWEXACT* rowexact;
1608 SCIP_Real rhschange;
1609 SCIP_ROUNDMODE prevmode;
1610
1611 assert(SCIPisExact(scip));
1612
1619
1620 rhschange = 0;
1621 nvals = 0;
1622
1623 prevmode = SCIPintervalGetRoundingMode();
1625
1627 SCIPrationalSetReal(rhsexact, rhs);
1628 if( SCIPisObjIntegral(scip) )
1629 {
1631 rhs = floor(rhs);
1632 }
1633
1634 /* add coefficients */
1635 for( int i = 0; i < SCIPgetNLPCols(scip) && (*success); i++ )
1636 {
1637 SCIP_RATIONAL* val;
1638 SCIP_COLEXACT* col;
1639
1640 col = scip->lpexact->cols[i];
1641 val = col->obj;
1642
1643 if( SCIPrationalIsZero(val) )
1644 continue;
1645
1646 /* make the objective safe, if possible */
1648 vals[nvals] = SCIPvarGetObj(col->var);
1649 else if( !SCIPrationalIsNegInfinity(col->lb) )
1650 {
1652 if( SCIPvarGetLbGlobal(col->var) < 0 )
1653 {
1655 * (-SCIPvarGetLbGlobal(col->var));
1656 }
1657 }
1658 else if( !SCIPrationalIsInfinity(col->ub) )
1659 {
1660 vals[nvals] = SCIPrationalRoundReal(col->obj, SCIP_R_ROUND_UPWARDS);
1661 if( SCIPvarGetUbGlobal(col->var) > 0)
1662 {
1664 * SCIPvarGetUbGlobal(col->var);
1665 }
1666 }
1667 else
1668 {
1669 *success = FALSE;
1670 break;
1671 }
1672
1673 valsexact[nvals] = val;
1674 cols[nvals] = scip->lp->cols[i];
1675 colsexact[nvals] = scip->lpexact->cols[i];
1676 assert(scip->lp->cols[i]->var == scip->lpexact->cols[i]->var);
1677
1678 /* rows do not allow numerically zero coefficients, since this almost never happens, just abort the procedure in this case*/
1679 if( SCIPisZero(scip, vals[nvals]) )
1680 {
1681 *success = FALSE;
1682 break;
1683 }
1684
1685 nvals++;
1686 }
1687
1688 if( *success )
1689 {
1690 rhs += rhschange;
1691 SCIP_CALL( SCIPcreateRowUnspec(scip, row, "objective", nvals, cols, vals, -SCIPinfinity(scip), rhs,
1692 FALSE, FALSE, TRUE) );
1693 SCIP_CALL( SCIPcreateRowExact(scip, &rowexact, *row , nvals, colsexact, valsexact, lhsexact, rhsexact, TRUE) );
1695 }
1696
1699 SCIPfreeBufferArray(scip, &vals);
1700 SCIPfreeBufferArray(scip, &cols);
1701 SCIPfreeBufferArray(scip, &colsexact);
1702 SCIPfreeBufferArray(scip, &valsexact);
1703
1705
1706 return SCIP_OKAY;
1707}
1708
1709/** calculates a Farkas proof from the current dual LP solution */
1711 SCIP_SET* set, /**< global SCIP settings */
1712 SCIP_PROB* transprob, /**< transformed problem */
1713 SCIP_LP* lp, /**< LP data */
1714 SCIP_LPI* lpi, /**< LPI data */
1715 SCIP_TREE* tree, /**< tree data */
1716 SCIP_AGGRROW* farkasrow, /**< aggregated row representing the proof */
1717 SCIP_Real* farkasact, /**< maximal activity of the proof constraint */
1718 int* validdepth, /**< pointer to store the valid depth of the proof constraint */
1719 SCIP_Real* curvarlbs, /**< current lower bounds of active problem variables */
1720 SCIP_Real* curvarubs, /**< current upper bounds of active problem variables */
1721 SCIP_Bool* valid /**< pointer store whether the proof constraint is valid */
1722 )
1723{
1724 SCIP_RETCODE retcode;
1725 SCIP_ROW** rows;
1726 SCIP_ROW* row;
1727 SCIP_Real* primsols;
1728 SCIP_Real* dualsols;
1729 SCIP_Real* redcosts;
1730 int* localrowinds;
1731 int* localrowdepth;
1732 SCIP_Bool infdelta;
1733 SCIP_ROW* objectiverow = NULL;
1734 int nlocalrows;
1735 int nrows;
1736 int ncols;
1737 int r;
1738
1739 assert(set != NULL);
1740 assert(transprob != NULL);
1741 assert(lp != NULL);
1742 assert(lp->flushed);
1743 assert(lp->solved);
1744 assert(curvarlbs != NULL);
1745 assert(curvarubs != NULL);
1746 assert(valid != NULL);
1747
1748 *validdepth = 0;
1749 *valid = TRUE;
1750
1751 localrowinds = NULL;
1752 localrowdepth = NULL;
1753 nlocalrows = 0;
1754
1755 /* get LP rows and problem variables */
1756 rows = SCIPlpGetRows(lp);
1757 nrows = SCIPlpGetNRows(lp);
1758 ncols = SCIPlpGetNCols(lp);
1759 assert(nrows == 0 || rows != NULL);
1760 assert(nrows == lp->nlpirows);
1761
1762 /* get temporary memory */
1763 SCIP_CALL( SCIPsetAllocBufferArray(set, &primsols, ncols) );
1764 SCIP_CALL( SCIPsetAllocBufferArray(set, &dualsols, nrows) );
1765 SCIP_CALL( SCIPsetAllocBufferArray(set, &redcosts, ncols) );
1766
1767 /* get solution from LPI */
1768 retcode = SCIPlpiGetSol(lpi, NULL, primsols, dualsols, NULL, redcosts);
1769 if( retcode == SCIP_LPERROR ) /* on an error in the LP solver, just abort the conflict analysis */
1770 {
1771 *valid = FALSE;
1772 goto TERMINATE;
1773 }
1774 SCIP_CALL( retcode );
1775#ifdef SCIP_DEBUG
1776 {
1777 SCIP_Real objval;
1778 SCIP_CALL( SCIPlpiGetObjval(lpi, &objval) );
1779 SCIPsetDebugMsg(set, " -> LP objval: %g\n", objval);
1780 }
1781#endif
1782
1783 /* check whether the dual solution is numerically stable */
1784 for( r = 0; r < nrows; ++r )
1785 {
1786 if( REALABS(dualsols[r]) > SOLSTOP )
1787 {
1788 *valid = FALSE;
1789 goto TERMINATE;
1790 }
1791 }
1792
1793 if( set->exact_enable )
1794 {
1795 SCIP_COL** cols = SCIPgetLPCols(set->scip);
1796 for( int i = 0; i < SCIPgetNLPCols(set->scip); i++ )
1797 {
1798 if( SCIPsetIsInfinity(set, -SCIPvarGetLbGlobal(cols[i]->var)) && SCIPsetIsInfinity(set, SCIPvarGetUbGlobal(cols[i]->var)) )
1799 {
1800 /* adding unbounded variables safely to an aggregation row is not yet supported */
1801 (*valid) = FALSE;
1802 goto TERMINATE;
1803 }
1804 }
1805 }
1806
1807 /* clear the proof */
1808 if( set->exact_enable )
1809 SCIPaggrRowClearSafely(farkasrow);
1810 else
1811 SCIPaggrRowClear(farkasrow);
1812
1813 /* Let y be the dual solution and r be the reduced cost vector. Let z be defined as
1814 * z_i := y_i if i is a global row,
1815 * z_i := 0 if i is a local row.
1816 * Define the set X := {x | lhs <= Ax <= rhs, lb <= x <= ub, c^Tx <= c*}, with c* being the current primal bound.
1817 * Then the following inequalities are valid for all x \in X:
1818 * - c* <= -c^Tx
1819 * <=> z^TAx - c* <= (z^TA - c^T) x
1820 * <=> z^TAx - c* <= (y^TA - c^T - (y-z)^TA) x
1821 * <=> z^TAx - c* <= (-r^T - (y-z)^TA) x (dual feasibility of (y,r): y^TA + r^T == c^T)
1822 * Because lhs <= Ax <= rhs and lb <= x <= ub, the inequality can be relaxed to give
1823 * min{z^Tq | lhs <= q <= rhs} - c* <= max{(-r^T - (y-z)^TA) x | lb <= x <= ub}, or X = {}.
1824 *
1825 * The resulting dual row is: z^T{lhs,rhs} - c* <= (-r^T - (y-z)^TA){lb,ub},
1826 * where lhs, rhs, lb, and ub are selected in order to maximize the feasibility of the row.
1827 */
1828
1829 /* add the objective function to the aggregation row with respect to the current cutoff bound
1830 *
1831 * for an integral objective the right-hand side is reduced by the cutoff bound delta to cut off up to the next
1832 * possible objective value below the cutoff bound
1833 */
1834
1835 if( !set->exact_enable )
1836 {
1837 SCIP_CALL( SCIPaggrRowAddObjectiveFunction(set->scip, farkasrow, lp->cutoffbound - (SCIPprobIsObjIntegral(transprob) ? SCIPsetCutoffbounddelta(set) : 0.0), 1.0) );
1838 }
1839 else
1840 {
1841 double cutoffbound;
1842
1844
1845 SCIP_CALL( getObjectiveRow(set->scip, &objectiverow, cutoffbound, valid) );
1846 if( *valid )
1847 {
1848 SCIP_CALL( addRowToAggrRow(set, objectiverow, 1.0, farkasrow, TRUE, valid) );
1849 }
1850
1851 if( !(*valid) )
1852 goto TERMINATE;
1853 }
1854
1855 /* dual row: z^T{lhs,rhs} - c* <= (-r^T - (y-z)^TA){lb,ub}
1856 * process rows: add z^T{lhs,rhs} to the dual row's left hand side, and -(y-z)^TA to the dual row's coefficients
1857 */
1858 for( r = 0; r < nrows; ++r )
1859 {
1860 row = rows[r];
1861 assert(row != NULL);
1862 assert(row->len == 0 || row->cols != NULL);
1863 assert(row->len == 0 || row->vals != NULL);
1864 assert(row == lp->lpirows[r]);
1865
1866 /* ignore dual solution values of 0.0 (in this case: y_i == z_i == 0) */
1867 if( REALABS(dualsols[r]) > 0.0 )
1868 {
1869 SCIP_Bool zerocontribution;
1870
1871 /* check dual feasibility */
1872 *valid = checkDualFeasibility(set, row, dualsols[r], &zerocontribution);
1873
1874 if( !(*valid) )
1875 goto TERMINATE;
1876
1877 if( zerocontribution )
1878 continue;
1879
1880 if( SCIPsetIsDualfeasZero(set, dualsols[r]) )
1881 continue;
1882
1883 /* skip local row */
1884 if( !row->local )
1885 {
1886 SCIP_CALL( addRowToAggrRow(set, row, -dualsols[r], farkasrow, set->exact_enable, valid) );
1887 if( !(*valid) )
1888 goto TERMINATE;
1889
1890 /* due to numerical reasons we want to stop */
1891 if( REALABS(SCIPaggrRowGetRhs(farkasrow)) > NUMSTOP )
1892 {
1893 *valid = FALSE;
1894 goto TERMINATE;
1895 }
1896 }
1897 else
1898 {
1899 int lpdepth = SCIProwGetLPDepth(row);
1900
1901 if( nlocalrows == 0 && lpdepth < SCIPtreeGetFocusDepth(tree) )
1902 {
1903 SCIP_CALL( SCIPsetAllocBufferArray(set, &localrowinds, nrows-r) );
1904 SCIP_CALL( SCIPsetAllocBufferArray(set, &localrowdepth, nrows-r) );
1905 }
1906
1907 if( lpdepth < SCIPtreeGetFocusDepth(tree) )
1908 {
1909 assert(localrowinds != NULL);
1910 assert(localrowdepth != NULL);
1911
1912 localrowinds[nlocalrows] = r;
1913 localrowdepth[nlocalrows++] = lpdepth;
1914 }
1915 }
1916 }
1917 }
1918
1919 /* remove all nearly zero coefficients */
1920 SCIPaggrRowRemoveZeros(set->scip, farkasrow, TRUE, valid);
1921
1922 if( !(*valid) )
1923 goto TERMINATE;
1924
1925 infdelta = FALSE;
1926
1927 /* check validity of the proof */
1928 *farkasact = SCIPaggrRowGetMinActivity(set, transprob, farkasrow, curvarlbs, curvarubs, &infdelta);
1929
1930 SCIPsetDebugMsg(set, " -> farkasact=%g farkasrhs=%g [infdelta: %u], \n",
1931 (*farkasact), SCIPaggrRowGetRhs(farkasrow), infdelta);
1932
1933 /* The constructed proof is not valid, this can happen due to numerical reasons,
1934 * e.g., we only consider rows r with !SCIPsetIsZero(set, dualsol[r]),
1935 * or because of local rows were ignored so far.
1936 * Due to the latter case, it might happen at least one variable contributes
1937 * with an infinite value to the activity (see: https://git.zib.de/integer/scip/issues/2743)
1938 */
1939 if( infdelta || SCIPsetIsFeasLE(set, *farkasact, SCIPaggrRowGetRhs(farkasrow)))
1940 {
1941 /* add contribution of local rows */
1942 if( nlocalrows > 0 && set->conf_uselocalrows > 0 )
1943 {
1944 SCIP_CALL( addLocalRows(set, transprob, lp, farkasrow, rows, dualsols, localrowinds, localrowdepth,
1945 nlocalrows, farkasact, validdepth, curvarlbs, curvarubs, valid) );
1946 }
1947 else
1948 {
1949 *valid = FALSE;
1950 SCIPsetDebugMsg(set, " -> proof is not valid to due infinite activity delta\n");
1951 }
1952 }
1953
1954 if( set->exact_enable && SCIPisCertified(set->scip) )
1955 {
1956 SCIP_Longint certificateline;
1957 SCIP_ROW** usedrows;
1958
1959 assert(objectiverow != NULL && objectiverow->rowexact != NULL);
1960
1962 SCIP_CALL( SCIPhashmapInsertLong(SCIPgetCertificate(set->scip)->rowdatahash, objectiverow->rowexact, certificateline) );
1963 SCIP_CALL( SCIPallocBufferArray(set->scip, &usedrows, farkasrow->nrows + 1) );
1964 usedrows[0] = objectiverow;
1965 for( int i = 1; i < farkasrow->nrows; i++ )
1966 {
1967 SCIP_Longint certificate_index;
1968
1969 usedrows[i] = SCIPgetLPRows(set->scip)[farkasrow->rowsinds[i]];
1970
1971 /* ensure used rows are certified */
1972 certificate_index = SCIPhashmapGetImageLong(SCIPgetCertificate(set->scip)->rowdatahash, usedrows[i]->rowexact);
1973 if( certificate_index == LONG_MAX && SCIProwGetOrigintype(usedrows[i]) == SCIP_ROWORIGINTYPE_SEPA )
1974 {
1975 SCIP_CALL( SCIPcertificatePrintMirCut(set, lp, SCIPgetCertificate(set->scip), transprob, usedrows[i], 'L') );
1976 }
1977 else
1978 {
1979 assert(certificate_index != SCIP_LONGINT_MAX);
1980 }
1981 }
1982 SCIP_CALL( SCIPcertificatePrintAggrrow(set, transprob, SCIPgetCertificate(set->scip), farkasrow, usedrows,
1983 farkasrow->rowweights, farkasrow->nrows, false, &farkasrow->certificateline) );
1985 SCIPfreeBufferArray(set->scip, &usedrows);
1986 }
1987
1988 TERMINATE:
1989 assert(set->exact_enable || objectiverow == NULL);
1990 if( objectiverow != NULL )
1991 {
1992 SCIP_CALL( SCIPreleaseRowExact(set->scip, &objectiverow->rowexact) );
1993 SCIP_CALL( SCIPreleaseRow(set->scip, &objectiverow) );
1994 }
1995 SCIPfreeBufferArrayNull(set->scip, &localrowdepth);
1996 SCIPfreeBufferArrayNull(set->scip, &localrowinds);
1997 SCIPsetFreeBufferArray(set, &redcosts);
1998 SCIPsetFreeBufferArray(set, &dualsols);
1999 SCIPsetFreeBufferArray(set, &primsols);
2000
2001 return SCIP_OKAY;
2002}
2003
2004
2005/*
2006 * pseudo solution conflict analysis
2007 */
2008
2009/** analyzes a pseudo solution with objective value exceeding the current cutoff to find out the bound changes on
2010 * variables that were responsible for the objective value degradation;
2011 * on success, calls standard conflict analysis with the responsible variables as starting conflict set, thus creating
2012 * a conflict constraint out of the resulting conflict set;
2013 * updates statistics for pseudo solution conflict analysis
2014 */
2016 SCIP_CONFLICT* conflict, /**< conflict analysis data */
2017 BMS_BLKMEM* blkmem, /**< block memory of transformed problem */
2018 SCIP_SET* set, /**< global SCIP settings */
2019 SCIP_STAT* stat, /**< problem statistics */
2020 SCIP_PROB* transprob, /**< transformed problem */
2021 SCIP_PROB* origprob, /**< original problem */
2022 SCIP_TREE* tree, /**< branch and bound tree */
2023 SCIP_REOPT* reopt, /**< reoptimization data structure */
2024 SCIP_LP* lp, /**< LP data */
2025 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
2026 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
2027 SCIP_EVENTFILTER* eventfilter, /**< global event filter */
2028 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
2029 SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
2030 )
2031{
2032 SCIP_VAR** vars;
2033 SCIP_VAR* var;
2034 SCIP_Real* curvarlbs;
2035 SCIP_Real* curvarubs;
2036 int* lbchginfoposs;
2037 int* ubchginfoposs;
2038 SCIP_Real* pseudocoefs;
2039 SCIP_Real pseudolhs;
2040 SCIP_Real pseudoact;
2041 int nvars;
2042 int v;
2043
2044 if( set->exact_enable )
2045 return SCIP_OKAY;
2046
2047 assert(conflict != NULL);
2048 assert(conflict->nconflictsets == 0);
2049 assert(set != NULL);
2050 assert(stat != NULL);
2051 assert(transprob != NULL);
2052 assert(lp != NULL);
2053 assert(!SCIPsetIsInfinity(set, -SCIPlpGetPseudoObjval(lp, set, transprob)));
2054 assert(!SCIPsetIsInfinity(set, lp->cutoffbound));
2055
2056 if( success != NULL )
2057 *success = FALSE;
2058
2059 /* check, if pseudo solution conflict analysis is enabled */
2060 if( !set->conf_enable || !set->conf_usepseudo )
2061 return SCIP_OKAY;
2062
2063 /* check, if there are any conflict handlers to use a conflict set */
2064 if( set->nconflicthdlrs == 0 )
2065 return SCIP_OKAY;
2066
2067 SCIPsetDebugMsg(set, "analyzing pseudo solution (obj: %g) that exceeds objective limit (%g)\n",
2068 SCIPlpGetPseudoObjval(lp, set, transprob), lp->cutoffbound);
2069
2071 conflict->conflictset->usescutoffbound = TRUE;
2072
2073 /* start timing */
2075 conflict->npseudocalls++;
2076
2077 vars = transprob->vars;
2078 nvars = transprob->nvars;
2079 assert(nvars == 0 || vars != NULL);
2080
2081 /* The current primal bound c* gives an upper bound for the current pseudo objective value:
2082 * min{c^T x | lb <= x <= ub} <= c*.
2083 * We have to transform this row into a >= inequality in order to use methods above:
2084 * -c* <= max{-c^T x | lb <= x <= ub}.
2085 * In the local subproblem, this row is violated. We want to undo bound changes while still keeping the
2086 * row violated.
2087 */
2088
2089 /* get temporary memory for remembering variables' current bounds and corresponding bound change information
2090 * positions in variable's bound change information arrays
2091 */
2092 SCIP_CALL( SCIPsetAllocBufferArray(set, &curvarlbs, nvars) );
2093 SCIP_CALL( SCIPsetAllocBufferArray(set, &curvarubs, nvars) );
2094 SCIP_CALL( SCIPsetAllocBufferArray(set, &lbchginfoposs, nvars) );
2095 SCIP_CALL( SCIPsetAllocBufferArray(set, &ubchginfoposs, nvars) );
2096
2097 /* get temporary memory for infeasibility proof coefficients */
2098 SCIP_CALL( SCIPsetAllocBufferArray(set, &pseudocoefs, nvars) );
2099
2100 /* for an integral objective use the cutoff bound reduced by the cutoff bound delta to cut off up to the next better
2101 * objective value
2102 */
2103 pseudolhs = -(lp->cutoffbound - (SCIPprobIsObjIntegral(transprob) ? SCIPsetCutoffbounddelta(set) : 0.0));
2104
2105 /* store the objective values as infeasibility proof coefficients, and recalculate the pseudo activity */
2106 pseudoact = 0.0;
2107 for( v = 0; v < nvars; ++v )
2108 {
2109 var = vars[v];
2110 pseudocoefs[v] = -SCIPvarGetObj(var);
2111 curvarlbs[v] = SCIPvarGetLbLocal(var);
2112 curvarubs[v] = SCIPvarGetUbLocal(var);
2113 lbchginfoposs[v] = var->nlbchginfos-1;
2114 ubchginfoposs[v] = var->nubchginfos-1;
2115
2116 if( SCIPsetIsZero(set, pseudocoefs[v]) )
2117 {
2118 pseudocoefs[v] = 0.0;
2119 continue;
2120 }
2121
2122 if( pseudocoefs[v] > 0.0 )
2123 pseudoact += pseudocoefs[v] * curvarubs[v];
2124 else
2125 pseudoact += pseudocoefs[v] * curvarlbs[v];
2126 }
2127 assert(SCIPsetIsFeasEQ(set, pseudoact, -SCIPlpGetPseudoObjval(lp, set, transprob)));
2128 SCIPsetDebugMsg(set, " -> recalculated pseudo infeasibility proof: %g <= %g\n", pseudolhs, pseudoact);
2129
2130 /* check, if the pseudo row is still violated (after recalculation of pseudo activity) */
2131 if( SCIPsetIsFeasGT(set, pseudolhs, pseudoact) )
2132 {
2133 int nconss;
2134 int nliterals;
2135 int nreconvconss;
2136 int nreconvliterals;
2137
2138 conflict->bdchgonlyconfqueue = TRUE;
2139
2140 /* undo bound changes without destroying the infeasibility proof */
2141 SCIP_CALL( SCIPundoBdchgsProof(set, transprob, SCIPtreeGetCurrentDepth(tree), pseudocoefs, pseudolhs, &pseudoact,
2142 curvarlbs, curvarubs, lbchginfoposs, ubchginfoposs, NULL, NULL, NULL, lp->lpi) );
2143
2144 /* analyze conflict on remaining bound changes */
2145 SCIP_CALL( SCIPconflictAnalyzeRemainingBdchgs(conflict, blkmem, set, stat, transprob, tree, FALSE, \
2146 lbchginfoposs, ubchginfoposs, &nconss, &nliterals, &nreconvconss, &nreconvliterals) );
2147 conflict->npseudosuccess += (nconss > 0 ? 1 : 0);
2148 conflict->npseudoconfconss += nconss;
2149 conflict->npseudoconfliterals += nliterals;
2150 conflict->npseudoreconvconss += nreconvconss;
2151 conflict->npseudoreconvliterals += nreconvliterals;
2152 if( success != NULL )
2153 *success = (nconss > 0);
2154
2155 conflict->bdchgonlyconfqueue = FALSE;
2156 }
2157
2158 /* free temporary memory */
2159 SCIPsetFreeBufferArray(set, &pseudocoefs);
2160 SCIPsetFreeBufferArray(set, &ubchginfoposs);
2161 SCIPsetFreeBufferArray(set, &lbchginfoposs);
2162 SCIPsetFreeBufferArray(set, &curvarubs);
2163 SCIPsetFreeBufferArray(set, &curvarlbs);
2164
2165 /* flush conflict set storage */
2166 SCIP_CALL( SCIPconflictFlushConss(conflict, blkmem, set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue, eventfilter, cliquetable) );
2167
2168 /* stop timing */
2170
2171 return SCIP_OKAY;
2172}
2173
2174/** gets time in seconds used for analyzing pseudo solution conflicts */
2176 SCIP_CONFLICT* conflict /**< conflict analysis data */
2177 )
2178{
2179 assert(conflict != NULL);
2180
2181 return SCIPclockGetTime(conflict->pseudoanalyzetime);
2182}
2183
2184/** gets number of calls to pseudo solution conflict analysis */
2186 SCIP_CONFLICT* conflict /**< conflict analysis data */
2187 )
2188{
2189 assert(conflict != NULL);
2190
2191 return conflict->npseudocalls;
2192}
2193
2194/** gets number of calls to pseudo solution conflict analysis that yield at least one conflict constraint */
2196 SCIP_CONFLICT* conflict /**< conflict analysis data */
2197 )
2198{
2199 assert(conflict != NULL);
2200
2201 return conflict->npseudosuccess;
2202}
2203
2204/** gets number of conflict constraints detected in pseudo solution conflict analysis */
2206 SCIP_CONFLICT* conflict /**< conflict analysis data */
2207 )
2208{
2209 assert(conflict != NULL);
2210
2211 return conflict->npseudoconfconss;
2212}
2213
2214/** gets total number of literals in conflict constraints created in pseudo solution conflict analysis */
2216 SCIP_CONFLICT* conflict /**< conflict analysis data */
2217 )
2218{
2219 assert(conflict != NULL);
2220
2221 return conflict->npseudoconfliterals;
2222}
2223
2224/** gets number of reconvergence constraints detected in pseudo solution conflict analysis */
2226 SCIP_CONFLICT* conflict /**< conflict analysis data */
2227 )
2228{
2229 assert(conflict != NULL);
2230
2231 return conflict->npseudoreconvconss;
2232}
2233
2234/** gets total number of literals in reconvergence constraints created in pseudo solution conflict analysis */
2236 SCIP_CONFLICT* conflict /**< conflict analysis data */
2237 )
2238{
2239 assert(conflict != NULL);
2240
2241 return conflict->npseudoreconvliterals;
2242}
2243
2244/** actually performs analysis of infeasible LP */
2245static
2247 SCIP_CONFLICT* conflict, /**< conflict analysis data */
2248 SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
2249 BMS_BLKMEM* blkmem, /**< block memory of transformed problem */
2250 SCIP_SET* set, /**< global SCIP settings */
2251 SCIP_STAT* stat, /**< problem statistics */
2252 SCIP_PROB* transprob, /**< transformed problem */
2253 SCIP_PROB* origprob, /**< original problem */
2254 SCIP_TREE* tree, /**< branch and bound tree */
2255 SCIP_REOPT* reopt, /**< reoptimization data structure */
2256 SCIP_LP* lp, /**< LP data */
2257 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
2258 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
2259 SCIP_EVENTFILTER* eventfilter, /**< global event filter */
2260 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
2261 SCIP_Bool diving, /**< are we in strong branching or diving mode? */
2262 SCIP_Bool* dualproofsuccess, /**< pointer to store success result of dual proof analysis */
2263 int* iterations, /**< pointer to store the total number of LP iterations used */
2264 int* nconss, /**< pointer to store the number of generated conflict constraints */
2265 int* nliterals, /**< pointer to store the number of literals in generated conflict constraints */
2266 int* nreconvconss, /**< pointer to store the number of generated reconvergence constraints */
2267 int* nreconvliterals, /**< pointer to store the number of literals generated reconvergence constraints */
2268 SCIP_Bool marklpunsolved /**< whether LP should be marked unsolved after analysis (needed for strong branching) */
2269 )
2270{
2271 SCIP_VAR** vars;
2272 SCIP_AGGRROW* farkasrow;
2273 SCIP_LPI* lpi;
2274 SCIP_Bool valid;
2275 SCIP_Bool globalinfeasible;
2276 int* lbchginfoposs;
2277 int* ubchginfoposs;
2278 int validdepth;
2279 int nvars;
2280 int v;
2281 SCIP_Real* curvarlbs;
2282 SCIP_Real* curvarubs;
2283 SCIP_Real farkasactivity;
2284
2285 assert(conflict != NULL);
2286 assert(conflict->nconflictsets == 0);
2287 assert(set != NULL);
2288 assert(SCIPprobAllColsInLP(transprob, set, lp)); /* LP conflict analysis is only valid, if all variables are known */
2289 assert(stat != NULL);
2290 assert(transprob != NULL);
2291 assert(lp != NULL);
2292 assert(lp->flushed);
2293 assert(lp->solved);
2294 assert(iterations != NULL);
2295 assert(nconss != NULL);
2296 assert(nliterals != NULL);
2297 assert(nreconvconss != NULL);
2298 assert(nreconvliterals != NULL);
2299
2300 *dualproofsuccess = FALSE;
2301 *iterations = 0;
2302 *nconss = 0;
2303 *nliterals = 0;
2304 *nreconvconss = 0;
2305 *nreconvliterals = 0;
2306
2307 vars = transprob->vars;
2308 nvars = transprob->nvars;
2309
2310 valid = TRUE;
2311 validdepth = 0;
2312
2313 /* get LP solver interface */
2314 lpi = SCIPlpGetLPI(lp);
2317
2318 if( !SCIPlpiIsPrimalInfeasible(lpi) )
2319 {
2320 SCIP_Real objval;
2321
2322 assert(!SCIPlpDivingObjChanged(lp));
2323
2324 /* make sure, a dual feasible solution exists, that exceeds the objective limit;
2325 * With FASTMIP setting, CPLEX does not apply the final pivot to reach the dual solution exceeding the objective
2326 * limit. Therefore, we have to either turn off FASTMIP and resolve the problem or continue solving it without
2327 * objective limit for at least one iteration. It seems that the strategy to continue with FASTMIP for one
2328 * additional simplex iteration yields better results.
2329 */
2330 SCIP_CALL( SCIPlpiGetObjval(lpi, &objval) );
2331 if( objval < lp->lpiobjlim )
2332 {
2333 SCIP_RETCODE retcode;
2334
2335 /* temporarily disable objective limit and install an iteration limit */
2338
2339 /* start LP timer */
2341
2342 /* resolve LP */
2343 retcode = SCIPlpiSolveDual(lpi);
2344
2345 /* stop LP timer */
2347
2348 /* check return code of LP solving call */
2349 valid = (retcode != SCIP_LPERROR);
2350 if( valid )
2351 {
2352 int iter;
2353
2354 SCIP_CALL( retcode );
2355
2356 /* count number of LP iterations */
2357 SCIP_CALL( SCIPlpiGetIterations(lpi, &iter) );
2358 (*iterations) += iter;
2359 stat->nconflictlps++;
2360 stat->nconflictlpiterations += iter;
2361 SCIPsetDebugMsg(set, " -> resolved objlim exceeding LP in %d iterations (total: %" SCIP_LONGINT_FORMAT ") (infeasible:%u, objlim: %u, optimal:%u)\n",
2364 }
2365
2366 /* reinstall old objective and iteration limits in LP solver */
2369
2370 /* abort, if the LP produced an error */
2371 if( !valid )
2372 return SCIP_OKAY;
2373 }
2374 }
2376
2377 if( !SCIPlpiIsPrimalInfeasible(lpi) )
2378 {
2379 SCIP_Real objval;
2380
2381 assert(!SCIPlpDivingObjChanged(lp));
2382
2383 SCIP_CALL( SCIPlpiGetObjval(lpi, &objval) );
2384 if( objval < lp->lpiobjlim )
2385 {
2386 SCIPsetDebugMsg(set, " -> LP does not exceed the cutoff bound: obj=%g, cutoff=%g\n", objval, lp->lpiobjlim);
2387 return SCIP_OKAY;
2388 }
2389 else
2390 {
2391 SCIPsetDebugMsg(set, " -> LP exceeds the cutoff bound: obj=%g, cutoff=%g\n", objval, lp->lpiobjlim);
2392 }
2393 }
2394
2395 assert(valid);
2396
2397 SCIP_CALL( SCIPaggrRowCreate(set->scip, &farkasrow) );
2398 SCIP_CALL( SCIPsetAllocBufferArray(set, &lbchginfoposs, transprob->nvars) );
2399 SCIP_CALL( SCIPsetAllocBufferArray(set, &ubchginfoposs, transprob->nvars) );
2400
2401 farkasactivity = 0.0;
2402
2403 /* get temporary memory for remembering variables' current bounds and corresponding bound change information
2404 * positions in variable's bound change information arrays
2405 */
2406 SCIP_CALL( SCIPsetAllocBufferArray(set, &curvarlbs, nvars) );
2407 SCIP_CALL( SCIPsetAllocBufferArray(set, &curvarubs, nvars) );
2408
2409 /* get current bounds and current positions in lb/ubchginfos arrays of variables */
2410 valid = TRUE;
2411 for( v = 0; v < nvars && valid; ++v )
2412 {
2413 SCIP_VAR* var;
2414
2415 var = vars[v];
2416
2417 curvarlbs[v] = SCIPvarGetLbLP(var, set);
2418 curvarubs[v] = SCIPvarGetUbLP(var, set);
2419 lbchginfoposs[v] = var->nlbchginfos-1;
2420 ubchginfoposs[v] = var->nubchginfos-1;
2421 assert(diving || SCIPsetIsEQ(set, curvarlbs[v], SCIPvarGetLbLocal(var)));
2422 assert(diving || SCIPsetIsEQ(set, curvarubs[v], SCIPvarGetUbLocal(var)));
2423
2424 /* check, if last bound changes were due to strong branching or diving */
2425 if( diving )
2426 {
2427 SCIP_Real lb;
2428 SCIP_Real ub;
2429
2430 lb = SCIPvarGetLbLocal(var);
2431 ub = SCIPvarGetUbLocal(var);
2432 if( SCIPsetIsGT(set, curvarlbs[v], lb) )
2433 lbchginfoposs[v] = var->nlbchginfos;
2434 else if( SCIPsetIsLT(set, curvarlbs[v], lb) )
2435 {
2436 /* the bound in the diving LP was relaxed -> the LP is not a subproblem of the current node -> abort! */
2437 /**@todo we could still analyze such a conflict, but we would have to take care with our data structures */
2438 valid = FALSE;
2439 }
2440 if( SCIPsetIsLT(set, curvarubs[v], ub) )
2441 ubchginfoposs[v] = var->nubchginfos;
2442 else if( SCIPsetIsGT(set, curvarubs[v], ub) )
2443 {
2444 /* the bound in the diving LP was relaxed -> the LP is not a subproblem of the current node -> abort! */
2445 /**@todo we could still analyze such a conflict, but we would have to take care with our data structures */
2446 valid = FALSE;
2447 }
2448 }
2449 }
2450
2451 if( !valid )
2452 goto TERMINATE;
2453
2454 /* the LP is proven to be infeasible */
2455 if( SCIPlpiIsPrimalInfeasible(lpi) )
2456 {
2457 SCIP_CALL( SCIPgetFarkasProof(set, transprob, lp, lpi, tree, farkasrow, &farkasactivity, &validdepth,
2458 curvarlbs, curvarubs, &valid) );
2459 }
2460 /* the LP is dual feasible and/or exceeds the current incumbant solution */
2461 else
2462 {
2463 assert(SCIPlpiIsDualFeasible(lpi) || SCIPlpiIsObjlimExc(lpi));
2464 SCIP_CALL( SCIPgetDualProof(set, transprob, lp, lpi, tree, farkasrow, &farkasactivity, &validdepth,
2465 curvarlbs, curvarubs, &valid) );
2466 }
2467
2468 if( !valid || validdepth >= SCIPtreeGetCurrentDepth(tree) )
2469 goto TERMINATE;
2470
2471 globalinfeasible = FALSE;
2472
2473 /* start dual proof analysis */
2474 if( ((set->conf_useinflp == 'b' || set->conf_useinflp == 'd') && conflict->conflictset->conflicttype == SCIP_CONFTYPE_INFEASLP)
2475 || ((set->conf_useboundlp == 'b' || set->conf_useboundlp == 'd') && conflict->conflictset->conflicttype == SCIP_CONFTYPE_BNDEXCEEDING) )
2476 {
2477 /* start dual proof analysis */
2478 SCIP_CALL( SCIPconflictAnalyzeDualProof(conflict, set, stat, eventfilter, blkmem, origprob, transprob, tree, reopt, lp,
2479 farkasrow, validdepth, curvarlbs, curvarubs, TRUE, &globalinfeasible, dualproofsuccess) );
2480 }
2481
2482 assert(valid);
2483
2484 /* todo: in theory, we could apply conflict graph analysis for locally valid proofs, too, but this needs to be
2485 * implemented; also conflict graph analysis is not implemented in exact solving mode, yet
2486 */
2487 if( !set->exact_enable && !globalinfeasible && validdepth <= SCIPtreeGetEffectiveRootDepth(tree)
2488 && (((set->conf_useinflp == 'b' || set->conf_useinflp == 'c') && conflict->conflictset->conflicttype == SCIP_CONFTYPE_INFEASLP)
2489 || ((set->conf_useboundlp == 'b' || set->conf_useboundlp == 'c') && conflict->conflictset->conflicttype == SCIP_CONFTYPE_BNDEXCEEDING)) )
2490 {
2491 SCIP_Real* farkascoefs;
2492 SCIP_Real farkaslhs;
2493 int* inds;
2494 int nnz;
2495
2496#ifdef SCIP_DEBUG
2497 {
2498 SCIP_Real objlim;
2499 SCIPsetDebugMsg(set, "analyzing conflict on infeasible LP (infeasible: %u, objlimexc: %u, optimal:%u) in depth %d (diving: %u)\n",
2501
2503 SCIPsetDebugMsg(set, " -> objective limit in LP solver: %g (in LP: %g)\n", objlim, lp->lpiobjlim);
2504 SCIPsetDebugMsg(set, " -> current cutoff bound: %g \n", SCIPgetCutoffbound(set->scip));
2505 }
2506#endif
2507
2508 SCIP_CALL( SCIPsetAllocBufferArray(set, &farkascoefs, SCIPprobGetNVars(transprob)) );
2509 BMSclearMemoryArray(farkascoefs, SCIPprobGetNVars(transprob));
2510
2511 farkaslhs = -SCIPaggrRowGetRhs(farkasrow);
2512 farkasactivity = -farkasactivity;
2513
2514 inds = SCIPaggrRowGetInds(farkasrow);
2515 nnz = SCIPaggrRowGetNNz(farkasrow);
2516
2517 for( v = 0; v < nnz; v++ )
2518 {
2519 int i = inds[v];
2520
2521 assert(SCIPvarGetProbindex(vars[i]) == inds[v]);
2522
2523 farkascoefs[i] = -SCIPaggrRowGetProbvarValue(farkasrow, i);
2524 }
2525
2526 SCIP_CALL( SCIPrunBoundHeuristic(conflict, set, stat, origprob, transprob, tree, reopt, lp, lpi, eventfilter,
2527 blkmem, farkascoefs, &farkaslhs, &farkasactivity, curvarlbs, curvarubs, lbchginfoposs, ubchginfoposs, iterations,
2528 marklpunsolved, dualproofsuccess, &valid) );
2529
2530 conflict->bdchgonlyconfqueue = FALSE;
2531
2532 SCIPsetFreeBufferArray(set, &farkascoefs);
2533
2534 if( !valid )
2535 goto FLUSHPROOFSETS;
2536
2537 conflict->bdchgonlyconfqueue = TRUE;
2538
2539 /* analyze the conflict starting with remaining bound changes */
2540 SCIP_CALL( SCIPconflictAnalyzeRemainingBdchgs(conflict, blkmem, set, stat, transprob, tree, diving,
2541 lbchginfoposs, ubchginfoposs, nconss, nliterals, nreconvconss, nreconvliterals) );
2542
2543 SCIP_CALL( SCIPconflictFlushConss(conflict, blkmem, set, stat, transprob, origprob, tree, reopt, lp, branchcand,
2544 eventqueue, eventfilter, cliquetable) );
2545
2546 conflict->bdchgonlyconfqueue = FALSE;
2547 }
2548
2549 FLUSHPROOFSETS:
2550 /* flush proof set */
2551 if( SCIPproofsetGetNVars(conflict->proofset) > 0 || conflict->nproofsets > 0 )
2552 {
2553 SCIP_CALL( SCIPconflictFlushProofset(conflict, conflictstore, blkmem, set, stat, transprob, origprob, tree, reopt, lp,
2554 branchcand, eventqueue, eventfilter, cliquetable) );
2555 }
2556
2557 TERMINATE:
2558 SCIPsetFreeBufferArray(set, &curvarubs);
2559 SCIPsetFreeBufferArray(set, &curvarlbs);
2560 SCIPsetFreeBufferArray(set, &ubchginfoposs);
2561 SCIPsetFreeBufferArray(set, &lbchginfoposs);
2562 SCIPaggrRowFree(set->scip, &farkasrow);
2563
2564 return SCIP_OKAY;
2565}
2566
2567
2568/*
2569 * infeasible strong branching conflict analysis
2570 */
2571
2572/** analyses infeasible strong branching sub problems for conflicts */
2574 SCIP_CONFLICT* conflict, /**< conflict analysis data */
2575 SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
2576 BMS_BLKMEM* blkmem, /**< block memory buffers */
2577 SCIP_SET* set, /**< global SCIP settings */
2578 SCIP_STAT* stat, /**< dynamic problem statistics */
2579 SCIP_PROB* transprob, /**< transformed problem */
2580 SCIP_PROB* origprob, /**< original problem */
2581 SCIP_TREE* tree, /**< branch and bound tree */
2582 SCIP_REOPT* reopt, /**< reoptimization data structure */
2583 SCIP_LP* lp, /**< LP data */
2584 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
2585 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
2586 SCIP_EVENTFILTER* eventfilter, /**< global event filter */
2587 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
2588 SCIP_COL* col, /**< LP column with at least one infeasible strong branching subproblem */
2589 SCIP_Bool* downconflict, /**< pointer to store whether a conflict constraint was created for an
2590 * infeasible downwards branch, or NULL */
2591 SCIP_Bool* upconflict /**< pointer to store whether a conflict constraint was created for an
2592 * infeasible upwards branch, or NULL */
2593 )
2594{
2595 int* cstat;
2596 int* rstat;
2597 SCIP_RETCODE retcode;
2598 SCIP_Bool resolve;
2599 SCIP_Real oldlb;
2600 SCIP_Real oldub;
2601 SCIP_Real newlb;
2602 SCIP_Real newub;
2603 SCIP_Bool dualraysuccess;
2604 int iter;
2605 int nconss;
2606 int nliterals;
2607 int nreconvconss;
2608 int nreconvliterals;
2609
2610 assert(stat != NULL);
2611 assert(lp != NULL);
2612 assert(lp->flushed);
2613 assert(lp->solved);
2614 assert(SCIPprobAllColsInLP(transprob, set, lp)); /* LP conflict analysis is only valid, if all variables are known */
2615 assert(col != NULL);
2616 assert((col->sbdownvalid && SCIPsetIsGE(set, col->sbdown, lp->cutoffbound)
2617 && SCIPsetFeasCeil(set, col->primsol-1.0) >= col->lb - 0.5)
2618 || (col->sbupvalid && SCIPsetIsGE(set, col->sbup, lp->cutoffbound)
2619 && SCIPsetFeasFloor(set, col->primsol+1.0) <= col->ub + 0.5));
2620 assert(SCIPtreeGetCurrentDepth(tree) > 0);
2621
2622 if( downconflict != NULL )
2623 *downconflict = FALSE;
2624 if( upconflict != NULL )
2625 *upconflict = FALSE;
2626
2627 /* check, if infeasible LP conflict analysis is enabled */
2628 if( !set->conf_enable || !set->conf_usesb )
2629 return SCIP_OKAY;
2630
2631 /* check, if there are any conflict handlers to use a conflict set */
2632 if( set->nconflicthdlrs == 0 )
2633 return SCIP_OKAY;
2634
2635 /* inform the LPI that strong branch is (temporarily) finished */
2637
2638 /* start timing */
2639 SCIPclockStart(conflict->sbanalyzetime, set);
2640
2641 /* get temporary memory for storing current LP basis */
2644
2645 /* get current LP basis */
2646 SCIP_CALL( SCIPlpiGetBase(lp->lpi, cstat, rstat) );
2647
2648 /* remember old bounds */
2649 oldlb = col->lb;
2650 oldub = col->ub;
2651
2652 resolve = FALSE;
2653
2654 /* is down branch infeasible? */
2655 if( col->sbdownvalid && SCIPsetIsGE(set, col->sbdown, lp->cutoffbound) )
2656 {
2657 newub = SCIPsetFeasCeil(set, col->primsol-1.0);
2658 if( newub >= col->lb - 0.5 )
2659 {
2660 SCIPsetDebugMsg(set, "analyzing conflict on infeasible downwards strongbranch for variable <%s>[%g,%g] in depth %d\n",
2663
2665 conflict->nsbcalls++;
2666
2667 /* change the upper bound */
2668 col->ub = newub;
2669 SCIP_CALL( SCIPlpiChgBounds(lp->lpi, 1, &col->lpipos, &col->lb, &col->ub) );
2670
2671 /* start LP timer */
2673
2674 /* resolve the LP */
2675 retcode = SCIPlpiSolveDual(lp->lpi);
2676
2677 /* stop LP timer */
2679
2680 /* check return code of LP solving call */
2681 if( retcode != SCIP_LPERROR )
2682 {
2683 SCIP_CALL( retcode );
2684 }
2685
2686 if( retcode != SCIP_LPERROR && SCIPlpiIsStable(lp->lpi) )
2687 {
2688 /* count number of LP iterations */
2689 SCIP_CALL( SCIPlpiGetIterations(lp->lpi, &iter) );
2690 stat->nconflictlps++;
2691 stat->nconflictlpiterations += iter;
2692 conflict->nsbiterations += iter;
2693 SCIPsetDebugMsg(set, " -> resolved downwards strong branching LP in %d iterations\n", iter);
2694
2695 /* perform conflict analysis on infeasible LP; last parameter guarantees status 'solved' on return */
2696 SCIP_CALL( conflictAnalyzeLP(conflict, conflictstore, blkmem, set, stat, transprob, origprob, tree, reopt,
2697 lp, branchcand, eventqueue, eventfilter, cliquetable, TRUE, &dualraysuccess, &iter, &nconss,
2698 &nliterals, &nreconvconss, &nreconvliterals, FALSE) );
2699 conflict->nsbsuccess += ((nconss > 0 || dualraysuccess) ? 1 : 0);
2700 conflict->nsbiterations += iter;
2701 conflict->nsbconfconss += nconss;
2702 conflict->nsbconfliterals += nliterals;
2703 conflict->nsbreconvconss += nreconvconss;
2704 conflict->nsbreconvliterals += nreconvliterals;
2705 if( downconflict != NULL )
2706 *downconflict = (nconss > 0);
2707 }
2708
2709 /* reset the upper bound */
2710 col->ub = oldub;
2711 SCIP_CALL( SCIPlpiChgBounds(lp->lpi, 1, &col->lpipos, &col->lb, &col->ub) );
2712
2713 /* reset LP basis */
2714 SCIP_CALL( SCIPlpiSetBase(lp->lpi, cstat, rstat) );
2715
2716 /* mark the LP to be resolved at the end */
2717 resolve = TRUE;
2718 }
2719 }
2720
2721 /* is up branch infeasible? */
2722 if( col->sbupvalid && SCIPsetIsGE(set, col->sbup, lp->cutoffbound) )
2723 {
2724 newlb = SCIPsetFeasFloor(set, col->primsol+1.0);
2725 if( newlb <= col->ub + 0.5 )
2726 {
2727 SCIPsetDebugMsg(set, "analyzing conflict on infeasible upwards strongbranch for variable <%s>[%g,%g] in depth %d\n",
2730
2732 conflict->nsbcalls++;
2733
2734 /* change the lower bound */
2735 col->lb = newlb;
2736 SCIP_CALL( SCIPlpiChgBounds(lp->lpi, 1, &col->lpipos, &col->lb, &col->ub) );
2737
2738 /* start LP timer */
2740
2741 /* resolve the LP */
2742 retcode = SCIPlpiSolveDual(lp->lpi);
2743
2744 /* stop LP timer */
2746
2747 /* check return code of LP solving call */
2748 if( retcode != SCIP_LPERROR )
2749 {
2750 SCIP_CALL( retcode );
2751 }
2752
2753 if( retcode != SCIP_LPERROR && SCIPlpiIsStable(lp->lpi) )
2754 {
2755 /* count number of LP iterations */
2756 SCIP_CALL( SCIPlpiGetIterations(lp->lpi, &iter) );
2757 stat->nconflictlps++;
2758 stat->nconflictlpiterations += iter;
2759 conflict->nsbiterations += iter;
2760 SCIPsetDebugMsg(set, " -> resolved upwards strong branching LP in %d iterations\n", iter);
2761
2762 /* perform conflict analysis on infeasible LP; last parameter guarantees status 'solved' on return */
2763 SCIP_CALL( conflictAnalyzeLP(conflict, conflictstore, blkmem, set, stat, transprob, origprob, tree, reopt,
2764 lp, branchcand, eventqueue, eventfilter, cliquetable, TRUE, &dualraysuccess, &iter, &nconss,
2765 &nliterals, &nreconvconss, &nreconvliterals, FALSE) );
2766 conflict->nsbsuccess += ((nconss > 0 || dualraysuccess) ? 1 : 0);
2767 conflict->nsbiterations += iter;
2768 conflict->nsbconfconss += nconss;
2769 conflict->nsbconfliterals += nliterals;
2770 conflict->nsbreconvconss += nreconvconss;
2771 conflict->nsbreconvliterals += nreconvliterals;
2772 if( upconflict != NULL )
2773 *upconflict = (nconss > 0);
2774 }
2775
2776 /* reset the lower bound */
2777 col->lb = oldlb;
2778 SCIP_CALL( SCIPlpiChgBounds(lp->lpi, 1, &col->lpipos, &col->lb, &col->ub) );
2779
2780 /* reset LP basis */
2781 SCIP_CALL( SCIPlpiSetBase(lp->lpi, cstat, rstat) );
2782
2783 /* mark the LP to be resolved at the end */
2784 resolve = TRUE;
2785 }
2786 }
2787
2788 /* free temporary memory for storing current LP basis */
2789 SCIPsetFreeBufferArray(set, &rstat);
2790 SCIPsetFreeBufferArray(set, &cstat);
2791
2792 assert(lp->flushed);
2793
2794 /* resolve LP if something has changed in order to synchronize LPI and LP */
2795 if( resolve )
2796 {
2797 /* start LP timer */
2799
2800 /* resolve the LP */
2802
2803 /* stop LP timer */
2805 }
2806
2807 /* stop timing */
2808 SCIPclockStop(conflict->sbanalyzetime, set);
2809
2810 /* inform the LPI that strong branch starts (again) */
2812
2813 return SCIP_OKAY;
2814}
2815
2816/** analyzes an infeasible LP to find out the bound changes on variables that were responsible for the infeasibility;
2817 * on success, calls standard conflict analysis with the responsible variables as starting conflict set, thus creating
2818 * a conflict constraint out of the resulting conflict set;
2819 * updates statistics for infeasible LP conflict analysis
2820 */
2821static
2823 SCIP_CONFLICT* conflict, /**< conflict analysis data */
2824 SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
2825 BMS_BLKMEM* blkmem, /**< block memory of transformed problem */
2826 SCIP_SET* set, /**< global SCIP settings */
2827 SCIP_STAT* stat, /**< problem statistics */
2828 SCIP_PROB* transprob, /**< transformed problem */
2829 SCIP_PROB* origprob, /**< original problem */
2830 SCIP_TREE* tree, /**< branch and bound tree */
2831 SCIP_REOPT* reopt, /**< reoptimization data structure */
2832 SCIP_LP* lp, /**< LP data */
2833 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
2834 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
2835 SCIP_EVENTFILTER* eventfilter, /**< global event filter */
2836 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
2837 SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
2838 )
2839{
2840 SCIP_Bool dualraysuccess = FALSE;
2841 SCIP_Longint olddualproofsuccess;
2842 int iterations;
2843 int nconss;
2844 int nliterals;
2845 int nreconvconss;
2846 int nreconvliterals;
2847
2848 assert(conflict != NULL);
2849 assert(set != NULL);
2850 assert(lp != NULL);
2851 assert(SCIPprobAllColsInLP(transprob, set, lp)); /* LP conflict analysis is only valid, if all variables are known */
2852
2853 assert(success == NULL || *success == FALSE);
2854
2855 /* check, if infeasible LP conflict analysis is enabled */
2856 if( !set->conf_enable || set->conf_useinflp == 'o' )
2857 return SCIP_OKAY;
2858
2859 /* check, if there are any conflict handlers to use a conflict set */
2860 if( set->nconflicthdlrs == 0 )
2861 return SCIP_OKAY;
2862
2863 SCIPsetDebugMsg(set, "analyzing conflict on infeasible LP in depth %d (solstat: %d, objchanged: %u)\n",
2865
2866 /* start timing */
2868 conflict->ninflpcalls++;
2869 /**@todo reset usescutoffbound flag */
2871
2872 olddualproofsuccess = conflict->ndualproofsinfsuccess;
2873
2874 /* perform conflict analysis */
2875 SCIP_CALL( conflictAnalyzeLP(conflict, conflictstore, blkmem, set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue,
2876 eventfilter, cliquetable, SCIPlpDiving(lp), &dualraysuccess, &iterations, &nconss, &nliterals, &nreconvconss, &nreconvliterals, TRUE) );
2877 conflict->ninflpsuccess += ((nconss > 0 || conflict->ndualproofsinfsuccess > olddualproofsuccess) ? 1 : 0);
2878 conflict->ninflpiterations += iterations;
2879 conflict->ninflpconfconss += nconss;
2880 conflict->ninflpconfliterals += nliterals;
2881 conflict->ninflpreconvconss += nreconvconss;
2882 conflict->ninflpreconvliterals += nreconvliterals;
2883 if( success != NULL )
2884 *success = (nconss > 0 || conflict->ndualproofsinfsuccess > olddualproofsuccess);
2885
2886 /* stop timing */
2888
2889 return SCIP_OKAY;
2890}
2891
2892/** analyzes a bound exceeding LP to find out the bound changes on variables that were responsible for exceeding the
2893 * primal bound;
2894 * on success, calls standard conflict analysis with the responsible variables as starting conflict set, thus creating
2895 * a conflict constraint out of the resulting conflict set;
2896 * updates statistics for bound exceeding LP conflict analysis
2897 */
2898static
2900 SCIP_CONFLICT* conflict, /**< conflict analysis data */
2901 SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
2902 BMS_BLKMEM* blkmem, /**< block memory of transformed problem */
2903 SCIP_SET* set, /**< global SCIP settings */
2904 SCIP_STAT* stat, /**< problem statistics */
2905 SCIP_PROB* transprob, /**< transformed problem */
2906 SCIP_PROB* origprob, /**< original problem */
2907 SCIP_TREE* tree, /**< branch and bound tree */
2908 SCIP_REOPT* reopt, /**< reoptimization data structure */
2909 SCIP_LP* lp, /**< LP data */
2910 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
2911 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
2912 SCIP_EVENTFILTER* eventfilter, /**< global event filter */
2913 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
2914 SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
2915 )
2916{
2917 SCIP_Bool dualraysuccess;
2918 SCIP_Longint oldnsuccess;
2919 int iterations;
2920 int nconss;
2921 int nliterals;
2922 int nreconvconss;
2923 int nreconvliterals;
2924
2925 assert(conflict != NULL);
2926 assert(set != NULL);
2927 assert(lp != NULL);
2928 assert(!SCIPlpDivingObjChanged(lp));
2929 assert(SCIPprobAllColsInLP(transprob, set, lp)); /* LP conflict analysis is only valid, if all variables are known */
2930
2931 assert(success == NULL || *success == FALSE);
2932
2933 /* check, if bound exceeding LP conflict analysis is enabled */
2934 if( !set->conf_enable || set->conf_useboundlp == 'o')
2935 return SCIP_OKAY;
2936
2937 /* check, if there are any conflict handlers to use a conflict set */
2938 if( set->nconflicthdlrs == 0 )
2939 return SCIP_OKAY;
2940
2941 SCIPsetDebugMsg(set, "analyzing conflict on bound exceeding LP in depth %d (solstat: %d)\n",
2943
2944 /* start timing */
2946 conflict->nboundlpcalls++;
2947
2948 /* mark the conflict to depend on the cutoff bound */
2950 conflict->conflictset->usescutoffbound = TRUE;
2951
2952 oldnsuccess = conflict->ndualproofsbndsuccess + conflict->ndualproofsinfsuccess;
2953
2954 /* perform conflict analysis */
2955 SCIP_CALL( conflictAnalyzeLP(conflict, conflictstore, blkmem, set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue,
2956 eventfilter, cliquetable, SCIPlpDiving(lp), &dualraysuccess, &iterations, &nconss, &nliterals, &nreconvconss, &nreconvliterals, TRUE) );
2957 conflict->nboundlpsuccess += ((nconss > 0 || conflict->ndualproofsbndsuccess + conflict->ndualproofsinfsuccess > oldnsuccess) ? 1 : 0);
2958 conflict->nboundlpiterations += iterations;
2959 conflict->nboundlpconfconss += nconss;
2960 conflict->nboundlpconfliterals += nliterals;
2961 conflict->nboundlpreconvconss += nreconvconss;
2962 conflict->nboundlpreconvliterals += nreconvliterals;
2963 if( success != NULL )
2964 *success = (nconss > 0 || conflict->ndualproofsbndsuccess + conflict->ndualproofsinfsuccess > oldnsuccess);
2965
2966 /* stop timing */
2968
2969 return SCIP_OKAY;
2970}
2971
2972/** analyzes an infeasible or bound exceeding LP to find out the bound changes on variables that were responsible for the
2973 * infeasibility or for exceeding the primal bound;
2974 * on success, calls standard conflict analysis with the responsible variables as starting conflict set, thus creating
2975 * a conflict constraint out of the resulting conflict set;
2976 * updates statistics for infeasible or bound exceeding LP conflict analysis;
2977 * may only be called if SCIPprobAllColsInLP()
2978 */
2980 SCIP_CONFLICT* conflict, /**< conflict analysis data */
2981 SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
2982 BMS_BLKMEM* blkmem, /**< block memory of transformed problem */
2983 SCIP_SET* set, /**< global SCIP settings */
2984 SCIP_STAT* stat, /**< problem statistics */
2985 SCIP_PROB* transprob, /**< transformed problem */
2986 SCIP_PROB* origprob, /**< original problem */
2987 SCIP_TREE* tree, /**< branch and bound tree */
2988 SCIP_REOPT* reopt, /**< reoptimization data structure */
2989 SCIP_LP* lp, /**< LP data */
2990 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
2991 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
2992 SCIP_EVENTFILTER* eventfilter, /**< global event filter */
2993 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
2994 SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
2995 )
2996{
2997 SCIP_LPSOLVALS storedsolvals;
2998 SCIP_COLSOLVALS* storedcolsolvals;
2999 SCIP_ROWSOLVALS* storedrowsolvals;
3000 int c;
3001 int r;
3002
3003 if( success != NULL )
3004 *success = FALSE;
3005
3006 /* check if the conflict analysis is applicable */
3007 if( !set->conf_enable || (set->conf_useinflp == 'o' && set->conf_useboundlp == 'o') )
3008 return SCIP_OKAY;
3009
3010 /* in rare cases, it might happen that the solution stati of the LP and the LPI are out of sync; in particular this
3011 * happens when a new incumbent which cuts off the current node is found during the LP solving loop; in this case the
3012 * LP has status objlimit, but if diving has been used, the LPI only has the basis information, but is not solved
3013 *
3014 * @todo: alternatively, solve the LPI
3015 */
3016 if( !SCIPlpiWasSolved(SCIPlpGetLPI(lp)) )
3017 return SCIP_OKAY;
3018
3019 /* LP conflict analysis is only valid, if all variables are known */
3020 assert( SCIPprobAllColsInLP(transprob, set, lp) );
3021 /* if the objective limit in the LP solver was disabled manually or during safe bounding in exact solving mode, then
3022 * the optimal objective value can be bound exceeding, and we can arrive here even if LP status is optimal
3023 */
3025 || (SCIPlpGetSolstat(lp) == SCIP_LPSOLSTAT_OPTIMAL && (set->lp_disablecutoff == 1 || set->exact_enable)) );
3026
3027 /* save status */
3028 storedsolvals.lpsolstat = lp->lpsolstat;
3029 storedsolvals.lpobjval = lp->lpobjval;
3030 storedsolvals.primalfeasible = lp->primalfeasible;
3031 storedsolvals.primalchecked = lp->primalchecked;
3032 storedsolvals.dualfeasible = lp->dualfeasible;
3033 storedsolvals.dualchecked = lp->dualchecked;
3034 storedsolvals.solisbasic = lp->solisbasic;
3035 storedsolvals.lpissolved = lp->solved;
3036
3037 /* store solution values */
3038 SCIP_CALL( SCIPsetAllocBufferArray(set, &storedcolsolvals, lp->ncols) );
3039 SCIP_CALL( SCIPsetAllocBufferArray(set, &storedrowsolvals, lp->nrows) );
3040 for( c = 0; c < lp->ncols; ++c )
3041 {
3042 SCIP_COL* col;
3043
3044 col = lp->cols[c];
3045 assert( col != NULL );
3046
3047 storedcolsolvals[c].primsol = col->primsol;
3048 storedcolsolvals[c].redcost = col->redcost;
3049 storedcolsolvals[c].basisstatus = col->basisstatus; /*lint !e641 !e732*/
3050 }
3051 for( r = 0; r < lp->nrows; ++r )
3052 {
3053 SCIP_ROW* row;
3054
3055 row = lp->rows[r];
3056 assert( row != NULL );
3057
3058 storedrowsolvals[r].dualsol = lp->lpsolstat == SCIP_LPSOLSTAT_INFEASIBLE ? row->dualfarkas : row->dualsol;
3059 storedrowsolvals[r].activity = row->activity;
3060 storedrowsolvals[r].basisstatus = row->basisstatus; /*lint !e641 !e732*/
3061 }
3062
3063 /* check, if the LP was infeasible or bound exceeding */
3065 {
3066 SCIP_CALL( conflictAnalyzeInfeasibleLP(conflict, conflictstore, blkmem, set, stat, transprob, origprob, tree,
3067 reopt, lp, branchcand, eventqueue, eventfilter, cliquetable, success) );
3068 }
3069 else
3070 {
3071 SCIP_CALL( conflictAnalyzeBoundexceedingLP(conflict, conflictstore, blkmem, set, stat, transprob, origprob, tree,
3072 reopt, lp, branchcand, eventqueue, eventfilter, cliquetable, success) );
3073 }
3074
3075 /* possibly restore solution values */
3077 {
3078 /* restore status */
3079 lp->lpsolstat = storedsolvals.lpsolstat;
3080 lp->lpobjval = storedsolvals.lpobjval;
3081 lp->primalfeasible = storedsolvals.primalfeasible;
3082 lp->primalchecked = storedsolvals.primalchecked;
3083 lp->dualfeasible = storedsolvals.dualfeasible;
3084 lp->dualchecked = storedsolvals.dualchecked;
3085 lp->solisbasic = storedsolvals.solisbasic;
3086 lp->solved = storedsolvals.lpissolved;
3087
3088 for( c = 0; c < lp->ncols; ++c )
3089 {
3090 SCIP_COL* col;
3091
3092 col = lp->cols[c];
3093 assert( col != NULL );
3094 col->primsol = storedcolsolvals[c].primsol;
3095 col->redcost = storedcolsolvals[c].redcost;
3096 col->basisstatus = storedcolsolvals[c].basisstatus; /*lint !e641 !e732*/
3097 }
3098 for( r = 0; r < lp->nrows; ++r )
3099 {
3100 SCIP_ROW* row;
3101
3102 row = lp->rows[r];
3103 assert( row != NULL );
3104
3106 row->dualfarkas = storedrowsolvals[r].dualsol;
3107 else
3108 {
3109 assert( lp->lpsolstat == SCIP_LPSOLSTAT_OBJLIMIT );
3110 row->dualsol = storedrowsolvals[r].dualsol;
3111 }
3112 row->activity = storedrowsolvals[r].activity;
3113 row->basisstatus = storedrowsolvals[r].basisstatus; /*lint !e641 !e732*/
3114 }
3115 }
3116 SCIPsetFreeBufferArray(set, &storedrowsolvals);
3117 SCIPsetFreeBufferArray(set, &storedcolsolvals);
3118
3119 return SCIP_OKAY;
3120}
SCIP_RETCODE SCIPcertificatePrintAggrrow(SCIP_SET *set, SCIP_PROB *prob, SCIP_CERTIFICATE *certificate, SCIP_AGGRROW *aggrrow, SCIP_ROW **aggrrows, SCIP_Real *weights, int naggrrows, SCIP_Bool local, SCIP_Longint *certificateline)
SCIP_CERTIFICATE * SCIPgetCertificate(SCIP *scip)
SCIP_Longint SCIPcertificateGetRowIndex(SCIP_CERTIFICATE *certificate, SCIP_ROWEXACT *row, SCIP_Bool rhs)
SCIP_RETCODE SCIPcertificatePrintMirCut(SCIP_SET *set, SCIP_LP *lp, SCIP_CERTIFICATE *certificate, SCIP_PROB *prob, SCIP_ROW *row, const char sense)
SCIP_RETCODE SCIPcertificatePrintCutoffBound(SCIP *scip, SCIP_CERTIFICATE *certificate, SCIP_RATIONAL *bound, SCIP_Longint *certificateline)
methods for certificate output
SCIP_Real * r
Definition: circlepacking.c:59
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
Definition: clock.c:360
void SCIPclockEnableOrDisable(SCIP_CLOCK *clck, SCIP_Bool enable)
Definition: clock.c:260
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
Definition: clock.c:290
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
Definition: clock.c:438
void SCIPclockFree(SCIP_CLOCK **clck)
Definition: clock.c:185
SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype)
Definition: clock.c:170
internal methods for clocks and timing issues
internal methods for conflict analysis
void SCIPproofsetFree(SCIP_PROOFSET **proofset, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPconflictInitProofset(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPconflictFlushProofset(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_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable)
SCIP_RETCODE SCIPconflictAnalyzeDualProof(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTFILTER *eventfilter, BMS_BLKMEM *blkmem, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_AGGRROW *proofrow, int validdepth, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, SCIP_Bool initialproof, SCIP_Bool *globalinfeasible, SCIP_Bool *success)
int SCIPproofsetGetNVars(SCIP_PROOFSET *proofset)
int SCIPconflictGetNConflicts(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedGlobalConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsInfLocal(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedLocalLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNResConflictVars(SCIP_CONFLICT *conflict)
#define SOLSTOP
SCIP_Longint SCIPconflictGetNPropCalls(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsInfNonzeros(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNStrongbranchIterations(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflictGetInfeasibleLPTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPCalls(SCIP_CONFLICT *conflict)
SCIP_RETCODE SCIPgetFarkasProof(SCIP_SET *set, SCIP_PROB *prob, SCIP_LP *lp, SCIP_LPI *lpi, SCIP_TREE *tree, SCIP_AGGRROW *farkasrow, SCIP_Real *farkasact, int *validdepth, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, SCIP_Bool *valid)
SCIP_RETCODE SCIPconflictCreate(SCIP_CONFLICT **conflict, BMS_BLKMEM *blkmem, SCIP_SET *set)
SCIP_Real SCIPconflictGetGlobalApplTime(SCIP_CONFLICT *conflict)
SCIP_RETCODE SCIPgetDualProof(SCIP_SET *set, SCIP_PROB *transprob, SCIP_LP *lp, SCIP_LPI *lpi, SCIP_TREE *tree, SCIP_AGGRROW *farkasrow, SCIP_Real *farkasact, int *validdepth, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, SCIP_Bool *valid)
SCIP_Longint SCIPconflictGetNInfeasibleLPSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNGlobalChgBds(SCIP_CONFLICT *conflict)
SCIP_RETCODE SCIPconflictClearQueues(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedLiterals(SCIP_CONFLICT *conflict)
static SCIP_Bool checkDualFeasibility(SCIP_SET *set, SCIP_ROW *row, SCIP_Real weight, SCIP_Bool *zerocontribution)
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_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *success)
SCIP_Longint SCIPconflictGetNPropConflictLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedConss(SCIP_CONFLICT *conflict)
static SCIP_DECL_SORTPTRCOMP(conflictBdchginfoComp)
SCIP_Longint SCIPconflictGetNInfeasibleLPConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNStrongbranchCalls(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPropReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflictGetBoundexceedingLPTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNStrongbranchReconvergenceLiterals(SCIP_CONFLICT *conflict)
static SCIP_RETCODE conflictAnalyzeBoundexceedingLP(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_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *success)
SCIP_Real SCIPconflictGetPseudoTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPseudoReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPropReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_Bool SCIPconflictApplicable(SCIP_SET *set)
static SCIP_RETCODE conflictAnalyzeInfeasibleLP(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_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *success)
static SCIP_RETCODE addLocalRows(SCIP_SET *set, SCIP_PROB *transprob, SCIP_LP *lp, SCIP_AGGRROW *proofrow, SCIP_ROW **rows, SCIP_Real *dualsols, int *localrowinds, int *localrowdepth, int nlocalrows, SCIP_Real *proofact, int *validdepth, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, SCIP_Bool *valid)
static SCIP_Real aggrRowGetMinActivitySafely(SCIP_SET *set, SCIP_PROB *transprob, SCIP_AGGRROW *aggrrow, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, SCIP_Bool *infdelta)
SCIP_Longint SCIPconflictGetNInfeasibleLPReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedLocalConss(SCIP_CONFLICT *conflict)
static SCIP_RETCODE sortLocalRows(SCIP_SET *set, SCIP_AGGRROW *aggrrow, SCIP_ROW **rows, int *rowinds, int *rowdepth, int nrows)
SCIP_RETCODE SCIPconflictAnalyzeStrongbranch(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_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_COL *col, SCIP_Bool *downconflict, SCIP_Bool *upconflict)
SCIP_Longint SCIPconflictGetNStrongbranchReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflictGetVarUb(SCIP_CONFLICT *conflict, SCIP_VAR *var)
SCIP_Longint SCIPconflictGetNBoundexceedingLPConflictLiterals(SCIP_CONFLICT *conflict)
SCIP_RETCODE SCIPconflictAnalyzePseudo(SCIP_CONFLICT *conflict, 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_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *success)
#define NUMSTOP
SCIP_Real SCIPconflictGetStrongbranchTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPseudoSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPConflictLiterals(SCIP_CONFLICT *conflict)
SCIP_Real SCIPaggrRowGetMinActivity(SCIP_SET *set, SCIP_PROB *transprob, SCIP_AGGRROW *aggrrow, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, SCIP_Bool *infdelta)
SCIP_Longint SCIPconflictGetNPseudoConflictLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNLocalChgBds(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsBndSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPropSuccess(SCIP_CONFLICT *conflict)
static SCIP_RETCODE getObjectiveRow(SCIP *scip, SCIP_ROW **row, SCIP_Real rhs, SCIP_Bool *success)
SCIP_Longint SCIPconflictGetNDualproofsInfSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPCalls(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPropConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNStrongbranchSuccess(SCIP_CONFLICT *conflict)
static SCIP_RETCODE addRowToAggrRow(SCIP_SET *set, SCIP_ROW *row, SCIP_Real weight, SCIP_AGGRROW *aggrrow, SCIP_Bool safely, SCIP_Bool *success)
SCIP_Real SCIPconflictGetResTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsBndGlobal(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPseudoReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedGlobalLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsBndLocal(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPseudoCalls(SCIP_CONFLICT *conflict)
static SCIP_RETCODE conflictAnalyzeLP(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_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool diving, SCIP_Bool *dualproofsuccess, int *iterations, int *nconss, int *nliterals, int *nreconvconss, int *nreconvliterals, SCIP_Bool marklpunsolved)
SCIP_Longint SCIPconflictGetNAppliedResConss(SCIP_CONFLICT *conflict)
void SCIPconflictEnableOrDisableClocks(SCIP_CONFLICT *conflict, SCIP_Bool enable)
SCIP_Real SCIPconflictGetPropTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPIterations(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNStrongbranchConflictLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPseudoConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsBndNonzeros(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsInfGlobal(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_RETCODE SCIPconflictFree(SCIP_CONFLICT **conflict, BMS_BLKMEM *blkmem)
SCIP_Real SCIPconflictGetVarLb(SCIP_CONFLICT *conflict, SCIP_VAR *var)
SCIP_Longint SCIPconflictGetNStrongbranchConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPIterations(SCIP_CONFLICT *conflict)
SCIP_RETCODE SCIPconflictFlushConss(SCIP_CONFLICT *conflict, 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_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable)
void SCIPconflictsetFree(SCIP_CONFLICTSET **conflictset, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPconflictAnalyzeRemainingBdchgs(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, SCIP_Bool diving, int *lbchginfoposs, int *ubchginfoposs, int *nconss, int *nliterals, int *nreconvconss, int *nreconvliterals)
SCIP_RETCODE SCIPrunBoundHeuristic(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_LPI *lpi, SCIP_EVENTFILTER *eventfilter, BMS_BLKMEM *blkmem, SCIP_Real *proofcoefs, SCIP_Real *prooflhs, SCIP_Real *proofactivity, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, int *lbchginfoposs, int *ubchginfoposs, int *iterations, SCIP_Bool marklpunsolved, SCIP_Bool *dualproofsuccess, SCIP_Bool *valid)
SCIP_RETCODE SCIPundoBdchgsProof(SCIP_SET *set, SCIP_PROB *prob, int currentdepth, SCIP_Real *proofcoefs, SCIP_Real prooflhs, SCIP_Real *proofact, SCIP_Real *curvarlbs, SCIP_Real *curvarubs, int *lbchginfoposs, int *ubchginfoposs, SCIP_LPBDCHGS *oldlpbdchgs, SCIP_LPBDCHGS *relaxedlpbdchgs, SCIP_Bool *resolve, SCIP_LPI *lpi)
SCIP_RETCODE SCIPconflictsetCreate(SCIP_CONFLICTSET **conflictset, BMS_BLKMEM *blkmem)
void SCIPconflictRowFree(SCIP_CONFLICTROW **row, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPconflictInitRows(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem)
internal methods for storing conflicts
internal methods for constraints and constraint handlers
Constraint handler for linear constraints in their most general form, .
methods for the aggregation rows
#define QUAD_EPSILON
Definition: dbldblarith.h:42
#define SCIPquadprecProdDD(r, a, b)
Definition: dbldblarith.h:58
#define QUAD_ASSIGN(a, constant)
Definition: dbldblarith.h:51
#define QUAD(x)
Definition: dbldblarith.h:47
#define SCIPquadprecSumQQ(r, a, b)
Definition: dbldblarith.h:67
#define QUAD_TO_DBL(x)
Definition: dbldblarith.h:49
#define NULL
Definition: def.h:248
#define EPSGE(x, y, eps)
Definition: def.h:187
#define SCIP_Longint
Definition: def.h:141
#define SCIP_Bool
Definition: def.h:91
#define EPSLE(x, y, eps)
Definition: def.h:185
#define SCIP_ALLOC(x)
Definition: def.h:366
#define SCIP_Real
Definition: def.h:156
#define ABS(x)
Definition: def.h:216
#define TRUE
Definition: def.h:93
#define FALSE
Definition: def.h:94
#define SCIP_LONGINT_FORMAT
Definition: def.h:148
#define REALABS(x)
Definition: def.h:182
#define SCIP_LONGINT_MAX
Definition: def.h:142
#define SCIP_CALL(x)
Definition: def.h:355
SCIP_Bool SCIPisObjIntegral(SCIP *scip)
Definition: scip_prob.c:1801
SCIP_RETCODE SCIPhashmapInsertLong(SCIP_HASHMAP *hashmap, void *origin, SCIP_Longint image)
Definition: misc.c:3215
SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin)
Definition: misc.c:3482
SCIP_Longint SCIPhashmapGetImageLong(SCIP_HASHMAP *hashmap, void *origin)
Definition: misc.c:3324
SCIP_RETCODE SCIPlpiGetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
Definition: lpi_clp.cpp:3824
SCIP_Real SCIPlpiInfinity(SCIP_LPI *lpi)
Definition: lpi_clp.cpp:3947
SCIP_Bool SCIPlpiIsObjlimExc(SCIP_LPI *lpi)
Definition: lpi_clp.cpp:2718
SCIP_RETCODE SCIPlpiGetBase(SCIP_LPI *lpi, int *cstat, int *rstat)
Definition: lpi_clp.cpp:2995
SCIP_RETCODE SCIPlpiSetRealpar(SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
Definition: lpi_clp.cpp:3861
SCIP_RETCODE SCIPlpiGetDualfarkas(SCIP_LPI *lpi, SCIP_Real *dualfarkas)
Definition: lpi_clp.cpp:2885
SCIP_RETCODE SCIPlpiGetObjval(SCIP_LPI *lpi, SCIP_Real *objval)
Definition: lpi_clp.cpp:2794
SCIP_RETCODE SCIPlpiStartStrongbranch(SCIP_LPI *lpi)
Definition: lpi_clp.cpp:2034
SCIP_RETCODE SCIPlpiChgBounds(SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
Definition: lpi_clp.cpp:1096
SCIP_Bool SCIPlpiIsDualFeasible(SCIP_LPI *lpi)
Definition: lpi_clp.cpp:2637
SCIP_RETCODE SCIPlpiSetIntpar(SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
Definition: lpi_clp.cpp:3720
SCIP_RETCODE SCIPlpiSetBase(SCIP_LPI *lpi, const int *cstat, const int *rstat)
Definition: lpi_clp.cpp:3095
SCIP_Bool SCIPlpiWasSolved(SCIP_LPI *lpi)
Definition: lpi_clp.cpp:2414
SCIP_Bool SCIPlpiIsOptimal(SCIP_LPI *lpi)
Definition: lpi_clp.cpp:2651
SCIP_RETCODE SCIPlpiEndStrongbranch(SCIP_LPI *lpi)
Definition: lpi_clp.cpp:2046
SCIP_RETCODE SCIPlpiGetSol(SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
Definition: lpi_clp.cpp:2816
SCIP_Bool SCIPlpiHasDualRay(SCIP_LPI *lpi)
Definition: lpi_clp.cpp:2584
SCIP_Bool SCIPlpiIsPrimalInfeasible(SCIP_LPI *lpi)
Definition: lpi_clp.cpp:2530
SCIP_RETCODE SCIPlpiSolveDual(SCIP_LPI *lpi)
Definition: lpi_clp.cpp:1908
SCIP_RETCODE SCIPlpiGetIterations(SCIP_LPI *lpi, int *iterations)
Definition: lpi_clp.cpp:2949
SCIP_Bool SCIPlpiIsStable(SCIP_LPI *lpi)
Definition: lpi_clp.cpp:2675
void SCIPpqueueClear(SCIP_PQUEUE *pqueue)
Definition: misc.c:1335
void SCIPpqueueFree(SCIP_PQUEUE **pqueue)
Definition: misc.c:1324
SCIP_RETCODE SCIPpqueueCreate(SCIP_PQUEUE **pqueue, int initsize, SCIP_Real sizefac, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), SCIP_DECL_PQUEUEELEMCHGPOS((*elemchgpos)))
Definition: misc.c:1297
SCIP_Bool SCIPisCertified(SCIP *scip)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
Definition: lp.c:17425
void SCIPaggrRowClearSafely(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:3196
SCIP_RETCODE SCIPaggrRowCreate(SCIP *scip, SCIP_AGGRROW **aggrrow)
Definition: cuts.c:2668
SCIP_RETCODE SCIPaggrRowAddRowSafely(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_ROW *row, SCIP_Real weight, int sidetype, SCIP_Bool *success)
Definition: cuts.c:2887
void SCIPaggrRowClear(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:3218
SCIP_Real SCIPaggrRowGetRhs(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:4068
void SCIPaggrRowFree(SCIP *scip, SCIP_AGGRROW **aggrrow)
Definition: cuts.c:2700
int * SCIPaggrRowGetInds(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:4028
void SCIPaggrRowRemoveZeros(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Bool useglbbounds, SCIP_Bool *valid)
Definition: cuts.c:3949
int SCIPaggrRowGetNNz(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:4038
SCIP_RETCODE SCIPaggrRowAddRow(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_ROW *row, SCIP_Real weight, int sidetype)
Definition: cuts.c:2804
static INLINE SCIP_Real SCIPaggrRowGetProbvarValue(SCIP_AGGRROW *aggrrow, int probindex)
Definition: cuts.h:297
SCIP_RETCODE SCIPaggrRowAddObjectiveFunction(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Real rhs, SCIP_Real scale)
Definition: cuts.c:3067
SCIP_Bool SCIPisExact(SCIP *scip)
Definition: scip_exact.c:193
void SCIPintervalSetRoundingModeUpwards(void)
void SCIPintervalSetRoundingModeDownwards(void)
SCIP_ROUNDMODE SCIPintervalGetRoundingMode(void)
void SCIPintervalSetRoundingMode(SCIP_ROUNDMODE roundmode)
int SCIP_ROUNDMODE
Definition: intervalarith.h:65
SCIP_RETCODE SCIPreleaseRowExact(SCIP *scip, SCIP_ROWEXACT **row)
Definition: scip_lpexact.c:110
SCIP_RETCODE SCIPcreateRowExact(SCIP *scip, SCIP_ROWEXACT **row, SCIP_ROW *fprow, int len, SCIP_COLEXACT **cols, SCIP_RATIONAL **vals, SCIP_RATIONAL *lhs, SCIP_RATIONAL *rhs, SCIP_Bool isfprelaxable)
Definition: scip_lpexact.c:256
SCIP_ROW ** SCIPgetLPRows(SCIP *scip)
Definition: scip_lp.c:611
SCIP_COL ** SCIPgetLPCols(SCIP *scip)
Definition: scip_lp.c:512
int SCIPgetNLPCols(SCIP *scip)
Definition: scip_lp.c:533
BMS_BUFMEM * SCIPbuffer(SCIP *scip)
Definition: scip_mem.c:72
#define SCIPallocBufferArray(scip, ptr, num)
Definition: scip_mem.h:124
#define SCIPfreeBufferArray(scip, ptr)
Definition: scip_mem.h:136
#define SCIPfreeBufferArrayNull(scip, ptr)
Definition: scip_mem.h:137
SCIP_Bool SCIPrationalIsFpRepresentable(SCIP_RATIONAL *rational)
Definition: rational.cpp:1710
void SCIPrationalRoundInteger(SCIP_RATIONAL *res, SCIP_RATIONAL *src, SCIP_ROUNDMODE_RAT roundmode)
Definition: rational.cpp:2158
void SCIPrationalSetReal(SCIP_RATIONAL *res, SCIP_Real real)
Definition: rational.cpp:603
void SCIPrationalFreeBuffer(BMS_BUFMEM *bufmem, SCIP_RATIONAL **rational)
Definition: rational.cpp:473
SCIP_RETCODE SCIPrationalCreateBuffer(BMS_BUFMEM *bufmem, SCIP_RATIONAL **rational)
Definition: rational.cpp:123
SCIP_Bool SCIPrationalIsZero(SCIP_RATIONAL *rational)
Definition: rational.cpp:1624
void SCIPrationalSetNegInfinity(SCIP_RATIONAL *res)
Definition: rational.cpp:630
SCIP_Bool SCIPrationalIsInfinity(SCIP_RATIONAL *rational)
Definition: rational.cpp:1660
SCIP_Real SCIPrationalRoundReal(SCIP_RATIONAL *rational, SCIP_ROUNDMODE_RAT roundmode)
Definition: rational.cpp:2110
SCIP_Bool SCIPrationalIsNegInfinity(SCIP_RATIONAL *rational)
Definition: rational.cpp:1670
int SCIProwGetLPDepth(SCIP_ROW *row)
Definition: lp.c:17906
int SCIProwGetNNonz(SCIP_ROW *row)
Definition: lp.c:17607
const char * SCIProwGetName(SCIP_ROW *row)
Definition: lp.c:17745
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
Definition: scip_lp.c:1508
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:1335
SCIP_ROWORIGINTYPE SCIProwGetOrigintype(SCIP_ROW *row)
Definition: lp.c:17825
SCIP_RATIONAL * SCIPgetCutoffboundExact(SCIP *scip)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPbdchginfoIsRedundant(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:25057
SCIP_BDCHGIDX * SCIPbdchginfoGetIdx(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:24979
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
Definition: var.c:24268
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
Definition: var.c:23900
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
Definition: var.c:24142
int SCIPvarGetProbindex(SCIP_VAR *var)
Definition: var.c:23662
const char * SCIPvarGetName(SCIP_VAR *var)
Definition: var.c:23267
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
Definition: var.c:24234
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
Definition: var.c:24120
SCIP_Bool SCIPbdchgidxIsEarlierNonNull(SCIP_BDCHGIDX *bdchgidx1, SCIP_BDCHGIDX *bdchgidx2)
Definition: var.c:24869
void SCIPsortIntInt(int *intarray1, int *intarray2, int len)
void SCIPsortIntIntInt(int *intarray1, int *intarray2, int *intarray3, int len)
internal methods for branching and inference history
SCIP_Bool SCIPlpDivingObjChanged(SCIP_LP *lp)
Definition: lp.c:18261
SCIP_LPSOLSTAT SCIPlpGetSolstat(SCIP_LP *lp)
Definition: lp.c:13420
SCIP_LPI * SCIPlpGetLPI(SCIP_LP *lp)
Definition: lp.c:18178
SCIP_Bool SCIPlpDiving(SCIP_LP *lp)
Definition: lp.c:18251
int SCIPlpGetNCols(SCIP_LP *lp)
Definition: lp.c:17979
SCIP_ROW ** SCIPlpGetRows(SCIP_LP *lp)
Definition: lp.c:18016
int SCIPlpGetNRows(SCIP_LP *lp)
Definition: lp.c:18026
SCIP_Real SCIPlpGetPseudoObjval(SCIP_LP *lp, SCIP_SET *set, SCIP_PROB *prob)
Definition: lp.c:13619
internal methods for LP management
internal methods for exact LP management
interface methods for specific LP solvers
#define BMSfreeMemory(ptr)
Definition: memory.h:145
#define BMSclearMemoryArray(ptr, num)
Definition: memory.h:130
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:437
#define BMSfreeMemoryArrayNull(ptr)
Definition: memory.h:148
#define BMSallocMemory(ptr)
Definition: memory.h:118
methods commonly used for presolving
SCIP_Bool SCIPprobIsObjIntegral(SCIP_PROB *prob)
Definition: prob.c:2813
int SCIPprobGetNVars(SCIP_PROB *prob)
Definition: prob.c:2868
SCIP_VAR ** SCIPprobGetVars(SCIP_PROB *prob)
Definition: prob.c:2913
SCIP_Bool SCIPprobAllColsInLP(SCIP_PROB *prob, SCIP_SET *set, SCIP_LP *lp)
Definition: prob.c:2825
internal methods for storing and manipulating the main problem
internal methods for propagators
public methods for conflict analysis handlers
public methods for managing constraints
public methods for LP management
public methods for message output
#define SCIPdebugMessage
Definition: pub_message.h:96
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for handling parameter settings
public methods for propagators
public methods for branch and bound tree
public methods for problem variables
public methods for certified solving
public methods for conflict handler plugins and conflict analysis
public methods for constraint handler plugins and constraints
public methods for exact solving
public methods for the LP relaxation, rows and columns
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for numerical tolerances
public methods for global and local (sub)problems
public methods for solutions
public methods for querying solving statistics
public methods for SCIP variables
SCIP_Bool SCIPsetIsDualfeasZero(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7292
SCIP_Bool SCIPsetIsGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6617
SCIP_Real SCIPsetFeasCeil(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7136
SCIP_Bool SCIPsetIsFeasGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7017
SCIP_Bool SCIPsetIsFeasLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6993
SCIP_Bool SCIPsetIsFeasEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6945
SCIP_Bool SCIPsetIsLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6577
SCIP_Real SCIPsetFeasFloor(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7124
SCIP_Bool SCIPsetIsEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6537
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
Definition: set.c:6380
SCIP_Bool SCIPsetIsLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6557
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6515
SCIP_Bool SCIPsetIsGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6597
SCIP_Bool SCIPsetIsZero(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6637
SCIP_Real SCIPsetCutoffbounddelta(SCIP_SET *set)
Definition: set.c:6480
internal methods for global SCIP settings
#define SCIPsetFreeBufferArray(set, ptr)
Definition: set.h:1782
#define SCIPsetAllocBufferArray(set, ptr, num)
Definition: set.h:1775
#define SCIPsetDebugMsg
Definition: set.h:1811
internal methods for storing primal CIP solutions
SCIP_Longint certificateline
Definition: struct_cuts.h:53
SCIP_Real * vals
Definition: struct_cuts.h:42
SCIP_Real * rowweights
Definition: struct_cuts.h:46
int * rowsinds
Definition: struct_cuts.h:44
SCIP_HASHMAP * rowdatahash
SCIP_RATIONAL * obj
SCIP_RATIONAL * ub
SCIP_VAR * var
SCIP_RATIONAL * lb
SCIP_Real primsol
Definition: struct_lp.h:96
unsigned int basisstatus
Definition: struct_lp.h:98
SCIP_Real redcost
Definition: struct_lp.h:97
SCIP_Real lb
Definition: struct_lp.h:140
SCIP_Real ub
Definition: struct_lp.h:141
SCIP_Real sbdown
Definition: struct_lp.h:155
SCIP_Real sbup
Definition: struct_lp.h:156
unsigned int basisstatus
Definition: struct_lp.h:181
SCIP_Real redcost
Definition: struct_lp.h:151
unsigned int sbupvalid
Definition: struct_lp.h:193
SCIP_Real primsol
Definition: struct_lp.h:150
int lpipos
Definition: struct_lp.h:175
unsigned int sbdownvalid
Definition: struct_lp.h:191
SCIP_CONFTYPE conflicttype
unsigned int usescutoffbound
SCIP_Longint ninflpiterations
SCIP_Longint ndualproofsbndglobal
SCIP_PROOFSET * proofset
SCIP_Longint ndualproofsinfsuccess
SCIP_Longint nappliedglbconss
SCIP_Longint nsbiterations
SCIP_Longint npropconfconss
SCIP_Longint ninflpconfconss
SCIP_Longint npseudoreconvliterals
SCIP_CLOCK * dIBclock
SCIP_Longint npseudosuccess
SCIP_Longint ninflpconfliterals
SCIP_Longint nsbsuccess
SCIP_CLOCK * propanalyzetime
SCIP_Longint nboundlpconfliterals
SCIP_Longint nsbcalls
SCIP_Longint ndualproofsinflocal
SCIP_Longint npseudoconfconss
SCIP_Longint nboundlpcalls
SCIP_PQUEUE * forcedbdchgqueue
SCIP_Longint nappliedglbliterals
SCIP_Longint nboundlpreconvliterals
SCIP_Longint npseudocalls
SCIP_Longint ninflpreconvconss
SCIP_Longint nglbchgbds
SCIP_Longint dualproofsbndnnonzeros
SCIP_Bool bdchgonlyconfqueue
SCIP_Longint nappliedglbresconss
SCIP_Longint ninflpcalls
SCIP_CLOCK * pseudoanalyzetime
SCIP_Longint nsbconfliterals
SCIP_CLOCK * inflpanalyzetime
SCIP_Longint nboundlpiterations
SCIP_Longint npseudoreconvconss
SCIP_Longint npseudoconfliterals
SCIP_Longint nlocchgbds
SCIP_Longint nsbreconvconss
SCIP_PQUEUE * bdchgqueue
SCIP_Longint nsbreconvliterals
SCIP_Longint npropsuccess
SCIP_Longint ndualproofsinfglobal
SCIP_Longint nresconfvariables
SCIP_Longint nappliedlocconss
SCIP_Longint nsbconfconss
SCIP_Longint ninflpsuccess
SCIP_CLOCK * sbanalyzetime
SCIP_Longint npropcalls
SCIP_Longint nboundlpreconvconss
SCIP_CLOCK * resanalyzetime
SCIP_Longint ndualproofsbndsuccess
SCIP_Longint dualproofsinfnnonzeros
SCIP_Longint nboundlpconfconss
SCIP_Longint npropreconvliterals
SCIP_CLOCK * boundlpanalyzetime
SCIP_Longint nboundlpsuccess
SCIP_Longint npropconfliterals
SCIP_Longint ninflpreconvliterals
SCIP_CONFLICTSET * conflictset
SCIP_Longint ndualproofsbndlocal
SCIP_Longint nappliedlocliterals
SCIP_Longint npropreconvconss
SCIP_Bool dualchecked
Definition: struct_lp.h:124
SCIP_Bool solisbasic
Definition: struct_lp.h:125
SCIP_Bool dualfeasible
Definition: struct_lp.h:123
SCIP_Bool primalfeasible
Definition: struct_lp.h:121
SCIP_Bool primalchecked
Definition: struct_lp.h:122
SCIP_Real lpobjval
Definition: struct_lp.h:120
SCIP_Bool lpissolved
Definition: struct_lp.h:126
SCIP_LPSOLSTAT lpsolstat
Definition: struct_lp.h:119
SCIP_ROW ** rows
Definition: struct_lp.h:308
SCIP_ROW ** lpirows
Definition: struct_lp.h:303
int lpiitlim
Definition: struct_lp.h:351
SCIP_Bool primalfeasible
Definition: struct_lp.h:374
SCIP_COL ** cols
Definition: struct_lp.h:306
int ncols
Definition: struct_lp.h:334
SCIP_Real cutoffbound
Definition: struct_lp.h:289
SCIP_Bool dualfeasible
Definition: struct_lp.h:376
SCIP_Bool solisbasic
Definition: struct_lp.h:378
int nrows
Definition: struct_lp.h:340
SCIP_Bool primalchecked
Definition: struct_lp.h:375
SCIP_LPSOLSTAT lpsolstat
Definition: struct_lp.h:359
int nlpicols
Definition: struct_lp.h:323
SCIP_Real lpobjval
Definition: struct_lp.h:276
int nlpirows
Definition: struct_lp.h:326
SCIP_Bool solved
Definition: struct_lp.h:373
SCIP_Bool dualchecked
Definition: struct_lp.h:377
SCIP_LPI * lpi
Definition: struct_lp.h:301
SCIP_Bool flushed
Definition: struct_lp.h:372
SCIP_Real lpiobjlim
Definition: struct_lp.h:291
SCIP_VAR ** vars
Definition: struct_prob.h:67
SCIP_Real activity
Definition: struct_lp.h:109
unsigned int basisstatus
Definition: struct_lp.h:110
SCIP_Real dualsol
Definition: struct_lp.h:108
unsigned int basisstatus
Definition: struct_lp.h:255
SCIP_Real rhs
Definition: struct_lp.h:208
SCIP_Real dualfarkas
Definition: struct_lp.h:218
SCIP_Real * vals
Definition: struct_lp.h:232
unsigned int local
Definition: struct_lp.h:264
SCIP_Real lhs
Definition: struct_lp.h:207
SCIP_COL ** cols
Definition: struct_lp.h:230
SCIP_ROWEXACT * rowexact
Definition: struct_lp.h:235
SCIP_Real constant
Definition: struct_lp.h:206
SCIP_Real activity
Definition: struct_lp.h:217
SCIP_Real dualsol
Definition: struct_lp.h:216
int lpdepth
Definition: struct_lp.h:245
int len
Definition: struct_lp.h:239
SCIP_Longint nconflictlps
Definition: struct_stat.h:228
SCIP_Longint nconflictlpiterations
Definition: struct_stat.h:81
SCIP_CLOCK * conflictlptime
Definition: struct_stat.h:179
int nubchginfos
Definition: struct_var.h:325
int conflictubcount
Definition: struct_var.h:327
SCIP_Real conflictrelaxedub
Definition: struct_var.h:276
SCIP_Real conflictub
Definition: struct_var.h:274
SCIP_Real conflictrelaxedlb
Definition: struct_var.h:275
int nlbchginfos
Definition: struct_var.h:323
SCIP_Real conflictlb
Definition: struct_var.h:273
int conflictlbcount
Definition: struct_var.h:326
data structures for certificate output
datastructures for conflict analysis
data structures for LP management
data structures for exact LP management
datastructures for storing and manipulating the main problem
SCIP main data structure.
datastructures for global SCIP settings
datastructures for problem statistics
data structures for branch and bound tree
datastructures for problem variables
Definition: heur_padm.c:135
int SCIPtreeGetFocusDepth(SCIP_TREE *tree)
Definition: tree.c:9404
int SCIPtreeGetEffectiveRootDepth(SCIP_TREE *tree)
Definition: tree.c:9518
int SCIPtreeGetCurrentDepth(SCIP_TREE *tree)
Definition: tree.c:9479
internal methods for branch and bound tree
@ SCIP_CLOCKTYPE_DEFAULT
Definition: type_clock.h:43
@ SCIP_CONFTYPE_BNDEXCEEDING
Definition: type_conflict.h:64
@ SCIP_CONFTYPE_INFEASLP
Definition: type_conflict.h:63
@ SCIP_ROWORIGINTYPE_SEPA
Definition: type_lp.h:76
@ SCIP_LPSOLSTAT_NOTSOLVED
Definition: type_lp.h:43
@ SCIP_LPSOLSTAT_OPTIMAL
Definition: type_lp.h:44
@ SCIP_LPSOLSTAT_INFEASIBLE
Definition: type_lp.h:45
@ SCIP_LPSOLSTAT_OBJLIMIT
Definition: type_lp.h:47
@ SCIP_LPPAR_LPITLIM
Definition: type_lpi.h:60
@ SCIP_LPPAR_OBJLIM
Definition: type_lpi.h:59
@ SCIP_R_ROUND_UPWARDS
Definition: type_rational.h:58
@ SCIP_R_ROUND_DOWNWARDS
Definition: type_rational.h:57
@ SCIP_LPERROR
Definition: type_retcode.h:49
@ SCIP_OKAY
Definition: type_retcode.h:42
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
SCIP_Real SCIPvarGetLbLP(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:18568
SCIP_Real SCIPvarGetUbLP(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:18638
internal methods for problem variables
methods for creating output for visualization tools (VBC, BAK)