Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

type definitions for primal heuristics

Author
Tobias Achterberg
Timo Berthold

This file defines the interface for primal heuristics implemented in C.

Definition in file type_heur.h.

#include "scip/def.h"
#include "scip/type_scip.h"
#include "scip/type_result.h"
#include "scip/type_timing.h"
#include "scip/type_var.h"

Go to the source code of this file.

Macros

#define SCIP_DIVETYPE_NONE   0x000u
 
#define SCIP_DIVETYPE_INTEGRALITY   0x001u
 
#define SCIP_DIVETYPE_SOS1VARIABLE   0x002u
 
#define SCIP_HEURDISPCHAR_LNS   'L'
 
#define SCIP_HEURDISPCHAR_DIVING   'd'
 
#define SCIP_HEURDISPCHAR_ITERATIVE   'i'
 
#define SCIP_HEURDISPCHAR_OBJDIVING   'o'
 
#define SCIP_HEURDISPCHAR_PROP   'p'
 
#define SCIP_HEURDISPCHAR_ROUNDING   'r'
 
#define SCIP_HEURDISPCHAR_TRIVIAL   't'
 
#define SCIP_DECL_HEURCOPY(x)   SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)
 
#define SCIP_DECL_HEURFREE(x)   SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)
 
#define SCIP_DECL_HEURINIT(x)   SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)
 
#define SCIP_DECL_HEUREXIT(x)   SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)
 
#define SCIP_DECL_HEURINITSOL(x)   SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)
 
#define SCIP_DECL_HEUREXITSOL(x)   SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)
 
#define SCIP_DECL_HEUREXEC(x)
 
#define SCIP_DECL_DIVESETGETSCORE(x)
 
#define SCIP_DECL_DIVESETAVAILABLE(x)   SCIP_RETCODE x (SCIP* scip, SCIP_DIVESET* diveset, SCIP_Bool* available)
 

Typedefs

typedef unsigned int SCIP_DIVETYPE
 
typedef enum SCIP_DiveContext SCIP_DIVECONTEXT
 
typedef struct SCIP_Heur SCIP_HEUR
 
typedef struct SCIP_HeurData SCIP_HEURDATA
 
typedef struct SCIP_Diveset SCIP_DIVESET
 
typedef struct SCIP_VGraph SCIP_VGRAPH
 

Enumerations

enum  SCIP_DiveContext {
  SCIP_DIVECONTEXT_TOTAL = 0 ,
  SCIP_DIVECONTEXT_SINGLE = 1 ,
  SCIP_DIVECONTEXT_ADAPTIVE = 2 ,
  SCIP_DIVECONTEXT_SCHEDULER = 3
}
 

Macro Definition Documentation

◆ SCIP_DIVETYPE_NONE

#define SCIP_DIVETYPE_NONE   0x000u

represents different methods for a dive set to explore the next children no method specified

Definition at line 59 of file type_heur.h.

◆ SCIP_DIVETYPE_INTEGRALITY

#define SCIP_DIVETYPE_INTEGRALITY   0x001u

use branching on a variable by shrinking the domain in the child nodes

Definition at line 60 of file type_heur.h.

◆ SCIP_DIVETYPE_SOS1VARIABLE

#define SCIP_DIVETYPE_SOS1VARIABLE   0x002u

branch on a variable solution value by exploiting special-ordered set conflict structure

Definition at line 61 of file type_heur.h.

◆ SCIP_HEURDISPCHAR_LNS

#define SCIP_HEURDISPCHAR_LNS   'L'

commonly used display characters indicating special classes of primal heuristics a 'L'arge Neighborhood or other local search heuristic

Definition at line 83 of file type_heur.h.

◆ SCIP_HEURDISPCHAR_DIVING

#define SCIP_HEURDISPCHAR_DIVING   'd'

a 'd'iving heuristic that dives down an auxiliary branch-and-bound path

Definition at line 84 of file type_heur.h.

◆ SCIP_HEURDISPCHAR_ITERATIVE

#define SCIP_HEURDISPCHAR_ITERATIVE   'i'

an iterative improvement heuristic such as 1-opt or 2-opt

Definition at line 85 of file type_heur.h.

◆ SCIP_HEURDISPCHAR_OBJDIVING

#define SCIP_HEURDISPCHAR_OBJDIVING   'o'

an 'o'bjective diving or feasibility pump heuristic

Definition at line 86 of file type_heur.h.

◆ SCIP_HEURDISPCHAR_PROP

#define SCIP_HEURDISPCHAR_PROP   'p'

a 'p'ropagation heuristic, often applied before branch-and-bound starts

Definition at line 87 of file type_heur.h.

◆ SCIP_HEURDISPCHAR_ROUNDING

#define SCIP_HEURDISPCHAR_ROUNDING   'r'

a 'r'ounding heuristic that iteratively tries to round an LP or relaxation solution

Definition at line 88 of file type_heur.h.

◆ SCIP_HEURDISPCHAR_TRIVIAL

#define SCIP_HEURDISPCHAR_TRIVIAL   't'

a 't'rivial or helper heuristic, usually applied before branch-and-bound starts

Definition at line 89 of file type_heur.h.

◆ SCIP_DECL_HEURCOPY

#define SCIP_DECL_HEURCOPY (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)

copy method for heuristic plugins (called when SCIP copies plugins)

input:

  • scip : SCIP main data structure
  • heur : the primal heuristic itself

Definition at line 97 of file type_heur.h.

◆ SCIP_DECL_HEURFREE

#define SCIP_DECL_HEURFREE (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)

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

input:

  • scip : SCIP main data structure
  • heur : the primal heuristic itself

Definition at line 105 of file type_heur.h.

