Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

primal heuristic that tries a given solution

Author
Marc Pfetsch

This heuristic takes a solution from somewhere else via the function SCIPheurPassSolTrySol(). It then tries to commit this solution. It is mainly used by cons_indicator, which tries to correct a given solution, but cannot directly submit this solution, because it is a constraint handler and not a heuristic.

Definition in file heur_trysol.c.

#include "scip/heur_trysol.h"
#include "scip/pub_heur.h"
#include "scip/pub_message.h"
#include "scip/pub_sol.h"
#include "scip/scip_heur.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_numerics.h"
#include "scip/scip_prob.h"
#include "scip/scip_sol.h"
#include <string.h>

Go to the source code of this file.

Macros

#define HEUR_NAME   "trysol"
 
#define HEUR_DESC   "try solution heuristic"
 
#define HEUR_DISPCHAR   SCIP_HEURDISPCHAR_TRIVIAL
 
#define HEUR_PRIORITY   -3000010 /* should process after all other heuristics */
 
#define HEUR_FREQ   1
 
#define HEUR_FREQOFS   0
 
#define HEUR_MAXDEPTH   -1
 
#define HEUR_TIMING   SCIP_HEURTIMING_DURINGLPLOOP | SCIP_HEURTIMING_BEFOREPRESOL | SCIP_HEURTIMING_BEFORENODE
 
#define HEUR_USESSUBSCIP   FALSE
 

Functions

static SCIP_DECL_HEURCOPY (heurCopyTrySol)
 
static SCIP_DECL_HEURFREE (heurFreeTrySol)
 
static SCIP_DECL_HEUREXITSOL (heurExitTrySol)
 
static SCIP_DECL_HEUREXEC (heurExecTrySol)
 
SCIP_RETCODE SCIPincludeHeurTrySol (SCIP *scip)
 
SCIP_RETCODE SCIPheurPassSolTrySol (SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
 
SCIP_RETCODE SCIPheurPassSolAddSol (SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol)
 

Macro Definition Documentation

◆ HEUR_NAME

◆ HEUR_DESC

#define HEUR_DESC   "try solution heuristic"

Definition at line 42 of file heur_trysol.c.

Referenced by SCIPincludeHeurTrySol().

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   SCIP_HEURDISPCHAR_TRIVIAL

Definition at line 43 of file heur_trysol.c.

Referenced by SCIPincludeHeurTrySol().

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   -3000010 /* should process after all other heuristics */

Definition at line 44 of file heur_trysol.c.

Referenced by SCIPincludeHeurTrySol().

◆ HEUR_FREQ

#define HEUR_FREQ   1

Definition at line 45 of file heur_trysol.c.

Referenced by SCIPincludeHeurTrySol().

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   0

Definition at line 46 of file heur_trysol.c.

Referenced by SCIPincludeHeurTrySol().

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 47 of file heur_trysol.c.

Referenced by SCIPincludeHeurTrySol().

◆ HEUR_TIMING

◆ HEUR_USESSUBSCIP

#define HEUR_USESSUBSCIP   FALSE

does the heuristic use a secondary SCIP instance?

Definition at line 49 of file heur_trysol.c.

Referenced by SCIPincludeHeurTrySol().

Function Documentation

◆ SCIP_DECL_HEURCOPY()

static SCIP_DECL_HEURCOPY ( heurCopyTrySol  )
static

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

Definition at line 72 of file heur_trysol.c.

References HEUR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurTrySol().

◆ SCIP_DECL_HEURFREE()

static SCIP_DECL_HEURFREE ( heurFreeTrySol  )
static

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

Definition at line 86 of file heur_trysol.c.

References HEUR_NAME, NULL, SCIP_OKAY, SCIPdebugMsg, SCIPfreeBlockMemory, SCIPheurGetData(), and SCIPheurGetName().

◆ SCIP_DECL_HEUREXITSOL()

static SCIP_DECL_HEUREXITSOL ( heurExitTrySol  )
static

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

Definition at line 108 of file heur_trysol.c.

References HEUR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMsg, SCIPfreeSol(), SCIPheurGetData(), and SCIPheurGetName().

◆ SCIP_DECL_HEUREXEC()

static SCIP_DECL_HEUREXEC ( heurExecTrySol  )
static