67 ofstream lockfile(
"temp.tour.lock");
68 lockfile <<
"lock" << endl;
72 ofstream filedata(
"temp.tour");
73 filedata <<
"RESET" << endl;
77 unlink(
"temp.tour.lock");
150 SCIPwarningMessage(
scip,
"cannot output tour in file, because lockfile <temp.tour.lock> is still existing\n");
155 ofstream lockfile(
"temp.tour.lock");
156 lockfile <<
"lock" << endl;
160 ofstream filedata(
"temp.tour");
161 filedata << graph->
nnodes << endl;
165 filedata <<
"relaxation" << endl;
173 filedata << node->
id <<
" " << node->
x <<
" " << node->
y << endl;
189 while ( node != &graph->
nodes[0] );
194 unlink(
"temp.tour.lock");
SCIP_DECL_EVENTEXIT(EventhdlrNewSol::scip_exit)
generator for global cuts in undirected graphs
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_DECL_EVENTINITSOL(EventhdlrNewSol::scip_initsol)
SCIP_Bool SCIPfileExists(const char *filename)
SCIP_DECL_EVENTINIT(EventhdlrNewSol::scip_init)
SCIP_DECL_EVENTFREE(EventhdlrNewSol::scip_free)
const char * SCIPheurGetName(SCIP_HEUR *heur)
struct GraphEdge * first_edge
C++ wrapper classes for SCIP.
event handler for new solutions in TSP
C++ problem data for TSP.
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)
scip::ObjProbData * SCIPgetObjProbData(SCIP *scip)
#define SCIP_EVENTTYPE_BESTSOLFOUND
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_DECL_EVENTEXEC(EventhdlrNewSol::scip_exec)
SCIP_HEUR * SCIPgetSolHeur(SCIP *scip, SCIP_SOL *sol)
SCIP_DECL_EVENTEXITSOL(EventhdlrNewSol::scip_exitsol)
SCIP_DECL_EVENTDELETE(EventhdlrNewSol::scip_delete)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)