Files
ortools-clone/docs/java/StepFunctionSampleSat_8java_source.html

82 lines
35 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">
2019-06-13 02:45:44 +02:00
<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="doxygen.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">
<span id="sfml">OR-Tools 7.1@</span>
</div>
</div>
<div id="content">
2019-06-13 02:45:44 +02:00
<!-- 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="pages.html"><span>Related&#160;Pages</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>
</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.java</div> </div>
</div><!--header-->
<div class="contents">
<a href="StepFunctionSampleSat_8java.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">import</span> <a class="code" href="namespacecom.html">com</a>.<a class="code" href="namespacecom_1_1google.html">google</a>.<a class="code" href="namespacecom_1_1google_1_1ortools.html">ortools</a>.<a class="code" href="namespacecom_1_1google_1_1ortools_1_1sat.html">sat</a>.<a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html">CpModel</a>;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="keyword">import</span> <a class="code" href="namespacecom.html">com</a>.<a class="code" href="namespacecom_1_1google.html">google</a>.<a class="code" href="namespacecom_1_1google_1_1ortools.html">ortools</a>.<a class="code" href="namespacecom_1_1google_1_1ortools_1_1sat.html">sat</a>.<a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1CpSolver.html">CpSolver</a>;</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="keyword">import</span> <a class="code" href="namespacecom.html">com</a>.<a class="code" href="namespacecom_1_1google.html">google</a>.<a class="code" href="namespacecom_1_1google_1_1ortools.html">ortools</a>.<a class="code" href="namespacecom_1_1google_1_1ortools_1_1sat.html">sat</a>.<a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1CpSolverSolutionCallback.html">CpSolverSolutionCallback</a>;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="keyword">import</span> <a class="code" href="namespacecom.html">com</a>.<a class="code" href="namespacecom_1_1google.html">google</a>.<a class="code" href="namespacecom_1_1google_1_1ortools.html">ortools</a>.<a class="code" href="namespacecom_1_1google_1_1ortools_1_1sat.html">sat</a>.<a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1DecisionStrategyProto.html">DecisionStrategyProto</a>;</div><div cla
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1Constraint_html_ac86aa1f6eb0c1e93c11162475c1b39f8"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1Constraint.html#ac86aa1f6eb0c1e93c11162475c1b39f8">com.google.ortools.sat.Constraint.onlyEnforceIf</a></div><div class="ttdeci">void onlyEnforceIf(Literal lit)</div><div class="ttdoc">Adds a literal to the constraint.</div><div class="ttdef"><b>Definition:</b> <a href="com_2google_2ortools_2sat_2Constraint_8java_source.html#l00032">com/google/ortools/sat/Constraint.java:32</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a0868f8bc35ae63fb326d569e50df1dea"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a0868f8bc35ae63fb326d569e50df1dea">com.google.ortools.sat.CpModel.addEquality</a></div><div class="ttdeci">Constraint addEquality(LinearExpr expr, long value)</div><div class="ttdoc">Adds.</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8java_source.html#l00153">CpModel.java:153</a></div></div>
<div class="ttc" id="enumcom_1_1google_1_1ortools_1_1sat_1_1SatParameters_1_1SearchBranching_html"><div class="ttname"><a href="enumcom_1_1google_1_1ortools_1_1sat_1_1SatParameters_1_1SearchBranching.html">com.google.ortools.sat.SatParameters.SearchBranching</a></div><div class="ttdef"><b>Definition:</b> <a href="SatParameters_8java_source.html#l01959">SatParameters.java:1959</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1SatParameters_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1SatParameters.html">com.google.ortools.sat.SatParameters</a></div><div class="ttdef"><b>Definition:</b> <a href="SatParameters_8java_source.html#l00015">SatParameters.java:15</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1DecisionStrategyProto_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1DecisionStrategyProto.html">com.google.ortools.sat.DecisionStrategyProto</a></div><div class="ttdef"><b>Definition:</b> <a href="DecisionStrategyProto_8java_source.html#l00014">DecisionStrategyProto.java:14</a></div></div>
<div class="ttc" id="enumcom_1_1google_1_1ortools_1_1sat_1_1DecisionStrategyProto_1_1VariableSelectionStrategy_html_ac6e5b32db02c3cb255d3ea92fefd59e1"><div class="ttname"><a href="enumcom_1_1google_1_1ortools_1_1sat_1_1DecisionStrategyProto_1_1VariableSelectionStrategy.html#ac6e5b32db02c3cb255d3ea92fefd59e1">com.google.ortools.sat.DecisionStrategyProto.VariableSelectionStrategy.CHOOSE_FIRST</a></div><div class="ttdeci">CHOOSE_FIRST</div><div class="ttdoc">CHOOSE_FIRST = 0;</div><div class="ttdef"><b>Definition:</b> <a href="DecisionStrategyProto_8java_source.html#l00148">DecisionStrategyProto.java:148</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1CpSolver_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1CpSolver.html">com.google.ortools.sat.CpSolver</a></div><div class="ttdoc">Wrapper around the SAT solver.</div><div class="ttdef"><b>Definition:</b> <a href="CpSolver_8java_source.html#l00026">CpSolver.java:26</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a78e6aa0bcdec9be8fc0d39c46b94d851"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a78e6aa0bcdec9be8fc0d39c46b94d851">com.google.ortools.sat.CpModel.newIntVar</a></div><div class="ttdeci">IntVar newIntVar(long lb, long ub, String name)</div><div class="ttdoc">Creates an integer variable with domain [lb, ub].</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8java_source.html#l00069">CpModel.java:69</a></div></div>
<div class="ttc" id="enumcom_1_1google_1_1ortools_1_1sat_1_1DecisionStrategyProto_1_1VariableSelectionStrategy_html"><div class="ttname"><a href="enumcom_1_1google_1_1ortools_1_1sat_1_1DecisionStrategyProto_1_1VariableSelectionStrategy.html">com.google.ortools.sat.DecisionStrategyProto.VariableSelectionStrategy</a></div><div class="ttdef"><b>Definition:</b> <a href="DecisionStrategyProto_8java_source.html#l00143">DecisionStrategyProto.java:143</a></div></div>
<div class="ttc" id="namespacecom_html"><div class="ttname"><a href="namespacecom.html">com</a></div></div>
<div class="ttc" id="enumcom_1_1google_1_1ortools_1_1sat_1_1DecisionStrategyProto_1_1DomainReductionStrategy_html"><div class="ttname"><a href="enumcom_1_1google_1_1ortools_1_1sat_1_1DecisionStrategyProto_1_1DomainReductionStrategy.html">com.google.ortools.sat.DecisionStrategyProto.DomainReductionStrategy</a></div><div class="ttdef"><b>Definition:</b> <a href="DecisionStrategyProto_8java_source.html#l00274">DecisionStrategyProto.java:274</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a08ef439d15caa1e1a1a713d20edaa8a6"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a08ef439d15caa1e1a1a713d20edaa8a6">com.google.ortools.sat.CpModel.newBoolVar</a></div><div class="ttdeci">IntVar newBoolVar(String name)</div><div class="ttdoc">Creates a Boolean variable with the given name.</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8java_source.html#l00085">CpModel.java:85</a></div></div>
<div class="ttc" id="classStepFunctionSampleSat_html"><div class="ttname"><a href="classStepFunctionSampleSat.html">StepFunctionSampleSat</a></div><div class="ttdoc">Link integer constraints together.</div><div class="ttdef"><b>Definition:</b> <a href="StepFunctionSampleSat_8java_source.html#l00024">StepFunctionSampleSat.java:24</a></div></div>
<div class="ttc" id="namespacecom_1_1google_1_1ortools_html"><div class="ttname"><a href="namespacecom_1_1google_1_1ortools.html">com.google.ortools</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a0058cd3a052f3be3c451bd8ab671cf36"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a0058cd3a052f3be3c451bd8ab671cf36">com.google.ortools.sat.CpModel.addLinearExpressionInDomain</a></div><div class="ttdeci">Constraint addLinearExpressionInDomain(LinearExpr expr, Domain domain)</div><div class="ttdoc">Adds.</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8java_source.html#l00134">CpModel.java:134</a></div></div>
<div class="ttc" id="enumcom_1_1google_1_1ortools_1_1sat_1_1DecisionStrategyProto_1_1DomainReductionStrategy_html_a122969bda1eb2568cbe2c91443b7da20"><div class="ttname"><a href="enumcom_1_1google_1_1ortools_1_1sat_1_1DecisionStrategyProto_1_1DomainReductionStrategy.html#a122969bda1eb2568cbe2c91443b7da20">com.google.ortools.sat.DecisionStrategyProto.DomainReductionStrategy.SELECT_MIN_VALUE</a></div><div class="ttdeci">SELECT_MIN_VALUE</div><div class="ttdoc">SELECT_MIN_VALUE = 0;</div><div class="ttdef"><b>Definition:</b> <a href="DecisionStrategyProto_8java_source.html#l00279">DecisionStrategyProto.java:279</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1util_1_1Domain_html_a299b2f810835cd5f39d5a892140409e8"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1util_1_1Domain.html#a299b2f810835cd5f39d5a892140409e8">com.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_8java_source.html#l00054">Domain.java:54</a></div></div>
<div class="ttc" id="enumcom_1_1google_1_1ortools_1_1sat_1_1SatParameters_1_1SearchBranching_html_a1d41a51f8dedeab0ed271411f4a21759"><div class="ttname"><a href="enumcom_1_1google_1_1ortools_1_1sat_1_1SatParameters_1_1SearchBranching.html#a1d41a51f8dedeab0ed271411f4a21759">com.google.ortools.sat.SatParameters.SearchBranching.FIXED_SEARCH</a></div><div class="ttdeci">FIXED_SEARCH</div><div class="ttdef"><b>Definition:</b> <a href="SatParameters_8java_source.html#l01982">SatParameters.java:1982</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1CpSolver_html_a21e42b4db90799992f39abf1a37da2e0"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1CpSolver.html#a21e42b4db90799992f39abf1a37da2e0">com.google.ortools.sat.CpSolver.getParameters</a></div><div class="ttdeci">SatParameters.Builder getParameters()</div><div class="ttdoc">Returns the builder of the parameters of the SAT solver for modification.</div><div class="ttdef"><b>Definition:</b> <a href="CpSolver_8java_source.html#l00119">CpSolver.java:119</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar.html">com.google.ortools.sat.IntVar</a></div><div class="ttdoc">An integer variable.</div><div class="ttdef"><b>Definition:</b> <a href="com_2google_2ortools_2sat_2IntVar_8java_source.html#l00021">com/google/ortools/sat/IntVar.java:21</a></div></div>
<div class="ttc" id="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal_html"><div class="ttname"><a href="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal.html">com.google.ortools.sat.Literal</a></div><div class="ttdoc">Interface to describe a boolean variable or its negation.</div><div class="ttdef"><b>Definition:</b> <a href="Literal_8java_source.html#l00017">Literal.java:17</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html">com.google.ortools.sat.CpModel</a></div><div class="ttdoc">Main modeling class.</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8java_source.html#l00040">CpModel.java:40</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1util_1_1Domain_html_a19c054d5f6543797b1ad6b402d5f3404"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1util_1_1Domain.html#a19c054d5f6543797b1ad6b402d5f3404">com.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_8java_source.html#l00058">Domain.java:58</a></div></div>
<div class="ttc" id="classStepFunctionSampleSat_html_a97df3edd25ad352a58534bf73a88b9f2"><div class="ttname"><a href="classStepFunctionSampleSat.html#a97df3edd25ad352a58534bf73a88b9f2">StepFunctionSampleSat.main</a></div><div class="ttdeci">static void main(String[] args)</div><div class="ttdef"><b>Definition:</b> <a href="StepFunctionSampleSat_8java_source.html#l00029">StepFunctionSampleSat.java:29</a></div></div>
<div class="ttc" id="namespacecom_1_1google_html"><div class="ttname"><a href="namespacecom_1_1google.html">com.google</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1CpSolver_html_ad64fabf13468253f9f080e4eeb1d3655"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1CpSolver.html#ad64fabf13468253f9f080e4eeb1d3655">com.google.ortools.sat.CpSolver.searchAllSolutions</a></div><div class="ttdeci">CpSolverStatus searchAllSolutions(CpModel model, CpSolverSolutionCallback cb)</div><div class="ttdoc">Searches for all solutions of a satisfiability problem.</div><div class="ttdef"><b>Definition:</b> <a href="CpSolver_8java_source.html#l00057">CpSolver.java:57</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1CpSolverSolutionCallback_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1CpSolverSolutionCallback.html">com.google.ortools.sat.CpSolverSolutionCallback</a></div><div class="ttdoc">Parent class to create a callback called at each solution.</div><div class="ttdef"><b>Definition:</b> <a href="CpSolverSolutionCallback_8java_source.html#l00039">CpSolverSolutionCallback.java:39</a></div></div>
<div class="ttc" id="namespacecom_1_1google_1_1ortools_1_1util_html"><div class="ttname"><a href="namespacecom_1_1google_1_1ortools_1_1util.html">com.google.ortools.util</a></div><div class="ttdef"><b>Definition:</b> <a href="Domain_8java_source.html#l00009">Domain.java:9</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1util_1_1Domain_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1util_1_1Domain.html">com.google.ortools.util.Domain</a></div><div class="ttdef"><b>Definition:</b> <a href="Domain_8java_source.html#l00011">Domain.java:11</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div>
<div id="footer-container">
<div id="footer">
</div>
</div>
</body>
2019-06-13 02:45:44 +02:00
</html>