Scippy

SCIP

Solving Constraint Integer Programs

Heur2opt.cpp File Reference

Detailed Description

2-Optimum - combinatorial improvement heuristic for TSP

Author
Timo Berthold

Definition in file Heur2opt.cpp.

#include <cassert>
#include <iostream>
#include "objscip/objscip.h"
#include "GomoryHuTree.h"
#include "Heur2opt.h"
#include "ProbDataTSP.h"

Go to the source code of this file.

Functions

static GRAPHEDGEfindEdge (GRAPHNODE *nodes, GRAPHNODE *node1, GRAPHNODE *node2)
 
 SCIP_DECL_HEURFREE (Heur2opt::scip_free)
 
 SCIP_DECL_HEURINIT (Heur2opt::scip_init)
 
 SCIP_DECL_HEUREXIT (Heur2opt::scip_exit)
 
 SCIP_DECL_HEURINITSOL (Heur2opt::scip_initsol)
 
 SCIP_DECL_HEUREXITSOL (Heur2opt::scip_exitsol)
 
 SCIP_DECL_HEUREXEC (Heur2opt::scip_exec)
 
 SCIP_DECL_HEURCLONE (scip::ObjCloneable *Heur2opt::clone)
 

Function Documentation

◆ findEdge()

static GRAPHEDGE* findEdge ( GRAPHNODE nodes,
GRAPHNODE node1,
GRAPHNODE node2 
)
static

method finding the edge going from the node with id index1 to the node with id index2

Parameters
nodesall nodes of the graph
node1id of the node where the searched edge starts
node2id of the node where the searched edge ends

Definition at line 37 of file Heur2opt.cpp.

References GraphEdge::adjac, GraphNode::first_edge, GraphEdge::next, and NULL.

Referenced by SCIP_DECL_HEUREXEC().

◆ SCIP_DECL_HEURFREE()

SCIP_DECL_HEURFREE ( Heur2opt::scip_free  )

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

Definition at line 57 of file Heur2opt.cpp.

References SCIP_OKAY.

◆ SCIP_DECL_HEURINIT()

SCIP_DECL_HEURINIT ( Heur2opt::scip_init  )

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

Definition at line 64 of file Heur2opt.cpp.

References SCIP_OKAY.

◆ SCIP_DECL_HEUREXIT()

SCIP_DECL_HEUREXIT ( Heur2opt::scip_exit  )

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

Definition at line 71 of file Heur2opt.cpp.

References SCIP_OKAY.

◆ SCIP_DECL_HEURINITSOL()

SCIP_DECL_HEURINITSOL ( Heur2opt::scip_initsol  )

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.

Definition at line 83 of file Heur2opt.cpp.

References capture_graph(), tsp::ProbDataTSP::getGraph(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, and SCIPgetObjProbData().

◆ SCIP_DECL_HEUREXITSOL()

SCIP_DECL_HEUREXITSOL ( Heur2opt::scip_exitsol  )

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.

Definition at line 102 of file Heur2opt.cpp.

References release_graph(), SCIP_OKAY, and SCIPfreeBlockMemoryArray.

◆ SCIP_DECL_HEUREXEC()

◆ SCIP_DECL_HEURCLONE()

SCIP_DECL_HEURCLONE ( scip::ObjCloneable *Heur2opt::clone  )

clone method which will be used to copy a objective plugin

Definition at line 236 of file Heur2opt.cpp.