Scippy

SCIP

Solving Constraint Integer Programs

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 "blockmemshell/memory.h"
#include "scip/cons_knapsack.h"
#include "scip/debug.h"
#include "scip/presol_convertinttobin.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_presol.h"
#include "scip/pub_var.h"
#include "scip/scip_cons.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_presol.h"
#include "scip/scip_prob.h"
#include "scip/scip_var.h"
#include <string.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 55 of file presol_convertinttobin.c.

◆ PRESOL_DESC

#define PRESOL_DESC   "converts integer variables to binaries"

Definition at line 56 of file presol_convertinttobin.c.

◆ PRESOL_PRIORITY

#define PRESOL_PRIORITY   +6000000

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

Definition at line 57 of file presol_convertinttobin.c.

◆ PRESOL_MAXROUNDS

#define PRESOL_MAXROUNDS   0

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

Definition at line 59 of file presol_convertinttobin.c.

◆ PRESOL_TIMING

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

Definition at line 60 of file presol_convertinttobin.c.

◆ DEFAULT_MAXDOMAINSIZE

#define DEFAULT_MAXDOMAINSIZE   SCIP_LONGINT_MAX

absolute value of maximum domain size which will be converted

Definition at line 62 of file presol_convertinttobin.c.

◆ 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 64 of file presol_convertinttobin.c.

◆ DEFAULT_SAMELOCKSINBOTHDIRECTIONS

#define DEFAULT_SAMELOCKSINBOTHDIRECTIONS   FALSE

should only integer variables with uplocks equals downlocks be converted

Definition at line 65 of file presol_convertinttobin.c.

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

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

◆ SCIP_DECL_PRESOLFREE()

static SCIP_DECL_PRESOLFREE ( presolFreeConvertinttobin  )
static

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

Definition at line 95 of file presol_convertinttobin.c.

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

◆ SCIP_DECL_PRESOLEXEC()