47 * \SCIP is a framework to solve constraint integer programs (CIPs) and mixed-integer nonlinear programs. In particular,
48 *
49 * - \SCIP incorporates a mixed-integer programming (MIP) solver as well as
50 * - an LP based mixed-integer nonlinear programming (MINLP) solver, and
51 * - is a framework for branch-cut-and-price.
52 *
53 * Since version 10, \SCIP can optionally be configured to solve mixed-integer linear programs in a numerically exact
54 * solving mode and produce certificates that can be independently verified, see \ref EXACT "How to use the numerically exact solving mode" for details.
55 *
56 * See the web site of <a href="http://scipopt.org">\SCIP</a> for more information about licensing and how to download \SCIP.
57 *
58 * <b style="color: blue">If you are new to SCIP and don't know where to start you should have a look at the
91 * - @subpage EXTERNALDOC "Links to external documentation"
92 *
93 *
94 * @section QUICKSTART Quickstart
95 *
96 * Let's consider the following minimal example in LP format. A 4-variable problem with a single, general integer
97 * variable and three linear constraints
98 *
99 * \verbinclude simple.lp
100 *
101 * Saving this file as "simple.lp" allows to read it into SCIP and solve it by calling the scip binary with the `-f` flag to solve the problem from the provided file and exit.
213 * Charlotte now needs to \ref INSTALL "install SCIP".
214 * She works on a recent computer with a windows system and already has the <a href="https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads">Visual C++ Redistributable Packages</a> and <a href="https://github.com/oneapi-src/oneTBB">TBB</a> installed.
215 *
216 * Having these prerequisites in place, Charlotte downloads the 64-bit windows exectuable from the <a href="https://scipopt.org/index.php#download">download page</a> and installs it without a problem.
217 * They also read about the <a href="http://www.pokutta.com/blog/pages/scip/scip-teaching.html"> dockerized SCIP container</a> which she wants
218 * to recommend to her students, in case they are unable to install SCIP on their own machines.
219 *
220 * @subsection GETTINGSTARTED_BLACKBOX_SOLVE Solve A First Problem
221 *
222 * To test her installation and get a first feeling for SCIP, Charlotte follows the steps described in the \ref QUICKSTART "quickstart" section to solve a first simple lp problem.
223 *
224 * She has just solved a problem, using SCIP in the command-based mode, by passing a command to the scip call via the `-c` flag.
225 * These commands can also be typed into the interactive shell, that one uses by just calling the binary `scip`.
226 *
227 * After the first solution process worked like a charm, Charlotte downloads a more complicated problem file from the <a href="https://miplib.zib.de/instance_details_enlight_hard.html">MIPLIB 2017</a> page
228 * and follows the \ref SHELL_AFTERINSTALL "interactive shell tutorial".
229 * There, she already learns quite a lot about the solving process and how to work with the interactive shell.
230 *
231 * @subsection GETTINGSTARTED_BLACKBOX_HELP Getting Help
232 *
233 * Feeling happy about having already solved some instances and having worked in interactive mode, Charlotte is curious on what more options SCIP has.
234 * She types `scip -h` to find out.
235 *
236 * She feels confident to being able to understand and use some of the other options, like `-l` to write the output to a logfile, or `-b` to pass a file containing the commands to be executed by scip.
237 * There are some commands that do not yet make a lot of sense to her, but she doesn't worry about it for now.
238 * She will familiarize herself with it over time and with experience.
239 *
240 * @section GETTINGSTARTED_DEVELOP Develop A Custom Plugin
241 *
242 * Alex is a researcher in Charlotte's group and is working on problems that have a very special structure that he hopes to be able to exploit in the solving process.
243 *
244 * Alex heard Charlotte talk about SCIP.
245 * She explained that SCIP is plugin-based, that is, different components (plugins) are implemented using a generic interface and that it is very easy to write your own plugins, like constraint handlers, heuristics etc.
246 * So Alex decides to give it a go and dive into SCIP.
247 *
248 * @subsection GETTINGSTARTED_DEVELOP_PREREQUISITES Prerequisites And Setup
249 *
250 * After some time of using SCIP, he feels confident enough to dig into the source code and decides to write his own plugin.
251 * Alex likes to use his linux machine for developing code, because in his experience compilation is easiest there.
252 *
253 * He starts by downloading the latest <a href="http://scipopt.org/#download">source code tarball</a>,
254 * unpacking it and compiling via \ref CMAKE "cmake", typing `mkdir build; cd build; cmake ..; make`.
255 *
256 * @subsection GETTINGSTARTED_DEVELOP_HELP Getting help
257 *
258 * Before writing any code, he quickly scans over the contents of the \ref PROGRAMMING "Programming with SCIP" page,
259 * so that he knows about some of the pitfalls, best practices and mechanisms.
260 * If a problem comes up later or he gets stuck, he knows what to look out for and where to find help.
261 *
262 * Whenever Alex gets stuck inside the code, he makes use of the extensive documentation to \ref DOC "search for interface functions".
263 *
264 * @subsection GETTINGSTARTED_DEVELOP_EXAMPLE Writing An Example
265 *
266 * Alex is now ready to write his very first example, he creates a new folder `MinEx` under `examples` and puts two files in there:
307 * After having successfully written this minimal example, Alex follows the instructions to \ref START "start a new project" to start his actual project and extend this most basic code.
308 *
309 * @subsection GETTINGSTARTED_DEVELOP_CONSTRAINTHANDLER Writing A Plugin
310 *
311 * Alex now needs a custom constraint handler in his project, for that he will write a custom plugin.
312 * He looks up the instructions in the \ref HOWTOADD "How to add..." page and is
313 * very happy to find \ref CONS "a page with a detailed description" what he has to do.
314 *
315 * Furthermore he found exercises for implementing plugins for the example of the
316 * linear ordering problem. The corresponding code framework
317 * (<a href="https://scipopt.org/workshop2018/pyscipopt-exercises.tgz">Python</a> or
319 * could form a good starting point for a new project as well.
320 *
321 * @subsection GETTINGSTARTED_DEVELOP_REOPTMIZATION Using Functionality In A Plugin
322 *
323 * After implementing his own constraint handler Alex realizes that he needs to use repotimization in his project.
324 * He looks up the \ref HOWTOUSESECTION "How to use..." section and finds some more information about \ref REOPT "how to use reoptimization".
325 *
326 */
327
328/**@page INSTALL Installing SCIP
329 *
330 * There are two options to get a running SCIP on your system.
331 * You can either use one of the installers or you can compile it yourself.
332 *
333 * Which one you choose depends on your use case and your level of expertise.
334 * If you just want to use SCIP as a black box solver you should use an installer with a precompiled binary from the <a href="http://scipopt.org/#download">download section</a>.
335 * This is highly recommended for new users.
336 * If you are just curious and want to try it out you can use the <a href="http://www.pokutta.com/blog/pages/scip/scip-teaching.html"> dockerized SCIP container</a>.
337 *
338 * However, if you want to develop your own plugin for SCIP, you have to compile SCIP or the SCIPOptSuite from source code, which are available as a tarball from the <a href="http://scipopt.org/#download">download page</a>.
339 * Note that you might need some level of experience to be able to do this, this is described in the following.
340 *
341 * SCIP lets you choose freely between its own, manually maintained Makefile system
342 * or the CMake cross platform build system generator. For new users, we strongly
343 * recommend to use CMake, if available on their targeted platform.
344 *
345 * Be aware that generated libraries and binaries of both systems might be different and incompatible.
396 * - @subpage TEST "How to run automated tests with SCIP"
397 * - @subpage EXACT "How to use the numerically exact solving mode"
398 * - @subpage CONF "How to use conflict analysis"
399 * - @subpage COUNTER "How to use SCIP to count feasible solutions"
400 * - @subpage REOPT "How to use reoptimization in SCIP"
401 * - @subpage CONCSCIP "How to use the concurrent solving mode in SCIP"
402 * - @subpage MINUCIIS "How to deduce reasons for infeasibility in SCIP"
403 * - @subpage DECOMP "How to provide a problem decomposition"
404 * - @subpage BENDDECF "How to use the Benders' decomposition framework"
405 * - @subpage TRAINESTIMATION "How to train custom tree size estimation for SCIP"
406 * - @subpage SYMMETRY "How to use symmetry handling in SCIP"
407 * - @subpage PROBINGDIVING "How to use probing and diving mode"
408 */
409
410/**@page AUTHORS SCIP Authors
411 *
412 * A list of all current and former developers as well as contributors can
413 * be found on the
414 * <a class="el" href="http://scipopt.org/#developers">Main Web Page</a>.
415 *
416 */
417
418/**@page EXTERNALDOC Links to external documentation
419 *
420 * <a class="el" href="https://www.cgudapati.com/integer-programming/2019/12/15/Getting-Started-With-SCIP-Optimization-Suite.html">Getting Started with SCIP optimization in C++: A toy example</a> by Chaitanya Gudapati.
421 *
422 */
423
424/**@page CHG Release notes and changes between different versions of SCIP
425 *
426 * New features, peformance improvements, and interface changes between different versions of SCIP are documented in the
427 * release notes:
428 *
429 * - \subpage RN10 "SCIP 10"
430 * - \subpage RN9 "SCIP 9"
431 * - \subpage RN8 "SCIP 8"
432 * - \subpage RN7 "SCIP 7.0"
433 * - \subpage RN6 "SCIP 6.0"
434 * - \subpage RN5 "SCIP 5.0"
435 * - \subpage RN4 "SCIP 4.0"
436 * - \subpage RN3_2 "SCIP 3.2"
437 * - \subpage RN3_1 "SCIP 3.1"
438 * - \subpage RN3_0 "SCIP 3.0"
439 * - \subpage RN2_1 "SCIP 2.1"
440 * - \subpage RN2_0 "SCIP 2.0"
441 * - \subpage RN1_2 "SCIP 1.2"
442 * - \subpage RN1_1 "SCIP 1.1"
443 * - \subpage RN1_0 "SCIP 1.0"
444 * - \subpage RN0_9 "SCIP 0.9"
445 * - \subpage RN0_8 "SCIP 0.8"
446 * - \subpage RN0_7 "SCIP 0.7"
447 *
448 */
449
450/**@page WHATPROBLEMS What types of optimization problems does SCIP solve?
451 *
452 * As a stand-alone solver, \SCIP can solve mixed-integer nonlinear programs \b (MINLPs), to which it applies
453 * an LP based spatial branch-and-cut algorithm. This method is guaranteed to solve bounded MINLPs
454 * within a given numerical tolerance in a finite amount of time. In particular, \SCIP is a stand-alone
455 * solver for mixed-integer linear programs \b (MIPs).
456 *
457 * As a framework, \SCIP also provides the tools to solve constraint optimization problems defined over
458 * integer and continuous variables. Therefore, the design of \SCIP
459 * supports the easy integration of constraints of arbitrary type into the solver.
460 * More precisely, \SCIP can handle the class of constraint integer programs \b (CIPs), which are constraint optimization problems
461 * that become linear programs (LPs) after the integer variables are fixed.
462 *
463 * @section PROBLEMCLASSES Some important subclasses of CIP and MINLP
464 *
465 * The following table gives a non-exhaustive list of common types of mathematical optimization problems that can be solved
466 * through \SCIP itself or one of its extensions. Some recommendations are given on how to compile \SCIP for a
467 * certain problem class and how make best use of \SCIP. The file format column gives some common file
468 * formats for every class. Note that since some of the mentioned problem classes are more general than others (like
469 * every LP is a MIP is an MINLP), the formats for the superclass should always work just as fine, although they
470 * may be less common for the class at hand.
471 *
472 * Please see also the pages on \ref EXAMPLES "SCIP Examples" and \ref APPLICATIONS "SCIP Applications" to learn more on how
473 * to extend \SCIP for a particular MIP, MINLP, or CIP application.
474 * All examples and applications use the C or C++ APIs of \SCIP. Please have a look at \ref INTERFACES "SCIP interfaces"
475 * to see how to use \SCIP from within other programming languages.
476 *
477 * <table class="types">
478 * <caption align="top">Some problem classes that can be solved by \SCIP</caption>
479 * <tr style="border-bottom: medium solid black;">
974 * A stochastic programming problem that demonstrates the use of the Benders' decomposition framework within SCIP.
975 * </td>
976 * </tr>
977 * </table>
978 */
979
980/** @page APPLICATIONS Application projects
981 *
982 * There are several extensions of \SCIP for particular applications included in the release. They are contained in the "applications" directory
983 * in the source code distribution.
984 *
985 * <table>
986 * <tr>
987 * <td>
988 * @subpage COLORING_MAIN
989 * </td>
990 * <td>
991 * An implementation of the column generation approach for graph coloring of Mehrotra and Trick.
992 * </td>
993 * </tr>
994 * <tr>
995 * <td>
996 * @subpage CYCLECLUSTERING_MAIN
997 * </td>
998 * <td>
999 * Branch-and-cut implementation of a graph partitioning problem used for Markov state models.
1000 * </td>
1001 * </tr>
1002 * <tr>
1003 * <td>
1004 * @subpage MINIISC_MAIN
1005 * </td>
1006 * <td>
1007 * A solver that computes irreducible infeasible subsystems using Benders decomposition
1008 * </td>
1009 * </tr>
1010 * <tr>
1011 * <td>
1012 * @subpage PBSOLVER_MAIN
1013 * </td>
1014 * <td>
1015 * A solver for pseudoboolean problems in OPB or WBO format. It complies by default with the technical regulations of
1016 * PB competition. Therefore, it includes a message handler to produce a valid general log and for optimization
1017 * problems an event handler to signal achievements of best primal solutions.
1018 * </td>
1019 * </tr>
1020 * <tr>
1021 * <td>
1022 * @subpage RINGPACKING_MAIN "Ringpacking"
1023 * </td>
1024 * <td>
1025 * An implementation of the column generation approach for the Ringpacking Problem. It includes a customized reader,
1026 * (global) problem data, variable data, and constraint handler.
1027 * </td>
1028 * </tr>
1029 * <tr>
1030 * <td>
1031 * @subpage SCHEDULER_MAIN
1032 * </td>
1033 * <td>
1034 * A solver for scheduling problems.
1035 * </td>
1036 * </tr>
1037 * </table>
1038 *
1039 */
1040
1041
1042/**@page SHELL Tutorial: the interactive shell
1043 *
1044 * If you are using \SCIP as a black box solver, here you will find some tips and tricks what you can do.
1045 *
1046 * @section TUTORIAL_OPTIMIZE Read and optimize a problem instance
1050 * First of all, we need a \SCIP binary and an example problem file to work with.
1051 * For installation we refer you to the \ref INSTALL section.
1052 *
1053 * Therefore, you can either download the \SCIP standard distribution (which includes problem files) and compile it on your own or you can download a
1054 * precompiled binary and an example problem separately. \SCIP can read files in LP, MPS, ZPL, WBO, FZN, PIP, OSiL, and
1055 * other formats (see \ref FILEREADERS).
1056 *
1057 * If you want to download the source code of the \SCIP standard distribution, we recommend to go to the <a
1058 * href="https://scipopt.org/#download">SCIP download section</a>, download the latest release,
1059 * inflate the tarball (e.g., with "tar xzf scipoptsuite-[version].tgz"), and follow the instructions
1060 * in the INSTALL file. The instance stein27, which will serve as an example in this tutorial, can be found under
1080 * Okay, let's solve the example instance... use "read check/instances/MIP/stein27.fzn" (or the problem file of your choice) to parse the instance file, "optimize" to solve it and "display
1081 * solution" to show the nonzero variables of the best found solution.
1199/**@page DOC How to search the documentation and source files structure for public interface functions
1200 *
1201 * If you are looking for a function in order to perform a specific task, the public \ref PUBLICAPI "SCIP C-API" is the place to look.
1202 * - It contains interface functions for all SCIP structs, both in the solver core or in one of the plugins.
1203 * - Plugins are mostly independent from each other, so to use them it is usually enough to browse the \ref PUBLICCOREAPI "Core API".
1204 * - If you want to add your own plugins, see the \ref HOWTOADD pages for exhaustive information for each plugin type.
1205 * - If you are learning SCIP with a concrete project in mind, looking at the available \ref EXAMPLES page may help you
1206 * getting started.
1207 * - See also \ref START "How to start a new project"
1208 *
1209 * Header file names of SCIP obey a consistent naming scheme: Type definitions and related objects such as enums are found in headers starting with "type_",
1210 * such as \ref type_var.h , which contains enums and type definitions related to \ref PublicVariableMethods "SCIP problem variables".
1211 * Definitions of the actual structs can be found in separate header files starting with "struct_".
1212 * All function definitions of the public SCIP API are split across header files starting with "pub_" such as \ref pub_cons.h
1213 * or headers starting with "scip_" such as \ref scip_cons.h .
1214 * The latter headers starting with "scip_" contain more complex functions, which always receive a scip pointer as first argument.
1215 * Those functions may affect several individual components controlled by SCIP. Such a function is SCIPbranchVar(), which
1216 * affects the search tree, which is controlled by SCIP itself and not meant to be accessed by user plugins.
1217 *
1218 * It should be sufficient to include scip/scip.h and scip/scipdefplugins.h for having all
1219 * needed functionality available in a project.
1220 *
1221 * If, for example, you are looking for information on how to create a problem instance, here are some steps you can take:
1222 *
1223 * 1. Browse the SCIP Core API and follow the path \ref PUBLICAPI > \ref PUBLICCOREAPI > \ref PublicProblemMethods > \ref GlobalProblemMethods > SCIPcreateProb()
1224 * 2. Here you can find information on the function's return value, preconditions, postconditions, parameters, as well as related functions.
1225 * 3. If you are unsure of how to use some of the parameters, it is worth looking for a basic version of the function.
1226 * This and other related functions may be found by either browsing neighboring functions and groups in the navigation tree to the left, or in the
1227 * 'References' and 'Referenced by' section of the function documentation. In this case, you can find `SCIPcreateProbBasic()`.
1228 *
1229 * The opposite case is that you already know the name of a function as, e.g., SCIPbranchVar().
1230 *
1231 * 1. Type the name of the function into the search bar to find the function documentation.
1232 * 2. In addition, you can find related functions by browsing the neighboring functions of the same group.
1233 * 3. In this example, you may now learn about SCIPgetNLPBranchCands() to query all integer
1234 * variables with fractional LP solution value, which are good candidates for classical branching on variables.
1235 *
1236 * Note that the \ref INTERNALAPI "private SCIP API" contains more complex functions and data structures that fill specialized roles and
1237 * is only for developers.
1238 * Those functions are **not** exported to the library and are therefore **not available in user projects** using the \ref PUBLICAPI "public SCIP API".
1349 * \par LINCONSUPGD_PRIORITY: priority of the constraint handler for upgrading of linear constraints
1350 * This property is only needed if a certain linear constraint can be upgraded to a more specific one. In one of
1351 * the first presolving rounds SCIP tries to upgrade linear constraints to more specialized constraints, such as
1352 * knapsack constraints. The upgrading calls are processed in the order of decreasing priority.
1353 *
1354 * \par NONLINCONSUPGD_PRIORITY: priority of the constraint handler for upgrading of nonlinear constraints
1355 * This property has the same effect as the LINCONSUPGD_PRIORITY parameter, see above, and should be set whenever
1356 * an upgrade functionality from a general nonlinear constraint to the more specific one is defined.
1357 *
1358 * \par CONSHDLR_SEPAFREQ: the default frequency for separating cuts.
1359 * The separation frequency defines the depth levels at which the constraint handler's separation functions \ref CONSSEPALP
1360 * and \ref CONSSEPASOL are called.
1361 * For example, a separation frequency of 7 means, that the separation callback is executed for subproblems that are
1362 * in depth 0, 7, 14, ... of the branching tree.
1363 * A separation frequency of 0 means, that the separation function is only called at the root node.
1364 * A separation frequency of -1 disables the separation function of the constraint handler.
1365 * \n
1366 * The separation frequency can be adjusted by the user.
1367 * This property of the constraint handler only defines the default value of the frequency.
1368 * If you want to have a more flexible control of when to execute the separation algorithm, you have to assign
1369 * a separation frequency of 1 and implement a check at the beginning of your separation algorithm whether you really
1370 * want to execute the separator or not.
1371 * If you do not want to execute the function, set the result code to SCIP_DIDNOTRUN.
1372 *
1373 * \par CONSHDLR_SEPAPRIORITY: the priority of the constraint handler for separation. (optional: to be set only if the constraint handler supports separation)
1374 * In each separation round during the price-and-cut loop of the subproblem processing or during the separation loop
1375 * of the primal solution separation, the separators and separation functions of the constraint handlers are called in
1376 * a predefined order, which is given by the priorities of the separators and the separation priorities of the
1377 * constraint handlers.
1378 * First, the separators with non-negative priority are called in the order of decreasing priority.
1379 * Next, the separation functions of the different constraint handlers are called in the order of decreasing separation
1380 * priority.
1381 * Finally, the separators with negative priority are called in the order of decreasing priority.
1382 * \n
1383 * The separation priority of the constraint handler should be set according to the complexity of the cut separation
1384 * algorithm and the impact of the resulting cuts:
1385 * Constraint handlers that provide fast algorithms that usually have a high impact (i.e., cut off a large portion of
1386 * the LP relaxation) should have a high priority.
1387 * See \ref CONSSEPALP and \ref CONSSEPASOL for further details of the separation callbacks.
1388 *
1389 * \par CONSHDLR_DELAYSEPA: the default for whether the separation function should be delayed, if other separators found cuts.
1390 * If the constraint handler's separation function is marked to be delayed, it is only executed after no other separator
1391 * or constraint handler found a cut during the price-and-cut loop.
1392 * If the separation function of the constraint handler is very expensive, you may want to mark it to be delayed until all
1393 * cheap separation methods have been executed.
1394 *
1395 * \par CONSHDLR_PROPFREQ: the default frequency for propagating domains.
1396 * This default frequency has the same meaning as the CONSHDLR_SEPAFREQ with respect to the domain propagation
1397 * callback of the constraint handler.
1398 * A propagation frequency of 0 means that propagation is only applied in preprocessing and at the root node.
1399 * A propagation frequency of -1 disables the propagation function of the constraint handler.
1400 *
1401 * \par CONSHDLR_DELAYPROP: the default for whether the propagation function should be delayed, if other propagators found reductions.
1402 * This property is analogous to the DELAYSEPA flag, but deals with the propagation function of the constraint handler.
1403 *
1404 * \par CONSHDLR_PROP_TIMING: the propagation timing mask of the constraint handler.
1405 * SCIP calls the domain propagation routines at different places in the node processing loop.
1406 * This property indicates at which places the propagation routine of the constraint handler is called.
1407 * Possible values are defined in type_timing.h and can be concatenated, e.g., as in SCIP_PROPTIMING_ALWAYS.
1408 *
1409 * \par CONSHDLR_PRESOLTIMING: the timing of the constraint handler's presolving function (FAST, MEDIUM, or EXHAUSTIVE).
1410 * Every presolving round starts with the FAST presolving timing. MEDIUM presolving functions are only called, if FAST presolvers did not find
1411 * enough reductions in this round so far, and EXHAUSTIVE presolving steps are only performed if all presolvers called before
1412 * in this round were unsuccessful.
1413 * Presolving functions should be assigned a timing based on how expensive they are, e.g., presolvers that provide fast algorithms that
1414 * usually have a high impact (i.e., remove lots of variables or tighten bounds of many variables) should have a timing FAST.
1415 * If a presolving function implements different algorithms of different complexity, it may also get multiple timings and check the timing
1416 * internally in the \ref CONSPRESOL callback to decide which algorithms to run.
1417 *
1418 * \par CONSHDLR_MAXPREROUNDS: the default maximal number of presolving rounds the constraint handler participates in.
1419 * The preprocessing is executed in rounds.
1420 * If enough changes have been applied to the model, an additional preprocessing round is performed.
1421 * The MAXPREROUNDS parameter of a constraint handler denotes the maximal number of preprocessing rounds the constraint
1422 * handler participates in.
1423 * A value of -1 means that there is no limit on the number of rounds.
1424 * A value of 0 means the preprocessing callback of the constraint handler is disabled.
1425 *
1426 *
1427 *
1428 * @section CONS_DATA Constraint Data and Constraint Handler Data
1429 *
1430 * Below the header "Data structures" you can find two structs called "struct SCIP_ConsData" and
1431 * "struct SCIP_ConshdlrData".
1432 * If you are using C++, you only need to define the "struct SCIP_ConsData".
1433 * The constraint handler data must be implemented as member variables of your constraint handler class.
1434 * \n
1435 * The constraint data are the information that is needed to define a single constraint of the constraint handler's
1436 * constraint class.
1437 * For example, the data of a knapsack constraint would consist of a list of variables, a list of weights, and
1438 * the capacity of the knapsack.
1439 * The data of a subtour constraint consists of the graph on which the problem is defined.
1440 * In the graph, each edge should be linked to the corresponding binary problem variable.
1441 * \n
1442 * The constraint handler data are additional variables, that belong to the constraint handler itself and which are
1443 * not specific to a single constraint.
1444 * For example, you can use these data to store parameters of the constraint handler or statistical information.
1817 * The CONSINITLP callback is executed before the first LP relaxation is solved.
1818 * It should add the LP relaxations of all "initial" constraints to the LP. The function should scan the constraints
1819 * array for constraints that are marked initial via calls to SCIPconsIsInitial() and put the LP relaxation
1820 * of all initial constraints to the LP with calls to SCIPaddRow().
1821 *
1822 * @subsection CONSSEPALP
1823 *
1824 * The CONSSEPALP callback is executed during the price-and-cut loop of the subproblem processing.
1825 * It should try to generate cutting planes for the constraints of the constraint handler in order to separate
1826 * the current LP solution.
1827 * The function is called in the LP solution loop, which means that a valid LP solution exists.
1828 *
1829 * Usually, a separation callback searches and produces cuts, that are added with a call to SCIPaddRow().
1830 * If the cut should be remembered in the global cut pool, it may also call SCIPaddPoolCut().
1831 * If the cut is constructed via multiple calls to SCIPaddVarToRow(), then performance can be improved by calling
1832 * SCIPcacheRowExtensions() before these additions and SCIPflushRowExtensions() after.
1833 * However, the callback may also produce domain reductions or add other constraints.
1834 *
1835 * The CONSSEPALP callback has the following options:
1836 * - detecting that the node is infeasible in the variables' bounds and can be cut off (result SCIP_CUTOFF)
1837 * - adding an additional constraint (result SCIP_CONSADDED)
1838 * - reducing a variable's domain (result SCIP_REDUCEDDOM)
1839 * - adding a cutting plane to the LP (result SCIP_SEPARATED)
1840 * - stating that the separator searched, but did not find domain reductions, cutting planes, or cut constraints
1841 * (result SCIP_DIDNOTFIND)
1842 * - stating that the separator was skipped (result SCIP_DIDNOTRUN)
1843 * - stating that the separator was skipped, but should be called again (result SCIP_DELAYED)
1844 * - stating that a new separation round should be started without calling the remaining separator functions (result SCIP_NEWROUND)
1845 *
1846 * Please see also the @ref CONS_ADDITIONALPROPERTIES section to learn about the properties
1847 * CONSHDLR_SEPAFREQ, CONSHDLR_SEPAPRIORITY, and CONSHDLR_DELAYSEPA, which influence the behaviour of SCIP
1848 * calling CONSSEPALP.
1849 *
1850 * @subsection CONSSEPASOL
1851 *
1852 * The CONSSEPASOL callback is executed during separation loop on arbitrary primal solutions.
1853 * It should try to generate cutting planes for the constraints of the constraint handler in order to separate
1854 * the given primal solution.
1855 * The function is not called in the LP solution loop, which means that there is no valid LP solution.
1856 *
1857 * Usually, a separation callback searches and produces cuts, that are added with a call to SCIPaddRow().
1858 * If the cut should be remembered in the global cut pool, it may also call SCIPaddPoolCut().
1859 * If the cut is constructed via multiple calls to SCIPaddVarToRow(), then performance can be improved by calling
1860 * SCIPcacheRowExtensions() before these additions and SCIPflushRowExtensions() after.
1861 * However, the callback may also produce domain reductions or add other constraints.
1862 *
1863 * The CONSSEPASOL callback has the following options:
1864 * - detecting that the node is infeasible in the variables' bounds and can be cut off (result SCIP_CUTOFF)
1865 * - adding an additional constraint (result SCIP_CONSADDED)
1866 * - reducing a variable's domain (result SCIP_REDUCEDDOM)
1867 * - adding a cutting plane to the LP (result SCIP_SEPARATED)
1868 * - stating that the separator searched, but did not find domain reductions, cutting planes, or cut constraints
1869 * (result SCIP_DIDNOTFIND)
1870 * - stating that the separator was skipped (result SCIP_DIDNOTRUN)
1871 * - stating that the separator was skipped, but should be called again (result SCIP_DELAYED)
1872 * - stating that a new separation round should be started without calling the remaining separator functions (result SCIP_NEWROUND)
1873 *
1874 * Please see also the @ref CONS_ADDITIONALPROPERTIES section to learn about the properties
1875 * CONSHDLR_SEPAFREQ, CONSHDLR_SEPAPRIORITY, and CONSHDLR_DELAYSEPA, which influence the behaviour of SCIP
1876 * calling CONSSEPASOL.
1877 *
1878 * @subsection CONSPROP
1879 *
1880 * The CONSPROP callback is called during the subproblem processing.
1881 * It should propagate the constraints, which means that it should infer reductions in the variables' local bounds
1882 * from the current local bounds.
1883 * This technique, which is the main workhorse of constraint programming, is called "node preprocessing" in the
1884 * Integer Programming community.
1885 *
1886 * The CONSPROP callback has the following options:
1887 * - detecting that the node is infeasible in the variables' bounds and can be cut off (result SCIP_CUTOFF)
1888 * - reducing a variable's domain (result SCIP_REDUCEDDOM)
1889 * - stating that the propagator searched, but did not find domain reductions, cutting planes, or cut constraints
1890 * (result SCIP_DIDNOTFIND)
1891 * - stating that the propagator was skipped (result SCIP_DIDNOTRUN)
1892 * - stating that the propagator was skipped, but should be called again (result SCIP_DELAYED)
1893 *
1894 * Please see also the @ref CONS_ADDITIONALPROPERTIES section to learn about the properties
1895 * CONSHDLR_PROPFREQ, CONSHDLR_DELAYPROP, and CONSHDLR_PROP_TIMING, which influence the behaviour of SCIP
1896 * calling CONSPROP.
1897 *
1898 * @subsection CONSRESPROP
1899 *
1900 * If the constraint handler should support \ref CONF "conflict analysis", it has to supply a CONSRESPROP function.
1901 * It also should call SCIPinferVarLbCons() or SCIPinferVarUbCons() in domain propagation instead of SCIPchgVarLb() or
1902 * SCIPchgVarUb() in order to deduce bound changes on variables.
1903 * In the SCIPinferVarLbCons() and SCIPinferVarUbCons() calls, the handler provides the constraint that deduced the
1904 * variable's bound change, and an integer value <code>inferinfo</code> that can be arbitrarily chosen.
1905 *
1906 * The propagation conflict resolving function CONSRESPROP must then be implemented to provide the "reasons" for the bound
1907 * changes, i.e., the bounds of variables at the time of the propagation, which forced the constraint to set the
1908 * conflict variable's bound to its current value. It can use the <code>inferinfo</code> tag to identify its own propagation rule
1909 * and thus identify the "reason" bounds. The bounds that form the reason of the assignment must then be provided by
1910 * calls to SCIPaddConflictLb() and SCIPaddConflictUb() in the propagation conflict resolving function.
1911 *
1912 * <b>Note:</b> The fact that <code>inferinfo</code> is an integer, as opposed to an arbitrary data object, is a compromise between space and speed. Sometimes a propagator would
1913 * need more information to efficiently infer the original propagation steps that lead to the conflict. This would,
1914 * however, require too much space. In the extreme, the original propagation steps have to be repeated.
1915 *
1916 * For example, the \ref cons_logicor.h "logicor constraint" \f$c = x \vee y \vee z\f$ fixes variable \f$z\f$ to TRUE (i.e., changes the lower
1917 * bound of \f$z\f$ to 1.0), if both, \f$x\f$ and \f$y\f$, are assigned to FALSE (i.e., if the upper bounds of these
1918 * variables are 0.0). It uses <code>SCIPinferVarLbCons(scip, z, 1.0, c, 0)</code> to apply this assignment (an
1919 * inference information tag is not needed by the constraint handler and is set to 0). In the conflict analysis, the
1920 * constraint handler may be asked to resolve the lower bound change on \f$z\f$ with constraint \f$c\f$, that was
1921 * applied at a time given by a bound change index "bdchgidx". With a call to <code>SCIPgetVarLbAtIndex(z,
1922 * bdchgidx)</code>, the handler can find out, that the lower bound of variable \f$z\f$ was set to 1.0 at the given
1923 * point of time, and should call <code>SCIPaddConflictUb(scip, x, bdchgidx)</code> and <code>SCIPaddConflictUb(scip, y,
1924 * bdchgidx)</code> to tell SCIP, that the upper bounds of \f$x\f$ and \f$y\f$ at this point of time were the reason for
1925 * the deduction of the lower bound of \f$z\f$.
1926 *
1927 * If conflict analysis should not be supported, the function has to set the result code to SCIP_DIDNOTFIND. Although
1928 * this is a viable approach to circumvent the implementation of the usually rather complex conflict resolving function, it
1929 * will make the conflict analysis less effective. We suggest to first omit the conflict resolving function and check how
1930 * effective the \ref CONSPROP "propagation function" is. If it produces a lot of propagations for your application, you definitely should
1931 * consider implementing the conflict resolving function.
1932 *
1933 * @subsection CONSPRESOL
1934 *
1935 * The CONSPRESOL callback is called during preprocessing.
1936 * It should try to tighten the domains of the variables, tighten the coefficients of the constraints of the constraint
1937 * handler, delete redundant constraints, aggregate and fix variables if possible, and upgrade constraints to more
1938 * specific types.
1939 *
1940 * If the CONSPRESOL callback applies changes to the constraint data, you also have to implement the \ref CONSTRANS callback
1941 * in order to copy the constraint data to the transformed problem space and protect the original problem from the
1942 * preprocessing changes.
1943 *
1944 * To inform SCIP that the presolving function found a reduction the result pointer has to be set in a proper way.
1945 * The following options are possible:
1946 *
1947 * - SCIP_UNBOUNDED : at least one variable is not bounded by any constraint in objective direction
1948 * - SCIP_CUTOFF : at least one constraint is infeasible in the variable's bounds
1949 * - SCIP_SUCCESS : the presolver found a reduction
1950 * - SCIP_DIDNOTFIND : the presolver searched, but did not find a presolving change
1951 * - SCIP_DIDNOTRUN : the presolver was skipped
1952 * - SCIP_DELAYED : the presolver was skipped, but should be called again
1953 *
1954 * Please see also the @ref CONS_ADDITIONALPROPERTIES section to learn about the properties
1955 * CONSHDLR_PRESOLTIMING and CONSHDLR_MAXPREROUNDS, which influence the behaviour of SCIP
1956 * calling CONSPRESOL.
1957 *
1958 * @subsection CONSACTIVE
1959 *
1960 * The CONSACTIVE callback is called each time a constraint of the constraint handler is activated.
1961 * For example, if a constraint is added locally to a subproblem, the CONSACTIVE callback is called whenever the
1962 * search enters the subtree where the constraint exists.
1963 *
1964 * @subsection CONSDEACTIVE
1965 *
1966 * The CONSDEACTIVE callback is called each time a constraint of the constraint handler is deactivated.
1967 * For example, if a constraint is added locally to a subproblem, the CONSDEACTIVE callback is called whenever the
1968 * search leaves the subtree where the constraint exists.
1969 *
1970 * @subsection CONSENABLE
1971 *
1972 * The CONSENABLE callback is called each time a constraint of the constraint handler is enabled.
1973 * Constraints might be active without being enabled. In this case, only the feasibility checks are executed,
1974 * but domain propagation and separation is skipped.
1975 *
1976 * @subsection CONSDISABLE
1977 *
1978 * The CONSDISABLE callback is called each time a constraint of the constraint handler is disabled.
1979 *
1980 * @subsection CONSPRINT
1981 *
1982 * The CONSPRINT callback is called, when the user asks SCIP to display the problem to the screen
1983 * or save the problem into a file. This is, however, only the case if the user requested the CIP format.
1984 * For more details about reading and writing with SCIP we refer to the \ref READER "file readers". In this
1985 * callback the constraint handler should display the data of the constraint in an appropriate form.
1986 * The output format that is defined by the CONSPRINT callbacks is called CIP format.
1987 * In later versions of SCIP, the constraint handlers should also be able to parse (i.e., read) constraints
1988 * which are given in CIP format.
1989 *
1990 * @subsection CONSCOPY
1991 *
1992 * The CONSCOPY callback is used whenever constraints should be copied from one SCIP instance into another SCIP
1993 * instance. This function comes with the necessary parameters to do so, most importantly with a mapping of the variables of the
1994 * source SCIP instance to the corresponding variables of the target SCIP instance, and a mapping for the constraints
1995 * in the same way. For a complete list of all arguments of this callback see type_cons.h.
1996 *
1997 * To get the corresponding target variable of a given source variable, you can use the variable map directly:
2175 * At the bottom of "pricer_mypricer.c" you can find the interface function SCIPincludePricerMypricer(), which also appears in "pricer_mypricer.h".
2176 * It is called by the user, if (s)he wants to include the pricer, i.e., if (s)he wants to solve a model for which variables should
2177 * be generated by this pricer.
2178 *
2179 * This function only has to be adjusted slightly.
2180 * It is responsible for notifying SCIP of the presence of the pricer. For this, you can either call SCIPincludePricer(),
2181 * or SCIPincludePricerBasic() since SCIP version 3.0. In the latter variant, \ref PRICER_ADDITIONALCALLBACKS "additional callbacks"
2182 * must be added via setter functions as, e.g., SCIPsetPricerCopy(). We recommend this latter variant because
2183 * it is more stable towards future SCIP versions which might have more callbacks, whereas source code using the first
2184 * variant must be manually adjusted with every SCIP release containing new callbacks for pricers in order to compile.
2185 *
2186 *
2187 * In addition, the pricer has to be activated before the solution process starts, like it is done
2188 * in the pricer of the Coloring application (applications/Coloring/src/reader_col.c) by calling
2469 * You also have to initialize the fields in struct SCIP_PresolData afterwards. For freeing the
2470 * presolver data, see \ref PRESOLFREE.
2471 *
2472 * You may also add user parameters for your presolver, see \ref PARAM for how to add user parameters and
2473 * the function SCIPincludePresolTrivial() in src/scip/presol_trivial.c for an example.
2474 *
2475 *
2476 * @section PRESOL_FUNDAMENTALCALLBACKS Fundamental Callbacks of a Presolver
2477 *
2478 * The fundamental callbacks of the plugins are the ones that have to be implemented in order to obtain
2479 * an operational algorithm.
2480 * They are passed together with the presolver itself to SCIP using SCIPincludePresol() or SCIPincludePresolBasic(),
2481 * see @ref PRESOL_INTERFACE.
2482 *
2483 * Presolver plugins have only one fundamental callback, namely the @ref PRESOLEXEC function.
2484 * This function has to be implemented for every presolver; the other callbacks are optional.
2485 * In the C++ wrapper class scip::ObjPresol, the scip_exec() method (which corresponds to the PRESOLEXEC callback) is a virtual
2486 * abstract member function.
2487 * You have to implement it in order to be able to construct an object of your presolver class.
2488 *
2489 * Additional documentation for the callbacks, in particular to their input parameters,
2490 * can be found in type_presol.h.
2491 *
2492 * @subsection PRESOLEXEC
2493 *
2494 * The PRESOLEXEC callback is called inside the presolving loop and should perform the actual presolving reductions.
2495 * It should inspect the problem instance at hand and simplify it by tightening bounds of variables, aggregating or fixing
2496 * variables, changing the type of variables, modifying the graph that represents the instance of your application, and
2497 * the like.
2498 *
2499 * Typical functions called by a presolver are, for example, SCIPchgVarType(), SCIPfixVar(), SCIPaggregateVars(), SCIPtightenVarLb(),
2500 * and SCIPtightenVarUb().
2501 *
2502 *
2503 * @section PRESOL_ADDITIONALCALLBACKS Additional Callbacks of a Presolver
2504 *
2505 * The additional callbacks do not need to be implemented in every case. However, some of them have to be
2506 * implemented for most applications, they can be used, for example, to initialize and free private data.
2507 * Additional callbacks can either be passed directly with SCIPincludePresol() to SCIP or via specific
2508 * <b>setter functions</b> after a call of SCIPincludePresolBasic(), see also @ref PRESOL_INTERFACE.
2509 *
2510 * @subsection PRESOLFREE
2511 *
2512 * If you are using presolver data (see \ref PRESOL_DATA and \ref PRESOL_INTERFACE), you have to implement this function in order to free the presolver data.
2513 * This can be done by the following procedure:
2558 * Separators are used to generate cutting planes that strengthen the LP relaxation of the problem formulation, but are
2559 * not required for a completeness and correctness of the model.
2560 * In contrast, constraint-based cutting planes, the second type of cutting planes in SCIP, are separated in the CONSSEPALP and
2561 * CONSSEPASOL callbacks of the constraint handlers, see \ref CONSSEPALP and \ref CONSSEPASOL. These cuts are
2562 * valid inequalities or even facets of the polyhedron described by a single constraint or a subset of the constraints of
2563 * a single constraint class. See also
2564 * "When should I implement a constraint handler, when should I implement a separator?" on \ref FAQ.
2565 * \n
2566 * A complete list of all separators contained in this release can be found \ref SEPARATORS "here".
2567 *
2568 * We now explain how users can add their own separators.
2569 * Take the separator for the class of Gomory mixed integer inequalities (src/scip/sepa_gomory.c) as an example.
2570 * As all other default plugins, it is written in C. C++ users can easily adapt the code by using the scip::ObjSepa wrapper
2571 * base class and implement the scip_...() virtual methods instead of the SCIP_DECL_SEPA... callbacks.
2572 *
2573 * Additional documentation for the callbacks of a separator, in particular for the input parameters,
2574 * can be found in the file type_sepa.h.
2575 *
2576 * Here is what you have to do to implement a separator:
2577 * -# Copy the template files src/scip/sepa_xyz.c and src/scip/sepa_xyz.h into files "sepa_myseparator.c"
2578 * and "sepa_myseparator.h".
2579 \n
2580 * Make sure to adjust your build system such that these files are compiled and linked to your project. \n
2581 * If you are adding a new default plugin, this means updating the `src/CMakeLists.txt` and `Makefile` files in the SCIP distribution.
2582 * -# Use `SCIPincludeSepaMyseparator()` in order to include the separator into your SCIP instance,
2583 * e.g., in the main file of your project (see, e.g., src/cmain.c in the Binpacking example). \n
2584 * If you are adding a new default plugin, this include function must be added to `src/scipdefplugins.c`.
2585 * -# Open the new files with a text editor and replace all occurrences of "xyz" by "myseparator".
2586 * -# Adjust the properties of the separator (see \ref SEPA_PROPERTIES).
2587 * -# Define the separator data (see \ref SEPA_DATA). This is optional.
2588 * -# Implement the interface functions (see \ref SEPA_INTERFACE).
2589 * -# Implement the fundamental callbacks (see \ref SEPA_FUNDAMENTALCALLBACKS).
2590 * -# Implement the additional callbacks (see \ref SEPA_ADDITIONALCALLBACKS). This is optional.
2591 *
2592 *
2593 * @section SEPA_PROPERTIES Properties of a Separator
2594 *
2595 * At the top of the new file "sepa_myseparator.c", you can find the separator properties.
2596 * These are given as compiler defines.
2597 * In the C++ wrapper class, you have to provide the separator properties by calling the constructor
2598 * of the abstract base class scip::ObjSepa from within your constructor.
2599 * The properties you have to set have the following meaning:
2600 *
2601 * \par SEPA_NAME: the name of the separator.
2602 * This name is used in the interactive shell to address the separator.
2603 * Additionally, if you are searching for a separator with SCIPfindSepa(), this name is looked up.
2604 * Names have to be unique: no two separators may have the same name.
2605 *
2606 * \par SEPA_DESC: the description of the separator.
2607 * This string is printed as a description of the separator in the interactive shell.
2608 *
2609 * \par SEPA_PRIORITY: the priority of the separator.
2610 * In each separation round during the price-and-cut loop of the subproblem processing or the separation loop
2611 * of the primal solution separation, the separators and separation functions of the constraint handlers are called in
2612 * a predefined order, which is given by the priorities of the separators and the separation priorities
2613 * of the constraint handlers (see \ref CONS_PROPERTIES).
2614 * First, the separators with non-negative priority are called in the order of decreasing priority.
2615 * Next, the separation functions of the constraint handlers are called in the order of decreasing separation
2616 * priority.
2617 * Finally, the separators with negative priority are called in the order of decreasing priority. An easy way to list the
2618 * priorities of all separators and constraint handlers is to type "display separators" and "display conshdlrs" in
2619 * the interactive shell.
2620 * \n
2621 * The priority of the separator should be set according to the complexity of the cut separation algorithm and the
2622 * impact of the resulting cuts: separators that provide fast algorithms that usually have a high impact (i.e., cut off
2623 * a large portion of the LP relaxation) should have a high priority.
2624 * See \ref SEPAEXECLP and \ref SEPAEXECSOL for further details of the separation callbacks.
2625 *
2626 * \par SEPA_FREQ: the default frequency for separating cuts.
2627 * The frequency defines the depth levels at which the separation functions \ref SEPAEXECLP and \ref SEPAEXECSOL are called.
2628 * For example, a frequency of 7 means, that the separation callback is executed for subproblems that are in depth
2629 * 0, 7, 14, ... of the branching tree. A frequency of 0 means, that the separation function is only called at the root node.
2630 * A frequency of -1 disables the separator.
2631 * \n
2632 * The frequency can be adjusted by the user. This property of the separator only defines the default value of the frequency.
2633 * If you want to have a more flexible control of when to execute the separation algorithm, you have to assign
2634 * a frequency of 1 and implement a check at the beginning of your separation functions whether you really want to execute
2635 * the separation or not. If you do not want to execute it, set the result code of
2636 * \ref SEPAEXECLP and \ref SEPAEXECSOL to SCIP_DIDNOTRUN.
2637 *
2638 * \par SEPA_MAXBOUNDDIST: the default maximal relative distance from the current node's dual bound to primal bound compared to best node's dual bound for applying separation.
2639 * At the current branch-and-bound node, the relative distance from its dual bound (local dual bound)
2640 * to the primal bound compared to the best node's dual bound (global dual bound) is considered. The separation function
2641 * of the separator will only be applied at the current node if this relative distance does not exceed SEPA_MAXBOUNDDIST.
2642 * \n
2643 * For example, if the global dual bound is 50 and the primal bound is 60, SEPA_MAXBOUNDDIST = 0.25 means that separation
2644 * is only applied if the current node's dual bound is in the first quarter of the interval [50,60], i.e., if it is less
2645 * than or equal to 52.5.
2646 * \n
2647 * In particular, the values 0.0 and 1.0 mean that separation is applied at the current best node only or at all
2648 * nodes, respectively. Since separation seems to be most important to apply at nodes that define to the global
2649 * dual bound, 0.0 is probably a good choice for SEPA_MAXBOUNDDIST.
2650 * Note that separators with a frequency of SEPA_FREQ = 0 are only applied at the root node.
2651 * Obviously, at the root node the local dual bound is equal to the global dual bound and thus, the separator is called
2652 * for any value of SEPA_MAXBOUNDDIST.
2653 *
2654 * \par SEPA_USESSUBSCIP: Does the separator use a secondary SCIP instance?
2655 * Some heuristics and separators solve MIPs or SAT problems and use a secondary SCIP instance. Examples are
2656 * Large Neighborhood Search heuristics such as RINS and Local Branching or the CGMIP separator. To avoid recursion,
2657 * these plugins usually deactivate all other plugins that solve MIPs. If a separator uses a secondary SCIP instance,
2658 * this parameter has to be TRUE and it is recommended to call SCIPsetSubscipsOff() for the secondary SCIP instance.
2659 *
2660 * \par SEPA_DELAY: the default for whether the separation function should be delayed, if other separators or constraint handlers found cuts.
2661 * If the separator's separation function is marked to be delayed, it is only executed after no other separator
2662 * or constraint handler found a cut during the price-and-cut loop, and in the last separation or stalling round,
2663 * either in the end, or in an additional round if only the maximal subsequent round is exceeded.
2664 * If the separation function of the separator is very expensive, you may want to mark it to be delayed until all cheap
2665 * separation functions have been executed.
2666 *
2667 * @section SEPA_DATA Separator Data
2668 *
2669 * Below the header "Data structures" you can find a struct which is called "struct SCIP_SepaData".
2670 * In this data structure, you can store the data of your separator. For example, you should store the adjustable
2671 * parameters of the separator in this data structure. In a separator, user parameters for the maximal number of
2672 * separation rounds per node and for the maximal number of cuts separated per separation round might be useful.
2673 * If you are using C++, you can add separator data as usual as object variables to your class.
2674 * \n
2675 * Defining separator data is optional. You can leave the struct empty.
2824 * Propagators are used to tighten the domains of the variables. Like for cutting planes, there are two different types
2825 * of domain propagations. Constraint based (primal) domain propagation algorithms are part of the corresponding
2826 * constraint handlers, see \ref CONSPROP. In contrast, domain propagators usually provide dual propagations, i.e.,
2827 * propagations that can be applied using the objective function and the current best known primal solution. This
2828 * section deals with such propagators.
2829 *
2830 * A complete list of all propagators contained in this release can be found \ref PROPAGATORS "here".
2831 *
2832 * We now explain how users can add their own propagators. Take the pseudo objective function propagator
2833 * (src/scip/prop_pseudoobj.c) as an example. As all other default plugins, it is written in C. C++ users can easily
2834 * adapt the code by using the scip::ObjProp wrapper base class and implement the @c scip_...() virtual methods instead
2835 * of the @c SCIP_DECL_PROP... callbacks.
2836 *
2837 * Additional documentation for the callbacks of a propagator can be found in the file type_prop.h.
2838 *
2839 * Here is what you have to do to implement a propagator:
2840 * -# Copy the template files src/scip/prop_xyz.c and src/scip/prop_xyz.h into files named "prop_mypropagator.c"
2841 * and "prop_mypropagator.h".
2842 * \n
2843 * Make sure to adjust your build system such that these files are compiled and linked to your project. \n
2844 * If you are adding a new default plugin, this means updating the `src/CMakeLists.txt` and `Makefile` files in the SCIP distribution.
2845 * -# Use `SCIPincludePropMypropagator()` in order to include the propagator into your SCIP instance,
2846 * e.g., in the main file of your project (see, e.g., src/cmain.c in the Binpacking example). \n
2847 * If you are adding a new default plugin, this include function must be added to `src/scipdefplugins.c`.
2848 * -# Open the new files with a text editor and replace all occurrences of "xyz" by "mypropagator".
2849 * -# Adjust the properties of the propagator (see \ref PROP_PROPERTIES).
2850 * -# Define the propagator data (see \ref PROP_DATA). This is optional.
2851 * -# Implement the interface functions (see \ref PROP_INTERFACE).
2852 * -# Implement the fundamental callbacks (see \ref PROP_FUNDAMENTALCALLBACKS).
2853 * -# Implement the additional callbacks (see \ref PROP_ADDITIONALCALLBACKS). This is optional.
2854 *
2855 * @section PROP_PROPERTIES Properties of a Propagator
2856 *
2857 * At the top of the new file "prop_mypropagator.c" you can find the propagator properties. These are given as compiler
2858 * defines. The presolving-related properties are optional,
2859 * they only have to be defined if the propagator supports presolving routines.
2860 * In the C++ wrapper class, you have to provide the propagator properties by calling the constructor of the
2861 * abstract base class scip::ObjProp from within your constructor. The properties you have the following meaning:
2862 *
2863 * @subsection PROP_FUNDAMENTALPROPERTIES Fundamental properties of a propagator
2864 *
2865 * \par PROP_NAME: the name of the propagator.
2866 * This name is used in the interactive shell to address the propagator. Additionally, if you are searching for a
2867 * propagator with SCIPfindProp(), this name is searched for. Names have to be unique: no two propagators may have the
2868 * same name.
2869 *
2870 * \par PROP_DESC: the description of the propagator.
2871 * This string is printed as a description of the propagator in the interactive shell.
2872 *
2873 * \par PROP_PRIORITY: the priority of the propagator.
2874 * In each propagation round, the propagators and propagation functions of the constraint handlers are called in a
2875 * predefined order, which is given by the priorities of the propagators and the check priorities of the constraint
2876 * handlers. First, the propagators with non-negative priority are called in order of decreasing priority. Next, the
2877 * propagation functions of the different constraint handlers are called in order of decreasing check priority. Finally,
2878 * the propagators with negative priority are called in order of decreasing priority. \n The priority of the
2879 * propagators should be set according to the complexity of the propagation algorithm and the impact of the domain
2880 * propagations: propagators providing fast algorithms that usually have a high impact (i.e., tighten many bounds)
2881 * should have a high priority.
2882 *
2883 * \par PROP_FREQ: the default frequency for propagating domains.
2884 * The frequency defines the depth levels at which the propagation function \ref PROPEXEC is called. For example, a
2885 * frequency of 7 means, that the propagation callback is executed for subproblems that are in depth 0, 7, 14, ... of
2886 * the branching tree. A frequency of 0 means that propagation is only applied in preprocessing and at the root node. A
2887 * frequency of -1 disables the propagator.
2888 * \n
2889 * The frequency can be adjusted by the user. This property of the propagator only defines the default value of the
2890 * frequency.\n
2891 * <b>Note:</b> If you want to have a more flexible control of when to execute the propagation algorithm, you have to
2892 * assign a frequency of 1 and implement a check at the beginning of your propagation algorithm whether you really want
2893 * to execute the domain propagation or not. If you do not want to execute it, set the result code to SCIP_DIDNOTRUN.
2894 *
2895 * \par PROP_DELAY: the default for whether the propagation function should be delayed, if other propagators or constraint handlers found domain reductions.
2896 * If the propagator's propagation function is marked to be delayed, it is only executed after no other propagator or
2897 * constraint handler found a domain reduction in the current iteration of the domain propagation loop. If the
2898 * propagation function of the propagator is very expensive, you may want to mark it to be delayed until all cheap
2899 * propagation functions have been executed.
2900 *
2901 * \par PROP_TIMING: the timing mask of the propagator.
2902 * SCIP calls the domain propagation routines at different places in the node processing loop.
2903 * This property indicates at which places the propagator is called.
2904 * Possible values are defined in type_timing.h and can be concatenated, e.g., as in SCIP_PROPTIMING_ALWAYS.
3108 * Branching rules are used to split the problem at the current node into smaller subproblems. Branching rules can be called at three
3109 * different occasions, which is why they have three different execution functions (see \ref
3110 * BRANCHRULE_ADDITIONALCALLBACKS). Branching is performed if:
3111 * - the LP solution of the current problem is fractional. In this case, the integrality constraint handler calls the
3112 * \ref BRANCHEXECLP functions of the branching rules.
3113 * - the list of external branching candidates is not empty. This will only be the case if branching candidates were added
3114 * by a user's \ref RELAX "relaxation handler" or \ref CONS "constraint handler" plugin, calling SCIPaddExternBranchCand().
3115 * These branching candidates should be processed by the \ref BRANCHEXECEXT function.
3116 * - if an integral solution violates one or more constraints and this infeasibility could not be resolved in the callbacks
3117 * \ref CONSENFOLP and \ref CONSENFOPS of the corresponding constraint handlers. In this case, the \ref BRANCHEXECPS function will be called. This is the
3118 * standard case, if you use SCIP as a pure CP or SAT solver. If the LP or any other type of relaxation is used, then
3119 * branching on pseudo solutions works as a last resort.
3120 *
3121 * The idea of branching rules is to take a global view on the problem. In contrast, branching paradigms which are
3122 * specific to one type of constraint are best implemented within the enforcement callbacks of your constraint handler.
3123 * See, e.g., the constraint specific branching rules provided by the constraint handlers for special ordered sets
3124 * (src/scip/cons_sos{1,2}.c)).
3125 * \n
3126 * All branching rules that come with the default distribution of SCIP create two subproblems by splitting a single
3127 * variable's domain. It is, however, fully supported to implement much more general branching schemes, for example by
3128 * creating more than two subproblems, or by adding additional constraints to the subproblems instead of tightening the
3129 * domains of the variables.
3130 * \n
3131 * A complete list of all branching rules contained in this release can be found \ref BRANCHINGRULES "here".
3132 * However, note that constraint handlers can implement their own branching when enforcing constraints.
3133 * In particular the handler for nonlinear constraints currently does not use the branching plugins for spatial branching
3134 * by default. Its behavior can be adjusted with the parameters in category constraints/nonlinear/branching.
3135 *
3136 * We now explain how users can add their own branching rules. Take the most infeasible LP branching rule
3137 * (src/scip/branch_mostinf.c) as an example. As all other default plugins, it is written in C. C++ users can easily
3138 * adapt the code by using the scip::ObjBranchrule wrapper base class and implement the scip_...() virtual methods instead of
3139 * the SCIP_DECL_BRANCH... callbacks.
3140 *
3141 * Additional documentation for the callbacks of a branching rule can be found in the file type_branch.h.
3142 *
3143 * Here is what you have to do to implement a branching rule:
3144 * -# Copy the template files src/scip/branch_xyz.c and src/scip/branch_xyz.h into files named
3145 * "branch_mybranchingrule.c" and "branch_mybranchingrule.h".
3146 * \n
3147 * Make sure to adjust your build system such that these files are compiled and linked to your project. \n
3148 * If you are adding a new default plugin, this means updating the `src/CMakeLists.txt` and `Makefile` files in the SCIP distribution.
3149 * -# Use `SCIPincludeBranchruleMybranchingrule()` in order to include the branching rule into your SCIP instance,
3150 * e.g., in the main file of your project (see, e.g., src/cmain.c in the Binpacking example). \n
3151 * If you are adding a new default plugin, this include function must be added to `src/scipdefplugins.c`.
3152 * -# Open the new files with a text editor and replace all occurrences of "xyz" by "mybranchingrule".
3153 * -# Adjust the properties of the branching rule (see \ref BRANCHRULE_PROPERTIES).
3154 * -# Define the branching rule data (see \ref BRANCHRULE_DATA). This is optional.
3155 * -# Implement the interface functions (see \ref BRANCHRULE_INTERFACE).
3156 * -# Implement the fundamental callbacks (see \ref BRANCHRULE_FUNDAMENTALCALLBACKS).
3157 * -# Implement the additional callbacks (see \ref BRANCHRULE_ADDITIONALCALLBACKS). This is optional.
3158 *
3159 *
3160 * @section BRANCHRULE_PROPERTIES Properties of a Branching Rule
3161 *
3162 * At the top of the new file "branch_mybranchingrule.c" you can find the branching rule properties.
3163 * These are given as compiler defines.
3164 * In the C++ wrapper class, you have to provide the branching rule properties by calling the constructor
3165 * of the abstract base class scip::ObjBranchrule from within your constructor.
3166 * The properties you have to set have the following meaning:
3167 *
3168 * \par BRANCHRULE_NAME: the name of the branching rule.
3169 * This name is used in the interactive shell to address the branching rule.
3170 * Additionally, if you are searching for a branching rule with SCIPfindBranchrule(), this name is looked up.
3171 * Names have to be unique: no two branching rules may have the same name.
3172 *
3173 * \par BRANCHRULE_DESC: the description of the branching rule.
3174 * This string is printed as a description of the branching rule in the interactive shell.
3175 *
3176 * \par BRANCHRULE_PRIORITY: the default value for the priority of the branching rule.
3177 * In the subproblem processing, the branching rules are called in decreasing order of their priority until
3178 * one succeeded to branch. Since most branching rules are able to generate a branching in all situations,
3179 * only the rule of highest priority is used. In combination with the BRANCHRULE_MAXDEPTH and
3180 * BRANCHRULE_MAXBOUNDDIST settings, however, interesting strategies can be easily employed. For example,
3181 * the user can set the priority of the "full strong branching" strategy to the highest value and assign the
3182 * second highest value to the "reliable pseudo cost" rule. If (s)he also sets the maximal depth for the
3183 * "full strong branching" to 5, in the top 5 depth levels of the search tree the "full strong branching" is
3184 * applied, while in the deeper levels "reliable pseudo cost branching" is used.
3185 * \n
3186 * Note that the BRANCHRULE_PRIORITY property only specifies the default value of the priority. The user can
3187 * change this value arbitrarily.
3188 *
3189 * \par BRANCHRULE_MAXDEPTH: the default value for the maximal depth level of the branching rule.
3190 * This parameter denotes the maximal depth level in the branch-and-bound tree up to which the branching function of the
3191 * branching rule will be applied. Use -1 for no limit.
3192 * \n
3193 * Note that this property only specifies the default value. The user can change this value arbitrarily.
3194 *
3195 * \par BRANCHRULE_MAXBOUNDDIST: the default value for the maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying branching.
3196 * At the current branch-and-bound node, the relative distance from its dual bound (local dual bound)
3197 * to the primal bound compared to the best node's dual bound (global dual bound) is considered. The branching function of
3198 * the branching rule will only be applied at the node if this relative distance does not exceed BRANCHRULE_MAXBOUNDDIST.
3199 * \n
3200 * For example, if the global dual bound is 50 and the primal bound is 60, BRANCHRULE_MAXBOUNDDIST = 0.25 means that
3201 * branching is only applied if the current node's dual bound is in the first quarter of the interval [50,60], i.e., if it
3202 * is less than or equal to 52.5. In particular, the values 0.0 and 1.0 mean that the branching rule is applied at the
3203 * current best node only or at all nodes, respectively.
3204 * \n
3205 * Note that the BRANCHRULE_MAXBOUNDDIST property only specifies the default value of the maximal bound distance.
3206 * The user can change this value arbitrarily.
3207 *
3208 *
3209 * @section BRANCHRULE_DATA Branching Rule Data
3210 *
3211 * Below the header "Data structures" you can find a struct which is called "struct SCIP_BranchruleData".
3212 * In this data structure, you can store the data of your branching rule. For example, you should store the adjustable
3213 * parameters of the branching rule in this data structure.
3214 * If you are using C++, you can add branching rule data as usual as object variables to your class.
3215 * \n
3216 * Defining branching rule data is optional. You can leave the struct empty.
4485 * If this callback is not implemented, the expression is assumed to be indefinite.
4486 *
4487 * @subsection EXPRMONOTONICITY
4488 *
4489 * This callback is called when an expression is checked for its monotonicity with respect to a given child.
4490 * It is given the index of the child and shall return whether the expression is monotonically increasing or decreasing with respect to this child,
4491 * that is, when assuming that all other children are fixed.
4492 * Bounds on the children can be taken into account.
4493 * These can be evaluated and obtained via SCIPevalExprActivity() and SCIPexprGetActivity().
4494 *
4495 * The implementation in the absolute value expression handler serves as an example:
4584 * If this callback is not implemented, routines (in particular primal heuristics) that rely on solving NLPs cannot be used, as they currently rely on using forward differentiation for gradient computations.
4585 *
4586 * @subsection EXPRBWFWDIFF
4587 *
4588 * This callback is called when the Hessian of a function that is represented by an expression is computed.
4589 *
4590 * The function computes the total derivative, w.r.t. its children, of the partial derivative of expr w.r.t. childidx.
4591 * Equivalently, it computes the partial derivative w.r.t. childidx of the total derivative.
4592 *
4593 * The expression should be interpreted as an operator \f$ f(c_1, \ldots, c_n) \f$, where \f$ c_1, \ldots, c_n \f$ are the children,
4612 * If this callback is not implemented, there is currently no particular performance impact.
4613 * In a future version, not implementing this callback would mean that Hessians are not available for NLP solvers, in which case they may have to work with approximations.
4614 *
4615 * @subsection EXPRINTEVAL
4616 *
4617 * This callback is called when bounds on an expression need to be computed.
4618 * It shall compute an (as tight as possible) overestimate on the range that the expression values take w.r.t. bounds (given as \ref SCIP_INTERVAL) for the children.
4619 * The latter can be accessed via SCIPexprGetActivity().
4620 *
4621 * Often, interval evaluation is implemented analogous to evaluation with numbers.
4625 * If this callback is not implemented, the performance of domain propagation for nonlinear constraints and other routines that rely on bounds of expressions will be impacted severely.
4626 *
4627 * @subsection EXPRESTIMATE
4628 *
4629 * While \ref EXPRINTEVAL computes constant under- and overestimators,
4630 * this callback is called when linear under- or overestimators need to be computed.
4631 * The estimator shall be as tight as possible at a given point and must be valid w.r.t. given (local) bounds.
4632 * If the value of the estimator in the reference point is smaller (larger) than a given targetvalue
4633 * when underestimating (overestimating), then no estimator needs to be computed.
4634 * Note, that targetvalue can be infinite if any estimator will be accepted.
4635 *
4636 * The callback shall also indicate whether the estimator is also valid w.r.t. given global bounds and for which
4637 * child a reduction in the local bounds (usually by branching) would improve the estimator.
4638 *
4639 * For the absolute-value expression, the under- and overestimators are computed as follows:
4642 * If this callback is not implemented, updating the linear relaxation for nonlinear constraints that use this expression will not be possible, which has a severe impact on performance.
4643 *
4644 * @subsection EXPRINITESTIMATES
4645 *
4646 * This callback is similar to \ref EXPRESTIMATE, but is not given a reference point.
4647 * It can also return several (up to \ref SCIP_EXPR_MAXINITESTIMATES many) estimators.
4648 * A usecase for this callback is the construction of an initial linear relaxation of nonlinear constraints.
4649 *
4650 * For the absolute-value expression, the following initial under- and overestimators are computed:
4670 * See also SCIPsimplifyExpr() for more information on implemented simplification rules.
4671 *
4672 * If this callback is not implemented, reducing the problem size when variables are fixed may not be possible, which can have an impact on performance.
4673 * (Also bugs may show up as this situation is untested.)
4674 *
4675 * @subsection EXPRREVERSEPROP
4676 *
4677 * This callback is called when given bounds on an expression shall be propagated over the children of an expression.
4678 * Already existing bounds on the children (see \ref EXPRINTEVAL) shall be used.
4679 * That is, the function shall compute an interval overestimate on
4698 * Nonlinear handlers define the extended formulations of nonlinear constraints and provide domain propagation and separation routines on this extended formulation.
4699 * In difference to \ref EXPRHDLR "expression handlers", they do not define a function, but instead identify a
4700 * structure in an existing expression and provide bound tightening and separation on this structure similar to \ref EXPRINTEVAL, \ref EXPRREVERSEPROP, \ref EXPRINITESTIMATES, and \ref EXPRESTIMATE.
4701 * The structure typically consists of a composition of expressions.
4702 *
4703 * Nonlinear handlers are a new plugin type in SCIP and may still have some rough edges.
4704 * They resemble constraint handlers in some sense, but are specific to the handling of nonlinear constraints.
4705 * We suggest to read section "New Handler for Nonlinear Constraints" in the SCIP 8.0 release report (2021)
4706 * to understand the role and use of nonlinear handlers before attempting to implement one.
4707 *
4708 * A complete list of all nonlinear handlers contained in this release can be found \ref NLHDLRS "here".
4709 * In difference to many other plugins in SCIP, nonlinear handlers are not handled by the SCIP core but by the constraint handler for nonlinear constraints.
4710 *
4711 * Here is what you have to do to implement a nonlinear handler:
4712 * -# Copy the template files `src/scip/nlhdlr_xyz.c` and `src/scip/nlhdlr_xyz.h` into files `nlhdlr_mystruct.c` and `nlhdlr_mystruct.h`, respectively. \n
4713 * Make sure to adjust your build system such that these files are compiled and linked to your project. \n
4714 * If you are adding a new default plugin, this means updating the `src/CMakeLists.txt` and `Makefile` files in the SCIP distribution.
4715 * -# Use `SCIPincludeNlhdlrMystruct()` in order to include the nonlinear handler into your SCIP instance, e.g., in the main file of your project. \n
4716 If you are adding a new default plugin, this include function must be added to `src/scipdefplugins.c`.
4717 * -# Open the new files with a text editor and replace all occurrences of "xyz" by "mystruct".
4718 * -# Adjust the properties of the nonlinear handler (see \ref NLHDLR_PROPERTIES).
4719 * -# Define the nonlinear handler data and nonlinear handler expression data (see \ref NLHDLR_DATA). This is optional.
4720 * -# Implement the interface functions (see \ref NLHDLR_INTERFACE).
4721 * -# Implement the fundamental callbacks (see \ref NLHDLR_FUNDAMENTALCALLBACKS).
4722 * -# Implement the additional callbacks (see \ref NLHDLR_ADDITIONALCALLBACKS), where necessary.
4723 *
4724 * Additional documentation for the callbacks of a nonlinear handler, in particular for the input parameters,
4725 * can be found in the file \ref type_nlhdlr.h.
4726 *
4727 * @section NLHDLR_PROPERTIES Properties of a Nonlinear Handler
4728 *
4729 * At the top of the new file `nlhdlr_mystruct.c`, you can find the nonlinear handler properties.
4730 * These are given as compiler defines.
4731 * The properties you have to set have the following meaning:
4732 *
4733 * \par NLHDLR_NAME: the name of the nonlinear handler.
4734 * This name is used in the interactive shell to address the nonlinear handler.
4735 * Additionally, if you are searching for a nonlinear handler with SCIPfindNlhdlrNonlinear(), this name is looked up.
4736 * Names have to be unique: no two nonlinear handlers may have the same name.
4737 *
4738 * \par NLHDLR_DESC: the description of the nonlinear handler.
4739 * This string is printed as a description of the nonlinear handler in the interactive shell.
4740 *
4741 * \par NLHDLR_DETECTPRIORITY: the priority of the nonlinear handler when detecting structure.
4742 * This priority decides when the \ref NLHDLRDETECT callback of the nonlinear handler is called, relative to other nonlinear handlers, on an expression.
4743 * Typically, the priority should be strictly positive.
4744 * This is because the nonlinear handler "default" (having detection priority 0) will not become active on expressions that are already handled by other nonlinear handlers.
4745 *
4746 * \par NLHDLR_ENFOPRIORITY: the priority of the nonlinear handler when enforcing constraints in the extended formulations.
4747 * This priority decides when the callbacks that help on domain propagation and separation are called for an expression for which the nonlinear handler detected a structure.
4748 * A high priority means that the nonlinear handler will be called before others.
4749 * The nonlinear handler "default" has enforcement priority 0.
4750 *
4751 * @section NLHDLR_DATA Nonlinear Handler Data and Nonlinear Handler Expression Data
4752 *
4753 * Below the header "Data structures" you can find structs called `struct SCIP_NlhdlrData` and `struct SCIP_NlhdlrExprData`.
4754 * In this first data structure, you can store the data of your nonlinear handler.
4755 * For example, you should store the adjustable parameters of the nonlinear handler in this data structure.
4756 * In the second data structure, you can store data that is unique to an expression for which the nonlinear handler detected a structure.
4757 * For example, the nonlinear handler for quotients stores a representation of a detected quotient in this data structure.
4758 * \n
4759 * Defining nonlinear handler data and nonlinear handler expression data is optional. You can leave these structs empty.
4781 * @section NLHDLR_FUNDAMENTALCALLBACKS Fundamental Callbacks of a Nonlinear Handler
4782 *
4783 * The fundamental callbacks of the plugins are the ones that have to be implemented in order to obtain
4784 * an operational algorithm.
4785 * They are passed to SCIP when the nonlinear handler is created and included in SCIP via SCIPincludeNlhdlrNonlinear(),
4786 * see @ref NLHDLR_INTERFACE.
4787 *
4788 * Nonlinear handlers have two fundamental callbacks that need to be implemented.
4789 * Additional documentation for the callbacks, in particular to their input parameters,
4790 * can be found in \ref type_nlhdlr.h.
4791 *
4792 * @subsection NLHDLRDETECT
4793 *
4794 * This callback is called by the handler for nonlinear constraints when extended formulations are constructed.
4795 * The result of this callback determines the extended formulation.
4796 *
4797 * The nonlinear handler shall analyze the given expression (`expr`) and decide whether it wants to contribute
4798 * in enforcing the relation between bounds or an auxiliary variable (`auxvar`) associated with this expression and
4799 * its descendants (e.g., children) via linear under- or overestimation, cut generation, and/or activity computation and propagation.
4800 * For linear under- or overestimation and cut generation, an auxiliary variable can be assumed to
4801 * be associated with the expression and auxiliary variables may be requested for descendant expressions.
4802 *
4803 * We distinguish the following enforcement methods:
4804 * - \ref SCIP_NLHDLR_METHOD_SEPABELOW : linear underestimation of `expr` or cut generation for the relation `expr` ≤ `auxvar` (denoted as "below")
4805 * - \ref SCIP_NLHDLR_METHOD_SEPAABOVE : linear overestimation of `expr` or cut generation for the relation `expr` ≥ `auxvar` (denoted as "above")
4808 * On input, parameter `enforcing` indicates for any of these methods, whether
4809 * - it is not necessary to have such a method, e.g., because no `auxvar` will exist for `expr`, or no one uses or sets activities of this expression,
4810 * or because analysis of the expression has shown that a relation like `expr` ≥ `auxvar` is not necessary to be satisfied,
4811 * - or there already exists a nonlinear handler that will provide this method in an "enforcement" sense, that is,
4812 * it believes that no one else could provide this method in a stronger sense. (This is mainly used by the nonlinear handler "default" to check whether
4813 * it should still reach out to the expression handler or whether it would be dominated by some nonlinear handler.)
4814 *
4815 * The DETECT callback shall augment the `enforcing` bitmask by setting the enforcement methods it wants to provide in an "enforcement" sense.
4816 *
4817 * Additionally, the `participating` bitmask shall be set if the nonlinear handler wants to be called on this expression at all.
4818 * Here, it shall set all methods that it wants to provide, which are those set in `enforcing`, but additionally those where it wants
4819 * to participate but leave enforcement to another nonlinear handler.
4820 * This can be useful for nonlinear handlers that do not implement a complete enforcement, e.g., a handler that only contributes
4821 * cutting planes in some situations only.
4822 *
4823 * A nonlinear handler will be called only for those callbacks that it mentioned in `participating`, which is
4824 * - \ref NLHDLRENFO and/or \ref NLHDLRESTIMATE will be called with `overestimate==FALSE` if \ref SCIP_NLHDLR_METHOD_SEPABELOW has been set
4825 * - \ref NLHDLRENFO and/or \ref NLHDLRESTIMATE will be called with `overestimate==TRUE` if \ref SCIP_NLHDLR_METHOD_SEPAABOVE has been set
4826 * - \ref NLHDLRINTEVAL and/or \ref NLHDLRREVERSEPROP will be called if \ref SCIP_NLHDLR_METHOD_ACTIVITY has been set
4827 *
4828 * If \ref SCIP_NLHDLR_METHOD_SEPABELOW or \ref SCIP_NLHDLR_METHOD_SEPAABOVE has been set, then at least one of the
4829 * callbacks \ref NLHDLRENFO and \ref NLHDLRESTIMATE needs to be implemented.
4830 * Also \ref NLHDLREVALAUX will be called in this case.
4831 * If \ref SCIP_NLHDLR_METHOD_ACTIVITY has been set, then at least one of \ref NLHDLRINTEVAL and \ref NLHDLRREVERSEPROP needs to be implemented.
4832 * If the nonlinear handler chooses not to participate, then it must not set `nlhdlrexprdata` and can leave `participating` at its
4833 * initial value (\ref SCIP_NLHDLR_METHOD_NONE).
4834 *
4835 * Additionally, a nonlinear handler that decides to participate in any of the enforcement methods must call
4836 * @ref SCIPregisterExprUsageNonlinear() for every subexpression that it will use and indicate whether
4837 * - it will use an auxiliary variable in \ref NLHDLRENFO or \ref NLHDLRESTIMATE,
4838 * - it will use activity for some subexpressions when computing estimators or cuts, and
4839 * - it will use activity for some subexpressions when in \ref NLHDLRINTEVAL or \ref NLHDLRREVERSEPROP.
4840 *
4841 * Note that auxiliary variables do not exist in subexpressions during DETECT and are not created by a call to @ref SCIPregisterExprUsageNonlinear().
4842 * They will be available when the \ref NLHDLRINITSEPA callback is called.
4843 *
4844 * For an example, see the implementation of the DETECT callback for the nonlinear handler for quotients (src/scip/nlhdlr_quotient.c).
4845 *
4846 * @subsection NLHDLREVALAUX
4847 *
4848 * This callback is called by the constraint handler for nonlinear constraints when the violation of constraints in the extended formulation
4849 * (`expr` ≤/≥ `auxvar`) needs to be evaluated.
4850 * During constraint enforcement, this violation value is used to decide whether estimation and separation callbacks should be called.
4851 *
4852 * The function shall evaluate the expression w.r.t. the auxiliary variables that were introduced by the nonlinear handler (if any).
4853 * It can be assumed that the expression itself has been evaluated in the given sol.
4854 *
4855 * For an example, see the evaluation for the quotient nonlinear handler:
4858 * @section NLHDLR_ADDITIONALCALLBACKS Additional Callbacks of a Nonlinear Handler
4859 *
4860 * The additional callbacks do not need to be implemented in every case. However, some of them have to be
4861 * implemented for most applications, they can be used, for example, to initialize and free private data.
4862 * Additional callbacks can be passed via specific
4863 * <b>setter functions</b> after a call of SCIPincludeNlhdlrNonlinear(), see also @ref NLHDLR_INTERFACE.
4864 *
4865 * @subsection NLHDLRCOPYHDLR
4866 *
4867 * This callback is called when doing a copy of the constraint handler for nonlinear constraints.
4868 * It shall include the nonlinear handler into the copy of the constraint handler.
4869 *
4870 * @subsection NLHDLRFREEHDLRDATA
4871 *
4872 * If you are using nonlinear handler data (see \ref NLHDLR_DATA and \ref NLHDLR_INTERFACE), you have to implement this function
4873 * in order to free the nonlinear handler data.
4874 *
4875 * @subsection NLHDLRFREEEXPRDATA
4876 *
4877 * If you are using nonlinear handler expression data (see \ref NLHDLR_DATA and \ref NLHDLRDETECT), you have to implement this function
4878 * in order to free the nonlinear handler expression data.
4879 * This function is called when an extended formulation is freed.
4880 *
4881 * @subsection NLHDLRINIT
4882 *
4883 * This callback is called when the constraint handler for nonlinear constraints is initialized, that is, after the problem was transformed.
4884 * The nonlinear handler can use this callback to initialize or reset some data for the upcoming solve.
4885 *
4886 * @subsection NLHDLREXIT
4887 *
4888 * This callback is called when the constraint handler for nonlinear constraints is deinitialized, that is, before the transformed problem is freed.
4889 * The nonlinear handler can use this callback to free some data that was used for the previous solve only.
4890 *
4891 * @subsection NLHDLRINTEVAL
4892 *
4893 * This callback is called when bounds on a given expression shall be computed.
4894 * It is called for expressions for which the nonlinear handler registered to participate in \ref SCIP_NLHDLR_METHOD_ACTIVITY in \ref NLHDLRDETECT.
4895 * The function is given the currently available bounds to the expression and can return possibly tighter bounds.
4896 *
4897 * For a univariate quotient ((ax+b)/(cx+d)), the interval evaluation is implemented as follows:
4902 * This callback is called when bounds on a given expression shall be propagated to its successors.
4903 * It is called for expressions for which the nonlinear handler registered to participate in \ref SCIP_NLHDLR_METHOD_ACTIVITY in \ref NLHDLRDETECT.
4904 * The tighter intervals should be passed to the corresponding expression via SCIPtightenExprIntervalNonlinear().
4905 *
4906 * For a univariate quotient ((ax+b)/(cx+d)), reverse propagation is implemented as follows:
4911 * This callback is called when the constraint handler for nonlinear constraints initializes the LP relaxation (@ref CONSINITLP).
4912 * It is called for expressions for which the nonlinear handler registered to participate in \ref SCIP_NLHDLR_METHOD_SEPABELOW or \ref SCIP_NLHDLR_METHOD_SEPAABOVE in \ref NLHDLRDETECT.
4913 * The function shall initialize the separation data of the nonlinear handler, if any, and add initial cuts to the LP relaxation.
4914 * It can assume that auxiliary variables are available for expressions for which auxiliary variables were requested via SCIPregisterExprUsageNonlinear() in \ref NLHDLRDETECT.
4915 *
4916 * @subsection NLHDLREXITSEPA
4917 *
4918 * This callback is called when the solving process is finished and the branch and bound process data is freed (@ref CONSEXITSOL).
4919 * It is called for expressions for which the nonlinear handler registered to participate in \ref SCIP_NLHDLR_METHOD_SEPABELOW or \ref SCIP_NLHDLR_METHOD_SEPAABOVE in \ref NLHDLRDETECT and \ref NLHDLRINITSEPA was called.
4920 * The function shall deinitialize the separation data of the nonlinear handler, if any.
4921 *
4922 * @subsection NLHDLRENFO
4923 *
4924 * This callback is called when the constraint handler requires that the relation between the given expression and its auxiliary variable
4925 * (`expr` ≤ `auxvar` or `expr` ≥ `auxvar`) is violated by a given solution and this solution needs to be separated.
4926 * It is called for expressions for which the nonlinear handler registered to participate in \ref SCIP_NLHDLR_METHOD_SEPABELOW or \ref SCIP_NLHDLR_METHOD_SEPAABOVE in \ref NLHDLRDETECT.
4927 *
4928 * The nonlinear handler can enforce `expr` ≤/≥ `auxvar` by
4929 * - separation, i.e., finding an affine hyperplane (a cut) that separates the given point, or
4930 * - bound tightening, i.e., changing bounds on a variable so that the given point is outside the updated domain, or
4931 * - adding branching scores to potentially split the current problem into two subproblems.
4932 *
4933 * If parameter `inenforcement` is FALSE, then only the first option (separation) is allowed.
4934 *
4935 * If the nonlinear handler always separates by computing a linear under- or overestimator of `expr`,
4936 * then it is usually easier to implement the \ref NLHDLRESTIMATE callback instead.
4937 *
4938 * Note, that the nonlinear handler may also choose to separate for a relaxation of the mentioned sets,
4939 * e.g., `expr` ≤ upperbound(`auxvar`) or `expr` ≥ lowerbound(`auxvar`).
4940 * This is especially useful in situations where `expr` is the root expression of a constraint
4941 * and it is sufficient to satisfy `lhs` ≤ `expr` ≤ `rhs`.
4942 * The constraint handler ensures that `lhs` ≤ lowerbound(`auxvar`) and upperbound(`auxvar`) ≤ `rhs`.
4943 *
4944 * The constraint handler may call this callback first with `allowweakcuts` = FALSE and repeat later with
4945 * `allowweakcuts` = TRUE, if it didn't succeed to enforce a solution without using weak cuts.
4946 * If in enforcement and the nonlinear handler cannot enforce by separation or bound tightening, it should register
4947 * branching scores for those expressions where branching may help to compute tighter cuts in children.
4948 *
4949 * The nonlinear handler must set `result` to \ref SCIP_SEPARATED if it added a cut,
4950 * to \ref SCIP_REDUCEDDOM if it added a bound change, and
4951 * to \ref SCIP_BRANCHED if it added branching scores.
4952 * Otherwise, it may set result to \ref SCIP_DIDNOTRUN or \ref SCIP_DIDNOTFIND.
4953 *
4954 * @subsection NLHDLRESTIMATE
4955 *
4956 * This callback is called when the constraint handler requires that the relaxation between the given expression and its auxiliary variable
4957 * (`expr` ≤ `auxvar` or `expr` ≥ `auxvar`) is violated by a given solution and this solution needs to be separated.
4958 * It is called for expressions for which the nonlinear handler registered to participate in \ref SCIP_NLHDLR_METHOD_SEPABELOW or \ref SCIP_NLHDLR_METHOD_SEPAABOVE in \ref NLHDLRDETECT.
4959 * This function is a simpler alternative to \ref NLHDLRENFO and is called if \ref NLHDLRENFO is not implemented or does not succeed.
4960 *
4961 * The function shall compute one or several linear under- or overestimator of `expr` that are as tight as possible at a given point.
4962 * If the value of the estimator in the solution is smaller (larger) than a given targetvalue
4963 * when underestimating (overestimating), then no estimator needs to be computed.
4964 * Note, that targetvalue can be infinite if any estimator will be accepted.
4965 * If successful, it shall store the estimators in the given `rowpreps` data structure and set the
4966 * `rowprep->local` flag accordingly (SCIProwprepSetLocal()).
4967 * The sidetype of a rowprep must be set to \ref SCIP_SIDETYPE_LEFT if overestimating and
4968 * \ref SCIP_SIDETYPE_RIGHT if underestimating.
4969 *
4970 * The callback may also be required to indicate for which expression a reduction in the local bounds (usually by branching) would improve the estimator.
4971 * This is done by a call to SCIPaddExprsViolScoreNonlinear().
4972 *
4973 * For the quotient nonlinear handler, the estimators are computed as follows:
4978 * This callback is called by the constraint handler when it has caught a solution event from SCIP and option constraints/nonlinear/linearizeheursol has been enabled.
4979 * The constraint handler then calls the nonlinear handlers for all expressions they currently handle.
4980 * The nonlinear handler may use this opportunity to add a cut that supports its nonlinear function in the given solution to the cutpool.
4981 * For convex functions, this may help to accellerate proving optimality for a solution found by a NLP solver.
5210 * You also have to initialize the fields in struct SCIP_RelaxData afterwards.
5211 *
5212 * You may also add user parameters for your relaxation handler, see the function SCIPincludeConshdlrKnapsack() in
5213 * the \ref cons_knapsack.h "knapsack constraint handler" for an example of how to add user parameters.
5214 *
5215 *
5216 * @section RELAX_FUNDAMENTALCALLBACKS Fundamental Callbacks of a Relaxation Handler
5217 *
5218 * The fundamental callbacks of the plugins are the ones that have to be implemented in order to obtain
5219 * an operational algorithm.
5220 * They are passed together with the relaxation handler itself to SCIP using SCIPincludeRelax() or SCIPincludeRelaxBasic(),
5221 * see @ref RELAX_INTERFACE.
5222 *
5223 *
5224 * Relaxation handler plugins have only one fundamental callback, namely the \ref RELAXEXEC function.
5225 * This function has to be implemented for every relaxation handler; the other callbacks are optional.
5226 * In the C++ wrapper class scip::ObjRelax, the scip_exec() method (which corresponds to the \ref RELAXEXEC callback) is a virtual
5227 * abstract member function.
5228 * You have to implement it in order to be able to construct an object of your relaxation handler class.
5229 *
5230 * Additional documentation for the callbacks can be found in type_relax.h.
5231 *
5232 * @subsection RELAXEXEC
5233 * The RELAXEXEC is called in each relaxation solving round. It should solve the current
5234 * subproblem's relaxation.
5235 *
5236 * Note that, like the LP relaxation, the relaxation handler should only operate on variables for which the corresponding
5237 * column exists in the transformed problem. Typical functions called by a relaxation handler are SCIPconstructLP() and SCIPflushLP() to
5238 * make sure that the LP of the current node is constructed and its data can be accessed via calls to SCIPgetLPRowsData()
5239 * and SCIPgetLPColsData(), and SCIPseparateSol() to call the cutting plane separators for a given primal solution.
5240 *
5241 * The lowerbound computed by the relaxation should be returned in the lowerbound pointer. If the relaxation improves on the best
5242 * relaxation already computed (either <code>SCIPisRelaxSolValid()</code> returns FALSE, meaning that no relaxation solution
5243 * is available so far, or the lowerbound is larger than the value returned by <code>SCIPgetRelaxSolObj()</code>), then the primal
5244 * solution of the relaxation should be stored inside the data structures of SCIP with <code>SCIPsetRelaxSolVal()</code>,
5245 * <code>SCIPsetRelaxSolVals()</code> or <code>SCIPsetRelaxSolValsSol()</code>. If you set the values one by one, you will need to call
5246 * <code>SCIPmarkRelaxSolValid()</code> to inform SCIP that the solution is complete and valid. With the "includeslp" argument of
5247 * <code>SCIPsetRelaxSolVals()</code>, <code>SCIPsetRelaxSolValsSol()</code> and <code>SCIPmarkRelaxSolValid()</code> you need to tell SCIP
5248 * whether the relaxation included all lp rows. In this case, the solution will be enforced and, if feasible, added to the solution storage if the
5249 * lowerbound of this relaxator is larger than the LP's. You may also call SCIPtrySolFree() directly from the
5250 * relaxation handler to make sure that a solution is added to the solution storage if it is feasible, even if the relaxator does not
5251 * include the LP or another relaxator produced a stronger bound. Also note that when setting the values of the relaxation solution one by one,
5252 * the objective value of the relaxation solution will be updated incrementally. If the whole solution should be updated, using SCIPsetRelaxSolVals()
5253 * instead or calling SCIPclearRelaxSolVals() before setting the first value to reset the solution and the objective value to 0 may help the numerics.
5254 * Furthermore, there is a list of external branching candidates, that can be filled by relaxation handlers and constraint handlers,
5255 * allowing branching rules to take these candidates as a guide on how to split the problem into subproblems. If the relaxation
5256 * solution is enforced, the integrality constraint handler will add external branching candidates for the relaxation solution
5257 * automatically, but the relaxation handler can also directly call <code>SCIPaddExternBranchCand()</code>.
5258 *
5259 * Usually, the RELAXEXEC callback only solves the relaxation and provides a lower (dual) bound through the corresponding pointer and
5260 * possibly a solution through <code>SCIPsetRelaxSolVal()</code> calls.
5261 * However, it may also produce domain reductions, add additional constraints or generate cutting planes. It has the
5262 * following options:
5263 * - detecting that the node is infeasible in the variable's bounds and can be cut off (result SCIP_CUTOFF)
5264 * - adding an additional constraint and stating that the relaxation handler should not be called again on the same
5265 * relaxation (result SCIP_CONSADDED)
5266 * - reducing a variable's domain and stating that the relaxation handler should not be called again on the same
5267 * relaxation (result SCIP_REDUCEDDOM)
5268 * - adding a cutting plane to the LP and stating that the relaxation handler should not be called again on the same
5269 * relaxation (result SCIP_SEPARATED)
5270 * - stating that the relaxation handler solved the relaxation and should not be called again on the same relaxation
5271 * (result SCIP_SUCCESS)
5272 * - interrupting the solving process to wait for additional input, e.g., cutting planes (result SCIP_SUSPENDED)
5273 * - stating that the separator was skipped (result SCIP_DIDNOTRUN).
5274 *
5275 * In the above criteria, "the same relaxation" means that the LP relaxation stayed unmodified. This means in particular
5276 * that no row has been added and no bounds have been modified. For example, changing the bounds of a variable will, as
5277 * long as it was a COLUMN variable, lead to a modification in the LP such that the relaxation handler is called again
5278 * after it returned with the result code SCIP_REDUCEDDOM. If the relaxation solution should be enforced, the relaxation
5279 * handler has to produce a new solution in this case which satisfies the updated LP. If a relaxation handler should only run
5280 * once per node to compute a lower bound, it should store the node of the last relaxation call itself and return
5281 * SCIP_DIDNOTRUN for subsequent calls in the same node.
5282 *
5283 *
5284 * @section RELAX_ADDITIONALCALLBACKS Additional Callbacks of a Relaxation Handler
5285 *
5286 * The additional callbacks do not need to be implemented in every case. However, some of them have to be
5287 * implemented for most applications, they can be used, for example, to initialize and free private data.
5288 * Additional callbacks can either be passed directly with SCIPincludeRelax() to SCIP or via specific
5289 * <b>setter functions</b> after a call of SCIPincludeRelaxBasic(), see also @ref RELAX_INTERFACE.
5290 *
5291 * @subsection RELAXFREE
5292 *
5293 * If you are using relaxation handler data, you have to implement this function in order to free the relaxation handler
5294 * data. This can be done by the following procedure:
5795 * At the bottom of "disp_mydisplaycolumn.c" you can find the interface function SCIPincludeDispMydisplaycolumn(), which also
5796 * appears in "disp_mydisplaycolumn.h".
5797 * \n
5798 * This function only has to be adjusted slightly.
5799 * It is responsible for notifying SCIP of the presence of the display column by calling the function
5800 * SCIPincludeDisp().
5801 *
5802 * The interface function is called by the user, if (s)he wants to include the display column, i.e., if (s)he wants to use the display column in his
5803 * application.
5804 *
5805 * If you are using display column data, you have to allocate the memory for the data at this point.
6188 * You also have to initialize the fields in struct SCIP_NlpiData afterwards. For freeing the
6189 * NLPI data, see \ref NLPIFREE.
6190 *
6191 *
6192 * @section NLPI_FUNDAMENTALCALLBACKS Fundamental Callbacks of an NLPI
6193 *
6194 * The fundamental callbacks of the plugins are the ones that have to be implemented in order to obtain
6195 * an operational algorithm. Most NLPI callbacks are fundamental.
6196 *
6197 * Additional documentation of the callbacks, in particular to their input parameters,
6198 * can be found in \ref type_nlpi.h.
6199 *
6200 * @subsection NLPIFREE
6201 *
6202 * The NLPIFREE callback is executed if the NLP solver interface data structure should be freed, e.g., when a SCIP instance is freed.
6203 *
6204 * @subsection NLPICREATEPROBLEM
6205 *
6206 * The NLPICREATEPROBLEM callback is executed if a particular NLP problem is to be created.
6207 * The callback should initialize a SCIP_NlpiProblem struct here that corresponds to an empty NLP.
6208 *
6209 * @subsection NLPIFREEPROBLEM
6210 *
6211 * The NLPIFREEPROBLEMPOINTER callback is executed if a particular NLP problem is to be freed.
6212 * The callback should free a SCIP_NlpiProblem struct here.
6213 *
6214 * @subsection NLPIADDVARS
6215 *
6216 * The NLPIADDVARS callback is executed if a set of variables with lower and upper bounds and names should be added to a particular NLP.
6217 * The callback must add the new variables behind the previously added variables, if any.
6218 * If NULL is given for the lower bounds arguments, -infinity is assumed as lower bound for each new variable.
6219 * If NULL is given for the upper bounds arguments, +infinity is assumed as upper bound for each new variable.
6220 * It is also permitted to use NULL for the names argument.
6221 *
6222 * @subsection NLPIADDCONSTRAINTS
6223 *
6224 * The NLPIADDCONSTRAINTS callback is executed if a set of constraints should be added to a particular NLP.
6225 * Constraints are specified by providing left- and right-hand-sides, linear coefficients, expressions, and constraint names.
6226 * All of these arguments are optional, giving NULL for left-hand-sides corresponds to -infinity, giving NULL for right-hand-sides corresponds to +infinity.
6227 *
6228 * @subsection NLPISETOBJECTIVE
6229 *
6230 * The NLPISETOBJECTIVE callback is executed to set the objective function of a particular NLP.
6231 *
6232 * @subsection NLPICHGVARBOUNDS
6233 *
6234 * The NLPICHGVARBOUNDS callback is executed to change the bounds on a set of variables of an NLP.
6235 *
6236 * @subsection NLPICHGCONSSIDES
6237 *
6238 * The NLPICHGCONSSIDES callback is executed to change the sides on a set of constraints of an NLP.
6239 *
6240 * @subsection NLPIDELVARSET
6241 *
6242 * The NLPIDELVARSET callback is executed to delete a set of variables from an NLP.
6243 * The caller provides an array in which for each variable it is marked whether it should be deleted.
6244 * In the same array, the function should return the new position of each variable in the NLP, or -1 if it was deleted.
6245 *
6246 * @subsection NLPIDELCONSSET
6247 *
6248 * The NLPIDELCONSSET callback is executed to delete a set of constraints from an NLP.
6249 * The caller provides an array in which for each constraint it is marked whether it should be deleted.
6250 * In the same array, the function should return the new position of each constraint in the NLP, or -1 if it was deleted.
6251 *
6252 * @subsection NLPICHGLINEARCOEFS
6253 *
6254 * The NLPICHGLINEARCOEFS callback is executed to change the coefficients in the linear part of the objective function or a constraint of an NLP.
6255 *
6256 * @subsection NLPICHGEXPR
6257 *
6258 * The NLPICHGEXPR callback is executed to replace the expression of the objective function or a constraint of an NLP.
6259 *
6260 * @subsection NLPICHGOBJCONSTANT
6261 *
6262 * The NLPICHGOBJCONSTANT callback is executed to change the constant offset of the objective function of an NLP.
6263 *
6264 * @subsection NLPISOLVE
6265 *
6266 * The NLPISOLVE callback is executed when an NLP should be solved.
6267 * The solver may use the initial guess provided by \ref NLPISETINITIALGUESS as starting point.
6268 * The status of the solving process and solution can be requested by
6273 * The NLPIGETSOLSTAT callback can be used to request the solution status (solved, infeasible, ...) after an NLP has been solved.
6274 *
6275 * @subsection NLPIGETTERMSTAT
6276 *
6277 * The NLPIGETTERMSTAT callback can be used to request the termination reason (normal, iteration limit, ...) after an NLP has been solved.
6278 *
6279 * @subsection NLPIGETSOLUTION
6280 *
6281 * The NLPIGETSOLUTION callback can be used to request the primal and dual solution values after an NLP solve.
6282 * The function should pass pointers to arrays of variable values to the caller.
6283 * It is possible to return only primal values for the variables, but no values for the dual variables, e.g., if a solver does not compute such values.
6284 *
6285 * @subsection NLPIGETSTATISTICS
6286 *
6287 * The NLPIGETSTATISTICS callback can be used to request the statistical values (number of iterations, time, ...) after an NLP solve.
6288 * The function should fill the provided NLPSTATISTICS data structure.
6289 *
6290 * @section NLPI_ADDITIONALCALLBACKS Additional Callbacks of an NLPI
6291 *
6292 * The additional callbacks do not need to be implemented in every case.
6293 *
6294 * @subsection NLPICOPY
6295 *
6296 * The NLPICOPY callback is executed if the plugin should be copied, e.g., when a SCIP instance is copied.
6297 *
6298 * It is advisable to implement this callback to make the NLP solver available in sub-SCIPs.
6299 * Note that the sub-NLP heuristic solves NLPs in a sub-SCIP.
6300 *
6301 * @subsection NLPIGETSOLVERPOINTER
6302 *
6303 * The NLPIGETSOLVERPOINTER callback can be used to pass a pointer to a solver specific data structure to the user.
6304 * Return NULL if you do not have a pointer to return.
6305 *
6306 * @subsection NLPIGETPROBLEMPOINTER
6307 *
6308 * The NLPIGETPROBLEMPOINTER callback can be used to pass a pointer to a solver specific data structure of the NLP to the user.
6309 *
6310 * @subsection NLPISETINITIALGUESS
6311 *
6312 * The NLPISETINITIALGUESS callback is executed to provide primal and dual initial values for the variables and constraints of an NLP.
6313 * For a local solver, it is strongly advisable to implement this callback, as these values should be used as a starting point for the search.
6314 * It is possible to pass a NULL pointer for any of the arguments (primal values of variables, dual values of variable bounds, dual values of constraints).
6315 * In this case, the solver should clear previously set starting values and setup its own starting point.
6357 * The expression interpreter has to implement a set of interface function.
6358 * In your "exprinterpret_myad.c", these functions are mostly dummy functions that return error codes.
6359 *
6360 * @subsection SCIPexprintGetName
6361 *
6362 * The SCIPexprintGetName() function should return the name of the expression interpreter.
6363 *
6364 * @subsection SCIPexprintGetDesc
6365 *
6366 * The SCIPexprintGetDesc() function should return a short description of the expression interpreter, e.g., the name of the developer of the code.
6367 *
6368 * @subsection SCIPexprintGetCapability
6369 *
6370 * The SCIPexprintGetCapability() function should return a bitmask that indicates the capabilities of the expression interpreter,
6371 * i.e., whether it can compute gradients and Hessians.
6372 *
6373 * @subsection SCIPexprintCreate
6374 *
6375 * The SCIPexprintCreate() function is called to create an expression interpreter data structure.
6376 * The function should initialize a `struct SCIP_ExprInt` here.
6377 *
6378 * @subsection SCIPexprintFree
6379 *
6380 * The SCIPexprintFree() function is called to free an expression interpreter data structure.
6381 * The function should free a `struct SCIP_ExprInt` here.
6382 *
6383 * @subsection SCIPexprintCompile
6384 *
6385 * The SCIPexprintCompile() function is called to initialize the data structures that are required to evaluate a particular expression.
6386 * The expression interpreter can create and return data that is particular to a given expression in the argument `exprintdata`.
6387 *
6388 * @subsection SCIPexprintFreeData
6389 *
6390 * The SCIPexprintFreeData() function is called to free the data that is particular to a given expression and was possibly created in SCIPexprintCompile().
6391 *
6392 * @subsection SCIPexprintGetExprCapability
6393 *
6394 * The SCIPexprintGetExprCapability() function is called to request the capability to evaluate a specific expression by the expression interpreter.
6395 *
6396 * In cases of user-given expressions, higher order derivatives may not be available for the user-expression,
6397 * even if the expression interpreter could handle these. This function allows to recognize that, e.g., the
6398 * Hessian for an expression is not available because it contains a user expression that does not provide
6399 * Hessians.
6400 *
6401 * @subsection SCIPexprintEval
6402 *
6403 * The SCIPexprintEval() function is called when the value of an expression should be computed for a point.
6404 *
6405 * @subsection SCIPexprintGrad
6406 *
6407 * The SCIPexprintGrad() function is called when the gradient of an expression represented by an expression should be computed for a point.
6408 *
6409 * @subsection SCIPexprintHessianSparsity
6410 *
6411 * The SCIPexprintHessianSparsity() function is called when the sparsity structure of the Hessian matrix should be computed and returned.
6412 * Only the position of nonzero entries in the lower-triangular part of Hessian should be reported.
6413 *
6414 * @subsection SCIPexprintHessian
6415 *
6416 * The SCIPexprintHessian() function is called when the Hessian of an expression should be computed for a point.
6499 * At the bottom of "table_mystatisticstable.c" you can find the interface function SCIPincludeTableMystatisticstable(), which also
6500 * appears in "table_mystatisticstable.h".
6501 * \n
6502 * This function only has to be adjusted slightly.
6503 * It is responsible for notifying SCIP of the presence of the statistics table by calling the function
6504 * SCIPincludeTable().
6505 *
6506 * The interface function is called by the user, if (s)he wants to include the statistics table, i.e., if (s)he wants to use the statistics table in an
6507 * application.
6508 *
6509 * If you are using statistics table data, you have to allocate the memory for the data at this point.
7362/**@page CONCSCIP How to use the concurrent solving mode
7363 *
7364 * @section Overview
7365 *
7366 * In \SCIP 4.0 a new feature has been added that allows to run multiple \SCIP instances with different settings
7367 * on one problem in parallel. To use this feature \SCIP has to be compiled with an additional make option to
7368 * enable the threading functionality (e.g. TPI=tny, see \ref MAKE).
7369 * Then, a concurrent solve can be started by using the <code>concurrentopt</code> command instead of the <code>optimize</code> command
7370 * in the \SCIP shell, or by calling the interface function SCIPsolveConcurrent().
7371 * To configure the behavior of the concurrent solving mode there are new parameters in the category <code>concurrent/</code>
7372 * and <code>parallel/</code> which will be explained here shortly.
7373 *
7374 * @section CONTROLNTHREADS Controlling the number of threads
7375 *
7376 * The parameters <code>parallel/maxnthreads</code> and <code>parallel/minnthreads</code> can be used to configure the number of threads
7377 * that sould be used for solving. \SCIP will try to use the configured maximum number of threads. If the
7378 * problem that is currently read is too large \SCIP will automatically use fewer threads, but never
7379 * go below the configured minimum number of threads.
7380 *
7381 * @section USEEMPHSETTINGS Using emphasis settings
7382 *
7383 * The parameters <code>concurrent/scip.../prefprio</code> configure which concurrent solvers should be used.
7384 * The concurrent solver <code>scip</code> will use the same settings as the \SCIP instance configured by the user.
7385 * The other concurrent solvers, e.g. <code>scip-feas</code>, will load the corresponding emphasis setting.
7386 * The behavior of the prefprio parameter is as follows: If it is set to 1.0 for <code>scip-feas</code> and
7387 * <code>scip-opti</code>, and to 0.0 for every other concurrent solver, then the threads will be evenly
7388 * distributed between the two types <code>scip-feas</code> and <code>scip-opti</code>. An example: if 4 threads are used each of these concurrent
7389 * solvers will use 2 threads. If the <code>prefprio</code> for one solver is set to 0.33 and the other is set to 1.0, then the former will use 1 thread
7390 * and the latter will use 3 threads of the 4 available threads.
7394 * To use custom settings for the concurrent solvers there is the parameter <code>concurrent/paramsetprefix</code>. If custom parameters
7395 * should be loaded by the concurrent solvers, then it must point to the folder where they are located (including a path separator at the end).
7396 * The parameter settings must be named after the concurrent solvers, e.g. if only the concurrent solver <code>scip</code> is used
7397 * they should be named <code>scip-1</code>, <code>scip-2</code>, <code>scip-3</code>. When different types of concurrent solvers are used the counter
7398 * starts at one for each of them, e.g. <code>scip-1</code> and <code>scip-feas-1</code>.
7450/**@page DECOMP How to provide a problem decomposition
7451 *
7452 * Most mixed-integer programs have sparse constraint matrices in the sense that most columns and rows have only very few nonzero entries,
7453 * maybe except for a few outlier columns/rows with many nonzeros.
7454 * A decomposition identifies subproblems (subsets of rows and columns) that are only linked to each other via a set of linking rows and/or linking
7455 * columns, but are otherwise independent.
7456 * The special case of completely independent subproblems (with no linking rows and columns), for example, can be solved by solving
7457 * the much smaller subproblems and concatenating their optimal solutions.
7458 * This case has already been integrated into SCIP as a successful presolving technique (see @ref cons_components.c).
7459 * Another use of decomposition within SCIP is the @ref BENDDECF "Benders Decomposition framework".
7460 *
7461 * Since SCIP 7.0, it is easier to pass user decompositions to SCIP that can be used within Benders decomposition or by user algorithms.
7462 * This page introduces the struct SCIP_DECOMP and gives examples how to create and use it.
7463 *
7464 * @section DECOMP_OVERVIEW Overview
7465 *
7466 * In the following, we present decompositions of mixed-integer programs. However, the generalization to Constraint Integer Programs is straightforward.
7467 *
7468 * Concretely, for \f$k \geq 0\f$ we call a partition \f$\mathcal{D}=(D^{\text{row}},D^{\text{col}})\f$ of the rows and columns of the constraint matrix \f$A\f$ into \f$k + 1\f$ pieces each,
7473 * a decomposition of \f$A\f$ if \f$D^{\text{row}}_{q} \neq \emptyset\f$, \f$D^{\text{col}}_{q} \neq \emptyset\f$ for \f$q \in \{1,\dots,k\}\f$ and if it holds for all \f$i\in D^{\text{row}}_{q_{1}}, j\in D^{\text{col}}_{q_{2}}\f$ that \f$a_{i,j} \neq 0 \Rightarrow q_{1} = q_{2}\f$.
7474 * The special rows \f$L^{\text{row}}\f$ and columns \f$L^{\text{col}}\f$, which may be empty, are called linking rows and linking columns, respectively.
7475 * In other words, the inequality system \f$A x \geq b\f$ can be rewritten
7476 * with respect to a decomposition \f$\mathcal{D}\f$ by a suitable permutation of the rows
7477 * and columns of \f$A\f$ as equivalent system
7548 * is part of subproblem \f$q\f$, the handling of the linking variables/constraints depends on the chosen application context.
7549 * For example, in the heuristic @ref heur_padm.c several smaller subproblems are solved multiple times to get a feasible solution.
7550 * Also the @ref BENDDECF "Benders' decomposition framework" was extended with release 7.0 to use user decompositions.
7551 *
7552 * @section DECOMP_CREATION Creation via SCIP-API
7553 *
7554 * There are two different ways to provide a decomposition in SCIP.
7555 * It can be created with the SCIP-API or it can be read from a file.
7556 *
7557 * To create it with the API, the user must first create a decomposition with SCIPcreateDecomp() specifying
7558 * whether the decomposition belongs to the original or transformed problem and the number of blocks.
7559 * Then the variables and constraints can be assigned to one block or to the linking rows/columns by calling
7560 * SCIPdecompSetVarsLabels() and SCIPdecompSetConsLabels(), respectively.
7561 * To complete the decomposition or to ensure that it is internally consistent, SCIPcomputeDecompVarsLabels() or
7562 * SCIPcomputeDecompConsLabels() can be called.
7563 * Note that SCIPcomputeDecompVarsLabels() will ignore the existing variable labels and computes again the labels based on the constraint labels only;
7564 * SCIPcomputeDecompConsLabels() works in the same way and ignores the existing constraint labels.
7565 *
7566 * After the decomposition has been successfully created, it can be saved for later use in the DecompStore using SCIPaddDecomp().
7567 * Access to all decompositions in the DecompStore is possible with SCIPgetDecomps().
7568 *
7569 * @section DECOMP_READDEC Reading a decomposition from a file
7570 *
7571 * Alternatively, after a problem has been read, a related decomposition can be read from a dec-file.
7572 * Please refer to the @ref reader_dec.h "DEC file reader" for further information about the required file format.
7573 * Upon reading a valid dec-file, a decomposition structure is created, where the corresponding variable labels are inferred from the constraint labels, giving precedence to block over linking constraints.
7574 *
7575 * @section DECOMP_BENDERS Use for Benders
7576 *
7577 * If the variables should be labeled for the application of @ref BENDDECF "Benders' decomposition", the decomposition must be explicitly flagged by setting the parameter decomposition/benderslabels to TRUE.
7578 * With this setting, the variable's labeling takes place giving precedence to its presence in linking constraints over its presence in named blocks.
7579 *
7580 * @section DECOMP_TRANS Decomposition after problem transformation
7581 *
7582 * As the problem's constraints are constantly changing, or possibly deleted, during presolving, the constraints' labeling must be triggered again.
7583 * Therefore, SCIP automatically transforms all user decompositions at the beginning of the root node based on the variables' labels.
7615 * where \f$e_{q}\f$ is the number of inner edges within block \f$q\f$ and \f$m\f$ is the total number of edges.
7616 * The presence of an inner edge is identified through the presence of a variable in a constraint,
7617 * both—the variable and the constraint—belonging to the same block.
7618 * - the block graph statistics: A block graph is constructed with the aim of depicting the connection between the different blocks in a decomposition through the existing linking variables in the constraints.
7619 * Note that the linking constraints are intentionally skipped in this computation.
7620 * \f$ G = (V,E) \f$ denotes a block graph, with vertex set \f$V\f$ and edge set \f$E\f$.
7621 * Each vertex in the graph represents a block in the decomposition; \f$V = \{v_{1},\dots,v_{k}\}\f$.
7622 * An edge \f$e = \{ v_{s},v_{t} \}\f$ is added to \f$G\f$, if and only if there exists a column \f$\ell \in L^{\text{col}}\f$, a row \f$i \in D^{\text{row}}_{s}\f$
7623 * and a row \f$j \in D^{\text{row}}_{t}\f$, such that \f$a_{i,\ell} \neq 0\f$ and \f$a_{j,\ell} \neq 0\f$.
7624 * From the constructed graph, the number of edges, articulation points and connected components are computed, together with the maximum and minimum degree.
7625 * Note that building the block graph can become computationally expensive with large and dense decompositions.
7626 * Thus, it is possible through a user parameter <code>decomposition/maxgraphedge</code> to define a maximum edge limit.
7627 * The construction process will be interrupted once this limit is reached, in which case only approximate estimations of the block graph statistics will be displayed and accompanied with a warning message.
7723 * - the subproblem is convex: \f$g_i(x,y)\f$ convex on \f$X\times Y\f$ if \f$u_i<\infty\f$, \f$g_i(x,y)\f$ concave on \f$X\times Y\f$ if \f$\ell_i>-\infty\f$, and \f$Y=\mathbb{R}^m\f$, or
7724 * - the first stage variables are of binary type: \f$ X \subseteq \{0,1\}^n \f$.
7725 *
7726 * This framework can be used in four different
7727 * ways: inputting an instance in the SMPS file format, using the default Benders' decomposition implementation
7728 * (see src/scip/benders_default.c), implementing a custom Benders' decomposition plugin (see \ref BENDER), or by using
7729 * the Benders' decomposition mode of GCG.
7730 * An overview of how to use each of these functions will be provided in this section.
7731 *
7732 * @section BENDERSSMPS Inputting an instance in the SMPS file format.
7733 *
7734 * As part of the Benders' decomposition framework development, a reader for instances in the SMPS file format has been
7735 * implemented (see src/scip/reader_smps.c). The details regarding the SMPS file format can be found at:
7736 *
7737 * Birge, J. R.; Dempster, M. A.; Gassmann, H. I.; Gunn, E.; King, A. J. & Wallace, S. W.
7738 * A standard input format for multiperiod stochastic linear programs
7739 * IIASA, Laxenburg, Austria, WP-87-118, 1987
7740 *
7741 * In brief, the SMPS file format involves three different files:
7742 * - A core file (.cor): a problem instance in MPS format that is the core problem of a stochastic program.
7743 * - A time file (.tim): partitions the variables and constraints into the different stages of the stochastic program
7744 * - A stochastic file (.sto): describes the scenarios for each stage.
7745 *
7746 * The STO reader (see src/scip/reader_sto.c) constructs the stochastic program using the information from the core and
7747 * time files. By default, the STO reader will construct the deterministic equivalent of the stochastic program. A
7748 * parameter is provided "reading/sto/usebenders" that will inform the STO reader to apply Benders' decomposition to the
7749 * input stochastic program.
7750 *
7751 * @section BENDERSDECSTRUCTURE Inputting a user-defined decomposition structure
7752 *
7753 * Benders' decomposition can be applied from a user-provided decomposition structure. Details about the decomposition
7754 * structure and how to provide it to SCIP can be found at @ref DECOMP. Prior to reading the decomposition structure
7755 * into SCIP, it is necessary to inform SCIP that the variables and constraints must be labelled for Benders'
7756 * decomposition. This is achieved by setting the parameter "decomposition/benderslabels" to "TRUE". Following this,
7757 * Benders' decomposition will be applied if the parameter "decomposition/applybenders" is set to "TRUE".
7758 *
7759 * When Benders' decomposition is applied using the decomposition structure, the Benders' decomposition algorithm is
7760 * executed within a relaxator (see @ref RELAX). The relaxator is called when processing the root node of the original
7761 * SCIP instance, before the first LP solve. Within the relaxator, a sub-SCIP is created, upon which the Benders'
7762 * decomposition is applied. The default Benders' decomposition plugin (see @ref BENDERSDEFAULT) is used for applying
7763 * the decomposition. The master problem sub-SCIP is solved and then the solution from the Benders' decomposition
7764 * algorithm is returned.
7765 *
7766 * If the problem is solved to optimality by the Benders' decomposition algorithm, then the original SCIP instance
7767 * terminates. There are cases where the Benders' decomposition algorithm terminates without an optimal solution. As a
7768 * result, the original SCIP instance would continue solving. These cases are: reaching node, memory or solution limits,
7769 * or numerical issues meaning that the Benders' solution is not optimal for the original problem. The parameter
7770 * "relaxing/benders/continueorig" is provided to inform SCIP whether the original SCIP instance should continue solving
7771 * following the completion of the Benders' algorithm. By default, solving in the original SCIP instance is interrupted
7772 * when the relaxator finishes.
7773 *
7774 * The parameter setting and limits from the original SCIP instance are copied across to the master problem
7775 * sub-SCIP in the Benders' decomposition relaxator. It is possible to set a separate node limit for the Benders'
7776 * algorithm within the relaxator. This is achieved by using the parameter "relaxing/benders/nodelimit". A possible use
7777 * case for a separate Benders' node limit is that the Benders' algorithm could be used as an initial heuristics for the
7778 * original SCIP instance.
7779 *
7780 * An advantage over using the decomposition structure compared to an instance in the SMPS format is that the solution
7781 * to the original problem is easily accessible. At the completion of the Benders' decomposition algorithm, the best
7782 * know solution is copied back to the original SCIP instance. Note that using a decomposition structure is not the only
7783 * way to get the original problem solution from the Benders' decomposition algorithm. Whichever method you use, it is
7784 * possible to solve the Benders' decomposition subproblems by calling SCIPsetupBendersSubproblem() and then
7785 * SCIPsolveBendersSubproblem() for each subproblem using the best solution from the master problem. An example of this
7786 * can be found in solveBendersSubproblems() of `src/scip/relax_benders.c`.
7787 *
7788 * @section BENDERSDEFAULT Using the default Benders' decomposition plugin.
7789 *
7790 * A default implementation of a Benders' decomposition plugin has been included in \SCIP 6.0 (see
7791 * src/scip/benders_default.c). In order to use the default plugin, the user must create SCIP instances of the master
7792 * problem and subproblems. The subproblems must also contain a copy of the master problem variables, since these are
7793 * fixed to the master problem solution values during the subproblem solving loop. These SCIP instances for the master
7794 * and subproblems are passed to the default plugin by calling SCIPcreateBendersDefault().
7795 *
7796 * The mapping between the master and subproblem variables is performed automatically. The default solving and cut
7797 * generation methods are applied to solve the input problem. It is important to note that the mapping between the
7798 * master and subproblem variables relies on the variable names. The variables of the subproblem corresponding to
7799 * master problem variables must have the same name in both problems.
7800 *
7801 * The CAP (stochastic capacitated facility location problem) example demonstrates the use of the default Benders'
7802 * decomposition implementation within a project.
7803 *
7804 * @section BENDERSCUSTOM Implementing a custom Benders' decomposition implementation.
7805 *
7806 * A custom Benders' decomposition requires the implementation of a Benders' decomposition plugin. The key aspects for
7807 * implementing a custom Benders' decomposition plugin are explained in \ref BENDER.
7808 *
7809 * @section BENDERSGCG Using the Benders' decomposition mode of GCG
7810 *
7811 * In GCG 3.0, a Benders' decomposition mode has been implemented. This mode takes the decomposition found by the
7812 * detection schemes of GCG and applies Benders' decomposition. Using GCG it is possible to apply Benders' decomposition
7813 * to general problem without having to manually construct the decompositions.
7814 *
7815 * @section BENDERSOBJTYPE Objective type options for the Benders' decomposition
7816 *
7817 * Classically, the application of Benders' decomposition results in the inclusion of an auxiliary variable to provide an
7818 * underestimation of the subproblem objective value. If the subproblem can be separated into disjoint problems, then
7819 * this auxiliary variable can be substituted with the sum of auxiliary variables (one for each subproblem).
7820 *
7821 * While the summation of auxiliary variables is theoretically possible for all applications of Benders' decomposition,
7822 * there are problems where an alternative objective may be beneficial. An example is a multiple machine scheduling
7823 * problem with a makespan objective. To accommodate different objective types, the Benders' decomposition framework
7824 * allows for the objective types of summation (the classical method) or the minimum of the maximum subproblem auxiliary
7825 * variables. The objective type can be set using the function SCIPsetBendersObjectiveType(). Note that the different
7826 * objective types only have an impact if more than one subproblem is used in the Benders' decomposition.
7832/**@page PROBINGDIVING How to use probing and diving mode
7833 *
7834 * SCIP contains two methods to perform a temporary dive in the branch-and-bound tree: the diving mode and the probing mode.
7835 * Both methods enable the modification of variable bounds, addition of new constraints, or adjustments to the objective function.
7836 * Whereas the diving mode works directly on the LP structure, the probing mode creates temporary branch-and-bound nodes, which makes it possible to perform backtracks during a dive.
7837 * Probing allows to perform domain propagation at the temporary nodes and provides the ability to solve the LP by column generation if a pricer plugin is implemented; neither is possible in diving mode.
7838 *
7839 * After entering diving or probing mode by calling SCIPstartDive() and SCIPstartProbing(), respectively, there exist various functions that allow the user to temporarily change the LP.
7840 * An overview for diving can be found here[https://www.scipopt.org/doc/html/group__PublicLPDivingMethods.php] and for the probing mode here[https://scipopt.org/doc/html/group__PublicProbingMethods.php].
7841 * To reset all changes, the respective mode needs to be ended by calling SCIPendDive() and SCIPendProbing(), respectively.
7842 *
7843 * Note that, although the state of the LP and the problem is reset after ending probing and diving, both modes can have several effects on the subsequent solving process.
7844 * In some situations, when the LP is infeasible for example, conflict analysis will be run in both probing and diving modes, which can lead to globally valid conflict constraints that are then added to the main solving process.
7845 * Similarly, the function SCIPpropagateProbing() might find globally valid bound changes, which are added to the main SCIP and considered in the subsequent solving process.
7846 * Another way to leverage insights found during probing or diving is to update pseudo costs during both modes, helping make better branching decisions.
7847 * This is controlled by setting the parameter "divingpscosts" to TRUE, which is done in the default settings of SCIP.
7848 * Moreover, if the LP was not solved to optimality before entering diving mode (or the parameter "resolverestore" is set to TRUE), the LP is resolved to reset the solution.
7849 * In some cases, such as when dealing with a numerically difficult instance, this might lead to a different LP state.
7850 * Finally, during probing, global variable statistics can be collected by calling SCIPenableVarHistory() after starting probing.
7851 * Since these statistics can be used for decision-making in SCIP, enabling their collection can have an effect on the solving process after probing ends.
8097 * As you can see, both pointers and integers are checked for valid values at the beginning of the
8098 * function <code>consCatchEvent()</code>. This is particularly important for, e.g., array indices like
8099 * the variable <code>pos</code> in this example, where using the <code>consdata->vars[pos]</code>
8100 * pointer could result in unexspected behaviour
8101 * if the asserted precondition on <code>pos</code> were not matched and <code>pos</code> were an arbitrary index
8102 * outside the array range.
8103 *
8104 * - In order to activate assertions, use the <b>Debug mode</b> by compiling SCIP via
8105 * \code
8106 * cmake -DCMAKE_BUILD_TYPE=Debug
8107 * \endcode
8108 * or the Makefile equivalent
8109 * \code
8110 * make OPT=dbg
8111 * \endcode and run the code. See \ref CMAKE and \ref MAKE for further information about compiler options for SCIP.
8112 * As a rule of thumb, Spending only little extra time on
8113 * asserting preconditions saves most of the time spent on debugging!
8114 *
8115 * - Turn on <b>additional debug output</b> by adding the line
8116 * \code
8117 * #define SCIP_DEBUG
8118 * \endcode
8119 * at the top of SCIP files you want to analyze. This will output messages included in the code using
8120 * <code>SCIPdebugMsg(scip, ...)</code> (or <code>SCIPdebugMessage()</code>), see \ref EXAMPLE_1.
8121 * We recommend to also use <code>SCIPdebugMsg(scip, ...)</code> in your own code for being able to activate
8122 * debug output in the same way.
8123 * - If available on your system, we recommend to use a debugger like <code>gdb</code>
8124 * to trace all function calls on the stack,
8125 * display values of certain expressions, manually break the running code, and so forth.
8126 * - If available on your system, you can use software like <a href="http://valgrind.org">valgrind</a> to check for uninitialized
8127 * values or segmentation faults.
8128 * - For checking the usage of SCIP memory, you can use
8129 * <code>SCIPprintMemoryDiagnostic()</code>. This outputs memory that is currently in use,
8130 * which can be useful after a <code>SCIPfree()</code> call.
8131 * - If there are memory leaks for which you cannot detect the origin, you can recompile your code with the option <code>cmake -DNOBLKBUFMEM=on</code>
8132 * (or <code>make NOBLKBUFMEM=true</code> if you are using the Makefile system.
8133 * Also for the Makefile system, do not forget to clean your code before with <code>make OPT=... LPS=... clean</code>)
8134 * Only with that change, valgrind (or similar) reliably helps
8135 * to detect leaked memory.
8136 * - If your code cuts off a feasible solution, but you do not know which component is responsible,
8137 * you can use the debugging mechanism (see \ref EXAMPLE_2). Therefore, a given solution is read and it
8138 * is checked for every reduction, whether the solution will be pruned globally.
8139 *
8140 * @section EXAMPLE_1 How to activate debug messages
8141 * For example, if we include a <code>\#define SCIP_DEBUG</code> at the top of \ref heur_oneopt.c, recompile SCIP
8142 * in Debug mode, and run the SCIP interactive shell to solve p0033.mps from the
8143 * <a href="http://miplib2010.zib.de/miplib3/miplib.html">MIPLIB 3.0</a> , we get some output like:
8144 *
8145 * \include debugexamples/example1.txt
8146 *
8147 * @section EXAMPLE_2 How to add a debug solution
8148 *
8149 * Continuing the example above, we finish the solving process.
8150 * The optimal solution can now be written to a file:
8151 * \include debugexamples/example2_1.txt
8152 *
8153 * If we afterwards recompile SCIP with the additional compiler flag <code>cmake -DDEBUGSOL=on</code> (<code>make DEBUGSOL=true</code> in the Makefile system),
8154 * set the parameter <code>misc/debugsol = check/p0033.sol</code>, and run SCIP again it will output:
8155 * \include debugexamples/example2_2.txt
8156 * Further debug output would only appear, if the solution was cut off in the solving process.
8163 * The SCIP object goes through different stages during the solving process, the transitions from one to the next are presented in the following diagram.
8164 * \image html stages.png
8165 * More exhaustively, the stages are:
8166 * \code
8167 * SCIP_STAGE_INIT = 0, /**< SCIP data structures are initialized, no problem exists
8168 * SCIP_STAGE_PROBLEM = 1, /**< the problem is being created and modified
8169 * SCIP_STAGE_TRANSFORMING = 2, /**< the problem is being transformed into solving data space
8170 * SCIP_STAGE_TRANSFORMED = 3, /**< the problem was transformed into solving data space
8171 * SCIP_STAGE_INITPRESOLVE = 4, /**< presolving is initialized
8172 * SCIP_STAGE_PRESOLVING = 5, /**< the problem is being presolved
8173 * SCIP_STAGE_EXITPRESOLVE = 6, /**< presolving is exited
8174 * SCIP_STAGE_PRESOLVED = 7, /**< the problem was presolved
8175 * SCIP_STAGE_INITSOLVE = 8, /**< the solving process data is being initialized
8176 * SCIP_STAGE_SOLVING = 9, /**< the problem is being solved
8177 * SCIP_STAGE_SOLVED = 10, /**< the problem was solved
8178 * SCIP_STAGE_EXITSOLVE = 11, /**< the solving process data is being freed
8179 * SCIP_STAGE_FREETRANS = 12, /**< the transformed problem is being freed
8180 * SCIP_STAGE_FREE = 13 /**< SCIP data structures are being freed
8181 * \endcode
8182 * Most functions can be called in a subset of the stages, this is then documented, a runtime check is often added and will throw a \ref SCIP_INVALIDCALL if the stage is not allowed.
8189 * The SCIP source code has different types of files, distinguished by their naming style. The following list gives an overview of the most important file types and their purpose.
8190 *
8191 * @section SRCORGA_CORE SCIP core components
8192 *
8193 * - Each core component has an implementation with an internal API and a public API.
8194 * - The internal implementation should be in a file `<component>.c,h` and should not be included in the public API.
8195 * - Internal API functions usually do not take a `SCIP*` parameter, but a pointer to the component as first argument and pointers to internal structures like `SCIP_SET*` or `SCIP_STAT*`, where necessary.
8196 * - The name of internal API functions follows the style `SCIP<component><operation>...`, e.g., <code>SCIPvarCreateOriginal()</code> or <code>SCIPvarAddLocks()</code>.
8197 * - `pub_<component>.h` declares the functions of the public API that do not need a SCIP pointer.
8198 * Often, these are getter-functions.
8199 * For example, \ref pub_var.h contains public variable API functions.
8200 * - Functions in `pub_<component>.h` follow the same naming style as those in `<component>.h` and are used by the implementation of the internal API as well.
8201 * - `scip_<component>.h` declares the functions of the public API that need a SCIP instance (`SCIP*`), e.g., \ref scip_var.h for public variable manipulation functions.
8202 * Functions declared in `scip_<component>.h` are often thin wrappers that call the internal API functions from `<component>.h`.
8203 * These functions should follow the naming style `SCIP<operation><component>...`, e.g., <code>SCIPcreateVarOriginal()</code> or <code>SCIPaddVarLocks()</code>.
8204 * - To ensure functions of the public API being reachable in shared libraries, their declaration needs to contain the <code>SCIP_EXPORT</code> attribute.
8205 * - Public types (typedef's, enumerations) are defined in file `type_<component>.h`.
8206 * Type names follow the style `SCIP_<COMPONENT>...`. For every struct, we have a typedef that shortens the name
8207 * (so one could for instance use `SCIP_PARAM` instead of `struct SCIP_Param`).
8208 * The convention is to have the mixed-casing for the struct name, and then all-capital for the typedef's type. Similar for enums.
8209 * - Structs that need to be accessed by several source files are defined in `struct_<component>.h`.
8210 * `struct_<component>.h` is usually included only by `<component>.c` and maybe `scip_<component>.c`.
8211 * Exceptions are due to manual inlining of functions via macros when compiling for optimized mode.
8212 * - All types, structs, and functions are documented with Doxygen-style comments.
8213 * The documentation of the implementation of a function must repeat the documentation of the function declaration exactly (for doxygen to treat them as identical).
8214 *
8215 * @section SRCORGA_PLUGINS Plugins
8216 * - Each plugin is defined in files `<type>_<name>.c,h`, e.g.,
8217 * \ref cons_knapsack.c implements the Knapsack constraint handler plugin and
8218 * \ref cons_knapsack.h declares its public API functions.
8219 * - Public types that belong to a plugin are declared in its header, `<type>_<name>.h`.
8220 * - API functions of plugins are named as `SCIP<operation>...<Name>`, e.g., <code>SCIPincludeConshdlrAnd()</code>, <code>SCIPcreateConsAnd()</code>, or <code>SCIPgetNVarsAnd()</code>.
8221 * - Plugins access only the public API.
8222 * - Plugins that need to be included by default should be registered in <code>src/scip/scipdefplugins.c</code>.
8404 * \arg <code>TIME</code> - time limit for each test instance in seconds [default: 3600]
8405 * \arg <code>SETCUTOFF</code> - if set to '1', an optimal solution value (from the <code>.solu</code>-file) is used as objective limit [default: 0]
8406 * \arg <code>THREADS</code> - the number of threads used for solving LPs, if the linked LP solver supports multithreading [default: 1]
8407 * \arg <code>VALGRIND</code> - run valgrind on the SCIP binary; errors and memory leaks found by valgrind are reported as fails [default: "false"]
8408 *
8409 *
8410 * @section COMPARE Comparing test runs for different settings
8411 *
8412 * Often test runs are performed on the basis of different settings. In this case, it is useful to
8413 * have a performance comparison. For this purpose, we can use the <code>allcmpres.sh</code> script in
8414 * the @c check directory.
8415 *
8416 * Suppose, we performed our test run with two different settings, say <code>fast.set</code> and
8417 * <code>slow.set</code>. Assuming that all other parameters (including the SCIP binary), were the same,
8418 * we may have the following <code>res</code>-files in the directory <code>scip/check/results/</code>
8530 * In this case, the test with respect to the number of found feasible solutions is irrelevant, since their number is
8531 * equal. In particular, the null hypothesis gets accepted (i.e., there is no difference in the settings - this is
8532 * marked by "X").
8533 *
8534 * With respect to the number of instances solved to optimality within the timelimit, we have that \f$0.005 < p <=
8535 * 0.05\f$ (marked by <tt>p ~ (0.005, 0.05)</tt>). Thus, there is some evidence that the null hypothesis is false, i.e., the
8536 * settings perform differently; this is marked by "!". In the concrete case, we have 230 instances, all of which are
8537 * solved by setting \c S2, but only 224 by setting \c S1.
8538 *
8539 * @subsection Wilcoxon Wilcoxon signed rank test
8540 *
8541 * Assume that we compare two settings \c S1 and \c S2 with respect to their solution times (within the time limit). We
8542 * generate a sorted list of the ratios of the run times, where ratios that are (absolutely or relatively) within 1\%
8543 * of 1.0 are discarded, and ratios between 0.0 and 0.99 are replaced with their negative inverse in order to
8544 * obtain a symmetric distribution for the ratios around the origin.
8545 * We then assign ranks 1 to \c N to the remaining \c N data points in nondecreasing
8546 * order of their absolute ratio. This yields two groups \c G1
8547 * and \c G2 depending on whether the ratios are smaller than -1.0 or larger than 1.0 (\c G1 contains the instances for which
8548 * setting \c S1 is faster). Then the sums of the ranks in groups \c G1 and \c G2 are computed, yielding values \c R1
8549 * and \c R2, respectively.
8550 *
8551 * The Wilcoxon test statistic is then
8552 * \f[
8553 * z = \frac{\min(R1, R2) - \frac{N(N+1)}{4}}{\sqrt{\frac{N(N+1)(2N+1)}{24}}},
8554 * \f]
8555 * which we assume to be (approximately) normally distributed (with zero mean) and allows to compute the probability
8556 * \f$p\f$ that one setting is faster than the other. (Note that for \f$N \leq 60\f$, we apply a correction by
8557 * subtracting 0.5 from the numerator).
8558 *
8559 * As an example consider the following output:
8560 * \code
8561 * Wilcoxon (time) z -0.1285, 0.05 <= p X
8562 * Wilcoxon (nodes) z -11.9154, p < 0.0005 !!!
8563 * \endcode
8564 * While the \f$z\f$-value is close to zero for the run time, it is extremely negative regarding the solving nodes. This latter
8565 * tendency for the number of nodes is significant on a 0.05 % level, i.e., the probability \f$p\f$ that setting \c S1 uses more
8566 * nodes than setting \c S2 is negligible (this null hypothesis is rejected - marked by "!!!").
8567 *
8568 * However, the null hypothesis is not rejected with respect to the run time. In the concrete case, setting \c S1 has a
8569 * shifted geometric mean of its run times (over 230 instances) of 248.5, for \c S2 it is 217.6. This makes a ratio of
8570 * 0.88. Still - the null hypothesis is not rejected.
8571 *
8572 * @section SOLVER Testing and Evaluating using GAMS
8573 *
8574 * Analogously to the target <code>test</code> there is another target to run automated tests with <a href="http://www.gams.com/">gams</a>
8575 * \code
8576 * make testgams GAMSSOLVER=xyz
8577 * \endcode
8578 * For this target, the option GAMSSOLVER has to be given to specify the name of a GAMS solver to run, e.g. GAMSSOLVER=SCIP.
8579 * Additional advanced options specific to this target are:
8580 * GAMS to specify the GAMS executable (default: gams),
8581 * GAP to specify a gap limit (default: 0.0),
8582 * CLIENTTMPDIR to specify a directory where GAMS should put its scratch files (default: /tmp),
8583 * CONVERTSCIP to specify a SCIP which can be used to convert non-gams files into gams format (default: bin/scip, if existing; set to "no" to disable conversion).
8584 * The following options are NOT supported (and ignored): DISPFREQ, FEASTOL, LOCK.
8585 * A memory limit (MEM option) is only passed as workspace option to GAMS, but not enforced via ulimit (it's up to the solver to regard and obey the limit).
8586 *
8587 * Note: This works only if the referred programs are installed globally on your machine.
8588 *
8589 * The above options like <code>TIME</code> are also available for gams.
8590 *
8591 * After the testrun there should be an <code>.out</code>, an <code>.err</code> and a <code>.res</code> file
8592 * with the same basename as described above.
8593 *
8594 * Furthermore you can also use the script <code>allcmpres.sh</code> for comparing results.
8595 *
8596 * @section PYTHON Testing using PySCIPOpt
8597 *
8598 * To run a python script that uses PySCIPOpt with <code>make test</code> or <code>make testcluster</code>, one has to
8599 * specify the python code to execute with the option <code>EXECUTABLE=/full/path/to/python-script.py</code>.
8600 * Note that <code>python-script.py</code> must be an executable file.
8601 * In addition, one <b>must</b> specify which python it should run with the option <code>PYTHON=my-python</code>.
8602 * The reason for this is that one usually installs PySCIPOpt in a virtual environment, thus only the python of the
8603 * virtual environment will work with the python script.
8604 *
8605 * The scripts work in such a way that they pass information to SCIP like the setting files, the instance name, and some other options.
8606 * It is the responsability of the python script <code>python-script.py</code> to parse this information.
8607 * Thus, you need to modify your python script to read the setting files and the other options provided by the testing scripts.
8608 * An example of how to do this is provided in <code>scip/check/scip-runner.py</code>.
8609 * One should either modify <code>scip/check/scip-runner.py</code> or include the <code>build_model()</code> function
8610 * into your script to correctly read the options passed by the scripts.
8611 *
8612 * An example of how to run the tests is
8613 * \code
8614 * make test EXECUTABLE=/full/path/to/scip/check/scip-runner.py PYTHON=python
9131 * There are several ways of accessing the \SCIP Optimization Suite from other software packages or programming
9132 * platforms.
9133 *
9134 *
9135 * @section FILEFORMATS File formats
9136 *
9137 * The easiest way to load a problem into SCIP is via an input file, given in a format that SCIP can parse directly,
9138 * see \ref SHELL "the tutorial on how to use the interactive shell".
9139 * \SCIP is capable of reading more than ten different file formats, including formats for nonlinear
9140 * problems and constraint programs. This gives researchers from different communities an easy access to the
9141 * \SCIP Optimization Suite. See also the \ref AVAILABLEFORMATS "list of readable file formats".
9142 *
9143 * @section C_API C API
9144 *
9145 * The main access point for \SCIP is its API to C. Please refer to the \ref PUBLICAPI documentation
9146 * for further details.
9147 *
9148 * @section CPLUSPLUS C++ wrapper classes
9149 *
9150 * Since \SCIP is written in C, its callable library can be directly accessed from C++. If a user wants to program own
9151 * plugins in C++, there are wrapper classes for all different types of plugins available in the <code>src/objscip</code>
9152 * directory of the \SCIP standard distribution. SCIP provides several examples that were written in C++, see
9153 * \ref EXAMPLES "Examples".
9154 *
9155 * @section SCIPINTERFACES Interfaces for other programming languages
9156 *
9157 * Interfaces for other programming languages are developed and maintained independently from the SCIP Optimization Suite
9158 * on <a href="https://github.com/scipopt">GitHub</a> in order to provide extensions and patches faster
9159 * and to collaborate on them more easily.
9160 *
9161 * - <a href="https://github.com/scipopt/PySCIPOpt">PySCIPOpt</a> provides an extensive open-source interface for Python.
9162 * PySCIPOpt can be installed via <a href="https://anaconda.org/conda-forge/pyscipopt">conda-forge</a>,
9163 * which automatically includes \SCIP.
9164 * PySCIPOpt uses wrappers to allow users to build
9165 * their own plugins without accessing the C code of \SCIP itself.
9166 * Since Python is one of the most commonly used programming languages, especially in the field of
9167 * machine learning, the API gives easy access to the solvers functionality to incorporate \SCIP
9168 * into any python project pipeline, extract data for further analysis and computation as well as allow
9169 * customizing the solving process.
9170 * - <a href="https://github.com/scipopt/SCIP.jl">SCIP.jl</a> is a
9171 * Julia interface that exposes an API identical to the SCIP-C_API and implements the
9172 * MathOptInterface used by most constrained solvers in Julia.
9173 * It can be accessed through the Julia package manager and will install a pre-built version of
9174 * \SCIP if none is provided by the user.
9175 * - There is a <a href="https://github.com/scipopt/MatlabSCIPInterface">Matlab interface</a>
9176 * to use SCIP and SCIP-SDP from Matlab and Octave.
9177 * - <a href="https://github.com/scipopt/JSCIPOpt">JSCIPOpt</a> is an interface for Java.
9178 * - <a href="https://github.com/scipopt/russcip">Russcip</a> is an interface for Rust.
9179 * - <a href="https://github.com/scipopt/SCIPpp">SCIP++</a> is a modeling interface for C++.
9180 *
9181 * Contributions to these projects are very welcome.
9182 *
9183 * There are also many third-party python interfaces to the \SCIP Optimization Suite, for example:
9184 * - <a href="https://github.com/eomahony/Numberjack">NUMBERJACK</a> is a constraint programming platform implemented in python.
9185 * It supports a variety of different solvers, one of them being the \SCIP Optimization Suite .
9186 * - <a href="http://code.google.com/p/python-zibopt/">python-zibopt</a> was developed
9187 * by Ryan J. O'Neil and is a python extension of the \SCIP Optimization Suite (not maintained anymore).
9188 * - <a href="http://picos.zib.de/">PICOS</a> is a python interface for conic optimization,
9189 * provided by Guillaume Sagnol.
9190 *
9191 * @section MODELLING Modeling languages
9192 *
9193 * A natural way of formulating an optimization problem is to use a modeling language.
9194 * Besides ZIMPL, which is part of the \SCIP Optimization Suite,
9195 * there are several other modeling tools with a direct interface to \SCIP:
9196 *
9197 * - <a href="https://zimpl.zib.de">ZIMPL</a>, a modeling language for constraint programming,
9198 * - both <a href="http://www.ampl.com/">AMPL</a> and <a href="http://www.gams.com">GAMS</a>,
9199 * are well-suited for modeling mixed-integer linear and nonlinear optimization problems,
9200 * - and <a href="https://coliop.org/">CMPL</a> for mixed-integer linear problems.
9201 * - <a href="https://jump.dev/JuMP.jl/stable/">JuMP</a> accesses SCIP through the Julia interface.
9202 * - <a href="http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Main.HomePage">YALMIP</a> by Johan Löfberg provides a
9203 * free modeling language.
9204 *
9205 * The AMPL and ZIMPL interfaces are included in the \SCIP distribution,
9206 * the GAMS interface is available <a href="https://github.com/coin-or/GAMSlinks">here</a>.
9207 *
9208 * @subsection AMPL AMPL Interface
9209 *
9210 * The AMPL interface is part of the main \SCIP executable.
9211 * It is activated when the executable is called with the name of the AMPL `.nl` file as first argument and `-AMPL` as second argument.
9212 * In this case, \SCIP will employ the \ref reader_nl.h "NL reader" to read the `.nl` file (and `.col` and `.row` files with variable and constraint names, if available),
9213 * read parameter settings from a `scip.set` file (if present), attempt to solve the problem, write an AMPL solution file with the solve output, and exit.
9214 * However, if `-i` is given as third argument, then solving the problem is replaced by opening the \ref SHELL "interactive shell".
9215 *
9216 * Next to a `scip.set` file, parameter settings can also be given via an `option` command in AMPL, e.g.,
9220 * Parameter `display/statistics` is specific to using \SCIP via the AMPL interface and triggers a call to \ref SCIPprintStatistics after the problem has been solved (or the interactive shell has been exited).
9221 * In addition, a parameter `display/logfile` is available to specify a file to which to print \SCIP output in addition to stdout.
9222 *
9223 * For most problems, \SCIP computes a primal solution only.
9224 * A dual solution is written to an AMPL solution file only if an LP has been solved with presolve disabled.
9225 *
9226 * \SCIP is also able to write AMPL `.nl` files (and `.col` and `.row` files with variable and constraint names). See \ref reader_nl.h for currently supported constraint types.
9227 */
9228
9229 /**@defgroup PUBLICAPI Public API of SCIP
9230 * @brief functions and headers of the public C-API of \SCIP. Please refer to \ref DOC "" for information how to use the reference manual.
9231 *
9232 * \PUBLICAPIDESCRIPTION
9233 *
9234 *
9235 */
9236
9237/**@defgroup PUBLICCOREAPI Core API
9238 * @ingroup PUBLICAPI
9239 * @brief functions and headers of the plugin-independent C-API provided by the \SCIP header file scip.h.
9240 *
9241 * This module comprises functions provided by the header file scip.h. Including this header into a user-written extension
9242 * suffices to have all plugin-independent functionality of \SCIP available. Plugin-independent
9243 * user functionality includes the
9244 *
9245 * - creation of problems that \SCIP should solve
9246 * - fine-grained access to initiate the solving process of \SCIP
9247 * - access to all sorts of solving process statistics
9248 * - commonly used data structures and algorithms
9249 * - the management of plugins
9250 * - ...
9251 *
9252 * In order facilitate the navigation through the core API of \SCIP, it is structured into different modules.
9253 */
9254
9255/**@defgroup TYPEDEFINITIONS Type Definitions
9256 * @ingroup PUBLICCOREAPI
9257 * @brief type definitions and callback declarations
9258 *
9259 * This page lists headers which contain type definitions of callbacks.
9260 *
9261 * All headers below include the descriptions of callbacks of
9262 * certain plugins. For more detail see the corresponding header.
9263 */
9264
9265/**@defgroup PublicProblemMethods Problem Creation
9266 * @ingroup PUBLICCOREAPI
9267 * @brief functions to create a problem that \SCIP should solve
9268 *
9269 * This module summarizes the main functions needed to create a problem for \SCIP, and access its most important members:
9270 * - Declaring, adding, accessing, and changing variables of the problem
9271 * - Declaring, adding, accessing, and changing constraints of the problem
9272 * - Creating, adding, accessing, changing, and checking of solutions to the problem
9273 *
9274 * @note These core functions are not sufficient to create constraints of a certain type that is provided by the default plugins of \SCIP.
9275 * An example would be the creation of a linear constraint for which the functions provided by the
9276 * \ref cons_linear.h "linear constraint handler" must be used. Such functions are provided by the default plugins of \SCIP
9277 * and can be found in the \ref PUBLICPLUGINAPI.
9278 */
9279
9280/**@defgroup GeneralSCIPMethods SCIP
9281 * @ingroup PublicProblemMethods
9282 * @brief functions to manipulate a SCIP object
9283 */
9284
9285/**@defgroup GlobalProblemMethods Global Problem
9286 * @ingroup PublicProblemMethods
9287 * @brief functions to create, read and modify a global problem together with its callbacks
9288 */
9289
9290/**@defgroup PublicVariableMethods Problem Variables
9291 * @ingroup PublicProblemMethods
9292 * @brief public functions for problem variables
9293 */
9294
9295/**@defgroup PublicConstraintMethods Problem Constraints
9862 * <tr><td>\ref reader_cnf.h "CNF format"</td> <td>DIMACS CNF (conjunctive normal form) file format used for example for SAT problems</td></tr>
9863 * <tr><td>\ref reader_diff.h "DIFF format"</td> <td>for reading a new objective function for mixed-integer programs</td></tr>
9864 * <tr><td>\ref reader_fzn.h "FZN format"</td> <td>FlatZinc is a low-level solver input language that is the target language for MiniZinc</td></tr>