<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_ad4bcd2a7566c6fe77e5bc5fe0606aa9e"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#ad4bcd2a7566c6fe77e5bc5fe0606aa9e">com.google.ortools.sat.CpModel.addGreaterOrEqualWithOffset</a></div><divclass="ttdeci">Constraint addGreaterOrEqualWithOffset(LinearExpr left, LinearExpr right, long offset)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00234">CpModel.java:234</a></div></div>
<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#l00974">CpModel.java:974</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a9a9e0fdb63a893daa454d53fb21a38c7"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a9a9e0fdb63a893daa454d53fb21a38c7">com.google.ortools.sat.CpModel.addReservoirConstraintWithActive</a></div><divclass="ttdeci">Constraint addReservoirConstraintWithActive(IntVar[] times, int[] demands, IntVar[] actives, long minLevel, long maxLevel)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00633">CpModel.java:633</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#l00640">CpModel.java:640</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 interface that can be parsed.</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExpr_8java_source.html#l00017">LinearExpr.java:17</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_aa03f83497b1d96e83c6bcf48c385078c"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#aa03f83497b1d96e83c6bcf48c385078c">com.google.ortools.sat.CpModel.maximize</a></div><divclass="ttdeci">void maximize(LinearExpr expr)</div><divclass="ttdoc">Adds a maximization objective of a linear expression.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l01007">CpModel.java:1007</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_acec0e451f95863176e68a4e97fef3b77"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#acec0e451f95863176e68a4e97fef3b77">com.google.ortools.sat.CpModel.addEquality</a></div><divclass="ttdeci">Constraint addEquality(LinearExpr expr, long value)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00173">CpModel.java:173</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#l00766">CpModel.java:766</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a258c2320306720544f8a9caa2fc1b949"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a258c2320306720544f8a9caa2fc1b949">com.google.ortools.sat.CpModel.addReservoirConstraintWithActive</a></div><divclass="ttdeci">Constraint addReservoirConstraintWithActive(IntVar[] times, long[] demands, IntVar[] actives, long minLevel, long maxLevel)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00594">CpModel.java:594</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a1f2aaa55e962b42810d132110c8bf558"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a1f2aaa55e962b42810d132110c8bf558">com.google.ortools.sat.CpModel.addGreaterOrEqual</a></div><divclass="ttdeci">Constraint addGreaterOrEqual(LinearExpr expr, long value)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00214">CpModel.java:214</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#l00820">CpModel.java:820</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a65c5e85798b91fc39bbcc8ee35e7d808"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a65c5e85798b91fc39bbcc8ee35e7d808">com.google.ortools.sat.CpModel.addReservoirConstraint</a></div><divclass="ttdeci">Constraint addReservoirConstraint(IntVar[] times, int[] demands, long minLevel, long maxLevel)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00566">CpModel.java:566</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#l00144">CpModel.java:144</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_ade4cf08cb9e883d52f012a25385a9eb0"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#ade4cf08cb9e883d52f012a25385a9eb0">com.google.ortools.sat.CpModel.addCumulative</a></div><divclass="ttdeci">Constraint addCumulative(IntervalVar[] intervals, int[] demands, long capacity)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00963">CpModel.java:963</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a303881f104fd9020dbb86013536bfa37"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a303881f104fd9020dbb86013536bfa37">com.google.ortools.sat.CpModel.addAutomaton</a></div><divclass="ttdeci">Constraint addAutomaton(IntVar[] transitionVariables, long startingState, long[] finalStates, long[][] transitions)</div><divclass="ttdoc">Adds an automaton constraint.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00469">CpModel.java:469</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#l00984">CpModel.java:984</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="Domain_8java_source.html#l00111">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_a6953f9cc3dd926d0262f76e5aff14c1c"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a6953f9cc3dd926d0262f76e5aff14c1c">com.google.ortools.sat.CpModel.addGreaterThan</a></div><divclass="ttdeci">Constraint addGreaterThan(LinearExpr expr, long value)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00224">CpModel.java:224</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#l01035">CpModel.java:1035</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="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a3795c421962238b8751b5e2e8654afbb"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a3795c421962238b8751b5e2e8654afbb">com.google.ortools.sat.CpModel.addModuloEquality</a></div><divclass="ttdeci">Constraint addModuloEquality(IntVar target, IntVar var, long mod)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00703">CpModel.java:703</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a56d289f9f3bd97accc65483c77f484c2"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a56d289f9f3bd97accc65483c77f484c2">com.google.ortools.sat.CpModel.newOptionalFixedSizeIntervalVar</a></div><divclass="ttdeci">IntervalVar newOptionalFixedSizeIntervalVar(LinearExpr 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#l00811">CpModel.java:811</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#l00979">CpModel.java:979</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#l01030">CpModel.java:1030</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a0e36a594178d35f5f43aff9bf2260059"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a0e36a594178d35f5f43aff9bf2260059">com.google.ortools.sat.CpModel.newIntervalVar</a></div><divclass="ttdeci">IntervalVar newIntervalVar(LinearExpr start, LinearExpr size, LinearExpr 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#l00740">CpModel.java:740</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#l00082">CpModel.java:82</a></div></div>
<divclass="ttc"id="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_aff988e01e71c0dd3c11e6f970a209520"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#aff988e01e71c0dd3c11e6f970a209520">com.google.ortools.sat.LinearExpr.getVariable</a></div><divclass="ttdeci">IntVar getVariable(int index)</div><divclass="ttdoc">Returns the ith variable.</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#l00051">CpModel.java:51</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a1787546d53c64b503e99b637e594bb13"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a1787546d53c64b503e99b637e594bb13">com.google.ortools.sat.CpModel.newBoolVar</a></div><divclass="ttdeci">IntVar 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#l00087">CpModel.java:87</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#l00058">CpModel.java:58</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#l00303">CpModel.java:303</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a8a947062906cb479d6b5c71b70abaf92"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a8a947062906cb479d6b5c71b70abaf92">com.google.ortools.sat.CpModel.addEqualityWithOffset</a></div><divclass="ttdeci">Constraint addEqualityWithOffset(LinearExpr left, LinearExpr right, long offset)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00183">CpModel.java:183</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 elements in the interface.</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#l00102">CpModel.java:102</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#l00291">CpModel.java:291</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_a14ce57566cb3f88aad8ecee628ae0cbd"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a14ce57566cb3f88aad8ecee628ae0cbd">com.google.ortools.sat.CpModel.newConstant</a></div><divclass="ttdeci">IntVar newConstant(long value)</div><divclass="ttdoc">Creates a constant variable.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00092">CpModel.java:92</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_ac8f81dca4ac2b4c73bb84e174d25fede"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#ac8f81dca4ac2b4c73bb84e174d25fede">com.google.ortools.sat.CpModel.addLinearConstraint</a></div><divclass="ttdeci">Constraint addLinearConstraint(LinearExpr expr, long lb, long ub)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00168">CpModel.java:168</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#l01047">CpModel.java:1047</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_acb6d6067e549d70a026c6617e6be61c9"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#acb6d6067e549d70a026c6617e6be61c9">com.google.ortools.sat.CpModel.addDifferent</a></div><divclass="ttdeci">Constraint addDifferent(LinearExpr expr, long value)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00240">CpModel.java:240</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#l00991">CpModel.java:991</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#l00279">CpModel.java:279</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a3a793869bfae713be3bc98be7a97e53d"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a3a793869bfae713be3bc98be7a97e53d">com.google.ortools.sat.CpModel.addLessOrEqual</a></div><divclass="ttdeci">Constraint addLessOrEqual(LinearExpr expr, long value)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00188">CpModel.java:188</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#l00107">CpModel.java:107</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#l00968">CpModel.java:968</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a731e8bd6e9ce86bea263bcb22498571d"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a731e8bd6e9ce86bea263bcb22498571d">com.google.ortools.sat.CpModel.addReservoirConstraint</a></div><divclass="ttdeci">Constraint addReservoirConstraint(IntVar[] times, long[] demands, long minLevel, long maxLevel)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00538">CpModel.java:538</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_1CpModel_html_a5ebe6f90377f06adcb4a95eca060bcb6"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a5ebe6f90377f06adcb4a95eca060bcb6">com.google.ortools.sat.CpModel.minimize</a></div><divclass="ttdeci">void minimize(LinearExpr expr)</div><divclass="ttdoc">Adds a minimization objective of a linear expression.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00998">CpModel.java:998</a></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">Internal, 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#l00045">java/com/google/ortools/sat/IntVar.java:45</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="Domain_8java_source.html#l00100">Domain.java:100</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_ab2e76a732efab8cbae8ee2cd9104ac7e"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#ab2e76a732efab8cbae8ee2cd9104ac7e">com.google.ortools.sat.CpModel.addCumulative</a></div><divclass="ttdeci">Constraint addCumulative(IntervalVar[] intervals, IntVar[] demands, long capacity)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00927">CpModel.java:927</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a47a7759857cba3794bbea0be6c642c0b"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a47a7759857cba3794bbea0be6c642c0b">com.google.ortools.sat.CpModel.addLessThan</a></div><divclass="ttdeci">Constraint addLessThan(LinearExpr expr, long value)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00198">CpModel.java:198</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a56a3febfb01f874a0a17acb65e27c6ee"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a56a3febfb01f874a0a17acb65e27c6ee">com.google.ortools.sat.CpModel.addLessOrEqualWithOffset</a></div><divclass="ttdeci">Constraint addLessOrEqualWithOffset(LinearExpr left, LinearExpr right, long offset)</div><divclass="ttdoc">Adds.</div><divclass="ttdef"><b>Definition:</b><ahref="CpModel_8java_source.html#l00208">CpModel.java:208</a></div></div>
<divclass="ttc"id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html_a609909160b084aff2496d9987776d271"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#a609909160b084aff2496d9987776d271">com.google.ortools.sat.CpModel.newFixedSizeIntervalVar</a></div><divclass="ttdeci">IntervalVar newFixedSizeIntervalVar(LinearExpr 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#l00759">CpModel.java:759</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#l00071">CpModel.java:71</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="Domain_8java_source.html#l00021">Domain.java:21</a></div></div>