Scippy

SCIP

Solving Constraint Integer Programs

pub_heur.h File Reference

Detailed Description

public methods for primal heuristics

Author
Tobias Achterberg

Definition in file pub_heur.h.

#include "scip/def.h"
#include "scip/type_misc.h"
#include "scip/type_heur.h"

Go to the source code of this file.

Functions

 SCIP_DECL_SORTPTRCOMP (SCIPheurComp)
 
 SCIP_DECL_SORTPTRCOMP (SCIPheurCompName)
 
SCIP_HEURDATASCIPheurGetData (SCIP_HEUR *heur)
 
void SCIPheurSetData (SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)
 
const char * SCIPheurGetName (SCIP_HEUR *heur)
 
const char * SCIPheurGetDesc (SCIP_HEUR *heur)
 
char SCIPheurGetDispchar (SCIP_HEUR *heur)
 
SCIP_HEURTIMING SCIPheurGetTimingmask (SCIP_HEUR *heur)
 
void SCIPheurSetTimingmask (SCIP_HEUR *heur, SCIP_HEURTIMING timingmask)
 
SCIP_Bool SCIPheurUsesSubscip (SCIP_HEUR *heur)
 
int SCIPheurGetPriority (SCIP_HEUR *heur)
 
int SCIPheurGetFreq (SCIP_HEUR *heur)
 
void SCIPheurSetFreq (SCIP_HEUR *heur, int freq)
 
int SCIPheurGetFreqofs (SCIP_HEUR *heur)
 
int SCIPheurGetMaxdepth (SCIP_HEUR *heur)
 
SCIP_Longint SCIPheurGetNCalls (SCIP_HEUR *heur)
 
SCIP_Longint SCIPheurGetNSolsFound (SCIP_HEUR *heur)
 
SCIP_Longint SCIPheurGetNBestSolsFound (SCIP_HEUR *heur)
 
SCIP_Bool SCIPheurIsInitialized (SCIP_HEUR *heur)
 
SCIP_Real SCIPheurGetSetupTime (SCIP_HEUR *heur)
 
SCIP_Real SCIPheurGetTime (SCIP_HEUR *heur)
 

Function Documentation

SCIP_DECL_SORTPTRCOMP ( SCIPheurComp  )

compares two heuristics w. r. to their priority

compares two heuristics w. r. to their delay positions and their priority

Definition at line 42 of file heur.c.

References SCIP_Heur::delaypos, SCIP_Heur::freq, SCIP_Heur::ncalls, NULL, and SCIP_Heur::priority.

SCIP_DECL_SORTPTRCOMP ( SCIPheurCompName  )

comparison method for sorting heuristics w.r.t. to their name

Definition at line 66 of file heur.c.

References SCIPheurGetName().

void SCIPheurSetData ( SCIP_HEUR heur,
SCIP_HEURDATA heurdata 
)

sets user data of primal heuristic; user has to free old data in advance!

Parameters
heurprimal heuristic
heurdatanew primal heuristic user data

Definition at line 512 of file heur.c.

References SCIP_Heur::heurdata, and NULL.

Referenced by presolveTwoOpt(), SCIP_DECL_HEUREXIT(), SCIP_DECL_HEUREXITSOL(), SCIP_DECL_HEURFREE(), SCIP_DECL_HEURINIT(), and SCIP_DECL_HEURINITSOL().

const char* SCIPheurGetDesc ( SCIP_HEUR heur)

gets description of primal heuristic

Parameters
heurprimal heuristic

Definition at line 601 of file heur.c.

References SCIP_Heur::desc, and NULL.

Referenced by SCIP_DECL_DIALOGEXEC(), SCIPincludeDialogDefaultFix(), and SCIPincludeDialogDefaultSet().

char SCIPheurGetDispchar ( SCIP_HEUR heur)

gets display character of primal heuristic

Parameters
heurprimal heuristic

Definition at line 611 of file heur.c.

References SCIP_Heur::dispchar, and NULL.

Referenced by SCIP_DECL_DIALOGEXEC(), and SCIP_DECL_DISPOUTPUT().

SCIP_HEURTIMING SCIPheurGetTimingmask ( SCIP_HEUR heur)

returns the timing mask of the heuristic

Parameters
heurprimal heuristic

Definition at line 621 of file heur.c.

References NULL, and SCIP_Heur::timingmask.

void SCIPheurSetTimingmask ( SCIP_HEUR heur,
SCIP_HEURTIMING  timingmask 
)

sets new timing mask for heuristic

