57 if( edge->
adjac == node2 )
145 int nnodes = graph_->nnodes;
169 while( edge !=
NULL )
179 for(j =
i; j > 0 && tour_[j-1]->length < edge->
length; j-- )
180 tour_[j] = tour_[j-1];
191 while ( node != &nodes[0] );
201 edges2test[0] = tour_[ncalls_];
202 edges2test[1] = tour_[
i];
204 edges2test[3] =
findEdge( nodes, edges2test[0]->adjac, edges2test[1]->adjac );
209 if( edges2test[0]->length + edges2test[1]->length > edges2test[2]->length + edges2test[3]->length
221 for(
int j = 0; j <
nnodes; j++)
void capture_graph(GRAPH *gr)
void release_graph(GRAPH **gr)
generator for global cuts in undirected graphs
struct GraphNode GRAPHNODE
struct GraphEdge GRAPHEDGE
static GRAPHEDGE * findEdge(GRAPHNODE *nodes, GRAPHNODE *node1, GRAPHNODE *node2)
2-Optimum - combinatorial improvement heuristic for TSP
C++ problem data for TSP.
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_RETCODE SCIPaddSolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool *stored)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIPcreateSol(scip, &heurdata->sol, heur))
assert(minobj< SCIPgetCutoffbound(scip))
scip::ObjProbData * SCIPgetObjProbData(SCIP *scip)
C++ wrapper classes for SCIP.
struct GraphEdge * first_edge
Definition of base class for all clonable classes.
#define SCIP_DECL_HEURINITSOL(x)
#define SCIP_DECL_HEURINIT(x)
#define SCIP_DECL_HEUREXIT(x)
#define SCIP_DECL_HEURFREE(x)
#define SCIP_DECL_HEUREXITSOL(x)
#define SCIP_DECL_HEUREXEC(x)
#define SCIP_DECL_HEURCLONE(x)