Files
ortools-clone/docs/dotnet/StepFunctionSampleSat_8cs_source.html

82 lines
31 KiB
HTML
Raw Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OR-Tools</title>
<meta http-equiv="Content-Type" content="text/html;"/>
<meta charset="utf-8"/>
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
<link rel="stylesheet" type="text/css" href="ortools.css" title="default" media="screen,print" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
</head>
<body>
<div id="banner-container">
<div id="banner">
2019-06-29 18:18:08 +02:00
<span id="sfml">OR-Tools 7.2</span>
</div>
</div>
2019-06-29 18:18:08 +02:00
<link rel="icon" href="https://developers.google.com/optimization/images/orLogo.png">
<div id="content">
<!-- Generated by Doxygen 1.8.15 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_a7cc1eeded8f693d0da6c729bc88c45a.html">ortools</a></li><li class="navelem"><a class="el" href="dir_dddac007a45022d9da6ea1dee012c3b9.html">sat</a></li><li class="navelem"><a class="el" href="dir_8005d2da67a7154daa1c0c8b69782d62.html">samples</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">StepFunctionSampleSat.cs</div> </div>
</div><!--header-->
<div class="contents">
<a href="StepFunctionSampleSat_8cs.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-2018 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="keyword">using</span> System;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="keyword">using</span> <a class="code" href="namespaceGoogle.html">Google</a>.<a class="code" href="namespaceGoogle_1_1OrTools.html">OrTools</a>.<a class="code" href="namespaceGoogle_1_1OrTools_1_1Sat.html">Sat</a>;</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="keyword">using</span> <a class="code" href="namespaceGoogle.html">Google</a>.<a class="code" href="namespaceGoogle_1_1OrTools.html">OrTools</a>.<a class="code" href="namespaceGoogle_1_1OrTools_1_1Util.html">Util</a>;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classVarArraySolutionPrinter.html">VarArraySolutionPrinter</a> : <a class="code" href="classGoogle_1_1OrTools_1_1Sat_1_1CpSolverSolutionCallback.html">CpSolverSolutionCallback</a></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;{</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="classVarArraySolutionPrinter.html#a3b71eea08c96242125490f2475e5a5ad"> 20</a></span>&#160; <span class="keyword">public</span> <a class="code" href="classVarArraySolutionPrinter.html#a3b71eea08c96242125490f2475e5a5ad">VarArraySolutionPrinter</a>(<a class="code" href="classGoogle_1_1OrTools_1_1Sat_1_1IntVar.html">IntVar</a>[] variables)</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; {</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; variables_ = variables;</div><div class="line"><a name="l00023"></a><span class="li
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1DecisionStrategyProto_html"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1DecisionStrategyProto.html">Google.OrTools.Sat.DecisionStrategyProto</a></div><div class="ttdoc">Define the strategy to follow when the solver needs to take a new decision.</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8pb_8cs_source.html#l04619">CpModel.pb.cs:4619</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1CpSolverSolutionCallback_html"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1CpSolverSolutionCallback.html">Google.OrTools.Sat.CpSolverSolutionCallback</a></div><div class="ttdef"><b>Definition:</b> <a href="SearchHelpers_8cs_source.html#l00020">SearchHelpers.cs:20</a></div></div>
<div class="ttc" id="namespaceGoogle_1_1OrTools_1_1Util_html"><div class="ttname"><a href="namespaceGoogle_1_1OrTools_1_1Util.html">Google.OrTools.Util</a></div><div class="ttdef"><b>Definition:</b> <a href="Domain_8cs_source.html#l00011">Domain.cs:11</a></div></div>
<div class="ttc" id="classVarArraySolutionPrinter_html_a3b71eea08c96242125490f2475e5a5ad"><div class="ttname"><a href="classVarArraySolutionPrinter.html#a3b71eea08c96242125490f2475e5a5ad">VarArraySolutionPrinter.VarArraySolutionPrinter</a></div><div class="ttdeci">VarArraySolutionPrinter(IntVar[] variables)</div><div class="ttdef"><b>Definition:</b> <a href="StepFunctionSampleSat_8cs_source.html#l00020">StepFunctionSampleSat.cs:20</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1IntVar_html"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1IntVar.html">Google.OrTools.Sat.IntVar</a></div><div class="ttdef"><b>Definition:</b> <a href="IntegerExpressions_8cs_source.html#l00495">IntegerExpressions.cs:495</a></div></div>
<div class="ttc" id="interfaceGoogle_1_1OrTools_1_1Sat_1_1ILiteral_html"><div class="ttname"><a href="interfaceGoogle_1_1OrTools_1_1Sat_1_1ILiteral.html">Google.OrTools.Sat.ILiteral</a></div><div class="ttdef"><b>Definition:</b> <a href="IntegerExpressions_8cs_source.html#l00042">IntegerExpressions.cs:42</a></div></div>
<div class="ttc" id="namespaceGoogle_html"><div class="ttname"><a href="namespaceGoogle.html">Google</a></div><div class="ttdef"><b>Definition:</b> <a href="KInt64Vector_8cs_source.html#l00011">KInt64Vector.cs:11</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1DecisionStrategyProto_1_1Types_html"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1DecisionStrategyProto_1_1Types.html">Google.OrTools.Sat.DecisionStrategyProto.Types</a></div><div class="ttdoc">Container for nested types declared in the DecisionStrategyProto message type.</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8pb_8cs_source.html#l04823">CpModel.pb.cs:4823</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1DecisionStrategyProto_1_1Types_html_a855a897b1424cc769df01ae2aa6f2b80"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1DecisionStrategyProto_1_1Types.html#a855a897b1424cc769df01ae2aa6f2b80">Google.OrTools.Sat.DecisionStrategyProto.Types.DomainReductionStrategy</a></div><div class="ttdeci">DomainReductionStrategy</div><div class="ttdoc">Once a variable has been chosen, this enum describe what decision is taken on its domain.</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8pb_8cs_source.html#l04844">CpModel.pb.cs:4844</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1CpSolver_html_a3291115621245e4e0d7a1fb4eace1a15"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1CpSolver.html#a3291115621245e4e0d7a1fb4eace1a15">Google.OrTools.Sat.CpSolver.StringParameters</a></div><div class="ttdeci">string StringParameters</div><div class="ttdef"><b>Definition:</b> <a href="CpSolver_8cs_source.html#l00086">CpSolver.cs:86</a></div></div>
2019-06-29 18:18:08 +02:00
<div class="ttc" id="classGoogle_1_1OrTools_1_1Util_1_1Domain_html_a64c5e2300de3f13db201708ab803828d"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Util_1_1Domain.html#a64c5e2300de3f13db201708ab803828d">Google.OrTools.Util.Domain.FromValues</a></div><div class="ttdeci">static Domain FromValues(long[] values)</div><div class="ttdef"><b>Definition:</b> <a href="Domain_8cs_source.html#l00065">Domain.cs:65</a></div></div>
<div class="ttc" id="classStepFunctionSampleSat_html"><div class="ttname"><a href="classStepFunctionSampleSat.html">StepFunctionSampleSat</a></div><div class="ttdef"><b>Definition:</b> <a href="StepFunctionSampleSat_8cs_source.html#l00039">StepFunctionSampleSat.cs:39</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1CpModel_html_ae9082049e3e606979b1f76cabce037ec"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1CpModel.html#ae9082049e3e606979b1f76cabce037ec">Google.OrTools.Sat.CpModel.Add</a></div><div class="ttdeci">Constraint Add(BoundedLinearExpression lin)</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8cs_source.html#l00104">CpModel.cs:104</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1CpSolverSolutionCallback_html_a02f75dd2fa406b17fb77769f9e85732c"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1CpSolverSolutionCallback.html#a02f75dd2fa406b17fb77769f9e85732c">Google.OrTools.Sat.CpSolverSolutionCallback.Value</a></div><div class="ttdeci">long Value(LinearExpr e)</div><div class="ttdef"><b>Definition:</b> <a href="SearchHelpers_8cs_source.html#l00022">SearchHelpers.cs:22</a></div></div>
<div class="ttc" id="classVarArraySolutionPrinter_html"><div class="ttname"><a href="classVarArraySolutionPrinter.html">VarArraySolutionPrinter</a></div><div class="ttdef"><b>Definition:</b> <a href="ChannelingSampleSat_8cs_source.html#l00018">ChannelingSampleSat.cs:18</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1CpSolver_html_a711296034d9325e18d29ceb7e131404d"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1CpSolver.html#a711296034d9325e18d29ceb7e131404d">Google.OrTools.Sat.CpSolver.SearchAllSolutions</a></div><div class="ttdeci">CpSolverStatus SearchAllSolutions(CpModel model, SolutionCallback cb)</div><div class="ttdef"><b>Definition:</b> <a href="CpSolver_8cs_source.html#l00052">CpSolver.cs:52</a></div></div>
<div class="ttc" id="namespaceGoogle_1_1OrTools_html"><div class="ttname"><a href="namespaceGoogle_1_1OrTools.html">Google.OrTools</a></div><div class="ttdef"><b>Definition:</b> <a href="KInt64Vector_8cs_source.html#l00011">KInt64Vector.cs:11</a></div></div>
2019-06-29 18:18:08 +02:00
<div class="ttc" id="classGoogle_1_1OrTools_1_1Util_1_1Domain_html_a61c1109187b67d6b21664c3357b8bffe"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Util_1_1Domain.html#a61c1109187b67d6b21664c3357b8bffe">Google.OrTools.Util.Domain.FromIntervals</a></div><div class="ttdeci">static Domain FromIntervals(long[][] intervals)</div><div class="ttdef"><b>Definition:</b> <a href="Domain_8cs_source.html#l00070">Domain.cs:70</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1CpModel_html"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1CpModel.html">Google.OrTools.Sat.CpModel</a></div><div class="ttdoc">Wrapper class around the cp_model proto.</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8cs_source.html#l00023">CpModel.cs:23</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Util_1_1Domain_html"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Util_1_1Domain.html">Google.OrTools.Util.Domain</a></div><div class="ttdef"><b>Definition:</b> <a href="Domain_8cs_source.html#l00017">Domain.cs:17</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1CpModel_html_aabc77d1b1ef5eed086a385d05b334b15"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1CpModel.html#aabc77d1b1ef5eed086a385d05b334b15">Google.OrTools.Sat.CpModel.NewBoolVar</a></div><div class="ttdeci">IntVar NewBoolVar(string name)</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8cs_source.html#l00067">CpModel.cs:67</a></div></div>
<div class="ttc" id="classVarArraySolutionPrinter_html_ad02c4526fbd64b06c394d61d67234098"><div class="ttname"><a href="classVarArraySolutionPrinter.html#ad02c4526fbd64b06c394d61d67234098">VarArraySolutionPrinter.OnSolutionCallback</a></div><div class="ttdeci">override void OnSolutionCallback()</div><div class="ttdef"><b>Definition:</b> <a href="StepFunctionSampleSat_8cs_source.html#l00025">StepFunctionSampleSat.cs:25</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1IntVar_html_aa7e80c52df4643dddde01eeab3f2f997"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1IntVar.html#aa7e80c52df4643dddde01eeab3f2f997">Google.OrTools.Sat.IntVar.ShortString</a></div><div class="ttdeci">override string ShortString()</div><div class="ttdef"><b>Definition:</b> <a href="IntegerExpressions_8cs_source.html#l00529">IntegerExpressions.cs:529</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1CpModel_html_a0e96e31fd021191475ec9008b1b8022f"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1CpModel.html#a0e96e31fd021191475ec9008b1b8022f">Google.OrTools.Sat.CpModel.NewIntVar</a></div><div class="ttdeci">IntVar NewIntVar(long lb, long ub, string name)</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8cs_source.html#l00045">CpModel.cs:45</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1DecisionStrategyProto_1_1Types_html_af4bf1a876161cbdf793093bf5e029c18"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1DecisionStrategyProto_1_1Types.html#af4bf1a876161cbdf793093bf5e029c18">Google.OrTools.Sat.DecisionStrategyProto.Types.VariableSelectionStrategy</a></div><div class="ttdeci">VariableSelectionStrategy</div><div class="ttdoc">The order in which the variables above should be considered.</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8pb_8cs_source.html#l04830">CpModel.pb.cs:4830</a></div></div>
<div class="ttc" id="namespaceGoogle_1_1OrTools_1_1Sat_html"><div class="ttname"><a href="namespaceGoogle_1_1OrTools_1_1Sat.html">Google.OrTools.Sat</a></div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8pb_8cs_source.html#l00012">CpModel.pb.cs:12</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1CpSolver_html"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1CpSolver.html">Google.OrTools.Sat.CpSolver</a></div><div class="ttdef"><b>Definition:</b> <a href="CpSolver_8cs_source.html#l00019">CpSolver.cs:19</a></div></div>
<div class="ttc" id="classGoogle_1_1OrTools_1_1Sat_1_1Constraint_html_ad1b0d13e53d3d3ffcb5d52176d5b7da1"><div class="ttname"><a href="classGoogle_1_1OrTools_1_1Sat_1_1Constraint.html#ad1b0d13e53d3d3ffcb5d52176d5b7da1">Google.OrTools.Sat.Constraint.OnlyEnforceIf</a></div><div class="ttdeci">void OnlyEnforceIf(ILiteral lit)</div><div class="ttdef"><b>Definition:</b> <a href="Constraints_8cs_source.html#l00028">Constraints.cs:28</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div>
<div id="footer-container">
<div id="footer">
</div>
</div>
</body>
</html>