◆ SCIP_DECL_HEURINIT

#define SCIP_DECL_HEURINIT (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)

initialization method of primal heuristic (called after problem was transformed)

input:

  • scip : SCIP main data structure
  • heur : the primal heuristic itself

Definition at line 113 of file type_heur.h.

◆ SCIP_DECL_HEUREXIT

#define SCIP_DECL_HEUREXIT (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)

deinitialization method of primal heuristic (called before transformed problem is freed)

input:

  • scip : SCIP main data structure
  • heur : the primal heuristic itself

Definition at line 121 of file type_heur.h.

◆ SCIP_DECL_HEURINITSOL

#define SCIP_DECL_HEURINITSOL (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)

solving process initialization method of primal heuristic (called when branch and bound process is about to begin)

This method is called when the presolving was finished and the branch and bound process is about to begin. The primal heuristic may use this call to initialize its branch and bound specific data.

input:

  • scip : SCIP main data structure
  • heur : the primal heuristic itself

Definition at line 132 of file type_heur.h.

◆ SCIP_DECL_HEUREXITSOL

#define SCIP_DECL_HEUREXITSOL (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur)

solving process deinitialization method of primal heuristic (called before branch and bound process data is freed)

This method is called before the branch and bound process is freed. The primal heuristic should use this call to clean up its branch and bound data.

input:

  • scip : SCIP main data structure
  • heur : the primal heuristic itself

Definition at line 143 of file type_heur.h.

◆ SCIP_DECL_HEUREXEC

#define SCIP_DECL_HEUREXEC (   x)
Value:
SCIP_RETCODE x (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, \
SCIP_Bool nodeinfeasible, SCIP_RESULT* result)
SCIP_VAR ** x
Definition: circlepacking.c:63
#define SCIP_Bool
Definition: def.h:91
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:61
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
unsigned int SCIP_HEURTIMING
Definition: type_timing.h:101

execution method of primal heuristic

Searches for feasible primal solutions. The method is called in the node processing loop.

input:

  • scip : SCIP main data structure
  • heur : the primal heuristic itself
  • heurtiming : current point in the node solving loop
  • nodeinfeasible : was the current node already detected to be infeasible?
  • result : pointer to store the result of the heuristic call

possible return values for *result:

  • SCIP_FOUNDSOL : at least one feasible primal solution was found
  • SCIP_DIDNOTFIND : the heuristic searched, but did not find a feasible solution
  • SCIP_DIDNOTRUN : the heuristic was skipped
  • SCIP_DELAYED : the heuristic was skipped, but should be called again as soon as possible, disregarding its frequency

Definition at line 163 of file type_heur.h.

◆ SCIP_DECL_DIVESETGETSCORE

#define SCIP_DECL_DIVESETGETSCORE (   x)
Value:
SCIP_DIVETYPE divetype, SCIP_VAR* cand, SCIP_Real candsol, SCIP_Real candsfrac, SCIP_Real* score, SCIP_Bool* roundup)
#define SCIP_Real
Definition: def.h:173
unsigned int SCIP_DIVETYPE
Definition: type_heur.h:63

calculate score and preferred rounding direction for the candidate variable; the best candidate maximizes the score

input:

  • scip : SCIP main data structure
  • diveset : diving settings for scoring
  • divetype : represents different methods for a dive set to explore the next children
  • cand : candidate variable for which the score should be determined
  • candsol : solution value of variable in LP relaxation solution
  • candsfrac : fractional part of solution value of variable
  • score : pointer for diving score value - the best candidate maximizes this score
  • roundup : pointer to store whether the preferred rounding direction is upwards

returns SCIP_OKAY if everything worked, otherwise, a suitable error code

Definition at line 184 of file type_heur.h.

◆ SCIP_DECL_DIVESETAVAILABLE

#define SCIP_DECL_DIVESETAVAILABLE (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_DIVESET* diveset, SCIP_Bool* available)

optional callback to check preconditions for diving, e.g., if an incumbent solution is available

input:

  • scip : SCIP main data structure
  • diveset : diving settings for scoring

output:

  • available : TRUE if diveset can run, otherwise FALSE

returns SCIP_OKAY if everything worked, otherwise, a suitable error code

Definition at line 199 of file type_heur.h.

Typedef Documentation

◆ SCIP_DIVETYPE

typedef unsigned int SCIP_DIVETYPE

Definition at line 63 of file type_heur.h.

◆ SCIP_DIVECONTEXT

Definition at line 73 of file type_heur.h.

◆ SCIP_HEUR

typedef struct SCIP_Heur SCIP_HEUR

primal heuristic

Definition at line 76 of file type_heur.h.

◆ SCIP_HEURDATA

typedef struct SCIP_HeurData SCIP_HEURDATA

locally defined primal heuristic data

Definition at line 77 of file type_heur.h.

◆ SCIP_DIVESET

typedef struct SCIP_Diveset SCIP_DIVESET

common parameters for all diving heuristics

Definition at line 78 of file type_heur.h.

◆ SCIP_VGRAPH

typedef struct SCIP_VGraph SCIP_VGRAPH

variable graph data structure to determine breadth-first distances between variables

Definition at line 79 of file type_heur.h.

Enumeration Type Documentation

◆ SCIP_DiveContext

context for diving statistics

Enumerator
SCIP_DIVECONTEXT_TOTAL 

all contexts combined

SCIP_DIVECONTEXT_SINGLE 

single heuristic context

SCIP_DIVECONTEXT_ADAPTIVE 

within adaptive diving

SCIP_DIVECONTEXT_SCHEDULER 

within the scheduler heuristic

Definition at line 66 of file type_heur.h.