95 lines
35 KiB
HTML
95 lines
35 KiB
HTML
|
|
<!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: StepFunctionSampleSat.java 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="doxygen.css" rel="stylesheet" type="text/css" />
|
||
|
|
<link href="ortools.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="projectalign" style="padding-left: 0.5em;">
|
||
|
|
<div id="projectname">OR-Tools
|
||
|
|
 <span id="projectnumber">7.1</span>
|
||
|
|
</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
<!-- end header part -->
|
||
|
|
<!-- Generated by Doxygen 1.8.15 -->
|
||
|
|
<div id="navrow1" class="tabs">
|
||
|
|
<ul class="tablist">
|
||
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
|
<li><a href="pages.html"><span>Related 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 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> <span class="comment">// Copyright 2010-2018 Google LLC</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <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> <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> <span class="comment">//</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <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> <span class="comment">//</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <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> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <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> <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> <span class="comment">// limitations under the License.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> </div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <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> <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> <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> <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 -->
|
||
|
|
<!-- start footer part -->
|
||
|
|
<hr class="footer"/><address class="footer"><small>
|
||
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
||
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||
|
|
</a> 1.8.15
|
||
|
|
</small></address>
|
||
|
|
</body>
|
||
|
|
</html>
|