A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://scip.zib.de/doc/html/HeurFarthestInsert_8cpp_source.php below:

SCIP Doxygen Documentation: examples/TSP/src/HeurFarthestInsert.cpp Source File

55 while

( edge !=

NULL

)

57 if

( edge->

adjac

->

id

== index2 )

78 while

( edge !=

NULL

)

144 int nnodes

= graph_->nnodes;

145 int

nedges = graph_->nedges;

148 for

(

int

e = 0; e < nedges; ++e)

153

hasFixedEdges =

TRUE

;

159 if

(

nnodes

< 3 || hasFixedEdges )

176 for

( i = 0; i <

nnodes

; i++ )

177

assert( i == nodes[i].

id

);

187 for

( i = 0; i <

nnodes

; i++ )

192 for

(

int

u = 0; u <

nnodes

- 2 && !foundThreeCircle; ++u)

194 for

(

int

v = u + 1; v <

nnodes

- 1 && !foundThreeCircle; ++v)

201 for

(

int w

= v + 1; (

w

<

nnodes

) && !foundThreeCircle; ++

w

)

212

foundThreeCircle =

TRUE

;

220

subtour[

w

] =

true

;

231 if

( !foundThreeCircle )

244 int

subtourlength = 3;

245 for

(; subtourlength <

nnodes

; subtourlength++ )

250 for

( i = 0; i <

nnodes

; i++)

252 if

( (maxmin < dist[i] && dist[i] != DBL_MAX) || (maxmin == dist[i] && !subtour[i]) )

258 if

(newnodeindex == -1)

260

couldNotInsert =

TRUE

;

269 while

( edge !=

NULL

)

276

assert(edge !=

NULL

);

277

assert(subtour[edge->

adjac

->

id

]);

283

startnode = edge->

adjac

;

289

edges[1] = successor[node->

id

];

290

edges[2] =

findEdge

(nodes, edges[1]->adjac->id, newnodeindex);

291

assert( edges[2] !=

NULL

);

299 for

( i = 0; i < 3; i++ )

300

bestedges[i] = edges[i];

302

node = edges[1]->

adjac

;

303

edges[0] = edges[2]->

back

;

305 while

( node != startnode);

307 if

( minval == DBL_MAX )

309

couldNotInsert =

TRUE

;

315

assert(bestedges[0]->adjac->id == bestedges[1]->

back

->

adjac

->

id

);

316

assert(bestedges[1]->adjac->id == bestedges[2]->

back

->

adjac

->

id

);

317

assert(bestedges[2]->adjac->id == bestedges[0]->

back

->

adjac

->

id

);

318

assert(subtour[bestedges[0]->adjac->id]);

319

assert(subtour[bestedges[1]->adjac->id]);

320

assert(bestedges[2]->adjac->id == newnodeindex);

321

assert(!subtour[newnodeindex]);

324

successor[bestedges[0]->

adjac

->

id

] = bestedges[0]->

back

;

325

successor[bestedges[2]->adjac->id] = bestedges[2]->

back

;

326

dist[newnodeindex] = 0.0;

327

subtour[newnodeindex] =

true

;

343 for

( i = 0; i <

nnodes

; i++ )

void capture_graph(GRAPH *gr)

void release_graph(GRAPH **gr)

generator for global cuts in undirected graphs

static GRAPHEDGE * findEdge(GRAPHNODE *nodes, int index1, int index2)

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

SCIP_DECL_HEURFREE(HeurFarthestInsert::scip_free)

static void updateDistances(GRAPHNODE *nodes, double *dist, int idx)

SCIP_DECL_HEUREXIT(HeurFarthestInsert::scip_exit)

SCIP_DECL_HEURINITSOL(HeurFarthestInsert::scip_initsol)

SCIP_DECL_HEUREXITSOL(HeurFarthestInsert::scip_exitsol)

SCIP_DECL_HEURINIT(HeurFarthestInsert::scip_init)

SCIP_DECL_HEUREXEC(HeurFarthestInsert::scip_exec)

farthest insert - combinatorial heuristic for TSP

C++ problem data for TSP.

#define SCIPallocBufferArray(scip, ptr, num)

#define SCIPfreeBufferArray(scip, ptr)

SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)

SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)

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_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)

SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)

SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)

#define BMSclearMemoryArray(ptr, num)

scip::ObjProbData * SCIPgetObjProbData(SCIP *scip)

C++ wrapper classes for SCIP.

struct GraphEdge * first_edge

Definition of base class for all clonable classes.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4