Scippy

SCIP

Solving Constraint Integer Programs

def.h File Reference

Detailed Description

common defines and data types used in all packages of SCIP

Author
Tobias Achterberg

Definition in file def.h.

#include <stdio.h>
#include <stdint.h>
#include <math.h>
#include <limits.h>
#include <float.h>
#include <assert.h>
#include "scip/type_retcode.h"
#include "scip/pub_message.h"

Go to the source code of this file.

Macros

#define SCIP_Bool   unsigned int
 
#define TRUE   1
 
#define FALSE   0
 
#define EXTERN   extern
 
#define SCIP_VERSION   321
 
#define SCIP_SUBVERSION   0
 
#define SCIP_COPYRIGHT   "Copyright (c) 2002-2016 Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)"
 
#define SCIP_VARTYPE_BINARY_CHAR   'B'
 
#define SCIP_VARTYPE_INTEGER_CHAR   'I'
 
#define SCIP_VARTYPE_IMPLINT_CHAR   'M'
 
#define SCIP_VARTYPE_CONTINUOUS_CHAR   'C'
 
#define SCIP_Longint   long long
 
#define SCIP_LONGINT_MAX   LLONG_MAX
 
#define SCIP_LONGINT_MIN   LLONG_MIN
 
#define SCIP_Real   double
 
#define SCIP_REAL_MAX   (SCIP_Real)DBL_MAX
 
#define SCIP_REAL_MIN   -(SCIP_Real)DBL_MAX
 
#define SCIP_REAL_FORMAT   "lf"
 
#define SCIP_DEFAULT_INFINITY   1e+20
 
#define SCIP_DEFAULT_EPSILON   1e-09
 
#define SCIP_DEFAULT_SUMEPSILON   1e-06
 
#define SCIP_DEFAULT_FEASTOL   1e-06
 
#define SCIP_DEFAULT_CHECKFEASTOLFAC   1.0
 
#define SCIP_DEFAULT_LPFEASTOL   1e-06
 
#define SCIP_DEFAULT_DUALFEASTOL   1e-07
 
#define SCIP_DEFAULT_BARRIERCONVTOL   1e-10
 
#define SCIP_DEFAULT_BOUNDSTREPS   0.05
 
#define SCIP_DEFAULT_PSEUDOCOSTEPS   1e-01
 
#define SCIP_DEFAULT_PSEUDOCOSTDELTA   1e-04
 
#define SCIP_DEFAULT_RECOMPFAC   1e+07
 
#define SCIP_DEFAULT_HUGEVAL   1e+15
 
#define SCIP_MAXEPSILON   1e-03
 
#define SCIP_MINEPSILON   1e-20
 
#define SCIP_INVALID   1e+99
 
#define SCIP_UNKNOWN   1e+98
 
#define REALABS(x)    (fabs(x))
 
#define EPSEQ(x, y, eps)    (REALABS((x)-(y)) <= (eps))
 
#define EPSLT(x, y, eps)    ((x)-(y) < -(eps))
 
#define EPSLE(x, y, eps)    ((x)-(y) <= (eps))
 
#define EPSGT(x, y, eps)    ((x)-(y) > (eps))
 
#define EPSGE(x, y, eps)    ((x)-(y) >= -(eps))
 
#define EPSZ(x, eps)    (REALABS(x) <= (eps))
 
#define EPSP(x, eps)    ((x) > (eps))
 
#define EPSN(x, eps)    ((x) < -(eps))
 
#define EPSFLOOR(x, eps)    (floor((x)+(eps)))
 
#define EPSCEIL(x, eps)    (ceil((x)-(eps)))
 
#define EPSROUND(x, eps)    (ceil((x)-0.5+(eps)))
 
#define EPSFRAC(x, eps)    ((x)-EPSFLOOR(x,eps))
 
#define EPSISINT(x, eps)    (EPSFRAC(x,eps) <= (eps))
 
#define SCIP_MAXSTRLEN   1024
 
#define SCIP_MAXMEMSIZE   (SIZE_MAX/2)
 
#define SCIP_HASHSIZE_PARAMS   4099
 
#define SCIP_HASHSIZE_NAMES   131101
 
#define SCIP_HASHSIZE_CUTPOOLS   131101
 