Parameters
heurprimal heuristic
timingmasknew timing mask of heuristic

Definition at line 631 of file heur.c.

References NULL, and SCIP_Heur::timingmask.

Referenced by SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXITSOL(), SCIP_DECL_HEURINIT(), and SCIP_DECL_HEURINITSOL().

SCIP_Bool SCIPheurUsesSubscip ( SCIP_HEUR heur)

does the heuristic use a secondary SCIP instance?

Parameters
heurprimal heuristic

Definition at line 642 of file heur.c.

References NULL, and SCIP_Heur::usessubscip.

Referenced by SCIPparamsetSetToSubscipsOff().

int SCIPheurGetPriority ( SCIP_HEUR heur)

gets priority of primal heuristic

Parameters
heurprimal heuristic

Definition at line 652 of file heur.c.

References NULL, and SCIP_Heur::priority.

Referenced by SCIP_DECL_DIALOGEXEC(), and SCIPprimalHeuristics().

int SCIPheurGetFreq ( SCIP_HEUR heur)

gets frequency of primal heuristic

Parameters
heurprimal heuristic

Definition at line 676 of file heur.c.

References SCIP_Heur::freq, and NULL.

Referenced by checkParameters(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_HEURINIT(), and SCIP_DECL_HEURINITSOL().

void SCIPheurSetFreq ( SCIP_HEUR heur,
int  freq 
)

sets frequency of primal heuristic

Parameters
heurprimal heuristic
freqnew frequency of heuristic

Definition at line 686 of file heur.c.

References SCIP_Heur::freq, and NULL.

Referenced by storeSolution().

int SCIPheurGetFreqofs ( SCIP_HEUR heur)

gets frequency offset of primal heuristic

Parameters
heurprimal heuristic

Definition at line 697 of file heur.c.

References SCIP_Heur::freqofs, and NULL.

Referenced by SCIP_DECL_DIALOGEXEC(), SCIP_DECL_HEURINIT(), and SCIP_DECL_HEURINITSOL().

int SCIPheurGetMaxdepth ( SCIP_HEUR heur)

gets maximal depth level for calling primal heuristic (returns -1, if no depth limit exists)

Parameters
heurprimal heuristic

Definition at line 707 of file heur.c.

References SCIP_Heur::maxdepth, and NULL.

SCIP_Longint SCIPheurGetNCalls ( SCIP_HEUR heur)

gets the number of times, the heuristic was called and tried to find a solution

Parameters
heurprimal heuristic

Definition at line 717 of file heur.c.

References SCIP_Heur::ncalls, and NULL.

Referenced by applyVbounds(), printHeuristicStatistics(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXIT(), and SCIPapplyZeroobj().

SCIP_Longint SCIPheurGetNSolsFound ( SCIP_HEUR heur)

gets the number of primal feasible solutions found by this heuristic

Parameters
heurprimal heuristic

Definition at line 727 of file heur.c.

References SCIP_Heur::nsolsfound, and NULL.

Referenced by printHeuristicStatistics(), SCIP_DECL_HEUREXEC(), and SCIP_DECL_HEUREXIT().

SCIP_Longint SCIPheurGetNBestSolsFound ( SCIP_HEUR heur)

gets the number of new best primal feasible solutions found by this heuristic

Parameters
heurprimal heuristic

Definition at line 737 of file heur.c.

References SCIP_Heur::nbestsolsfound, and NULL.

Referenced by applyVbounds(), and SCIP_DECL_HEUREXEC().

SCIP_Bool SCIPheurIsInitialized ( SCIP_HEUR heur)

is primal heuristic initialized?

Parameters
heurprimal heuristic

Definition at line 747 of file heur.c.

References SCIP_Heur::initialized, and NULL.

Referenced by SCIPsetIncludeHeur().

SCIP_Real SCIPheurGetSetupTime ( SCIP_HEUR heur)

gets time in seconds used in this heuristic for setting up for next stages

Parameters
heurprimal heuristic

Definition at line 757 of file heur.c.

References NULL, SCIPclockGetTime(), and SCIP_Heur::setuptime.

Referenced by printHeuristicStatistics().

SCIP_Real SCIPheurGetTime ( SCIP_HEUR heur)

gets time in seconds used in this heuristic

Parameters
heurprimal heuristic

Definition at line 767 of file heur.c.

References SCIP_Heur::heurclock, NULL, and SCIPclockGetTime().

Referenced by printHeuristicStatistics(), and SCIP_DECL_HEUREXIT().