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 <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   311
 
#define SCIP_SUBVERSION   0
 
#define SCIP_COPYRIGHT   "Copyright (c) 2002-2014 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_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_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 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_DEPRECATED
 

Macro Definition Documentation

#define SCIP_Bool   unsigned int
#define EXTERN   extern

Definition at line 71 of file def.h.

#define SCIP_VERSION   311

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

Definition at line 84 of file def.h.

#define SCIP_SUBVERSION   0

SCIP sub version number

Definition at line 85 of file def.h.

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

Definition at line 86 of file def.h.

#define SCIP_VARTYPE_BINARY_CHAR   'B'

Definition at line 93 of file def.h.

#define SCIP_VARTYPE_INTEGER_CHAR   'I'

Definition at line 94 of file def.h.

#define SCIP_VARTYPE_IMPLINT_CHAR   'M'

Definition at line 95 of file def.h.

#define SCIP_VARTYPE_CONTINUOUS_CHAR   'C'

Definition at line 96 of file def.h.

#define SCIP_Longint   long long

type used for long integer values

Definition at line 107 of file def.h.

#define SCIP_LONGINT_MAX   LLONG_MAX

Definition at line 108 of file def.h.

#define SCIP_LONGINT_MIN   LLONG_MIN

Definition at line 109 of file def.h.

#define SCIP_REAL_MAX   (SCIP_Real)DBL_MAX

Definition at line 124 of file def.h.

#define SCIP_REAL_MIN   -(SCIP_Real)DBL_MAX

Definition at line 125 of file def.h.

#define SCIP_REAL_FORMAT   "lf"

Definition at line 126 of file def.h.

#define SCIP_DEFAULT_INFINITY   1e+20

default value considered to be infinity

Definition at line 128 of file def.h.

#define SCIP_DEFAULT_EPSILON   1e-09

default upper bound for floating points to be considered zero

Definition at line 129 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 130 of file def.h.

#define SCIP_DEFAULT_FEASTOL   1e-06

default feasibility tolerance for constraints

Definition at line 131 of file def.h.

#define SCIP_DEFAULT_LPFEASTOL   1e-06

default primal feasibility tolerance of LP solver

Definition at line 132 of file def.h.

#define SCIP_DEFAULT_DUALFEASTOL   1e-07

default feasibility tolerance for reduced costs

Definition at line 133 of file def.h.

#define SCIP_DEFAULT_BARRIERCONVTOL   1e-10

default convergence tolerance used in barrier algorithm

Definition at line 134 of file def.h.

#define SCIP_DEFAULT_BOUNDSTREPS   0.05

default minimal relative improve for strengthening bounds

Definition at line 135 of file def.h.

#define SCIP_DEFAULT_PSEUDOCOSTEPS   1e-01

default minimal variable distance value to use for pseudo cost updates

Definition at line 136 of file def.h.

#define SCIP_DEFAULT_PSEUDOCOSTDELTA   1e-04

default minimal objective distance value to use for pseudo cost updates

Definition at line 137 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 138 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 139 of file def.h.

#define SCIP_MAXEPSILON   1e-03

maximum value for any numerical epsilon

Definition at line 140 of file def.h.

#define SCIP_MINEPSILON   1e-20

minimum value for any numerical epsilon

Definition at line 141 of file def.h.

#define SCIP_INVALID   1e+99

floating point value is not valid

Definition at line 142 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 143 of file def.h.

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

Definition at line 146 of file def.h.

Referenced by SCIPlpiSetState().

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

Definition at line 147 of file def.h.

Referenced by SCIPlpiSetBase().

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

Definition at line 148 of file def.h.

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

Definition at line 149 of file def.h.

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

Definition at line 150 of file def.h.

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

Definition at line 151 of file def.h.

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

Definition at line 152 of file def.h.

Referenced by SCIPlpiChgBounds().

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

Definition at line 153 of file def.h.

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

Definition at line 154 of file def.h.

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

Definition at line 155 of file def.h.

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

Definition at line 156 of file def.h.

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

Definition at line 157 of file def.h.

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

Definition at line 158 of file def.h.

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

maximum string length in SCIP

Definition at line 196 of file def.h.

Referenced by SCIPlpiWriteState().

#define SCIP_HASHSIZE_PARAMS   4099

size of hash table in parameter name tables

Definition at line 202 of file def.h.

#define SCIP_HASHSIZE_NAMES   131101

size of hash table in name tables

Definition at line 203 of file def.h.

#define SCIP_HASHSIZE_CUTPOOLS   131101

size of hash table in cut pools

Definition at line 204 of file def.h.

#define SCIP_HASHSIZE_CLIQUES   131101

size of hash table in clique tables

Definition at line 205 of file def.h.

#define SCIP_HASHSIZE_NAMES_SMALL   8011

size of hash table in name tables for small problems

Definition at line 206 of file def.h.

#define SCIP_HASHSIZE_CUTPOOLS_SMALL   8011

size of hash table in cut pools for small problems

Definition at line 207 of file def.h.

#define SCIP_HASHSIZE_CLIQUES_SMALL   8011

size of hash table in clique tables for small problems

Definition at line 208 of file def.h.

#define SCIP_HASHSIZE_VBC   131101

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

Definition at line 209 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 230 of file def.h.

Referenced by SCIPlpiGetBase(), 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 232 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 234 of file def.h.

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

Definition at line 235 of file def.h.

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

Definition at line 248 of file def.h.

#define SCIP_DEPRECATED

Definition at line 288 of file def.h.