#define SCIP_HASHSIZE_CLIQUES   131101
 
#define SCIP_HASHSIZE_NAMES_SMALL   8011
 
#define SCIP_HASHSIZE_CUTPOOLS_SMALL   8011
 
#define SCIP_HASHSIZE_CLIQUES_SMALL   8011
 
#define SCIP_HASHSIZE_VBC   131101
 
#define SCIP_DEFAULT_MEM_ARRAYGROWFAC   1.2
 
#define SCIP_DEFAULT_MEM_ARRAYGROWINIT   4
 
#define SCIPABORT()   assert(FALSE)
 
#define SCIP_CALL_ABORT_QUIET(x)   do { if( (x) != SCIP_OKAY ) SCIPABORT(); } while( FALSE )
 
#define SCIP_CALL_QUIET(x)    do { SCIP_RETCODE _restat_; if( (_restat_ = (x)) != SCIP_OKAY ) return _restat_; } while( FALSE )
 
#define SCIP_ALLOC_ABORT_QUIET(x)   do { if( NULL == (x) ) SCIPABORT(); } while( FALSE )
 
#define SCIP_ALLOC_QUIET(x)    do { if( NULL == (x) ) return SCIP_NOMEMORY; } while( FALSE )
 
#define SCIP_CALL_ABORT(x)
 
#define SCIP_ALLOC_ABORT(x)
 
#define SCIP_CALL(x)
 
#define SCIP_ALLOC(x)
 
#define SCIP_CALL_TERMINATE(retcode, x, TERM)
 
#define SCIP_ALLOC_TERMINATE(retcode, x, TERM)
 
#define SCIP_DEPRECATED
 

Macro Definition Documentation

#define EXTERN   extern

Definition at line 75 of file def.h.

#define SCIP_VERSION   321

SCIP version number (multiplied by 100 to get integer number)

Definition at line 89 of file def.h.

#define SCIP_SUBVERSION   0

SCIP sub version number

Definition at line 90 of file def.h.

#define SCIP_COPYRIGHT   "Copyright (c) 2002-2016 Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)"

Definition at line 91 of file def.h.

#define SCIP_VARTYPE_BINARY_CHAR   'B'

Definition at line 98 of file def.h.

#define SCIP_VARTYPE_INTEGER_CHAR   'I'

Definition at line 99 of file def.h.

#define SCIP_VARTYPE_IMPLINT_CHAR   'M'

Definition at line 100 of file def.h.

#define SCIP_VARTYPE_CONTINUOUS_CHAR   'C'

Definition at line 101 of file def.h.

#define SCIP_Longint   long long

type used for long integer values

Definition at line 112 of file def.h.

#define SCIP_LONGINT_MAX   LLONG_MAX

Definition at line 113 of file def.h.

#define SCIP_LONGINT_MIN   LLONG_MIN

Definition at line 114 of file def.h.

#define SCIP_REAL_MAX   (SCIP_Real)DBL_MAX

Definition at line 128 of file def.h.

#define SCIP_REAL_MIN   -(SCIP_Real)DBL_MAX

Definition at line 129 of file def.h.

#define SCIP_REAL_FORMAT   "lf"

Definition at line 130 of file def.h.

#define SCIP_DEFAULT_INFINITY   1e+20

default value considered to be infinity

Definition at line 132 of file def.h.

#define SCIP_DEFAULT_EPSILON   1e-09

default upper bound for floating points to be considered zero

Definition at line 133 of file def.h.

#define SCIP_DEFAULT_SUMEPSILON   1e-06

default upper bound for sums of floating points to be considered zero

Definition at line 134 of file def.h.

#define SCIP_DEFAULT_FEASTOL   1e-06

default feasibility tolerance for constraints

Definition at line 135 of file def.h.

#define SCIP_DEFAULT_CHECKFEASTOLFAC   1.0

default factor to change the feasibility tolerance when testing the best solution for feasibility (after solving process)

Definition at line 136 of file def.h.

#define SCIP_DEFAULT_LPFEASTOL   1e-06

default primal feasibility tolerance of LP solver

Definition at line 137 of file def.h.

#define SCIP_DEFAULT_DUALFEASTOL   1e-07

