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_TIMING   SCIP_PRESOLTIMING_FAST /* timing of the presolver (fast, medium, or exhaustive) */
 
#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

◆ PRESOL_NAME

#define PRESOL_NAME   "convertinttobin"

Definition at line 36 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

◆ PRESOL_DESC

#define PRESOL_DESC   "converts integer variables to binaries"

Definition at line 37 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

◆ PRESOL_PRIORITY

#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().

◆ PRESOL_MAXROUNDS

#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().

◆ PRESOL_TIMING

#define PRESOL_TIMING   SCIP_PRESOLTIMING_FAST /* timing of the presolver (fast, medium, or exhaustive) */

Definition at line 42 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

◆ DEFAULT_MAXDOMAINSIZE

#define DEFAULT_MAXDOMAINSIZE   SCIP_LONGINT_MAX

absolute value of maximum domain size which will be converted

Definition at line 44 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

◆ DEFAULT_ONLYPOWERSOFTWO

#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 45 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

◆ DEFAULT_SAMELOCKSINBOTHDIRECTIONS

#define DEFAULT_SAMELOCKSINBOTHDIRECTIONS   FALSE

should only integer variables with uplocks equals downlocks be converted

Definition at line 48 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

Function Documentation

◆ SCIP_DECL_PRESOLCOPY()

static SCIP_DECL_PRESOLCOPY ( presolCopyConvertinttobin  )
static

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

Definition at line 64 of file presol_convertinttobin.c.

◆ SCIP_DECL_PRESOLFREE()

static SCIP_DECL_PRESOLFREE ( presolFreeConvertinttobin  )
static

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

Definition at line 78 of file presol_convertinttobin.c.

◆ SCIP_DECL_PRESOLEXEC()

static SCIP_DECL_PRESOLEXEC ( presolExecConvertinttobin  )
static

presolving execution method

Definition at line 94 of file presol_convertinttobin.c.