56 assert(probdata !=
NULL);
59 assert(graph !=
NULL);
108 assert(result !=
NULL);
127 currnode = &graph->nodes[0];
128 nnodes = graph->nnodes;
136 assert(currnode->
id == 0);
140 for( i = 0; i <
nnodes; i++ )
156 while( edge !=
NULL )
171 finalnode = &graph->nodes[0];
174 while( edge !=
NULL )
176 if( edge->
adjac == finalnode )
196 assert(bestedge !=
NULL);
202 currnode = bestedge->
adjac;
203 assert(currnode !=
NULL);
204 assert(0 <= currnode->
id && currnode->
id <= nnodes-1);
206 assert(!visited[currnode->
id]);
207 visited[currnode->
id] =
TRUE;
212 for( i = 0; i <
nnodes; i++ )
213 assert(visited[graph->nodes[i].id]);
SCIP_RETCODE SCIPlinkLPSol(SCIP *scip, SCIP_SOL *sol)
SCIP_DECL_HEURINITSOL(HeurFrats::scip_initsol)
SCIP_DECL_HEUREXEC(HeurFrats::scip_exec)
SCIP_DECL_HEURINIT(HeurFrats::scip_init)
SCIP_DECL_HEURCLONE(scip::ObjCloneable *HeurFrats::clone)
#define SCIPfreeBufferArray(scip, ptr)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
struct GraphEdge * first_edge
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)
C++ problem data for TSP.
#define SCIPallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
SCIP_DECL_HEUREXITSOL(HeurFrats::scip_exitsol)
SCIP_DECL_HEURFREE(HeurFrats::scip_free)
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
fractional travelling salesman heuristic - Rounding heuristic for TSP
SCIP_RETCODE SCIPtrySol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
scip::ObjProbData * SCIPgetObjProbData(SCIP *scip)
SCIP_DECL_HEUREXIT(HeurFrats::scip_exit)
Definition of base class for all clonable classes.
void capture_graph(GRAPH *gr)
void release_graph(GRAPH **gr)
#define BMSclearMemoryArray(ptr, num)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)