Scippy

SCIP

Solving Constraint Integer Programs

EventhdlrNewSol.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2018 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License. */
12 /* along with SCIP; see the file COPYING. If not visit scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file EventhdlrNewSol.h
17  * @brief event handler for new solutions in TSP
18  * @author Timo Berthold
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __EVENTHDLRNEWSOL_H__
24 #define __EVENTHDLRNEWSOL_H__
25 
26 
27 #include "objscip/objscip.h"
28 
29 namespace tsp
30 {
31 /** C++ wrapper object for event handlers */
33 {
34 public:
35  /** default constructor */
37  SCIP* scip
38  )
39  : ObjEventhdlr(scip, "newsol","event handler for new solutions in TSP")
40  {
41  }
42 
43  /** destructor */
44  virtual ~EventhdlrNewSol()
45  {
46  }
47 
48  /** destructor of event handler to free user data (called when SCIP is exiting) */
49  virtual SCIP_DECL_EVENTFREE(scip_free);
50 
51  /** initialization method of event handler (called after problem was transformed) */
52  virtual SCIP_DECL_EVENTINIT(scip_init);
53 
54  /** deinitialization method of event handler (called before transformed problem is freed) */
55  virtual SCIP_DECL_EVENTEXIT(scip_exit);
56 
57  /** solving process initialization method of event handler (called when branch and bound process is about to begin)
58  *
59  * This method is called when the presolving was finished and the branch and bound process is about to begin.
60  * The event handler may use this call to initialize its branch and bound specific data.
61  *
62  */
63  virtual SCIP_DECL_EVENTINITSOL(scip_initsol);
64 
65  /** solving process deinitialization method of event handler (called before branch and bound process data is freed)
66  *
67  * This method is called before the branch and bound process is freed.
68  * The event handler should use this call to clean up its branch and bound data.
69  */
70  virtual SCIP_DECL_EVENTEXITSOL(scip_exitsol);
71 
72  /** frees specific constraint data */
73  virtual SCIP_DECL_EVENTDELETE(scip_delete);
74 
75  /** execution method of event handler
76  *
77  * Processes the event. The method is called every time an event occurs, for which the event handler
78  * is responsible. Event handlers may declare themselves resposible for events by calling the
79  * corresponding SCIPcatch...() method. This method creates an event filter object to point to the
80  * given event handler and event data.
81  */
82  virtual SCIP_DECL_EVENTEXEC(scip_exec);
83 }; /*lint !e1712*/
84 
85 } /* namespace tsp */
86 
87 
88 #endif
virtual SCIP_DECL_EVENTINITSOL(scip_initsol)
virtual SCIP_DECL_EVENTEXIT(scip_exit)
EventhdlrNewSol(SCIP *scip)
virtual SCIP_DECL_EVENTEXEC(scip_exec)
ObjEventhdlr(SCIP *scip, const char *name, const char *desc)
Definition: objeventhdlr.h:57
virtual SCIP_DECL_EVENTEXITSOL(scip_exitsol)
C++ wrapper classes for SCIP.
virtual SCIP_DECL_EVENTFREE(scip_free)
virtual SCIP_DECL_EVENTINIT(scip_init)
C++ wrapper for event handlers.
Definition: objeventhdlr.h:42
virtual SCIP_DECL_EVENTDELETE(scip_delete)