default feasibility tolerance for reduced costs

Definition at line 138 of file def.h.

#define SCIP_DEFAULT_BARRIERCONVTOL   1e-10

default convergence tolerance used in barrier algorithm

Definition at line 139 of file def.h.

#define SCIP_DEFAULT_BOUNDSTREPS   0.05

default minimal relative improve for strengthening bounds

Definition at line 140 of file def.h.

#define SCIP_DEFAULT_PSEUDOCOSTEPS   1e-01

default minimal variable distance value to use for pseudo cost updates

Definition at line 141 of file def.h.

#define SCIP_DEFAULT_PSEUDOCOSTDELTA   1e-04

default minimal objective distance value to use for pseudo cost updates

Definition at line 142 of file def.h.

#define SCIP_DEFAULT_RECOMPFAC   1e+07

default minimal decrease factor that causes the recomputation of a value (e.g., pseudo objective) instead of an update

Definition at line 143 of file def.h.

#define SCIP_DEFAULT_HUGEVAL   1e+15

values larger than this are considered huge and should be handled separately (e.g., in activity computation)

Definition at line 144 of file def.h.

#define SCIP_MAXEPSILON   1e-03

maximum value for any numerical epsilon

Definition at line 145 of file def.h.

#define SCIP_MINEPSILON   1e-20

minimum value for any numerical epsilon

Definition at line 146 of file def.h.

#define SCIP_INVALID   1e+99

floating point value is not valid

Definition at line 147 of file def.h.

Referenced by SCIPlpiGetRealSolQuality(), and SCIPlpiIsStable().

#define SCIP_UNKNOWN   1e+98

floating point value is not known (in primal solution)

Definition at line 148 of file def.h.

#define REALABS (   x)    (fabs(x))

Definition at line 151 of file def.h.

Referenced by atomic_signpower< Type >::atomic_signpower(), and SCIPlpiSetState().

#define EPSEQ (   x,
  y,
  eps 
)    (REALABS((x)-(y)) <= (eps))

Definition at line 152 of file def.h.

Referenced by SCIPlpiEndStrongbranch(), and SCIPlpiSetBase().

#define EPSLT (   x,
  y,
  eps 
)    ((x)-(y) < -(eps))

Definition at line 153 of file def.h.

#define EPSLE (   x,
  y,
  eps 
)    ((x)-(y) <= (eps))

Definition at line 154 of file def.h.

#define EPSGT (   x,
  y,
  eps 
)    ((x)-(y) > (eps))

Definition at line 155 of file def.h.

#define EPSGE (   x,
  y,
  eps 
)    ((x)-(y) >= -(eps))

Definition at line 156 of file def.h.

#define EPSZ (   x,
  eps 
)    (REALABS(x) <= (eps))

Definition at line 157 of file def.h.

Referenced by SCIPlpiChgBounds().

#define EPSP (   x,
  eps 
)    ((x) > (eps))

Definition at line 158 of file def.h.

#define EPSN (   x,
  eps 
)    ((x) < -(eps))

Definition at line 159 of file def.h.

#define EPSFLOOR (   x,
  eps 
)    (floor((x)+(eps)))

Definition at line 160 of file def.h.

Referenced by SCIPlpiEndStrongbranch(), and SCIPlpiSolveBarrier().

#define EPSCEIL (   x,
  eps 
)    (ceil((x)-(eps)))

Definition at line 161 of file def.h.

Referenced by SCIPlpiEndStrongbranch(), and SCIPlpiSolveBarrier().

#define EPSROUND (   x,
  eps 
)    (ceil((x)-0.5+(eps)))

Definition at line 162 of file def.h.

#define EPSFRAC (   x,
  eps 
)    ((x)-EPSFLOOR(x,eps))

Definition at line 163 of file def.h.

#define EPSISINT (   x,
  eps 
)    (EPSFRAC(x,eps) <= (eps))
#define SCIP_MAXSTRLEN   1024

maximum string length in SCIP

Definition at line 201 of file def.h.

Referenced by SCIPlpiWriteState().

#define SCIP_MAXMEMSIZE   (SIZE_MAX/2)

maximum size of allocated memory (array)

Definition at line 208 of file def.h.

