Files
ortools-clone/docs/cpp/callback_8h_source.html
Laurent Perron a2ad6677e1 regenerate doc
2022-01-16 18:02:36 +01:00

150 lines
61 KiB
HTML

<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OR-Tools: callback.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="styleSheet.tmp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="orLogo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">OR-Tools
&#160;<span id="projectnumber">9.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('callback_8h_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">callback.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="callback_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Copyright 2010-2021 Google LLC</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">// You may obtain a copy of the License at</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">// limitations under the License.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">// Data types for using callbacks with MathOpt.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">// Callbacks allow to user to observe the progress of a solver and modify its</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">// behavior mid solve. This is supported by allowing the user to a function of</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">// type MathOpt::Callback as an optional argument to MathOpt::Solve(). This</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">// function is called periodically throughout the solve process. This file</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">// defines the data types needed to use this callback.</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment">// The example below registers a callback that listens for feasible solutions</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">// the solvers finds along the way and accumulates them in a list for analysis</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment">// after the solve.</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment">// using ::operations_research::math_opt::CallbackData;</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment">// using ::operations_research::math_opt::CallbackRegistration;</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment">// using ::operations_research::math_opt::CallbackResult;</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="comment">// using ::operations_research::math_opt::MathOpt;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="comment">// using ::operations_research::math_opt::Result;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="comment">// using ::operations_research::math_opt::Variable;</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="comment">// using ::operations_research::math_opt::VariableMap;</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="comment">// MathOpt model(operations_research::math_opt::SOLVER_TYPE_GUROBI);</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="comment">// Variable x = model.AddBinaryVariable();</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="comment">// model.objective().Maximize(x);</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="comment">// CallbackRegistration cb_reg;</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="comment">// cb_reg.events = {</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment">// operations_research::math_opt::CALLBACK_EVENT_MIP_SOLUTION};</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="comment">// std::vector&lt;VariableMap&lt;double&gt;&gt; solutions;</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="comment">// auto cb = [&amp;solutions](const CallbackData&amp; cb_data) {</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="comment">// // NOTE: this assumes the callback is always called from the same thread.</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="comment">// // Gurobi always does this, multi-threaded SCIP does not.</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="comment">// solutions.push_back(*cb_data.solution);</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="comment">// return CallbackResult();</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="comment">// };</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="comment">// absl::StatusOr&lt;Result&gt; result = opt.Solve({}, {}, cb_reb, cb);</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="comment">// At the termination of the example, solutions will have {{x, 1.0}}, and</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="comment">// possibly {{x, 0.0}} as well.</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="comment">// If the callback argument to MathOpt::Solve() is not null, it will be invoked</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="comment">// on the events specified by the callback_registration argument (and when the</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;<span class="comment">// callback is null, callback_registration must not request any events or will</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="comment">// CHECK fail). Some solvers do not support callbacks or certain events, in this</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="comment">// case the callback is ignored. TODO(b/180617976): change this behavior.</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="comment">// Some solvers may call callback from multiple threads (SCIP will, Gurobi</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="comment">// will not). You should either solve with one thread (see</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;<span class="comment">// solver_parameters.common_parameters.threads), write a threadsafe callback,</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;<span class="comment">// or consult the documentation of your underlying solver.</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="preprocessor">#ifndef OR_TOOLS_MATH_OPT_CPP_CALLBACK_H_</span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="preprocessor">#define OR_TOOLS_MATH_OPT_CPP_CALLBACK_H_</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="preprocessor">#include &quot;absl/container/flat_hash_set.h&quot;</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="preprocessor">#include &quot;absl/time/time.h&quot;</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="preprocessor">#include &quot;absl/types/optional.h&quot;</span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="preprocessor">#include &quot;ortools/math_opt/callback.pb.h&quot;</span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="indexed__model_8h.html">ortools/math_opt/core/indexed_model.h</a>&quot;</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="map__filter_8h.html">ortools/math_opt/cpp/map_filter.h</a>&quot;</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="variable__and__expressions_8h.html">ortools/math_opt/cpp/variable_and_expressions.h</a>&quot;</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceoperations__research.html">operations_research</a> {</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;<span class="keyword">namespace </span>math_opt {</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;<span class="comment">// The input to the MathOpt::Callback function.</span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="comment">// The information available depends on the current event.</span></div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_data.html"> 83</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structoperations__research_1_1math__opt_1_1_callback_data.html">CallbackData</a> {</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="comment">// Users will typically not need this function.</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="comment">// Will CHECK fail if proto is not valid.</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_data.html#aaf8768ad7f47b90562a96b2b0a6c5162">CallbackData</a>(<a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html">IndexedModel</a>* <a class="code" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>, <span class="keyword">const</span> CallbackDataProto&amp; <a class="code" href="cp__model__fz__solver_8cc.html#aed003f5eb5197bc586b7ef2c36a63da2">proto</a>);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_data.html#aaf8768ad7f47b90562a96b2b0a6c5162">CallbackData</a>() = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="comment">// The current state of the underlying solver.</span></div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_data.html#aadec2e6a6b9b19987865c9e08366dea9"> 90</a></span>&#160; CallbackEventProto <span class="keyword">event</span> = CALLBACK_EVENT_UNSPECIFIED;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="comment">// If event == CALLBACK_EVENT_MIP_NODE, the primal_solution contains the</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="comment">// primal solution to the current LP-node relaxation. In some cases, no</span></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="comment">// solution will be available (e.g. because LP was infeasible or the solve</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="comment">// was imprecise).</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="comment">// If event == CALLBACK_EVENT_MIP_SOLUTION, the primal_solution contains the</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="comment">// newly found primal (integer) feasible solution. The solution is always</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="comment">// present.</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="comment">// Otherwise, the primal_solution is not available.</span></div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_data.html#a7cc4865303820dac5bb07154f72c2365"> 100</a></span>&#160; absl::optional&lt;VariableMap&lt;double&gt;&gt; <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_data.html#a7cc4865303820dac5bb07154f72c2365">solution</a>;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="comment">// If event == CALLBACK_EVENT_MESSAGE, contains the messages from the solver.</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="comment">// Each message represents a single output line from the solver, and each</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="comment">// message does not contain any &#39;\n&#39; characters.</span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="comment">// Otherwise, messages is empty.</span></div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_data.html#a71df9ba7e15c125b9274fd5f41b44378"> 106</a></span>&#160; std::vector&lt;std::string&gt; <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_data.html#a71df9ba7e15c125b9274fd5f41b44378">messages</a>;</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="comment">// Time since `Solve()` was called. Available for all events except</span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="comment">// CALLBACK_EVENT_POLLING.</span></div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_data.html#a32e54c85f3390e20ab42c14f8e153581"> 110</a></span>&#160; absl::Duration <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_data.html#a32e54c85f3390e20ab42c14f8e153581">runtime</a>;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="comment">// Only available for event == CALLBACK_EVENT_PRESOLVE.</span></div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_data.html#a726b449027cc54e1295a2325adae55b3"> 113</a></span>&#160; CallbackDataProto::PresolveStats <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_data.html#a726b449027cc54e1295a2325adae55b3">presolve_stats</a>;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="comment">// Only available for event == CALLBACK_EVENT_SIMPLEX.</span></div><div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_data.html#a999366c84e0b001631cde508e7470d11"> 116</a></span>&#160; CallbackDataProto::SimplexStats <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_data.html#a999366c84e0b001631cde508e7470d11">simplex_stats</a>;</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="comment">// Only available for event == CALLBACK_EVENT_BARRIER.</span></div><div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_data.html#acb8748e5254e826afc06678839c36e76"> 119</a></span>&#160; CallbackDataProto::BarrierStats <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_data.html#acb8748e5254e826afc06678839c36e76">barrier_stats</a>;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="comment">// Only available for event of CALLBACK_EVENT_MIP, CALLBACK_EVENT_MIP_NODE, or</span></div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="comment">// CALLBACK_EVENT_MIP_SOLUTION.</span></div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_data.html#af1b70d8a9e16aed62a51574867acce69"> 123</a></span>&#160; CallbackDataProto::MipStats <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_data.html#af1b70d8a9e16aed62a51574867acce69">mip_stats</a>;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;};</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;<span class="comment">// Provided with a callback at the start of a Solve() to inform the solver:</span></div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;<span class="comment">// * what information the callback needs,</span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="comment">// * how the callback might alter the solve process.</span></div><div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_registration.html"> 129</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structoperations__research_1_1math__opt_1_1_callback_registration.html">CallbackRegistration</a> {</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="comment">// Will CHECK fail if referenced variables are not from the same model.</span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; CallbackRegistrationProto <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a0c87a70760f8ded4a81f33893f2a5605">Proto</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="comment">// Returns the model referenced variables, or null if no variables are</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="comment">// referenced. Will CHECK fail if variables are not from the same model.</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html">IndexedModel</a>* <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a64203ba9d12b2e9827e18cf8e8c30ab2">model</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="comment">// The events the solver should invoke the callback at.</span></div><div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a704cfc9f1e9d0d79e8729114f9e13e1b"> 138</a></span>&#160; absl::flat_hash_set&lt;CallbackEventProto&gt; <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a704cfc9f1e9d0d79e8729114f9e13e1b">events</a>;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="comment">// Restricts the variable returned in CallbackData.solution for event</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="comment">// CALLBACK_EVENT_MIP_SOLUTION. This can improve performance.</span></div><div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a5c3733be3e96b79b2474ace714e498c8"> 142</a></span>&#160; <a class="code" href="structoperations__research_1_1math__opt_1_1_map_filter.html">MapFilter&lt;Variable&gt;</a> <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a5c3733be3e96b79b2474ace714e498c8">mip_solution_filter</a>;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="comment">// Restricts the variable returned in CallbackData.solution for event</span></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="comment">// CALLBACK_EVENT_MIP_NODE. This can improve performance.</span></div><div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_registration.html#aa9894fa600000048052e68fc1bd7abab"> 146</a></span>&#160; <a class="code" href="structoperations__research_1_1math__opt_1_1_map_filter.html">MapFilter&lt;Variable&gt;</a> <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_registration.html#aa9894fa600000048052e68fc1bd7abab">mip_node_filter</a>;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="comment">// If the callback will ever add &quot;user cuts&quot; at event CALLBACK_EVENT_MIP_NODE</span></div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="comment">// during the solve process (a linear constraint that excludes the current LP</span></div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="comment">// solution but does not cut off any integer points).</span></div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a30ba937e73ce5c1b77fdced5e6adafdd"> 151</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a30ba937e73ce5c1b77fdced5e6adafdd">add_cuts</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="comment">// If the callback will ever add &quot;lazy constraints&quot; at event</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="comment">// CALLBACK_EVENT_MIP_NODE or CALLBACK_EVENT_MIP_SOLUTION during the solve</span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="comment">// process (a linear constraint that excludes integer points).</span></div><div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a922db711f1c18d9e29f2e85c2fe23541"> 156</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a922db711f1c18d9e29f2e85c2fe23541">add_lazy_constraints</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;};</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;<span class="comment">// The value returned by the MathOpt::Callback function.</span></div><div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_result.html"> 160</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result.html">CallbackResult</a> {</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <span class="comment">// Prefer AddUserCut and AddLazyConstraint below instead of using this</span></div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="comment">// directly.</span></div><div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html"> 163</a></span>&#160; <span class="keyword">struct </span><a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html">GeneratedLinearConstraint</a> {</div><div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html#ac9e29c31846c20153162dca604561b9c"> 164</a></span>&#160; <a class="code" href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html">BoundedLinearExpression</a> <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html#ac9e29c31846c20153162dca604561b9c">linear_constraint</a>;</div><div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html#a07523a32cb6b7dc0e6faa86c48420c7f"> 165</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html#a07523a32cb6b7dc0e6faa86c48420c7f">is_lazy</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html#a58b994073f20fde65a1679904f205304"> 167</a></span>&#160; <a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html">IndexedModel</a>* <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html#a58b994073f20fde65a1679904f205304">model</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html#ac9e29c31846c20153162dca604561b9c">linear_constraint</a>.<a class="code" href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html#a4a753905fdb2765209204ba37e6acc8d">expression</a>.<a class="code" href="classoperations__research_1_1math__opt_1_1_linear_expression.html#a64203ba9d12b2e9827e18cf8e8c30ab2">model</a>(); }</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; };</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="comment">// Adds a &quot;user cut,&quot; a linear constraint that excludes the current LP</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="comment">// solution but does not cut off any integer points. Use only for</span></div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="comment">// CALLBACK_EVENT_MIP_NODE.</span></div><div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_result.html#aaad1dc9bd90c163cd5cffd2435a4bea5"> 173</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result.html#aaad1dc9bd90c163cd5cffd2435a4bea5">AddUserCut</a>(<a class="code" href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html">BoundedLinearExpression</a> linear_constraint) {</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result.html#afc2dc2d61e49bb4d674aa79f76c8e143">new_constraints</a>.push_back({std::move(linear_constraint), <span class="keyword">false</span>});</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; }</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="comment">// Adds a &quot;lazy constraint,&quot; a linear constraint that excludes integer points.</span></div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="comment">// Use only for CALLBACK_EVENT_MIP_NODE and CALLBACK_EVENT_MIP_SOLUTION.</span></div><div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_result.html#a8225d69ce6f20e86ccfe133c7d80ff1a"> 179</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result.html#a8225d69ce6f20e86ccfe133c7d80ff1a">AddLazyConstraint</a>(<a class="code" href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html">BoundedLinearExpression</a> linear_constraint) {</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result.html#afc2dc2d61e49bb4d674aa79f76c8e143">new_constraints</a>.push_back({std::move(linear_constraint), <span class="keyword">true</span>});</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; }</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="comment">// Will CHECK fail if referenced variables are not from the same model.</span></div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; CallbackResultProto <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result.html#a945924a45caa0d8fb76132e005a89a91">Proto</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="comment">// Returns the model referenced variables, or null if no variables are</span></div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="comment">// referenced. Will CHECK fail if variables are not from the same model.</span></div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="comment">// Runs in O(num constraints + num suggested solutions).</span></div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <a class="code" href="classoperations__research_1_1math__opt_1_1_indexed_model.html">IndexedModel</a>* <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result.html#a64203ba9d12b2e9827e18cf8e8c30ab2">model</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="comment">// Stop the solve process and return early. Can be called from any event.</span></div><div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_result.html#a74995b2493f23c9103413e37da5cdc38"> 193</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result.html#a74995b2493f23c9103413e37da5cdc38">terminate</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160;</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <span class="comment">// The user cuts and lazy constraints added. Prefer AddUserCut() and</span></div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="comment">// AddLazyConstraint() to modifying this directly.</span></div><div class="line"><a name="l00197"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_result.html#afc2dc2d61e49bb4d674aa79f76c8e143"> 197</a></span>&#160; std::vector&lt;GeneratedLinearConstraint&gt; <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result.html#afc2dc2d61e49bb4d674aa79f76c8e143">new_constraints</a>;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="comment">// A solution or partially defined solution to give to the solver.</span></div><div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="structoperations__research_1_1math__opt_1_1_callback_result.html#a81066f9b4707ddcb2f5b5eb5ce216153"> 200</a></span>&#160; std::vector&lt;VariableMap&lt;double&gt;&gt; <a class="code" href="structoperations__research_1_1math__opt_1_1_callback_result.html#a81066f9b4707ddcb2f5b5eb5ce216153">suggested_solutions</a>;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;};</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;} <span class="comment">// namespace math_opt</span></div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;} <span class="comment">// namespace operations_research</span></div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;<span class="preprocessor">#endif // OR_TOOLS_MATH_OPT_CPP_CALLBACK_H_</span></div><div class="ttc" id="structoperations__research_1_1math__opt_1_1_map_filter_html"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_map_filter.html">operations_research::math_opt::MapFilter</a></div><div class="ttdef"><b>Definition:</b> <a href="map__filter_8h_source.html#l00052">map_filter.h:52</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_result_html_a8225d69ce6f20e86ccfe133c7d80ff1a"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_result.html#a8225d69ce6f20e86ccfe133c7d80ff1a">operations_research::math_opt::CallbackResult::AddLazyConstraint</a></div><div class="ttdeci">void AddLazyConstraint(BoundedLinearExpression linear_constraint)</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00179">callback.h:179</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint_html_a07523a32cb6b7dc0e6faa86c48420c7f"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html#a07523a32cb6b7dc0e6faa86c48420c7f">operations_research::math_opt::CallbackResult::GeneratedLinearConstraint::is_lazy</a></div><div class="ttdeci">bool is_lazy</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00165">callback.h:165</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_result_html_a81066f9b4707ddcb2f5b5eb5ce216153"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_result.html#a81066f9b4707ddcb2f5b5eb5ce216153">operations_research::math_opt::CallbackResult::suggested_solutions</a></div><div class="ttdeci">std::vector&lt; VariableMap&lt; double &gt; &gt; suggested_solutions</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00200">callback.h:200</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_result_html_aaad1dc9bd90c163cd5cffd2435a4bea5"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_result.html#aaad1dc9bd90c163cd5cffd2435a4bea5">operations_research::math_opt::CallbackResult::AddUserCut</a></div><div class="ttdeci">void AddUserCut(BoundedLinearExpression linear_constraint)</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00173">callback.h:173</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_result_html"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_result.html">operations_research::math_opt::CallbackResult</a></div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00160">callback.h:160</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_data_html_a7cc4865303820dac5bb07154f72c2365"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_data.html#a7cc4865303820dac5bb07154f72c2365">operations_research::math_opt::CallbackData::solution</a></div><div class="ttdeci">absl::optional&lt; VariableMap&lt; double &gt; &gt; solution</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00100">callback.h:100</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_bounded_linear_expression_html_a4a753905fdb2765209204ba37e6acc8d"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html#a4a753905fdb2765209204ba37e6acc8d">operations_research::math_opt::BoundedLinearExpression::expression</a></div><div class="ttdeci">LinearExpression expression</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l00488">variable_and_expressions.h:488</a></div></div>
<div class="ttc" id="gurobi__interface_8cc_html_a0728f23c9a47655d38e0bf1a2f200bcf"><div class="ttname"><a href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a></div><div class="ttdeci">GRBmodel * model</div><div class="ttdef"><b>Definition:</b> <a href="gurobi__interface_8cc_source.html#l00274">gurobi_interface.cc:274</a></div></div>
<div class="ttc" id="classoperations__research_1_1math__opt_1_1_indexed_model_html"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_indexed_model.html">operations_research::math_opt::IndexedModel</a></div><div class="ttdef"><b>Definition:</b> <a href="indexed__model_8h_source.html#l00161">indexed_model.h:161</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_result_html_afc2dc2d61e49bb4d674aa79f76c8e143"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_result.html#afc2dc2d61e49bb4d674aa79f76c8e143">operations_research::math_opt::CallbackResult::new_constraints</a></div><div class="ttdeci">std::vector&lt; GeneratedLinearConstraint &gt; new_constraints</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00197">callback.h:197</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_registration_html_a922db711f1c18d9e29f2e85c2fe23541"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a922db711f1c18d9e29f2e85c2fe23541">operations_research::math_opt::CallbackRegistration::add_lazy_constraints</a></div><div class="ttdeci">bool add_lazy_constraints</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00156">callback.h:156</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_data_html_aaf8768ad7f47b90562a96b2b0a6c5162"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_data.html#aaf8768ad7f47b90562a96b2b0a6c5162">operations_research::math_opt::CallbackData::CallbackData</a></div><div class="ttdeci">CallbackData()=default</div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_result_html_a945924a45caa0d8fb76132e005a89a91"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_result.html#a945924a45caa0d8fb76132e005a89a91">operations_research::math_opt::CallbackResult::Proto</a></div><div class="ttdeci">CallbackResultProto Proto() const</div><div class="ttdef"><b>Definition:</b> <a href="callback_8cc_source.html#l00120">callback.cc:120</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_registration_html_a704cfc9f1e9d0d79e8729114f9e13e1b"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a704cfc9f1e9d0d79e8729114f9e13e1b">operations_research::math_opt::CallbackRegistration::events</a></div><div class="ttdeci">absl::flat_hash_set&lt; CallbackEventProto &gt; events</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00138">callback.h:138</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_data_html_a32e54c85f3390e20ab42c14f8e153581"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_data.html#a32e54c85f3390e20ab42c14f8e153581">operations_research::math_opt::CallbackData::runtime</a></div><div class="ttdeci">absl::Duration runtime</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00110">callback.h:110</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_bounded_linear_expression_html"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_bounded_linear_expression.html">operations_research::math_opt::BoundedLinearExpression</a></div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l00465">variable_and_expressions.h:465</a></div></div>
<div class="ttc" id="cp__model__fz__solver_8cc_html_aed003f5eb5197bc586b7ef2c36a63da2"><div class="ttname"><a href="cp__model__fz__solver_8cc.html#aed003f5eb5197bc586b7ef2c36a63da2">proto</a></div><div class="ttdeci">CpModelProto proto</div><div class="ttdef"><b>Definition:</b> <a href="cp__model__fz__solver_8cc_source.html#l00119">cp_model_fz_solver.cc:119</a></div></div>
<div class="ttc" id="classoperations__research_1_1math__opt_1_1_linear_expression_html_a64203ba9d12b2e9827e18cf8e8c30ab2"><div class="ttname"><a href="classoperations__research_1_1math__opt_1_1_linear_expression.html#a64203ba9d12b2e9827e18cf8e8c30ab2">operations_research::math_opt::LinearExpression::model</a></div><div class="ttdeci">IndexedModel * model() const</div><div class="ttdef"><b>Definition:</b> <a href="variable__and__expressions_8h_source.html#l00965">variable_and_expressions.h:965</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_result_html_a74995b2493f23c9103413e37da5cdc38"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_result.html#a74995b2493f23c9103413e37da5cdc38">operations_research::math_opt::CallbackResult::terminate</a></div><div class="ttdeci">bool terminate</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00193">callback.h:193</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_registration_html_a64203ba9d12b2e9827e18cf8e8c30ab2"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a64203ba9d12b2e9827e18cf8e8c30ab2">operations_research::math_opt::CallbackRegistration::model</a></div><div class="ttdeci">IndexedModel * model() const</div><div class="ttdef"><b>Definition:</b> <a href="callback_8cc_source.html#l00093">callback.cc:93</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_data_html_a726b449027cc54e1295a2325adae55b3"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_data.html#a726b449027cc54e1295a2325adae55b3">operations_research::math_opt::CallbackData::presolve_stats</a></div><div class="ttdeci">CallbackDataProto::PresolveStats presolve_stats</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00113">callback.h:113</a></div></div>
<div class="ttc" id="indexed__model_8h_html"><div class="ttname"><a href="indexed__model_8h.html">indexed_model.h</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_registration_html_a30ba937e73ce5c1b77fdced5e6adafdd"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a30ba937e73ce5c1b77fdced5e6adafdd">operations_research::math_opt::CallbackRegistration::add_cuts</a></div><div class="ttdeci">bool add_cuts</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00151">callback.h:151</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_registration_html_a0c87a70760f8ded4a81f33893f2a5605"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a0c87a70760f8ded4a81f33893f2a5605">operations_research::math_opt::CallbackRegistration::Proto</a></div><div class="ttdeci">CallbackRegistrationProto Proto() const</div><div class="ttdef"><b>Definition:</b> <a href="callback_8cc_source.html#l00098">callback.cc:98</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_registration_html_a5c3733be3e96b79b2474ace714e498c8"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_registration.html#a5c3733be3e96b79b2474ace714e498c8">operations_research::math_opt::CallbackRegistration::mip_solution_filter</a></div><div class="ttdeci">MapFilter&lt; Variable &gt; mip_solution_filter</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00142">callback.h:142</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_data_html_af1b70d8a9e16aed62a51574867acce69"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_data.html#af1b70d8a9e16aed62a51574867acce69">operations_research::math_opt::CallbackData::mip_stats</a></div><div class="ttdeci">CallbackDataProto::MipStats mip_stats</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00123">callback.h:123</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint_html_a58b994073f20fde65a1679904f205304"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html#a58b994073f20fde65a1679904f205304">operations_research::math_opt::CallbackResult::GeneratedLinearConstraint::model</a></div><div class="ttdeci">IndexedModel * model() const</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00167">callback.h:167</a></div></div>
<div class="ttc" id="variable__and__expressions_8h_html"><div class="ttname"><a href="variable__and__expressions_8h.html">variable_and_expressions.h</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_registration_html"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_registration.html">operations_research::math_opt::CallbackRegistration</a></div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00129">callback.h:129</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_data_html_acb8748e5254e826afc06678839c36e76"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_data.html#acb8748e5254e826afc06678839c36e76">operations_research::math_opt::CallbackData::barrier_stats</a></div><div class="ttdeci">CallbackDataProto::BarrierStats barrier_stats</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00119">callback.h:119</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_data_html"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_data.html">operations_research::math_opt::CallbackData</a></div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00083">callback.h:83</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_data_html_a999366c84e0b001631cde508e7470d11"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_data.html#a999366c84e0b001631cde508e7470d11">operations_research::math_opt::CallbackData::simplex_stats</a></div><div class="ttdeci">CallbackDataProto::SimplexStats simplex_stats</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00116">callback.h:116</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint_html_ac9e29c31846c20153162dca604561b9c"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html#ac9e29c31846c20153162dca604561b9c">operations_research::math_opt::CallbackResult::GeneratedLinearConstraint::linear_constraint</a></div><div class="ttdeci">BoundedLinearExpression linear_constraint</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00164">callback.h:164</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_result_html_a64203ba9d12b2e9827e18cf8e8c30ab2"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_result.html#a64203ba9d12b2e9827e18cf8e8c30ab2">operations_research::math_opt::CallbackResult::model</a></div><div class="ttdeci">IndexedModel * model() const</div><div class="ttdef"><b>Definition:</b> <a href="callback_8cc_source.html#l00115">callback.cc:115</a></div></div>
<div class="ttc" id="namespaceoperations__research_html"><div class="ttname"><a href="namespaceoperations__research.html">operations_research</a></div><div class="ttdoc">Collection of objects used to extend the Constraint Solver library.</div><div class="ttdef"><b>Definition:</b> <a href="dense__doubly__linked__list_8h_source.html#l00021">dense_doubly_linked_list.h:21</a></div></div>
<div class="ttc" id="map__filter_8h_html"><div class="ttname"><a href="map__filter_8h.html">map_filter.h</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint_html"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_result_1_1_generated_linear_constraint.html">operations_research::math_opt::CallbackResult::GeneratedLinearConstraint</a></div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00163">callback.h:163</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_registration_html_aa9894fa600000048052e68fc1bd7abab"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_registration.html#aa9894fa600000048052e68fc1bd7abab">operations_research::math_opt::CallbackRegistration::mip_node_filter</a></div><div class="ttdeci">MapFilter&lt; Variable &gt; mip_node_filter</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00146">callback.h:146</a></div></div>
<div class="ttc" id="structoperations__research_1_1math__opt_1_1_callback_data_html_a71df9ba7e15c125b9274fd5f41b44378"><div class="ttname"><a href="structoperations__research_1_1math__opt_1_1_callback_data.html#a71df9ba7e15c125b9274fd5f41b44378">operations_research::math_opt::CallbackData::messages</a></div><div class="ttdeci">std::vector&lt; std::string &gt; messages</div><div class="ttdef"><b>Definition:</b> <a href="callback_8h_source.html#l00106">callback.h:106</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_a7cc1eeded8f693d0da6c729bc88c45a.html">ortools</a></li><li class="navelem"><a class="el" href="dir_1defc00030ff81d309105e053121082f.html">math_opt</a></li><li class="navelem"><a class="el" href="dir_dd5645fbbabcdccb47d1d6db92f0f35b.html">cpp</a></li><li class="navelem"><a class="el" href="callback_8h.html">callback.h</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>
</div>
</body>
</html>