Scippy

SCIP

Solving Constraint Integer Programs

presol_convertinttobin.c File Reference

Detailed Description

presolver that converts integer variables to binaries

Author
Michael Winkler

Converts integer variables at the beginning of Presolving into their binary representation. If necessary adds a bounding knapsack constraint.

Definition in file presol_convertinttobin.c.

#include <assert.h>
#include <string.h>
#include "scip/presol_convertinttobin.h"
#include "scip/cons_knapsack.h"
#include "scip/pub_misc.h"

Go to the source code of this file.

Macros

#define PRESOL_NAME   "convertinttobin"
 
#define PRESOL_DESC   "converts integer variables to binaries"
 
#define PRESOL_PRIORITY   +6000000
 
#define PRESOL_MAXROUNDS   0
 
#define PRESOL_DELAY   FALSE
 
#define DEFAULT_MAXDOMAINSIZE   SCIP_LONGINT_MAX
 
#define DEFAULT_ONLYPOWERSOFTWO   FALSE
 
#define DEFAULT_SAMELOCKSINBOTHDIRECTIONS   FALSE
 

Functions

static SCIP_DECL_PRESOLCOPY (presolCopyConvertinttobin)
 
static SCIP_DECL_PRESOLFREE (presolFreeConvertinttobin)
 
static SCIP_DECL_PRESOLEXEC (presolExecConvertinttobin)
 
SCIP_RETCODE SCIPincludePresolConvertinttobin (SCIP *scip)
 

Macro Definition Documentation

#define PRESOL_NAME   "convertinttobin"
#define PRESOL_DESC   "converts integer variables to binaries"

Definition at line 37 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

#define PRESOL_PRIORITY   +6000000

priority of the presolver (>= 0: before, < 0: after constraint handlers)

Definition at line 38 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

#define PRESOL_MAXROUNDS   0

maximal number of presolving rounds the presolver participates in (-1: no limit)

Definition at line 39 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

#define PRESOL_DELAY   FALSE

should presolver be delayed, if other presolvers found reductions?

Definition at line 41 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

#define DEFAULT_MAXDOMAINSIZE   SCIP_LONGINT_MAX

absolute value of maximum domain size which will be converted

Definition at line 43 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

#define DEFAULT_ONLYPOWERSOFTWO   FALSE

should only integer variables with a domain size of 2^p - 1 be converted(, there we don't need an knapsack-constraint)

Definition at line 44 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

#define DEFAULT_SAMELOCKSINBOTHDIRECTIONS   FALSE

should only integer variables with uplocks equals downlocks be converted

Definition at line 46 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

Function Documentation

static SCIP_DECL_PRESOLCOPY ( presolCopyConvertinttobin  )
static

copy method for constraint handler plugins (called when SCIP copies plugins)

Definition at line 62 of file presol_convertinttobin.c.

References NULL, PRESOL_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludePresolConvertinttobin(), and SCIPpresolGetName().

static SCIP_DECL_PRESOLFREE ( presolFreeConvertinttobin  )
static

destructor of presolver to free user data (called when SCIP is exiting)

Definition at line 76 of file presol_convertinttobin.c.

References NULL, SCIP_OKAY, SCIPfreeMemory, SCIPpresolGetData(), and SCIPpresolSetData().