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 "blockmemshell/memory.h"
#include "scip/cons_knapsack.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 45 of file presol_convertinttobin.c.

Referenced by SCIPincludePresolConvertinttobin().

◆ PRESOL_DESC

#define PRESOL_DESC   "converts integer variables to binaries"

Definition at line 46 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 47 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 48 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 51 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 53 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 54 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 57 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 73 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 87 of file presol_convertinttobin.c.

◆ SCIP_DECL_PRESOLEXEC()

static SCIP_DECL_PRESOLEXEC ( presolExecConvertinttobin  )
static

presolving execution method

Definition at line 103 of file presol_convertinttobin.c.