|
| 1 | +# Copyright (c) 2018 Felipe Serrano, Miles Lubin, Robert Schwarz, and contributors |
| 2 | +# |
| 3 | +# Use of this source code is governed by an MIT-style license that can be found |
| 4 | +# in the LICENSE.md file or at https://opensource.org/licenses/MIT. |
| 5 | + |
1 | 6 | # Wrapper for implementing event handlers in SCIP.
|
2 | 7 | # Before using please familiaze yourself with https://scipopt.org/doc/html/EVENT.php
|
3 |
| -# |
| 8 | +# |
4 | 9 | # The basic idea here is the same as with the separator wrappers. First, you need
|
5 | 10 | # to define a structure that implements the abstract type `AbstractEventhdlr`.
|
6 | 11 | # Second you should implement the function `eventexec` where the argument is an
|
7 | 12 | # instance of your event handler structure. Third, you should at runtime instantiate
|
8 | 13 | # the structure and call `include_event_handler` to register the event handler with SCIP.
|
9 |
| -# |
| 14 | +# |
10 | 15 | # See eventhdlr.jl in the test folder for an example.
|
11 |
| -# |
| 16 | +# |
12 | 17 | abstract type AbstractEventhdlr end
|
13 | 18 |
|
14 |
| -""" |
| 19 | +""" |
15 | 20 | This is a virtual function that must be implemented by the user. Its Only
|
16 | 21 | argument is the event handler object.
|
17 | 22 | """
|
|
82 | 87 | """
|
83 | 88 | include_event_handler(scipd::SCIP.SCIPData, event_handler::EVENTHDLR; name="", desc="")
|
84 | 89 |
|
85 |
| -Include the event handler in SCIP. WARNING! In contrast to the separator wrapper you only need to |
86 |
| -pass the SCIPData rather than the SCIP pointer and dictionary. |
| 90 | +Include the event handler in SCIP. WARNING! In contrast to the separator wrapper you only need to |
| 91 | +pass the SCIPData rather than the SCIP pointer and dictionary. |
87 | 92 |
|
88 | 93 | # Arguments
|
89 | 94 | - scipd::SCIP.SCIPData: The SCIPData object
|
@@ -147,7 +152,7 @@ function catch_event(
|
147 | 152 | @SCIP_CALL SCIPcatchEvent(scipd, eventtype, eventhdlrptr, C_NULL, C_NULL)
|
148 | 153 | end
|
149 | 154 |
|
150 |
| -""" |
| 155 | +""" |
151 | 156 | drop_event(scipd::SCIP.SCIPData, eventtype::SCIP_EVENTTYPE, eventhdlr::EVENTHDLR)
|
152 | 157 |
|
153 | 158 | Drop an event in SCIP. This function is a wrapper around the SCIPdropEvent function.
|
|
0 commit comments