Scippy

SCIP

Solving Constraint Integer Programs

EventhdlrNewSol.cpp File Reference

Detailed Description

event handler for new solutions in TSP

Author
Timo Berthold

Definition in file EventhdlrNewSol.cpp.

#include <cassert>
#include <fstream>
#include <iostream>
#include <unistd.h>
#include "objscip/objscip.h"
#include "EventhdlrNewSol.h"
#include "ProbDataTSP.h"
#include "GomoryHuTree.h"

Go to the source code of this file.

Functions

 SCIP_DECL_EVENTFREE (EventhdlrNewSol::scip_free)
 
 SCIP_DECL_EVENTINIT (EventhdlrNewSol::scip_init)
 
 SCIP_DECL_EVENTEXIT (EventhdlrNewSol::scip_exit)
 
 SCIP_DECL_EVENTINITSOL (EventhdlrNewSol::scip_initsol)
 
 SCIP_DECL_EVENTEXITSOL (EventhdlrNewSol::scip_exitsol)
 
 SCIP_DECL_EVENTDELETE (EventhdlrNewSol::scip_delete)
 
 SCIP_DECL_EVENTEXEC (EventhdlrNewSol::scip_exec)
 

Function Documentation

◆ SCIP_DECL_EVENTFREE()

SCIP_DECL_EVENTFREE ( EventhdlrNewSol::scip_free  )

destructor of event handler to free user data (called when SCIP is exiting)

Definition at line 52 of file EventhdlrNewSol.cpp.

References SCIP_OKAY.

◆ SCIP_DECL_EVENTINIT()

SCIP_DECL_EVENTINIT ( EventhdlrNewSol::scip_init  )

initialization method of event handler (called after problem was transformed)

Definition at line 59 of file EventhdlrNewSol.cpp.

References SCIP_OKAY, SCIPfileExists(), and SCIPwarningMessage().

◆ SCIP_DECL_EVENTEXIT()

SCIP_DECL_EVENTEXIT ( EventhdlrNewSol::scip_exit  )

deinitialization method of event handler (called before transformed problem is freed)

Definition at line 95 of file EventhdlrNewSol.cpp.

References SCIP_OKAY.

◆ SCIP_DECL_EVENTINITSOL()

SCIP_DECL_EVENTINITSOL ( EventhdlrNewSol::scip_initsol  )

solving process initialization method of event handler (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 event handler may use this call to initialize its branch and bound specific data.

Definition at line 107 of file EventhdlrNewSol.cpp.

References NULL, SCIP_CALL, SCIP_EVENTTYPE_BESTSOLFOUND, SCIP_OKAY, and SCIPcatchEvent().

◆ SCIP_DECL_EVENTEXITSOL()

SCIP_DECL_EVENTEXITSOL ( EventhdlrNewSol::scip_exitsol  )

solving process deinitialization method of event handler (called before branch and bound process data is freed)

This method is called before the branch and bound process is freed. The event handler should use this call to clean up its branch and bound data.

Definition at line 120 of file EventhdlrNewSol.cpp.

References NULL, SCIP_CALL, SCIP_EVENTTYPE_BESTSOLFOUND, SCIP_OKAY, and SCIPdropEvent().

◆ SCIP_DECL_EVENTDELETE()

SCIP_DECL_EVENTDELETE ( EventhdlrNewSol::scip_delete  )

frees specific constraint data

Definition at line 129 of file EventhdlrNewSol.cpp.

References SCIP_OKAY.

◆ SCIP_DECL_EVENTEXEC()

SCIP_DECL_EVENTEXEC ( EventhdlrNewSol::scip_exec  )

execution method of event handler

Processes the event. The method is called every time an event occurs, for which the event handler is responsible. Event handlers may declare themselves resposible for events by calling the corresponding SCIPcatch...() method. This method creates an event filter object to point to the given event handler and event data.

Definition at line 142 of file EventhdlrNewSol.cpp.

References GraphEdge::adjac, GraphEdge::back, GraphNode::first_edge, tsp::ProbDataTSP::getGraph(), GraphNode::id, GraphEdge::next, Graph::nnodes, Graph::nodes, NULL, SCIP_OKAY, SCIPfileExists(), SCIPgetBestSol(), SCIPgetObjProbData(), SCIPgetSolHeur(), SCIPgetSolOrigObj(), SCIPgetSolVal(), SCIPheurGetName(), SCIPwarningMessage(), GraphEdge::var, GraphNode::x, and GraphNode::y.