Scippy

SCIP

Solving Constraint Integer Programs

type_heur.h File Reference

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"

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_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)
 

Typedefs

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

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 44 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 45 of file type_heur.h.

Referenced by getScore(), getScoreLikeCoefdiving(), SCIP_DECL_CONSGETDIVEBDCHGS(), and selectNextDiving().

◆ SCIP_DIVETYPE_SOS1VARIABLE

#define SCIP_DIVETYPE_SOS1VARIABLE   0x002u

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

Definition at line 46 of file type_heur.h.

Referenced by getDiveBdChgsSOS1conflictgraph(), getDiveBdChgsSOS1constraints(), getScore(), and getScoreLikeCoefdiving().

◆ 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 62 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 70 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 78 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 86 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 97 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 108 of file type_heur.h.

◆ SCIP_DECL_HEUREXEC

#define SCIP_DECL_HEUREXEC (   x)
Value:
SCIP_Bool nodeinfeasible, SCIP_RESULT* result)
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
unsigned int SCIP_HEURTIMING
Definition: type_timing.h:97
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_VAR ** x
Definition: circlepacking.c:54
#define SCIP_Bool
Definition: def.h:69

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 128 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)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
unsigned int SCIP_DIVETYPE
Definition: type_heur.h:48
SCIP_VAR ** x
Definition: circlepacking.c:54
#define SCIP_Bool
Definition: def.h:69
#define SCIP_Real
Definition: def.h:157

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 149 of file type_heur.h.

Typedef Documentation

◆ SCIP_DIVETYPE

typedef unsigned int SCIP_DIVETYPE

Definition at line 48 of file type_heur.h.

◆ SCIP_HEUR

typedef struct SCIP_Heur SCIP_HEUR

primal heuristic

Definition at line 50 of file type_heur.h.

◆ SCIP_HEURDATA

typedef struct SCIP_HeurData SCIP_HEURDATA

locally defined primal heuristic data

Definition at line 51 of file type_heur.h.

◆ SCIP_DIVESET

typedef struct SCIP_Diveset SCIP_DIVESET

common parameters for all diving heuristics

Definition at line 52 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 53 of file type_heur.h.