#define SCIP_HASHSIZE_PARAMS   4099

size of hash table in parameter name tables

Definition at line 210 of file def.h.

#define SCIP_HASHSIZE_NAMES   131101

size of hash table in name tables

Definition at line 211 of file def.h.

#define SCIP_HASHSIZE_CUTPOOLS   131101

size of hash table in cut pools

Definition at line 212 of file def.h.

#define SCIP_HASHSIZE_CLIQUES   131101

size of hash table in clique tables

Definition at line 213 of file def.h.

#define SCIP_HASHSIZE_NAMES_SMALL   8011

size of hash table in name tables for small problems

Definition at line 214 of file def.h.

#define SCIP_HASHSIZE_CUTPOOLS_SMALL   8011

size of hash table in cut pools for small problems

Definition at line 215 of file def.h.

#define SCIP_HASHSIZE_CLIQUES_SMALL   8011

size of hash table in clique tables for small problems

Definition at line 216 of file def.h.

#define SCIP_HASHSIZE_VBC   131101

size of hash map for node -> nodenum mapping used for VBC output

Definition at line 217 of file def.h.

#define SCIP_DEFAULT_MEM_ARRAYGROWFAC   1.2

memory growing factor for dynamically allocated arrays

Definition at line 219 of file def.h.

#define SCIP_DEFAULT_MEM_ARRAYGROWINIT   4

initial size of dynamically allocated arrays

Definition at line 220 of file def.h.

#define SCIPABORT ( )    assert(FALSE)

this macro is used to stop SCIP in debug mode such that errors can be debugged;

Note
In optimized mode this macro has no effect. That means, in case of an error it has to be ensured that code terminates with an error code or continues safely.

Definition at line 238 of file def.h.

Referenced by SCIPlpiGetBase(), SCIPlpiGetRealSolQuality(), SCIPlpiGetRows(), SCIPlpiGetSides(), SCIPlpiGetSol(), SCIPlpiIsStable(), SCIPlpiSetBase(), SCIPlpiSetIntpar(), and SCIPlpiSetState().

#define SCIP_CALL_ABORT_QUIET (   x)    do { if( (x) != SCIP_OKAY ) SCIPABORT(); } while( FALSE )

Definition at line 240 of file def.h.

#define SCIP_CALL_QUIET (   x)    do { SCIP_RETCODE _restat_; if( (_restat_ = (x)) != SCIP_OKAY ) return _restat_; } while( FALSE )
#define SCIP_ALLOC_ABORT_QUIET (   x)    do { if( NULL == (x) ) SCIPABORT(); } while( FALSE )

Definition at line 242 of file def.h.

#define SCIP_ALLOC_QUIET (   x)    do { if( NULL == (x) ) return SCIP_NOMEMORY; } while( FALSE )

Definition at line 243 of file def.h.

#define SCIP_CALL_ABORT (   x)
#define SCIP_ALLOC_ABORT (   x)
Value:
do \
{ \
if( NULL == (x) ) \
{ \
SCIPerrorMessage("No memory in function call\n", __FILE__, __LINE__); \
SCIPABORT(); \
} \
} \
while( FALSE )
#define NULL
Definition: lpi_spx.cpp:130
#define FALSE
Definition: def.h:56

Definition at line 256 of file def.h.

#define SCIP_CALL_TERMINATE (   retcode,
  x,
  TERM 
)
Value:
do \
{ \
if( ((retcode) = (x)) != SCIP_OKAY ) \
{ \
SCIPerrorMessage("Error <%d> in function call\n", retcode); \
goto TERM; \
} \
} \
while( FALSE )
#define FALSE
Definition: def.h:56

Definition at line 287 of file def.h.

#define SCIP_ALLOC_TERMINATE (   retcode,
  x,
  TERM 
)
Value:
do \
{ \
if( NULL == (x) ) \
{ \
SCIPerrorMessage("No memory in function call\n"); \
retcode = SCIP_NOMEMORY; \
goto TERM; \
} \
} \
while( FALSE )
#define NULL
Definition: lpi_spx.cpp:130
#define FALSE
Definition: def.h:56

Definition at line 297 of file def.h.

#define SCIP_DEPRECATED

Definition at line 318 of file def.h.