1 /* $Id$ 2 * 3 * Name: CouennePrecisions.hpp 4 * Author: Pietro Belotti 5 * Purpose: constants for evaluation procedures 6 * 7 * (C) Carnegie-Mellon University, 2006-10. 8 * This file is licensed under the Eclipse Public License (EPL) 9 */ 10 11 #ifndef COUENNE_PRECISIONS_HPP 12 #define COUENNE_PRECISIONS_HPP 13 14 #include <math.h> 15 16 namespace Couenne { 17 18 // must be >= 1e-7 19 #define COUENNE_EPS 1.e-07 20 21 // to be used in bounds tightening to avoid node pruning due to strict COUENNE_EPS tolerance 22 #define COUENNE_BOUND_PREC 1.e-5 23 24 // for integrality check 25 #define COUENNE_EPS_INT 1.e-9 26 27 // for simplification 28 #define COUENNE_EPS_SIMPL 1.e-20 29 30 // for bounds 31 #ifndef COUENNE_INFINITY 32 #define COUENNE_INFINITY 1.e+50 33 #endif 34 35 // for cuts, ensures stability and scaling in Clp 36 #define COU_MAX_COEFF 1.e+9 37 38 // for cuts, ditto 39 #define COU_MIN_COEFF 1.e-9 40 41 // rounds to nearest integer 42 #define COUENNE_round(x) ((int) (floor ((x) + 0.5))) 43 44 // sign of a value 45 #define COUENNE_sign(x) ((x) > 0.0 ? 1.0 : -1.0) 46 47 #define MAX_BOUND 1.e45 48 49 /// used to declare LP unbounded 50 const double Couenne_large_bound = 9.999e12; 51 52 } 53 54 #endif 55