<ahref="CpModel_8java.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">// Copyright 2010-2021 Google LLC</span></div><divclass="line"><aname="l00002"></a><spanclass="lineno"> 2</span> <spanclass="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div><divclass="line"><aname="l00003"></a><spanclass="lineno"> 3</span> <spanclass="comment">// you may not use this file except in compliance with the License.</span></div><divclass="line"><aname="l00004"></a><spanclass="lineno"> 4</span> <spanclass="comment">// You may obtain a copy of the License at</span></div><divclass="line"><aname="l00005"></a><spanclass="lineno"> 5</span> <spanclass="comment">//</span></div><divclass="line"><aname="l00006"></a><spanclass="lineno"> 6</span> <spanclass="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div><divclass="line"><aname="l00007"></a><spanclass="lineno"> 7</span> <spanclass="comment">//</span></div><divclass="line"><aname="l00008"></a><spanclass="lineno"> 8</span> <spanclass="comment">// Unless required by applicable law or agreed to in writing, software</span></div><divclass="line"><aname="l00009"></a><spanclass="lineno"> 9</span> <spanclass="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div><divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> <spanclass="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><divclass="line"><aname="l00011"></a><spanclass="lineno"> 11</span> <spanclass="comment">// See the License for the specific language governing permissions and</span></div><divclass="line"><aname="l00012"></a><spanclass="lineno"> 12</span> <spanclass="comment">// limitations under the License.</span></div><divclass="line"><aname="l00013"></a><spanclass="lineno"> 13</span> </div><divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="keyword">package </span>com.google.ortools.sat;</div><divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> </div><divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="keyword">import</span><aclass="code"href="namespacecom.html">com</a>.<aclass="code"href="namespacecom_1_1google.html">google</a>.<aclass="code"href="namespacecom_1_1google_1_1ortools.html">ortools</a>.<aclass="code"href="namespacecom_1_1google_1_1ortools_1_1sat.html">sat</a>.<aclass="code"href="classcom_1_1google_1_1ortools_1_1sat_1_1AllDifferentConstraintProto.html">AllDifferentConstraintProto</a>;</div><divclass="line"><aname="l00017"></a><spanclass="lineno"> 17</span> <spanclass="keyword">import</span><aclass="code"href="namespacecom.html">com</a>.<aclass="code"href="namespacecom_1_1google.html">google</a>.<aclass="code"href="namespacecom_1_1google_1_1ortools.html">ortools</a>.<aclass="code"href="namespacecom_1_1google_1_1ortools_1_1sat.html">sat</a>.<aclass="code"href="classcom_1_1google_1_1ortools_1_1sat_1_1AutomatonConstraintProto.html">AutomatonConstraintProto</a>;</div><divclass="line"><aname="l00018"></a><spanclass="lineno"> 18</span> <spanclass="keyword">import</span><aclass="code"href="namespacecom.html">com</a>.<aclass="code"href="namespacecom_1_1google.html">google</a>.<aclass="code"href="namespacecom_1_1google_1_1ortools.html">ortools</a>.<aclass="code"href="namespacecom_1_1google_1_1ortools_1_1sat.html">sat</a>.<aclass="code"href="classcom_1_1google_1_1ortools_1_1sat_1_1BoolArgumentProto.html">BoolArgumentProto</a>;</div><divclass="line"><aname="l00019"></a><spanclass="lineno"> 19</span> <spanclass="keyword">import</span><aclass="code"href="namespacecom.html">com</a>.<aclass="code"href="namespacecom_1_1google.html">google</a>.<aclass=
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_acfebe68026a8b01e9eba16f811d2fd8d"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#acfebe68026a8b01e9eba16f811d2fd8d">com.google.ortools.sat.CpModel.clearHints</a></div><divclass="ttdeci">void clearHints()</div><divclass="ttdoc">Remove all solution hints.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00890">CpModel.java:890</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_abe9f49ebd3adc21e3433735393f7990b"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#abe9f49ebd3adc21e3433735393f7990b">com.google.ortools.sat.CpModel.addMapDomain</a></div><divclass="ttdeci">void addMapDomain(IntVar var, Literal[] booleans, long offset)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00578">CpModel.java:578</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_ad4b1418e7e2a1a91f62f9f75ccae0a60"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#ad4b1418e7e2a1a91f62f9f75ccae0a60">com.google.ortools.sat.CpModel.minimize</a></div><divclass="ttdeci">void minimize(LinearArgument expr)</div><divclass="ttdoc">Adds a minimization objective of a linear expression.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00914">CpModel.java:914</a></div></div>
<divclass="ttc"id="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html">com.google.ortools.sat.LinearExpr</a></div><divclass="ttdoc">A linear expression (sum (ai * xi) + b).</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExpr_8java_source.html#l00019">LinearExpr.java:19</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a7742b1602e3a7143f00ae987e9ce6038"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a7742b1602e3a7143f00ae987e9ce6038">com.google.ortools.sat.CpModel.newFixedInterval</a></div><divclass="ttdeci">IntervalVar newFixedInterval(long start, long size, String name)</div><divclass="ttdoc">Creates a fixed interval from its start and its size.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00744">CpModel.java:744</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a4005900c34d265fa7fd60e622d533cfa"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a4005900c34d265fa7fd60e622d533cfa">com.google.ortools.sat.CpModel.newOptionalFixedInterval</a></div><divclass="ttdeci">IntervalVar newOptionalFixedInterval(long start, long size, Literal isPresent, String name)</div><divclass="ttdoc">Creates an optional fixed interval from start and size, and an isPresent literal.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00802">CpModel.java:802</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_a60b47b19e5c9213c1fdb818eee0f45d4"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#a60b47b19e5c9213c1fdb818eee0f45d4">com.google.ortools.sat.DoubleLinearExpr.getCoefficient</a></div><divclass="ttdeci">double getCoefficient(int index)</div><divclass="ttdoc">Returns the ith coefficient.</div><divclass="ttdef"><b>Definition:</b><ahref="DoubleLinearExpr_8java_source.html#l00113">DoubleLinearExpr.java:113</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a6d24660e4148b1e37ce4f8ca1eda5340"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a6d24660e4148b1e37ce4f8ca1eda5340">com.google.ortools.sat.CpModel.newFixedSizeIntervalVar</a></div><divclass="ttdeci">IntervalVar newFixedSizeIntervalVar(LinearArgument start, long size, String name)</div><divclass="ttdoc">Creates an interval variable from an affine expression start, and a fixed size.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00734">CpModel.java:734</a></div></div>
<divclass="ttc"id="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_aa67a97afc7ff974a68379b0a13dc8a39"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#aa67a97afc7ff974a68379b0a13dc8a39">com.google.ortools.sat.LinearExpr.newBuilder</a></div><divclass="ttdeci">static LinearExprBuilder newBuilder()</div><divclass="ttdoc">Returns a builder.</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExpr_8java_source.html#l00033">LinearExpr.java:33</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a3bb9eb7bd95881e3e165b8bb91b75a1a"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a3bb9eb7bd95881e3e165b8bb91b75a1a">com.google.ortools.sat.CpModel.newBoolVar</a></div><divclass="ttdeci">BoolVar newBoolVar(String name)</div><divclass="ttdoc">Creates a Boolean variable with the given name.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00089">CpModel.java:89</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_aa382179fc276c2f26657f73ed6a71fab"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#aa382179fc276c2f26657f73ed6a71fab">com.google.ortools.sat.CpModel.addImplication</a></div><divclass="ttdeci">Constraint addImplication(Literal a, Literal b)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00211">CpModel.java:211</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_aaf344b07bec2f7236a136e8b20304497"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#aaf344b07bec2f7236a136e8b20304497">com.google.ortools.sat.CpModel.addGreaterOrEqual</a></div><divclass="ttdeci">Constraint addGreaterOrEqual(LinearArgument expr, long value)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00281">CpModel.java:281</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a8beab7e1e58d829de3473de546550da5"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a8beab7e1e58d829de3473de546550da5">com.google.ortools.sat.CpModel.addGreaterThan</a></div><divclass="ttdeci">Constraint addGreaterThan(LinearArgument expr, long value)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00294">CpModel.java:294</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a5e4f37cb45edff88fe9b00f74ab56fe5"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a5e4f37cb45edff88fe9b00f74ab56fe5">com.google.ortools.sat.CpModel.addAtLeastOne</a></div><divclass="ttdeci">Constraint addAtLeastOne(Literal[] literals)</div><divclass="ttdoc">Same as addBoolOr.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00141">CpModel.java:141</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a575f2ec309ae45622e0d3601a83ccb91"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a575f2ec309ae45622e0d3601a83ccb91">com.google.ortools.sat.CpModel.addAssumptions</a></div><divclass="ttdeci">void addAssumptions(Literal[] literals)</div><divclass="ttdoc">Adds multiple literals to the model as assumptions.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00900">CpModel.java:900</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1util_1_1Domain_html_a8f3d8247806e88dd3d62d9d03e520acf"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1util_1_1Domain.html#a8f3d8247806e88dd3d62d9d03e520acf">com.google.ortools.util.Domain.flattenedIntervals</a></div><divclass="ttdeci">long [] flattenedIntervals()</div><divclass="ttdoc">This method returns the flattened list of interval bounds of the domain.</div><divclass="ttdef"><b>Definition:</b><ahref="util_2Domain_8java_source.html#l00111">util/Domain.java:111</a></div></div>
<divclass="ttc"id="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_aa7d6a5c7e69f4efdc6a44b85bbe22f1a"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#aa7d6a5c7e69f4efdc6a44b85bbe22f1a">com.google.ortools.sat.LinearExpr.getOffset</a></div><divclass="ttdeci">long getOffset()</div><divclass="ttdoc">Returns the constant part of the expression.</div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_ab9520e238ce658ed81ef5dfd96ed7bfe"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#ab9520e238ce658ed81ef5dfd96ed7bfe">com.google.ortools.sat.CpModel.newOptionalIntervalVar</a></div><divclass="ttdeci">IntervalVar newOptionalIntervalVar(LinearArgument start, LinearArgument size, LinearArgument end, Literal isPresent, String name)</div><divclass="ttdoc">Creates an optional interval variable from three affine expressions start, size, end,...</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00768">CpModel.java:768</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_ad3864adf749011c7abcd03127679af5d"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#ad3864adf749011c7abcd03127679af5d">com.google.ortools.sat.CpModel.validate</a></div><divclass="ttdeci">String validate()</div><divclass="ttdoc">Returns a non empty string explaining the issue if the model is invalid.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00969">CpModel.java:969</a></div></div>
<divclass="ttc"id="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_ae9592a449a7c3bdebd04b8ea4f174871"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#ae9592a449a7c3bdebd04b8ea4f174871">com.google.ortools.sat.LinearExpr.getVariableIndex</a></div><divclass="ttdeci">int getVariableIndex(int index)</div><divclass="ttdoc">Returns the index of the ith variable.</div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_abdaf677e39597cf7c20c2992c6fb2ab9"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#abdaf677e39597cf7c20c2992c6fb2ab9">com.google.ortools.sat.CpModel.addAutomaton</a></div><divclass="ttdeci">AutomatonConstraint addAutomaton(IntVar[] transitionVariables, long startingState, long[] finalStates)</div><divclass="ttdoc">Adds an automaton constraint.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00501">CpModel.java:501</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1Constraint_html"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1Constraint.html">com.google.ortools.sat.Constraint</a></div><divclass="ttdoc">Wrapper around a ConstraintProto.</div><divclass="ttdef"><b>Definition:</b><ahref="java_2com_2google_2ortools_2sat_2Constraint_8java_source.html#l00025">java/com/google/ortools/sat/Constraint.java:25</a></div></div>
<divclass="ttc"id="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearArgument_html"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearArgument.html">com.google.ortools.sat.LinearArgument</a></div><divclass="ttdoc">A object that can build a LinearExpr object.</div><divclass="ttdef"><b>Definition:</b><ahref="LinearArgument_8java_source.html#l00021">LinearArgument.java:21</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a6c947e26c649b032bc71b742a8591c78"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a6c947e26c649b032bc71b742a8591c78">com.google.ortools.sat.CpModel.addAssumption</a></div><divclass="ttdeci">void addAssumption(Literal lit)</div><divclass="ttdoc">Adds a literal to the model as assumption.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00895">CpModel.java:895</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a8587d15895c3f5b185d6836f31ac5c79"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a8587d15895c3f5b185d6836f31ac5c79">com.google.ortools.sat.CpModel.modelStats</a></div><divclass="ttdeci">String modelStats()</div><divclass="ttdoc">Returns some statistics on model as a string.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00964">CpModel.java:964</a></div></div>
<divclass="ttc"id="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal_html_a9e2c0b0299cf2164e32a7fbc543a7ea6"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal.html#a9e2c0b0299cf2164e32a7fbc543a7ea6">com.google.ortools.sat.Literal.not</a></div><divclass="ttdeci">Literal not()</div><divclass="ttdoc">Returns the Boolean negation of the current literal.</div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_ae7cb886849e1cba3a0df2213906efbfd"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#ae7cb886849e1cba3a0df2213906efbfd">com.google.ortools.sat.CpModel.newIntVarFromDomain</a></div><divclass="ttdeci">IntVar newIntVarFromDomain(Domain domain, String name)</div><divclass="ttdoc">Creates an integer variable with given domain.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00084">CpModel.java:84</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_ac832bdb8a12317239ec2111a4f101937"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#ac832bdb8a12317239ec2111a4f101937">com.google.ortools.sat.DoubleLinearExpr.getOffset</a></div><divclass="ttdeci">double getOffset()</div><divclass="ttdoc">Returns the constant part of the expression.</div><divclass="ttdef"><b>Definition:</b><ahref="DoubleLinearExpr_8java_source.html#l00121">DoubleLinearExpr.java:121</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_1_1MismatchedArrayLengths_html"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_1_1MismatchedArrayLengths.html">com.google.ortools.sat.CpModel.MismatchedArrayLengths</a></div><divclass="ttdoc">Exception thrown when parallel arrays have mismatched lengths.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00052">CpModel.java:52</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_aec6c93c6887293dd9d003c400f2652aa"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#aec6c93c6887293dd9d003c400f2652aa">com.google.ortools.sat.CpModel.addLinearConstraint</a></div><divclass="ttdeci">Constraint addLinearConstraint(LinearArgument expr, long lb, long ub)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00237">CpModel.java:237</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_1_1WrongLength_html"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_1_1WrongLength.html">com.google.ortools.sat.CpModel.WrongLength</a></div><divclass="ttdoc">Exception thrown when an array has a wrong length.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00059">CpModel.java:59</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_abb2eecf7168947f2590ef6bc16d0bd4c"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#abb2eecf7168947f2590ef6bc16d0bd4c">com.google.ortools.sat.CpModel.addDifferent</a></div><divclass="ttdeci">Constraint addDifferent(LinearArgument expr, long value)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00307">CpModel.java:307</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_acc3ffb69f2905a8cde7093e16f7e55e4"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#acc3ffb69f2905a8cde7093e16f7e55e4">com.google.ortools.sat.CpModel.addElement</a></div><divclass="ttdeci">Constraint addElement(IntVar index, int[] values, IntVar target)</div><divclass="ttdoc">Adds the element constraint:</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00375">CpModel.java:375</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_aef7f4e90b06bc50fd752fbddbb5ccce0"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#aef7f4e90b06bc50fd752fbddbb5ccce0">com.google.ortools.sat.CpModel.addAtLeastOne</a></div><divclass="ttdeci">Constraint addAtLeastOne(Iterable< Literal > literals)</div><divclass="ttdoc">Same as addBoolOr.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00146">CpModel.java:146</a></div></div>
<divclass="ttc"id="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_a59f9cb76db051cd784a42f38220f896d"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#a59f9cb76db051cd784a42f38220f896d">com.google.ortools.sat.LinearExpr.numElements</a></div><divclass="ttdeci">int numElements()</div><divclass="ttdoc">Returns the number of terms (excluding the constant one) in this expression.</div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a5f04fd101219e4fc83cbee32a0b0dd2f"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a5f04fd101219e4fc83cbee32a0b0dd2f">com.google.ortools.sat.CpModel.maximize</a></div><divclass="ttdeci">void maximize(LinearArgument expr)</div><divclass="ttdoc">Adds a maximization objective of a linear expression.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00932">CpModel.java:932</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html">com.google.ortools.sat.DoubleLinearExpr</a></div><divclass="ttdoc">A linear expression interface that can be parsed.</div><divclass="ttdef"><b>Definition:</b><ahref="DoubleLinearExpr_8java_source.html#l00017">DoubleLinearExpr.java:17</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_ac9e2f74d525548916080a1465b77c2e6"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#ac9e2f74d525548916080a1465b77c2e6">com.google.ortools.sat.CpModel.trueLiteral</a></div><divclass="ttdeci">Literal trueLiteral()</div><divclass="ttdoc">Returns the true literal.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00104">CpModel.java:104</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a8b1ec6f0dcdfbeb554ccc5a3d393faa1"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a8b1ec6f0dcdfbeb554ccc5a3d393faa1">com.google.ortools.sat.CpModel.newIntervalVar</a></div><divclass="ttdeci">IntervalVar newIntervalVar(LinearArgument start, LinearArgument size, LinearArgument end, String name)</div><divclass="ttdoc">Creates an interval variable from three affine expressions start, size, and end.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00714">CpModel.java:714</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a1e3a73ae219c0fa08448c15f9322b8b5"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a1e3a73ae219c0fa08448c15f9322b8b5">com.google.ortools.sat.CpModel.addReservoirConstraint</a></div><divclass="ttdeci">ReservoirConstraint addReservoirConstraint(long minLevel, long maxLevel)</div><divclass="ttdoc">Adds a reservoir constraint with optional refill/emptying events.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00564">CpModel.java:564</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1Constraint_html_ae49c1e99145157c8aa8cce5897e6a6bc"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1Constraint.html#ae49c1e99145157c8aa8cce5897e6a6bc">com.google.ortools.sat.Constraint.onlyEnforceIf</a></div><divclass="ttdeci">void onlyEnforceIf(Literal lit)</div><divclass="ttdoc">Adds a literal to the constraint.</div><divclass="ttdef"><b>Definition:</b><ahref="java_2com_2google_2ortools_2sat_2Constraint_8java_source.html#l00032">java/com/google/ortools/sat/Constraint.java:32</a></div></div>
<divclass="ttc"id="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal_html"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal.html">com.google.ortools.sat.Literal</a></div><divclass="ttdoc">Interface to describe a boolean variable or its negation.</div><divclass="ttdef"><b>Definition:</b><ahref="Literal_8java_source.html#l00017">Literal.java:17</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a4812f7dcd21b909dc60679944dc87941"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a4812f7dcd21b909dc60679944dc87941">com.google.ortools.sat.CpModel.addElement</a></div><divclass="ttdeci">Constraint addElement(IntVar index, long[] values, IntVar target)</div><divclass="ttdoc">Adds the element constraint:</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00363">CpModel.java:363</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1Constraint_html_a745f45cacfc19026a06b544c914a773d"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1Constraint.html#a745f45cacfc19026a06b544c914a773d">com.google.ortools.sat.Constraint.getBuilder</a></div><divclass="ttdeci">ConstraintProto.Builder getBuilder()</div><divclass="ttdoc">Returns the constraint builder.</div><divclass="ttdef"><b>Definition:</b><ahref="java_2com_2google_2ortools_2sat_2Constraint_8java_source.html#l00049">java/com/google/ortools/sat/Constraint.java:49</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a380637b707322864d915ee2c3dd4a900"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a380637b707322864d915ee2c3dd4a900">com.google.ortools.sat.CpModel.exportToFile</a></div><divclass="ttdeci">Boolean exportToFile(String file)</div><divclass="ttdoc">Write the model as a protocol buffer to 'file'.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00981">CpModel.java:981</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_acec1ebcc0a2e58e7eb719c1d97ecb308"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#acec1ebcc0a2e58e7eb719c1d97ecb308">com.google.ortools.sat.CpModel.addLessOrEqual</a></div><divclass="ttdeci">Constraint addLessOrEqual(LinearArgument expr, long value)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00255">CpModel.java:255</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_a59f9cb76db051cd784a42f38220f896d"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#a59f9cb76db051cd784a42f38220f896d">com.google.ortools.sat.DoubleLinearExpr.numElements</a></div><divclass="ttdeci">int numElements()</div><divclass="ttdoc">Returns the number of elements in the interface.</div><divclass="ttdef"><b>Definition:</b><ahref="DoubleLinearExpr_8java_source.html#l00100">DoubleLinearExpr.java:100</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a2295a3e26efe868c58ef9cbf16714ddc"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a2295a3e26efe868c58ef9cbf16714ddc">com.google.ortools.sat.CpModel.clearAssumptions</a></div><divclass="ttdeci">void clearAssumptions()</div><divclass="ttdoc">Remove all assumptions from the model.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00907">CpModel.java:907</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1LinearExprBuilder_html"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1LinearExprBuilder.html">com.google.ortools.sat.LinearExprBuilder</a></div><divclass="ttdoc">Builder class for the LinearExpr container.</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExprBuilder_8java_source.html#l00020">LinearExprBuilder.java:20</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a8a9dc8e5d73e1683ac243d9afa7a52e8"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a8a9dc8e5d73e1683ac243d9afa7a52e8">com.google.ortools.sat.CpModel.addElement</a></div><divclass="ttdeci">Constraint addElement(IntVar index, IntVar[] variables, IntVar target)</div><divclass="ttdoc">Adds the element constraint:</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00351">CpModel.java:351</a></div></div>
<divclass="ttc"id="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearArgument_html_a68a038d4ae2f7cf74dfa8e8fe21c4feb"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearArgument.html#a68a038d4ae2f7cf74dfa8e8fe21c4feb">com.google.ortools.sat.LinearArgument.build</a></div><divclass="ttdeci">LinearExpr build()</div><divclass="ttdoc">Builds a linear expression.</div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a14ccb6be52e0df479fb234bbd49bc368"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a14ccb6be52e0df479fb234bbd49bc368">com.google.ortools.sat.CpModel.newOptionalFixedSizeIntervalVar</a></div><divclass="ttdeci">IntervalVar newOptionalFixedSizeIntervalVar(LinearArgument start, long size, Literal isPresent, String name)</div><divclass="ttdoc">Creates an optional interval variable from an affine expression start, and a fixed size.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00791">CpModel.java:791</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_ae9592a449a7c3bdebd04b8ea4f174871"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#ae9592a449a7c3bdebd04b8ea4f174871">com.google.ortools.sat.DoubleLinearExpr.getVariableIndex</a></div><divclass="ttdeci">int getVariableIndex(int index)</div><divclass="ttdoc">Returns the ith variable.</div><divclass="ttdef"><b>Definition:</b><ahref="DoubleLinearExpr_8java_source.html#l00105">DoubleLinearExpr.java:105</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_aec2d99d4d6d15f4f4f4e4f146329835f"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#aec2d99d4d6d15f4f4f4e4f146329835f">com.google.ortools.sat.CpModel.addModuloEquality</a></div><divclass="ttdeci">Constraint addModuloEquality(LinearArgument target, LinearArgument var, long mod)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00666">CpModel.java:666</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1LinearExprBuilder_html_afe458481a51c77d39c76ba6876235659"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1LinearExprBuilder.html#afe458481a51c77d39c76ba6876235659">com.google.ortools.sat.LinearExprBuilder.addTerm</a></div><divclass="ttdeci">LinearExprBuilder addTerm(LinearArgument expr, long coeff)</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExprBuilder_8java_source.html#l00039">LinearExprBuilder.java:39</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a0289220f955eed8161f8ad742a2c8380"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a0289220f955eed8161f8ad742a2c8380">com.google.ortools.sat.CpModel.addLessThan</a></div><divclass="ttdeci">Constraint addLessThan(LinearArgument expr, long value)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00268">CpModel.java:268</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a5301d52f616d96319f708f4379d17cea"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a5301d52f616d96319f708f4379d17cea">com.google.ortools.sat.CpModel.falseLiteral</a></div><divclass="ttdeci">Literal falseLiteral()</div><divclass="ttdoc">Returns the false literal.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00114">CpModel.java:114</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a7383b73106c0c44d04316bfdd15c12f8"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a7383b73106c0c44d04316bfdd15c12f8">com.google.ortools.sat.CpModel.addHint</a></div><divclass="ttdeci">void addHint(IntVar var, long value)</div><divclass="ttdoc">Adds hinting to a variable.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00884">CpModel.java:884</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a107bf12aa6885ec5d9f5731ebdca6ae2"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a107bf12aa6885ec5d9f5731ebdca6ae2">com.google.ortools.sat.CpModel.addEquality</a></div><divclass="ttdeci">Constraint addEquality(LinearArgument expr, long value)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00242">CpModel.java:242</a></div></div>
<divclass="ttc"id="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_a2c77626134edecc47b69efe661ea1904"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#a2c77626134edecc47b69efe661ea1904">com.google.ortools.sat.LinearExpr.getCoefficient</a></div><divclass="ttdeci">long getCoefficient(int index)</div><divclass="ttdoc">Returns the ith coefficient.</div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar_html_a59d053c950ff1e9f8a004d493f34e754"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar.html#a59d053c950ff1e9f8a004d493f34e754">com.google.ortools.sat.IntVar.getIndex</a></div><divclass="ttdeci">int getIndex()</div><divclass="ttdoc">Returns the index of the variable in the underlying CpModelProto.</div><divclass="ttdef"><b>Definition:</b><ahref="java_2com_2google_2ortools_2sat_2IntVar_8java_source.html#l00044">java/com/google/ortools/sat/IntVar.java:44</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_ac6bd36b79d4e1faf2394c04c39a833db"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#ac6bd36b79d4e1faf2394c04c39a833db">com.google.ortools.sat.CpModel.addModuloEquality</a></div><divclass="ttdeci">Constraint addModuloEquality(LinearArgument target, LinearArgument var, LinearArgument mod)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00654">CpModel.java:654</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1util_1_1Domain_html_a8350d3549edfadb84f04fcf3496a7d55"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1util_1_1Domain.html#a8350d3549edfadb84f04fcf3496a7d55">com.google.ortools.util.Domain.fromFlatIntervals</a></div><divclass="ttdeci">static Domain fromFlatIntervals(long[] flat_intervals)</div><divclass="ttdoc">This method is available in Python, Java and .NET.</div><divclass="ttdef"><b>Definition:</b><ahref="util_2Domain_8java_source.html#l00100">util/Domain.java:100</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_ab85f26d65b25672b7d59ad39dbca4e03"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#ab85f26d65b25672b7d59ad39dbca4e03">com.google.ortools.sat.CpModel.newIntVar</a></div><divclass="ttdeci">IntVar newIntVar(long lb, long ub, String name)</div><divclass="ttdoc">Creates an integer variable with domain [lb, ub].</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00073">CpModel.java:73</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1util_1_1Domain_html"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1util_1_1Domain.html">com.google.ortools.util.Domain</a></div><divclass="ttdoc">We call domain any subset of Int64 = [kint64min, kint64max].</div><divclass="ttdef"><b>Definition:</b><ahref="util_2Domain_8java_source.html#l00021">util/Domain.java:21</a></div></div>