Scippy

SCIP

Solving Constraint Integer Programs

scip_numerics.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-2024 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file scip_numerics.c
26 * @ingroup OTHER_CFILES
27 * @brief public methods for numerical tolerances
28 * @author Tobias Achterberg
29 * @author Timo Berthold
30 * @author Gerald Gamrath
31 * @author Leona Gottwald
32 * @author Stefan Heinz
33 * @author Gregor Hendel
34 * @author Thorsten Koch
35 * @author Alexander Martin
36 * @author Marc Pfetsch
37 * @author Michael Winkler
38 * @author Kati Wolter
39 *
40 * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
41 */
42
43/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
44
45#include "scip/debug.h"
46#include "scip/pub_message.h"
47#include "scip/pub_misc.h"
48#include "scip/scip_numerics.h"
49#include "scip/set.h"
50#include "scip/struct_lp.h"
51#include "scip/struct_scip.h"
52#include "scip/scip_lp.h"
53#include "scip/scip_message.h"
54
55
56/* In debug mode, the following methods are implemented as function calls to ensure
57 * type validity.
58 * In optimized mode, the methods are implemented as defines to improve performance.
59 * However, we want to have them in the library anyways, so we have to undef the defines.
60 */
61
62#undef SCIPinfinity
63#undef SCIPisInfinity
64#undef SCIPisEQ
65#undef SCIPisLT
66#undef SCIPisLE
67#undef SCIPisGT
68#undef SCIPisGE
69#undef SCIPisZero
70#undef SCIPisPositive
71#undef SCIPisNegative
72#undef SCIPisIntegral
73#undef SCIPisScalingIntegral
74#undef SCIPisFracIntegral
75#undef SCIPfloor
76#undef SCIPceil
77#undef SCIPround
78#undef SCIPfrac
79#undef SCIPisSumEQ
80#undef SCIPisSumLT
81#undef SCIPisSumLE
82#undef SCIPisSumGT
83#undef SCIPisSumGE
84#undef SCIPisSumZero
85#undef SCIPisSumPositive
86#undef SCIPisSumNegative
87#undef SCIPisFeasEQ
88#undef SCIPisFeasLT
89#undef SCIPisFeasLE
90#undef SCIPisFeasGT
91#undef SCIPisFeasGE
92#undef SCIPisFeasZero
93#undef SCIPisFeasPositive
94#undef SCIPisFeasNegative
95#undef SCIPisFeasIntegral
96#undef SCIPisFeasFracIntegral
97#undef SCIPfeasFloor
98#undef SCIPfeasCeil
99#undef SCIPfeasRound
100#undef SCIPfeasFrac
101#undef SCIPisDualfeasEQ
102#undef SCIPisDualfeasLT
103#undef SCIPisDualfeasLE
104#undef SCIPisDualfeasGT
105#undef SCIPisDualfeasGE
106#undef SCIPisDualfeasZero
107#undef SCIPisDualfeasPositive
108#undef SCIPisDualfeasNegative
109#undef SCIPisDualfeasIntegral
110#undef SCIPisDualfeasFracIntegral
111#undef SCIPdualfeasFloor
112#undef SCIPdualfeasCeil
113#undef SCIPdualfeasRound
114#undef SCIPdualfeasFrac
115#undef SCIPisLbBetter
116#undef SCIPisUbBetter
117#undef SCIPisRelEQ
118#undef SCIPisRelLT
119#undef SCIPisRelLE
120#undef SCIPisRelGT
121#undef SCIPisRelGE
122#undef SCIPisSumRelEQ
123#undef SCIPisSumRelLT
124#undef SCIPisSumRelLE
125#undef SCIPisSumRelGT
126#undef SCIPisSumRelGE
127#undef SCIPconvertRealToInt
128#undef SCIPconvertRealToLongint
129#undef SCIPisUpdateUnreliable
130#undef SCIPisHugeValue
131#undef SCIPgetHugeValue
132
133/** returns value treated as zero
134 *
135 * @return value treated as zero
136 */
138 SCIP* scip /**< SCIP data structure */
139 )
140{
141 assert(scip != NULL);
142 assert(scip->set != NULL);
143
144 return SCIPsetEpsilon(scip->set);
145}
146
147/** returns value treated as zero for sums of floating point values
148 *
149 * @return value treated as zero for sums of floating point values
150 */
152 SCIP* scip /**< SCIP data structure */
153 )
154{
155 assert(scip != NULL);
156 assert(scip->set != NULL);
157
158 return SCIPsetSumepsilon(scip->set);
159}
160
161/** returns feasibility tolerance for constraints
162 *
163 * @return feasibility tolerance for constraints
164 */
166 SCIP* scip /**< SCIP data structure */
167 )
168{
169 assert(scip != NULL);
170 assert(scip->set != NULL);
171
172 return SCIPsetFeastol(scip->set);
173}
174
175/** returns primal feasibility tolerance of LP solver
176 *
177 * @deprecated Please use SCIPgetLPFeastol().
178 *
179 * @return primal feasibility tolerance of LP solver
180 */
182 SCIP* scip /**< SCIP data structure */
183 )
184{
185 assert(scip != NULL);
186 assert(scip->set != NULL);
187
188 return SCIPgetLPFeastol(scip);
189}
190
191/** returns feasibility tolerance for reduced costs
192 *
193 * @return feasibility tolerance for reduced costs
194 */
196 SCIP* scip /**< SCIP data structure */
197 )
198{
199 assert(scip != NULL);
200 assert(scip->set != NULL);
201
202 return SCIPsetDualfeastol(scip->set);
203}
204
205/** returns convergence tolerance used in barrier algorithm
206 *
207 * @return convergence tolerance used in barrier algorithm
208 */
210 SCIP* scip /**< SCIP data structure */
211 )
212{
213 assert(scip != NULL);
214 assert(scip->set != NULL);
215
216 return SCIPsetBarrierconvtol(scip->set);
217}
218
219/** return the cutoff bound delta
220 *
221 * @return cutoff bound data
222 */
224 SCIP* scip /**< SCIP data structure */
225 )
226{
227 assert(scip != NULL);
228 assert(scip->set != NULL);
229
230 return SCIPsetCutoffbounddelta(scip->set);
231}
232
233/** return the relaxation primal feasibility tolerance
234 *
235 * @see SCIPchgRelaxfeastol
236 * @return relaxfeastol
237 */
239 SCIP* scip /**< SCIP data structure */
240 )
241{
242 assert(scip != NULL);
243 assert(scip->set != NULL);
244
245 return SCIPsetRelaxfeastol(scip->set);
246}
247
248/** sets the feasibility tolerance for constraints
249 *
250 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
251 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
252 */
254 SCIP* scip, /**< SCIP data structure */
255 SCIP_Real feastol /**< new feasibility tolerance for constraints */
256 )
257{
258 assert(scip != NULL);
259
260 /* change the settings */
261 SCIP_CALL( SCIPsetSetFeastol(scip->set, scip->lp, feastol) );
262
263 return SCIP_OKAY;
264}
265
266/** sets the primal feasibility tolerance of LP solver
267 *
268 * @deprecated Please use SCIPsetLPFeastol().
269 *
270 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
271 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
272 */
274 SCIP* scip, /**< SCIP data structure */
275 SCIP_Real lpfeastol, /**< new primal feasibility tolerance of LP solver */
276 SCIP_Bool printnewvalue /**< should "numerics/lpfeastol = ..." be printed? */
277 )
278{
279 SCIPsetLPFeastol(scip, lpfeastol);
280
281 if( printnewvalue )
282 {
283 SCIPverbMessage(scip, SCIP_VERBLEVEL_HIGH, NULL, "numerics/lpfeastol = %.15g\n", lpfeastol);
284 }
285
286 return SCIP_OKAY;
287}
288
289/** sets the feasibility tolerance for reduced costs
290 *
291 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
292 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
293 */
295 SCIP* scip, /**< SCIP data structure */
296 SCIP_Real dualfeastol /**< new feasibility tolerance for reduced costs */
297 )
298{
299 assert(scip != NULL);
300
301 /* mark the LP unsolved, if the dual feasibility tolerance was tightened */
302 if( scip->lp != NULL && dualfeastol < SCIPsetDualfeastol(scip->set) )
303 {
304 scip->lp->solved = FALSE;
305 scip->lp->lpsolstat = SCIP_LPSOLSTAT_NOTSOLVED;
306 }
307
308 /* change the settings */
309 SCIP_CALL( SCIPsetSetDualfeastol(scip->set, dualfeastol) );
310
311 return SCIP_OKAY;
312}
313
314/** sets the convergence tolerance used in barrier algorithm
315 *
316 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
317 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
318 */
320 SCIP* scip, /**< SCIP data structure */
321 SCIP_Real barrierconvtol /**< new convergence tolerance used in barrier algorithm */
322 )
323{
324 assert(scip != NULL);
325
326 /* mark the LP unsolved, if the convergence tolerance was tightened, and the LP was solved with the barrier algorithm */
327 if( scip->lp != NULL && barrierconvtol < SCIPsetBarrierconvtol(scip->set)
328 && (scip->lp->lastlpalgo == SCIP_LPALGO_BARRIER || scip->lp->lastlpalgo == SCIP_LPALGO_BARRIERCROSSOVER) )
329 scip->lp->solved = FALSE;
330
331 /* change the settings */
332 SCIP_CALL( SCIPsetSetBarrierconvtol(scip->set, barrierconvtol) );
333
334 return SCIP_OKAY;
335}
336
337/** sets the primal feasibility tolerance of relaxations
338 *
339 * This tolerance value is used by the SCIP core and plugins to tighten then feasibility tolerance on relaxations
340 * (especially the LP relaxation) during a solve. It is set to SCIP_INVALID initially, which means that only the
341 * feasibility tolerance of the particular relaxation is taken into account. If set to a valid value, however,
342 * then this value should be used to reduce the primal feasibility tolerance of a relaxation (thus, use the
343 * minimum of relaxfeastol and the relaxations primal feastol).
344 *
345 * @pre The value of relaxfeastol is reset to SCIP_INVALID when initializing the solve (INITSOL).
346 * Therefore, this method can only be called in one of the following stages of the SCIP solving process:
347 * - \ref SCIP_STAGE_INITSOLVE
348 * - \ref SCIP_STAGE_SOLVING
349 *
350 * @return previous value of relaxfeastol
351 */
353 SCIP* scip, /**< SCIP data structure */
354 SCIP_Real relaxfeastol /**< new primal feasibility tolerance of relaxations */
355 )
356{
357 assert(scip != NULL);
358 assert(scip->set != NULL);
359
361
362 return SCIPsetSetRelaxfeastol(scip->set, relaxfeastol);
363}
364
365/** marks that some limit parameter was changed */
367 SCIP* scip /**< SCIP data structure */
368 )
369{
370 assert(scip != NULL);
371
372 /* change the settings */
374}
375
376/** outputs a real number, or "+infinity", or "-infinity" to a file */
378 SCIP* scip, /**< SCIP data structure */
379 FILE* file, /**< output file (or NULL for standard output) */
380 SCIP_Real val, /**< value to print */
381 int width, /**< width of the field */
382 int precision /**< number of significant digits printed */
383 )
384{
385 char s[SCIP_MAXSTRLEN];
386 char strformat[SCIP_MAXSTRLEN];
387
388 assert(scip != NULL);
389
390 if( SCIPsetIsInfinity(scip->set, val) )
391 (void) SCIPsnprintf(s, SCIP_MAXSTRLEN, "+infinity");
392 else if( SCIPsetIsInfinity(scip->set, -val) )
393 (void) SCIPsnprintf(s, SCIP_MAXSTRLEN, "-infinity");
394 else
395 {
396 (void) SCIPsnprintf(strformat, SCIP_MAXSTRLEN, "%%.%dg", precision);
397 (void) SCIPsnprintf(s, SCIP_MAXSTRLEN, (const char*)strformat, val);
398 }
399 (void) SCIPsnprintf(strformat, SCIP_MAXSTRLEN, "%%%ds", width);
400 SCIPmessageFPrintInfo(scip->messagehdlr, file, (const char*)strformat, s);
401}
402
403/** parse a real value that was written with SCIPprintReal() */
405 SCIP* scip, /**< SCIP data structure */
406 const char* str, /**< string to search */
407 SCIP_Real* value, /**< pointer to store the parsed value */
408 char** endptr /**< pointer to store the final string position if successfully parsed, otherwise @p str */
409 )
410{
411 char* localstr;
412
413 assert(scip != NULL);
414 assert(str != NULL);
415 assert(value != NULL);
416 assert(endptr != NULL);
417
418 localstr = (char*)str;
419
420 /* ignore white space */
421 if( SCIPskipSpace(&localstr) != SCIP_OKAY )
422 return FALSE;
423
424 /* test for a special infinity first */
425 if( strncmp(localstr, "+infinity", 9) == 0 )
426 {
427 *value = SCIPinfinity(scip);
428 *endptr = (char*)(localstr + 9);
429 return TRUE;
430 }
431 else if( strncmp(localstr, "-infinity", 9) == 0 )
432 {
433 *value = -SCIPinfinity(scip);
434 *endptr = (char*)(localstr + 9);
435 return TRUE;
436 }
437 else
438 {
439 /* parse a finite value */
440 return SCIPstrToRealValue(localstr, value, endptr);
441 }
442}
443
444/** checks, if values are in range of epsilon */
446 SCIP* scip, /**< SCIP data structure */
447 SCIP_Real val1, /**< first value to be compared */
448 SCIP_Real val2 /**< second value to be compared */
449 )
450{
451 assert(scip != NULL);
452 assert(scip->set != NULL);
453
454 return SCIPsetIsEQ(scip->set, val1, val2);
455}
456
457/** checks, if val1 is (more than epsilon) lower than val2 */
459 SCIP* scip, /**< SCIP data structure */
460 SCIP_Real val1, /**< first value to be compared */
461 SCIP_Real val2 /**< second value to be compared */
462 )
463{
464 assert(scip != NULL);
465 assert(scip->set != NULL);
466
467 return SCIPsetIsLT(scip->set, val1, val2);
468}
469
470/** checks, if val1 is not (more than epsilon) greater than val2 */
472 SCIP* scip, /**< SCIP data structure */
473 SCIP_Real val1, /**< first value to be compared */
474 SCIP_Real val2 /**< second value to be compared */
475 )
476{
477 assert(scip != NULL);
478 assert(scip->set != NULL);
479
480 return SCIPsetIsLE(scip->set, val1, val2);
481}
482
483/** checks, if val1 is (more than epsilon) greater than val2 */
485 SCIP* scip, /**< SCIP data structure */
486 SCIP_Real val1, /**< first value to be compared */
487 SCIP_Real val2 /**< second value to be compared */
488 )
489{
490 assert(scip != NULL);
491 assert(scip->set != NULL);
492
493 return SCIPsetIsGT(scip->set, val1, val2);
494}
495
496/** checks, if val1 is not (more than epsilon) lower than val2 */
498 SCIP* scip, /**< SCIP data structure */
499 SCIP_Real val1, /**< first value to be compared */
500 SCIP_Real val2 /**< second value to be compared */
501 )
502{
503 assert(scip != NULL);
504 assert(scip->set != NULL);
505
506 return SCIPsetIsGE(scip->set, val1, val2);
507}
508
509/** returns value treated as infinity */
511 SCIP* scip /**< SCIP data structure */
512 )
513{
514 assert(scip != NULL);
515 assert(scip->set != NULL);
516
517 return SCIPsetInfinity(scip->set);
518}
519
520/** checks, if value is (positive) infinite */
522 SCIP* scip, /**< SCIP data structure */
523 SCIP_Real val /**< value to be compared against infinity */
524 )
525{
526 assert(scip != NULL);
527 assert(scip->set != NULL);
528
529 return SCIPsetIsInfinity(scip->set, val);
530}
531
532/** checks, if value is huge and should be handled separately (e.g., in activity computation) */
534 SCIP* scip, /**< SCIP data structure */
535 SCIP_Real val /**< value to be checked whether it is huge */
536 )
537{
538 assert(scip != NULL);
539 assert(scip->set != NULL);
540
541 return SCIPsetIsHugeValue(scip->set, val);
542}
543
544/** returns the minimum value that is regarded as huge and should be handled separately (e.g., in activity
545 * computation)
546 */
548 SCIP* scip /**< SCIP data structure */
549 )
550{
551 assert(scip != NULL);
552 assert(scip->set != NULL);
553
554 return SCIPsetGetHugeValue(scip->set);
555}
556
557/** checks, if value is in range epsilon of 0.0 */
559 SCIP* scip, /**< SCIP data structure */
560 SCIP_Real val /**< value to process */
561 )
562{
563 assert(scip != NULL);
564 assert(scip->set != NULL);
565
566 return SCIPsetIsZero(scip->set, val);
567}
568
569/** checks, if value is greater than epsilon */
571 SCIP* scip, /**< SCIP data structure */
572 SCIP_Real val /**< value to process */
573 )
574{
575 assert(scip != NULL);
576 assert(scip->set != NULL);
577
578 return SCIPsetIsPositive(scip->set, val);
579}
580
581/** checks, if value is lower than -epsilon */
583 SCIP* scip, /**< SCIP data structure */
584 SCIP_Real val /**< value to process */
585 )
586{
587 assert(scip != NULL);
588 assert(scip->set != NULL);
589
590 return SCIPsetIsNegative(scip->set, val);
591}
592
593/** checks, if value is integral within epsilon */
595 SCIP* scip, /**< SCIP data structure */
596 SCIP_Real val /**< value to process */
597 )
598{
599 assert(scip != NULL);
600 assert(scip->set != NULL);
601
602 return SCIPsetIsIntegral(scip->set, val);
603}
604
605/** checks whether the product val * scalar is integral in epsilon scaled by scalar */
607 SCIP* scip, /**< SCIP data structure */
608 SCIP_Real val, /**< unscaled value to check for scaled integrality */
609 SCIP_Real scalar /**< value to scale val with for checking for integrality */
610 )
611{
612 assert(scip != NULL);
613 assert(scip->set != NULL);
614
615 return SCIPsetIsScalingIntegral(scip->set, val, scalar);
616}
617
618/** checks, if given fractional part is smaller than epsilon */
620 SCIP* scip, /**< SCIP data structure */
621 SCIP_Real val /**< value to process */
622 )
623{
624 assert(scip != NULL);
625 assert(scip->set != NULL);
626
627 return SCIPsetIsFracIntegral(scip->set, val);
628}
629
630/** rounds value + epsilon down to the next integer */
632 SCIP* scip, /**< SCIP data structure */
633 SCIP_Real val /**< value to process */
634 )
635{
636 assert(scip != NULL);
637 assert(scip->set != NULL);
638
639 return SCIPsetFloor(scip->set, val);
640}
641
642/** rounds value - epsilon up to the next integer */
644 SCIP* scip, /**< SCIP data structure */
645 SCIP_Real val /**< value to process */
646 )
647{
648 assert(scip != NULL);
649 assert(scip->set != NULL);
650
651 return SCIPsetCeil(scip->set, val);
652}
653
654/** rounds value to the nearest integer with epsilon tolerance */
656 SCIP* scip, /**< SCIP data structure */
657 SCIP_Real val /**< value to process */
658 )
659{
660 assert(scip != NULL);
661 assert(scip->set != NULL);
662
663 return SCIPsetRound(scip->set, val);
664}
665
666/** returns fractional part of value, i.e. x - floor(x) in epsilon tolerance */
668 SCIP* scip, /**< SCIP data structure */
669 SCIP_Real val /**< value to return fractional part for */
670 )
671{
672 assert(scip != NULL);
673 assert(scip->set != NULL);
674
675 return SCIPsetFrac(scip->set, val);
676}
677
678/** checks, if values are in range of sumepsilon */
680 SCIP* scip, /**< SCIP data structure */
681 SCIP_Real val1, /**< first value to be compared */
682 SCIP_Real val2 /**< second value to be compared */
683 )
684{
685 assert(scip != NULL);
686 assert(scip->set != NULL);
687
688 return SCIPsetIsSumEQ(scip->set, val1, val2);
689}
690
691/** checks, if val1 is (more than sumepsilon) lower than val2 */
693 SCIP* scip, /**< SCIP data structure */
694 SCIP_Real val1, /**< first value to be compared */
695 SCIP_Real val2 /**< second value to be compared */
696 )
697{
698 assert(scip != NULL);
699 assert(scip->set != NULL);
700
701 return SCIPsetIsSumLT(scip->set, val1, val2);
702}
703
704/** checks, if val1 is not (more than sumepsilon) greater than val2 */
706 SCIP* scip, /**< SCIP data structure */
707 SCIP_Real val1, /**< first value to be compared */
708 SCIP_Real val2 /**< second value to be compared */
709 )
710{
711 assert(scip != NULL);
712 assert(scip->set != NULL);
713
714 return SCIPsetIsSumLE(scip->set, val1, val2);
715}
716
717/** checks, if val1 is (more than sumepsilon) greater than val2 */
719 SCIP* scip, /**< SCIP data structure */
720 SCIP_Real val1, /**< first value to be compared */
721 SCIP_Real val2 /**< second value to be compared */
722 )
723{
724 assert(scip != NULL);
725 assert(scip->set != NULL);
726
727 return SCIPsetIsSumGT(scip->set, val1, val2);
728}
729
730/** checks, if val1 is not (more than sumepsilon) lower than val2 */
732 SCIP* scip, /**< SCIP data structure */
733 SCIP_Real val1, /**< first value to be compared */
734 SCIP_Real val2 /**< second value to be compared */
735 )
736{
737 assert(scip != NULL);
738 assert(scip->set != NULL);
739
740 return SCIPsetIsSumGE(scip->set, val1, val2);
741}
742
743/** checks, if value is in range sumepsilon of 0.0 */
745 SCIP* scip, /**< SCIP data structure */
746 SCIP_Real val /**< value to process */
747 )
748{
749 assert(scip != NULL);
750 assert(scip->set != NULL);
751
752 return SCIPsetIsSumZero(scip->set, val);
753}
754
755/** checks, if value is greater than sumepsilon */
757 SCIP* scip, /**< SCIP data structure */
758 SCIP_Real val /**< value to process */
759 )
760{
761 assert(scip != NULL);
762 assert(scip->set != NULL);
763
764 return SCIPsetIsSumPositive(scip->set, val);
765}
766
767/** checks, if value is lower than -sumepsilon */
769 SCIP* scip, /**< SCIP data structure */
770 SCIP_Real val /**< value to process */
771 )
772{
773 assert(scip != NULL);
774 assert(scip->set != NULL);
775
776 return SCIPsetIsSumNegative(scip->set, val);
777}
778
779/** checks, if relative difference of values is in range of feasibility tolerance */
781 SCIP* scip, /**< SCIP data structure */
782 SCIP_Real val1, /**< first value to be compared */
783 SCIP_Real val2 /**< second value to be compared */
784 )
785{
786 assert(scip != NULL);
787 assert(scip->set != NULL);
788
789 return SCIPsetIsFeasEQ(scip->set, val1, val2);
790}
791
792/** checks, if relative difference val1 and val2 is lower than feasibility tolerance */
794 SCIP* scip, /**< SCIP data structure */
795 SCIP_Real val1, /**< first value to be compared */
796 SCIP_Real val2 /**< second value to be compared */
797 )
798{
799 assert(scip != NULL);
800 assert(scip->set != NULL);
801
802 return SCIPsetIsFeasLT(scip->set, val1, val2);
803}
804
805/** checks, if relative difference of val1 and val2 is not greater than feasibility tolerance */
807 SCIP* scip, /**< SCIP data structure */
808 SCIP_Real val1, /**< first value to be compared */
809 SCIP_Real val2 /**< second value to be compared */
810 )
811{
812 assert(scip != NULL);
813 assert(scip->set != NULL);
814
815 return SCIPsetIsFeasLE(scip->set, val1, val2);
816}
817
818/** checks, if relative difference of val1 and val2 is greater than feastol */
820 SCIP* scip, /**< SCIP data structure */
821 SCIP_Real val1, /**< first value to be compared */
822 SCIP_Real val2 /**< second value to be compared */
823 )
824{
825 assert(scip != NULL);
826 assert(scip->set != NULL);
827
828 return SCIPsetIsFeasGT(scip->set, val1, val2);
829}
830
831/** checks, if relative difference of val1 and val2 is not lower than -feastol */
833 SCIP* scip, /**< SCIP data structure */
834 SCIP_Real val1, /**< first value to be compared */
835 SCIP_Real val2 /**< second value to be compared */
836 )
837{
838 assert(scip != NULL);
839 assert(scip->set != NULL);
840
841 return SCIPsetIsFeasGE(scip->set, val1, val2);
842}
843
844/** checks, if value is in range feasibility tolerance of 0.0 */
846 SCIP* scip, /**< SCIP data structure */
847 SCIP_Real val /**< value to process */
848 )
849{
850 assert(scip != NULL);
851 assert(scip->set != NULL);
852
853 return SCIPsetIsFeasZero(scip->set, val);
854}
855
856/** checks, if value is greater than feasibility tolerance */
858 SCIP* scip, /**< SCIP data structure */
859 SCIP_Real val /**< value to process */
860 )
861{
862 assert(scip != NULL);
863 assert(scip->set != NULL);
864
865 return SCIPsetIsFeasPositive(scip->set, val);
866}
867
868/** checks, if value is lower than -feasibility tolerance */
870 SCIP* scip, /**< SCIP data structure */
871 SCIP_Real val /**< value to process */
872 )
873{
874 assert(scip != NULL);
875 assert(scip->set != NULL);
876
877 return SCIPsetIsFeasNegative(scip->set, val);
878}
879
880/** checks, if value is integral within the LP feasibility bounds */
882 SCIP* scip, /**< SCIP data structure */
883 SCIP_Real val /**< value to process */
884 )
885{
886 assert(scip != NULL);
887 assert(scip->set != NULL);
888
889 return SCIPsetIsFeasIntegral(scip->set, val);
890}
891
892/** checks, if given fractional part is smaller than feastol */
894 SCIP* scip, /**< SCIP data structure */
895 SCIP_Real val /**< value to process */
896 )
897{
898 assert(scip != NULL);
899 assert(scip->set != NULL);
900
901 return SCIPsetIsFeasFracIntegral(scip->set, val);
902}
903
904/** rounds value + feasibility tolerance down to the next integer */
906 SCIP* scip, /**< SCIP data structure */
907 SCIP_Real val /**< value to process */
908 )
909{
910 assert(scip != NULL);
911 assert(scip->set != NULL);
912
913 return SCIPsetFeasFloor(scip->set, val);
914}
915
916/** rounds value - feasibility tolerance up to the next integer */
918 SCIP* scip, /**< SCIP data structure */
919 SCIP_Real val /**< value to process */
920 )
921{
922 assert(scip != NULL);
923 assert(scip->set != NULL);
924
925 return SCIPsetFeasCeil(scip->set, val);
926}
927
928/** rounds value to the nearest integer in feasibility tolerance */
930 SCIP* scip, /**< SCIP data structure */
931 SCIP_Real val /**< value to process */
932 )
933{
934 assert(scip != NULL);
935 assert(scip->set != NULL);
936
937 return SCIPsetFeasRound(scip->set, val);
938}
939
940/** returns fractional part of value, i.e. x - floor(x) in feasibility tolerance */
942 SCIP* scip, /**< SCIP data structure */
943 SCIP_Real val /**< value to process */
944 )
945{
946 assert(scip != NULL);
947 assert(scip->set != NULL);
948
949 return SCIPsetFeasFrac(scip->set, val);
950}
951
952/** checks, if relative difference of values is in range of dual feasibility tolerance */
954 SCIP* scip, /**< SCIP data structure */
955 SCIP_Real val1, /**< first value to be compared */
956 SCIP_Real val2 /**< second value to be compared */
957 )
958{
959 assert(scip != NULL);
960 assert(scip->set != NULL);
961
962 return SCIPsetIsDualfeasEQ(scip->set, val1, val2);
963}
964
965/** checks, if relative difference val1 and val2 is lower than dual feasibility tolerance */
967 SCIP* scip, /**< SCIP data structure */
968 SCIP_Real val1, /**< first value to be compared */
969 SCIP_Real val2 /**< second value to be compared */
970 )
971{
972 assert(scip != NULL);
973 assert(scip->set != NULL);
974
975 return SCIPsetIsDualfeasLT(scip->set, val1, val2);
976}
977
978/** checks, if relative difference of val1 and val2 is not greater than dual feasibility tolerance */
980 SCIP* scip, /**< SCIP data structure */
981 SCIP_Real val1, /**< first value to be compared */
982 SCIP_Real val2 /**< second value to be compared */
983 )
984{
985 assert(scip != NULL);
986 assert(scip->set != NULL);
987
988 return SCIPsetIsDualfeasLE(scip->set, val1, val2);
989}
990
991/** checks, if relative difference of val1 and val2 is greater than dual feasibility tolerance */
993 SCIP* scip, /**< SCIP data structure */
994 SCIP_Real val1, /**< first value to be compared */
995 SCIP_Real val2 /**< second value to be compared */
996 )
997{
998 assert(scip != NULL);
999 assert(scip->set != NULL);
1000
1001 return SCIPsetIsDualfeasGT(scip->set, val1, val2);
1002}
1003
1004/** checks, if relative difference of val1 and val2 is not lower than -dual feasibility tolerance */
1006 SCIP* scip, /**< SCIP data structure */
1007 SCIP_Real val1, /**< first value to be compared */
1008 SCIP_Real val2 /**< second value to be compared */
1009 )
1010{
1011 assert(scip != NULL);
1012 assert(scip->set != NULL);
1013
1014 return SCIPsetIsDualfeasGE(scip->set, val1, val2);
1015}
1016
1017/** checks, if value is in range dual feasibility tolerance of 0.0 */
1019 SCIP* scip, /**< SCIP data structure */
1020 SCIP_Real val /**< value to process */
1021 )
1022{
1023 assert(scip != NULL);
1024 assert(scip->set != NULL);
1025
1026 return SCIPsetIsDualfeasZero(scip->set, val);
1027}
1028
1029/** checks, if value is greater than dual feasibility tolerance */
1031 SCIP* scip, /**< SCIP data structure */
1032 SCIP_Real val /**< value to process */
1033 )
1034{
1035 assert(scip != NULL);
1036 assert(scip->set != NULL);
1037
1038 return SCIPsetIsDualfeasPositive(scip->set, val);
1039}
1040
1041/** checks, if value is lower than -dual feasibility tolerance */
1043 SCIP* scip, /**< SCIP data structure */
1044 SCIP_Real val /**< value to process */
1045 )
1046{
1047 assert(scip != NULL);
1048 assert(scip->set != NULL);
1049
1050 return SCIPsetIsDualfeasNegative(scip->set, val);
1051}
1052
1053/** checks, if value is integral within the LP dual feasibility tolerance */
1055 SCIP* scip, /**< SCIP data structure */
1056 SCIP_Real val /**< value to process */
1057 )
1058{
1059 assert(scip != NULL);
1060 assert(scip->set != NULL);
1061
1062 return SCIPsetIsDualfeasIntegral(scip->set, val);
1063}
1064
1065/** checks, if given fractional part is smaller than dual feasibility tolerance */
1067 SCIP* scip, /**< SCIP data structure */
1068 SCIP_Real val /**< value to process */
1069 )
1070{
1071 assert(scip != NULL);
1072 assert(scip->set != NULL);
1073
1074 return SCIPsetIsDualfeasFracIntegral(scip->set, val);
1075}
1076
1077/** rounds value + dual feasibility tolerance down to the next integer */
1079 SCIP* scip, /**< SCIP data structure */
1080 SCIP_Real val /**< value to process */
1081 )
1082{
1083 assert(scip != NULL);
1084 assert(scip->set != NULL);
1085
1086 return SCIPsetDualfeasFloor(scip->set, val);
1087}
1088
1089/** rounds value - dual feasibility tolerance up to the next integer */
1091 SCIP* scip, /**< SCIP data structure */
1092 SCIP_Real val /**< value to process */
1093 )
1094{
1095 assert(scip != NULL);
1096 assert(scip->set != NULL);
1097
1098 return SCIPsetDualfeasCeil(scip->set, val);
1099}
1100
1101/** rounds value to the nearest integer in dual feasibility tolerance */
1103 SCIP* scip, /**< SCIP data structure */
1104 SCIP_Real val /**< value to process */
1105 )
1106{
1107 assert(scip != NULL);
1108 assert(scip->set != NULL);
1109
1110 return SCIPsetDualfeasRound(scip->set, val);
1111}
1112
1113/** returns fractional part of value, i.e. x - floor(x) in dual feasibility tolerance */
1115 SCIP* scip, /**< SCIP data structure */
1116 SCIP_Real val /**< value to process */
1117 )
1118{
1119 assert(scip != NULL);
1120 assert(scip->set != NULL);
1121
1122 return SCIPsetDualfeasFrac(scip->set, val);
1123}
1124
1125/** checks, if the given new lower bound is at least min(oldub - oldlb, |oldlb|) times the bound
1126 * strengthening epsilon better than the old one
1127 */
1129 SCIP* scip, /**< SCIP data structure */
1130 SCIP_Real newlb, /**< new lower bound */
1131 SCIP_Real oldlb, /**< old lower bound */
1132 SCIP_Real oldub /**< old upper bound */
1133 )
1134{
1135 assert(scip != NULL);
1136
1137 return SCIPsetIsLbBetter(scip->set, newlb, oldlb, oldub);
1138}
1139
1140/** checks, if the given new upper bound is at least min(oldub - oldlb, |oldub|) times the bound
1141 * strengthening epsilon better than the old one
1142 */
1144 SCIP* scip, /**< SCIP data structure */
1145 SCIP_Real newub, /**< new upper bound */
1146 SCIP_Real oldlb, /**< old lower bound */
1147 SCIP_Real oldub /**< old upper bound */
1148 )
1149{
1150 assert(scip != NULL);
1151
1152 return SCIPsetIsUbBetter(scip->set, newub, oldlb, oldub);
1153}
1154
1155/** checks, if relative difference of values is in range of epsilon */
1157 SCIP* scip, /**< SCIP data structure */
1158 SCIP_Real val1, /**< first value to be compared */
1159 SCIP_Real val2 /**< second value to be compared */
1160 )
1161{
1162 assert(scip != NULL);
1163 assert(scip->set != NULL);
1164
1165 return SCIPsetIsRelEQ(scip->set, val1, val2);
1166}
1167
1168/** checks, if relative difference of val1 and val2 is lower than epsilon */
1170 SCIP* scip, /**< SCIP data structure */
1171 SCIP_Real val1, /**< first value to be compared */
1172 SCIP_Real val2 /**< second value to be compared */
1173 )
1174{
1175 assert(scip != NULL);
1176 assert(scip->set != NULL);
1177
1178 return SCIPsetIsRelLT(scip->set, val1, val2);
1179}
1180
1181/** checks, if relative difference of val1 and val2 is not greater than epsilon */
1183 SCIP* scip, /**< SCIP data structure */
1184 SCIP_Real val1, /**< first value to be compared */
1185 SCIP_Real val2 /**< second value to be compared */
1186 )
1187{
1188 assert(scip != NULL);
1189 assert(scip->set != NULL);
1190
1191 return SCIPsetIsRelLE(scip->set, val1, val2);
1192}
1193
1194/** checks, if relative difference of val1 and val2 is greater than epsilon */
1196 SCIP* scip, /**< SCIP data structure */
1197 SCIP_Real val1, /**< first value to be compared */
1198 SCIP_Real val2 /**< second value to be compared */
1199 )
1200{
1201 assert(scip != NULL);
1202 assert(scip->set != NULL);
1203
1204 return SCIPsetIsRelGT(scip->set, val1, val2);
1205}
1206
1207/** checks, if relative difference of val1 and val2 is not lower than -epsilon */
1209 SCIP* scip, /**< SCIP data structure */
1210 SCIP_Real val1, /**< first value to be compared */
1211 SCIP_Real val2 /**< second value to be compared */
1212 )
1213{
1214 assert(scip != NULL);
1215 assert(scip->set != NULL);
1216
1217 return SCIPsetIsRelGE(scip->set, val1, val2);
1218}
1219
1220/** checks, if relative difference of values is in range of sumepsilon */
1222 SCIP* scip, /**< SCIP data structure */
1223 SCIP_Real val1, /**< first value to be compared */
1224 SCIP_Real val2 /**< second value to be compared */
1225 )
1226{
1227 assert(scip != NULL);
1228 assert(scip->set != NULL);
1229
1230 return SCIPsetIsSumRelEQ(scip->set, val1, val2);
1231}
1232
1233/** checks, if relative difference of val1 and val2 is lower than sumepsilon */
1235 SCIP* scip, /**< SCIP data structure */
1236 SCIP_Real val1, /**< first value to be compared */
1237 SCIP_Real val2 /**< second value to be compared */
1238 )
1239{
1240 assert(scip != NULL);
1241 assert(scip->set != NULL);
1242
1243 return SCIPsetIsSumRelLT(scip->set, val1, val2);
1244}
1245
1246/** checks, if relative difference of val1 and val2 is not greater than sumepsilon */
1248 SCIP* scip, /**< SCIP data structure */
1249 SCIP_Real val1, /**< first value to be compared */
1250 SCIP_Real val2 /**< second value to be compared */
1251 )
1252{
1253 assert(scip != NULL);
1254 assert(scip->set != NULL);
1255
1256 return SCIPsetIsSumRelLE(scip->set, val1, val2);
1257}
1258
1259/** checks, if relative difference of val1 and val2 is greater than sumepsilon */
1261 SCIP* scip, /**< SCIP data structure */
1262 SCIP_Real val1, /**< first value to be compared */
1263 SCIP_Real val2 /**< second value to be compared */
1264 )
1265{
1266 assert(scip != NULL);
1267 assert(scip->set != NULL);
1268
1269 return SCIPsetIsSumRelGT(scip->set, val1, val2);
1270}
1271
1272/** checks, if relative difference of val1 and val2 is not lower than -sumepsilon */
1274 SCIP* scip, /**< SCIP data structure */
1275 SCIP_Real val1, /**< first value to be compared */
1276 SCIP_Real val2 /**< second value to be compared */
1277 )
1278{
1279 assert(scip != NULL);
1280 assert(scip->set != NULL);
1281
1282 return SCIPsetIsSumRelGE(scip->set, val1, val2);
1283}
1284
1285/** converts the given real number representing an integer to an int; in optimized mode the function gets inlined for
1286 * performance; in debug mode we check some additional conditions
1287 */
1289 SCIP* scip, /**< SCIP data structure */
1290 SCIP_Real real /**< double bound to convert */
1291 )
1292{
1293 assert(SCIPisFeasIntegral(scip, real));
1294 assert(SCIPisFeasEQ(scip, real, (SCIP_Real)(int)(real < 0 ? real - 0.5 : real + 0.5)));
1295 assert(real < INT_MAX);
1296 assert(real > INT_MIN);
1297
1298 return (int)(real < 0 ? (real - 0.5) : (real + 0.5));
1299}
1300
1301/** converts the given real number representing an integer to a long integer; in optimized mode the function gets inlined for
1302 * performance; in debug mode we check some additional conditions
1303 */
1305 SCIP* scip, /**< SCIP data structure */
1306 SCIP_Real real /**< double bound to convert */
1307 )
1308{
1309 assert(SCIPisFeasIntegral(scip, real));
1310 assert(SCIPisFeasEQ(scip, real, (SCIP_Real)(SCIP_Longint)(real < 0 ? real - 0.5 : real + 0.5)));
1311 assert(real < (SCIP_Real)SCIP_LONGINT_MAX);
1312 assert(real > (SCIP_Real)SCIP_LONGINT_MIN);
1313
1314 return (SCIP_Longint)(real < 0 ? (real - 0.5) : (real + 0.5));
1315}
1316
1317/** Checks, if an iteratively updated value is reliable or should be recomputed from scratch.
1318 * This is useful, if the value, e.g., the activity of a linear constraint or the pseudo objective value, gets a high
1319 * absolute value during the optimization process which is later reduced significantly. In this case, the last digits
1320 * were canceled out when increasing the value and are random after decreasing it.
1321 * We do not consider the cancellations which can occur during increasing the absolute value because they just cannot
1322 * be expressed using fixed precision floating point arithmetic, anymore.
1323 * In order to get more reliable values, the idea is to always store the last reliable value, where increasing the
1324 * absolute of the value is viewed as preserving reliability. Then, after each update, the new absolute value can be
1325 * compared against the last reliable one with this method, checking whether it was decreased by a factor of at least
1326 * "lp/recompfac" and should be recomputed.
1327 */
1329 SCIP* scip, /**< SCIP data structure */
1330 SCIP_Real newvalue, /**< new value after update */
1331 SCIP_Real oldvalue /**< old value, i.e., last reliable value */
1332 )
1333{
1334 assert(scip != NULL);
1335
1336 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisUpdateUnreliable", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
1337
1338 return SCIPsetIsUpdateUnreliable(scip->set, newvalue, oldvalue);
1339}
SCIP_RETCODE SCIPcheckStage(SCIP *scip, const char *method, SCIP_Bool init, SCIP_Bool problem, SCIP_Bool transforming, SCIP_Bool transformed, SCIP_Bool initpresolve, SCIP_Bool presolving, SCIP_Bool exitpresolve, SCIP_Bool presolved, SCIP_Bool initsolve, SCIP_Bool solving, SCIP_Bool solved, SCIP_Bool exitsolve, SCIP_Bool freetrans, SCIP_Bool freescip)
Definition: debug.c:2208
methods for debugging
#define NULL
Definition: def.h:266
#define SCIP_MAXSTRLEN
Definition: def.h:287
#define SCIP_Longint
Definition: def.h:157
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:172
#define TRUE
Definition: def.h:93
#define FALSE
Definition: def.h:94
#define SCIP_CALL_ABORT(x)
Definition: def.h:352
#define SCIP_LONGINT_MIN
Definition: def.h:159
#define SCIP_LONGINT_MAX
Definition: def.h:158
#define SCIP_CALL(x)
Definition: def.h:373
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
Definition: scip_message.c:225
void SCIPsetLPFeastol(SCIP *scip, SCIP_Real newfeastol)
Definition: scip_lp.c:438
SCIP_Real SCIPgetLPFeastol(SCIP *scip)
Definition: scip_lp.c:428
SCIP_Bool SCIPisRelEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPdualfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisRelLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisUbBetter(SCIP *scip, SCIP_Real newub, SCIP_Real oldlb, SCIP_Real oldub)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPdualfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumRelGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisDualfeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasFracIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPrelaxfeastol(SCIP *scip)
SCIP_Real SCIPfeasFrac(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPchgRelaxfeastol(SCIP *scip, SCIP_Real relaxfeastol)
SCIP_Bool SCIPisRelLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisSumRelLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisRelGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisRelGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisSumRelEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPchgLpfeastol(SCIP *scip, SCIP_Real lpfeastol, SCIP_Bool printnewvalue)
SCIP_Bool SCIPisSumNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisDualfeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisDualfeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLbBetter(SCIP *scip, SCIP_Real newlb, SCIP_Real oldlb, SCIP_Real oldub)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisDualfeasPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisHugeValue(SCIP *scip, SCIP_Real val)
void SCIPprintReal(SCIP *scip, FILE *file, SCIP_Real val, int width, int precision)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPdualfeasRound(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumRelLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisDualfeasFracIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPround(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfeasRound(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFracIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPlpfeastol(SCIP *scip)
SCIP_RETCODE SCIPchgFeastol(SCIP *scip, SCIP_Real feastol)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisDualfeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisDualfeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Bool SCIPisSumGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPdualfeastol(SCIP *scip)
SCIP_Real SCIPfrac(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPgetHugeValue(SCIP *scip)
SCIP_Bool SCIPisDualfeasZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPdualfeasFrac(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Longint SCIPconvertRealToLongint(SCIP *scip, SCIP_Real real)
SCIP_Bool SCIPisNegative(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumRelGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisScalingIntegral(SCIP *scip, SCIP_Real val, SCIP_Real scalar)
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisDualfeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisSumZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPcutoffbounddelta(SCIP *scip)
SCIP_Bool SCIPisUpdateUnreliable(SCIP *scip, SCIP_Real newvalue, SCIP_Real oldvalue)
int SCIPconvertRealToInt(SCIP *scip, SCIP_Real real)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPchgBarrierconvtol(SCIP *scip, SCIP_Real barrierconvtol)
void SCIPmarkLimitChanged(SCIP *scip)
SCIP_Real SCIPepsilon(SCIP *scip)
SCIP_Real SCIPsumepsilon(SCIP *scip)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisDualfeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPbarrierconvtol(SCIP *scip)
SCIP_Bool SCIPisSumGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPparseReal(SCIP *scip, const char *str, SCIP_Real *value, char **endptr)
SCIP_RETCODE SCIPchgDualfeastol(SCIP *scip, SCIP_Real dualfeastol)
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:10880
SCIP_Bool SCIPstrToRealValue(const char *str, SCIP_Real *value, char **endptr)
Definition: misc.c:11008
SCIP_RETCODE SCIPskipSpace(char **s)
Definition: misc.c:10869
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
Definition: message.c:618
double real
public methods for message output
public data structures and miscellaneous methods
public methods for the LP relaxation, rows and columns
public methods for message handling
public methods for numerical tolerances
SCIP_Bool SCIPsetIsDualfeasZero(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6918
SCIP_Real SCIPsetFloor(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6386
SCIP_Bool SCIPsetIsDualfeasLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6852
SCIP_RETCODE SCIPsetSetBarrierconvtol(SCIP_SET *set, SCIP_Real barrierconvtol)
Definition: set.c:5844
SCIP_Bool SCIPsetIsLbBetter(SCIP_SET *set, SCIP_Real newlb, SCIP_Real oldlb, SCIP_Real oldub)
Definition: set.c:7022
SCIP_Bool SCIPsetIsRelLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7098
SCIP_RETCODE SCIPsetSetFeastol(SCIP_SET *set, SCIP_LP *lp, SCIP_Real feastol)
Definition: set.c:5810
SCIP_Bool SCIPsetIsFeasPositive(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6718
SCIP_Bool SCIPsetIsHugeValue(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6210
SCIP_Bool SCIPsetIsDualfeasFracIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6962
SCIP_Real SCIPsetDualfeasCeil(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6986
SCIP_Bool SCIPsetIsGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6293
SCIP_Real SCIPsetFeasCeil(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6775
SCIP_Bool SCIPsetIsFeasFracIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6751
SCIP_Bool SCIPsetIsFeasNegative(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6729
SCIP_Real SCIPsetSetRelaxfeastol(SCIP_SET *set, SCIP_Real relaxfeastol)
Definition: set.c:5862
SCIP_Bool SCIPsetIsSumRelGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7274
SCIP_Real SCIPsetFeastol(SCIP_SET *set)
Definition: set.c:6106
SCIP_Bool SCIPsetIsSumGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6484
SCIP_RETCODE SCIPsetSetDualfeastol(SCIP_SET *set, SCIP_Real dualfeastol)
Definition: set.c:5831
SCIP_Real SCIPsetCeil(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6397
SCIP_Bool SCIPsetIsRelEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7076
SCIP_Bool SCIPsetIsDualfeasLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6830
SCIP_Bool SCIPsetIsFeasGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6663
SCIP_Bool SCIPsetIsFeasLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6641
SCIP_Real SCIPsetFeasRound(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6786
SCIP_Bool SCIPsetIsFeasEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6597
SCIP_Bool SCIPsetIsPositive(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6322
SCIP_Bool SCIPsetIsSumRelGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7252
SCIP_Bool SCIPsetIsLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6257
SCIP_Bool SCIPsetIsScalingIntegral(SCIP_SET *set, SCIP_Real val, SCIP_Real scalar)
Definition: set.c:6355
SCIP_Real SCIPsetFeasFloor(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6764
SCIP_Real SCIPsetRelaxfeastol(SCIP_SET *set)
Definition: set.c:6178
SCIP_Bool SCIPsetIsSumLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6466
SCIP_Bool SCIPsetIsDualfeasNegative(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6940
SCIP_Real SCIPsetDualfeastol(SCIP_SET *set)
Definition: set.c:6116
SCIP_Real SCIPsetEpsilon(SCIP_SET *set)
Definition: set.c:6086
SCIP_Bool SCIPsetIsSumRelEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7186
SCIP_Bool SCIPsetIsSumGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6502
SCIP_Bool SCIPsetIsEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6221
SCIP_Bool SCIPsetIsFeasZero(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6707
SCIP_Bool SCIPsetIsSumNegative(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6542
SCIP_Bool SCIPsetIsSumLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6448
SCIP_Bool SCIPsetIsFeasLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6619
SCIP_Real SCIPsetFrac(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6419
SCIP_Bool SCIPsetIsUbBetter(SCIP_SET *set, SCIP_Real newub, SCIP_Real oldlb, SCIP_Real oldub)
Definition: set.c:7043
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
Definition: set.c:6064
SCIP_Real SCIPsetSumepsilon(SCIP_SET *set)
Definition: set.c:6096
SCIP_Bool SCIPsetIsLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6239
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6199
SCIP_Bool SCIPsetIsSumZero(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6520
SCIP_Real SCIPsetDualfeasRound(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6997
SCIP_Bool SCIPsetIsDualfeasIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6951
SCIP_Bool SCIPsetIsRelGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7164
SCIP_Bool SCIPsetIsDualfeasPositive(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6929
SCIP_Bool SCIPsetIsDualfeasEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6808
SCIP_Bool SCIPsetIsDualfeasGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6874
SCIP_Bool SCIPsetIsSumRelLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7208
SCIP_Bool SCIPsetIsRelGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7142
SCIP_Bool SCIPsetIsGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6275
SCIP_Bool SCIPsetIsSumEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6430
SCIP_Bool SCIPsetIsIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6344
SCIP_Real SCIPsetDualfeasFrac(SCIP_SET *set, SCIP_Real val)
Definition: set.c:7008
SCIP_Bool SCIPsetIsZero(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6311
SCIP_Bool SCIPsetIsUpdateUnreliable(SCIP_SET *set, SCIP_Real newvalue, SCIP_Real oldvalue)
Definition: set.c:7316
SCIP_Real SCIPsetDualfeasFloor(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6975
SCIP_Bool SCIPsetIsFracIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6373
SCIP_Real SCIPsetFeasFrac(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6797
SCIP_Real SCIPsetCutoffbounddelta(SCIP_SET *set)
Definition: set.c:6164
SCIP_Bool SCIPsetIsSumRelLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7230
SCIP_Bool SCIPsetIsDualfeasGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6896
SCIP_Bool SCIPsetIsFeasGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6685
SCIP_Real SCIPsetGetHugeValue(SCIP_SET *set)
Definition: set.c:6076
SCIP_Bool SCIPsetIsRelLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:7120
void SCIPsetSetLimitChanged(SCIP_SET *set)
Definition: set.c:5879
SCIP_Real SCIPsetBarrierconvtol(SCIP_SET *set)
Definition: set.c:6134
SCIP_Real SCIPsetRound(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6408
SCIP_Bool SCIPsetIsSumPositive(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6531
SCIP_Bool SCIPsetIsFeasIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6740
SCIP_Bool SCIPsetIsNegative(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6333
internal methods for global SCIP settings
data structures for LP management
SCIP main data structure.
@ SCIP_LPALGO_BARRIER
Definition: type_lp.h:85
@ SCIP_LPALGO_BARRIERCROSSOVER
Definition: type_lp.h:86
@ SCIP_LPSOLSTAT_NOTSOLVED
Definition: type_lp.h:42
@ SCIP_VERBLEVEL_HIGH
Definition: type_message.h:56
@ SCIP_OKAY
Definition: type_retcode.h:42
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63