Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Jul 17, 2019
1 parent 4276a58 commit 23657e6
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 72 deletions.
54 changes: 29 additions & 25 deletions docs/python/ortools/linear_solver/pywraplp.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,6 @@ <h1 class="title">Module <code>pywraplp</code></h1>
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.


# Remove the documentation of some functions.
# See https://pdoc3.github.io/pdoc/doc/pdoc/#overriding-docstrings-with-
__pdoc__ = {}
__pdoc__[&#39;Solver_infinity&#39;] = False
__pdoc__[&#39;Solver_Infinity&#39;] = False
__pdoc__[&#39;Solver_SolveWithProto&#39;] = False
__pdoc__[&#39;Solver_SupportsProblemType&#39;] = False
__pdoc__[&#39;setup_variable_operator&#39;] = False
__pdoc__[&#39;Constraint.thisown&#39;] = False
__pdoc__[&#39;Constraint.thisown&#39;] = False
__pdoc__[&#39;MPSolverParameters.thisown&#39;] = False
__pdoc__[&#39;ModelExportOptions.thisown&#39;] = False
__pdoc__[&#39;Objective.thisown&#39;] = False
__pdoc__[&#39;Solver.thisown&#39;] = False
__pdoc__[&#39;Variable.thisown&#39;] = False



from sys import version_info as _swig_python_version_info
if _swig_python_version_info &lt; (2, 7, 0):
raise RuntimeError(&#39;Python 2.7 or later required&#39;)
Expand Down Expand Up @@ -150,6 +131,22 @@ <h1 class="title">Module <code>pywraplp</code></h1>
from ortools.linear_solver.linear_solver_natural_api import LinearConstraint
from ortools.linear_solver.linear_solver_natural_api import VariableExpr

# Remove the documentation of some functions.
# See https://pdoc3.github.io/pdoc/doc/pdoc/#overriding-docstrings-with-
__pdoc__ = {}
__pdoc__[&#39;Solver_infinity&#39;] = False
__pdoc__[&#39;Solver_Infinity&#39;] = False
__pdoc__[&#39;Solver_SolveWithProto&#39;] = False
__pdoc__[&#39;Solver_SupportsProblemType&#39;] = False
__pdoc__[&#39;setup_variable_operator&#39;] = False
__pdoc__[&#39;Constraint.thisown&#39;] = False
__pdoc__[&#39;Constraint.thisown&#39;] = False
__pdoc__[&#39;MPSolverParameters.thisown&#39;] = False
__pdoc__[&#39;ModelExportOptions.thisown&#39;] = False
__pdoc__[&#39;Objective.thisown&#39;] = False
__pdoc__[&#39;Solver.thisown&#39;] = False
__pdoc__[&#39;Variable.thisown&#39;] = False

class Solver(object):
r&#34;&#34;&#34;

Expand Down Expand Up @@ -449,10 +446,11 @@ <h1 class="title">Module <code>pywraplp</code></h1>
return _pywraplp.Solver_infinity()

def EnableOutput(self) -&gt; &#34;void&#34;:
r&#34;&#34;&#34; Enables solver logging.&#34;&#34;&#34;
return _pywraplp.Solver_EnableOutput(self)

def SuppressOutput(self) -&gt; &#34;void&#34;:
r&#34;&#34;&#34; Suppress output.&#34;&#34;&#34;
r&#34;&#34;&#34; Suppresses solver logging.&#34;&#34;&#34;
return _pywraplp.Solver_SuppressOutput(self)

def iterations(self) -&gt; &#34;int64&#34;:
Expand Down Expand Up @@ -1038,6 +1036,8 @@ <h1 class="title">Module <code>pywraplp</code></h1>
MPSolverParameters.kDefaultIncrementality = _pywraplp.cvar.MPSolverParameters_kDefaultIncrementality

class ModelExportOptions(object):
r&#34;&#34;&#34; Export options.&#34;&#34;&#34;

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc=&#39;The membership flag&#39;)
__repr__ = _swig_repr

Expand Down Expand Up @@ -1719,10 +1719,12 @@ <h3>Methods</h3>
<span>class <span class="ident">ModelExportOptions</span></span>
</code></dt>
<dd>
<section class="desc"></section>
<section class="desc"><p>Export options.</p></section>
<details class="source">
<summary>Source code</summary>
<pre><code class="python">class ModelExportOptions(object):
r&#34;&#34;&#34; Export options.&#34;&#34;&#34;

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc=&#39;The membership flag&#39;)
__repr__ = _swig_repr

Expand Down Expand Up @@ -2344,10 +2346,11 @@ <h3>Methods</h3>
return _pywraplp.Solver_infinity()

def EnableOutput(self) -&gt; &#34;void&#34;:
r&#34;&#34;&#34; Enables solver logging.&#34;&#34;&#34;
return _pywraplp.Solver_EnableOutput(self)

def SuppressOutput(self) -&gt; &#34;void&#34;:
r&#34;&#34;&#34; Suppress output.&#34;&#34;&#34;
r&#34;&#34;&#34; Suppresses solver logging.&#34;&#34;&#34;
return _pywraplp.Solver_SuppressOutput(self)

def iterations(self) -&gt; &#34;int64&#34;:
Expand Down Expand Up @@ -2805,10 +2808,11 @@ <h3>Methods</h3>
<span>def <span class="ident">EnableOutput</span></span>(<span>self)</span>
</code></dt>
<dd>
<section class="desc"></section>
<section class="desc"><p>Enables solver logging.</p></section>
<details class="source">
<summary>Source code</summary>
<pre><code class="python">def EnableOutput(self) -&gt; &#34;void&#34;:
r&#34;&#34;&#34; Enables solver logging.&#34;&#34;&#34;
return _pywraplp.Solver_EnableOutput(self)</code></pre>
</details>
</dd>
Expand Down Expand Up @@ -3262,11 +3266,11 @@ <h3>Methods</h3>
<span>def <span class="ident">SuppressOutput</span></span>(<span>self)</span>
</code></dt>
<dd>
<section class="desc"><p>Suppress output.</p></section>
<section class="desc"><p>Suppresses solver logging.</p></section>
<details class="source">
<summary>Source code</summary>
<pre><code class="python">def SuppressOutput(self) -&gt; &#34;void&#34;:
r&#34;&#34;&#34; Suppress output.&#34;&#34;&#34;
r&#34;&#34;&#34; Suppresses solver logging.&#34;&#34;&#34;
return _pywraplp.Solver_SuppressOutput(self)</code></pre>
</details>
</dd>
Expand Down
72 changes: 36 additions & 36 deletions docs/python/ortools/sat/python/cp_model.html
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ <h1 class="title">Module <code>cp_model</code></h1>
while to_process: # Flatten to avoid recursion.
expr, coef = to_process.pop()
if isinstance(expr, _ProductCst):
to_process.append(
(expr.Expression(), coef * expr.Coefficient()))
to_process.append((expr.Expression(),
coef * expr.Coefficient()))
elif isinstance(expr, _SumArray):
for e in expr.Expressions():
to_process.append((e, coef))
Expand Down Expand Up @@ -483,8 +483,8 @@ <h1 class="title">Module <code>cp_model</code></h1>

def __repr__(self):
return &#39;ScalProd([{}], [{}], {})&#39;.format(
&#39;, &#39;.join(map(repr, self.__expressions)),
&#39;, &#39;.join(map(repr, self.__coefficients)), self.__constant)
&#39;, &#39;.join(map(repr, self.__expressions)), &#39;, &#39;.join(
map(repr, self.__coefficients)), self.__constant)

def Expressions(self):
return self.__expressions
Expand Down Expand Up @@ -723,14 +723,14 @@ <h1 class="title">Module <code>cp_model</code></h1>
if self.__ct.enforcement_literal:
return &#39;%s(start = %s, size = %s, end = %s, is_present = %s)&#39; % (
self.__ct.name, ShortName(self.__model, interval.start),
ShortName(self.__model,
interval.size), ShortName(self.__model, interval.end),
ShortName(self.__model, interval.size),
ShortName(self.__model, interval.end),
ShortName(self.__model, self.__ct.enforcement_literal[0]))
else:
return &#39;%s(start = %s, size = %s, end = %s)&#39; % (
self.__ct.name, ShortName(self.__model, interval.start),
ShortName(self.__model,
interval.size), ShortName(self.__model, interval.end))
ShortName(self.__model, interval.size),
ShortName(self.__model, interval.end))

def Name(self):
return self.__ct.name
Expand Down Expand Up @@ -1608,8 +1608,8 @@ <h1 class="title">Module <code>cp_model</code></h1>
else:
return not solution.solution[-index - 1]
else:
raise TypeError(&#39;Cannot interpret %s as a boolean expression.&#39; %
literal)
raise TypeError(
&#39;Cannot interpret %s as a boolean expression.&#39; % literal)


class CpSolver(object):
Expand Down Expand Up @@ -1777,8 +1777,8 @@ <h1 class="title">Module <code>cp_model</code></h1>
index = lit.Index()
return self.SolutionBooleanValue(index)
else:
raise TypeError(&#39;Cannot interpret %s as a boolean expression.&#39; %
lit)
raise TypeError(
&#39;Cannot interpret %s as a boolean expression.&#39; % lit)

def Value(self, expression):
&#34;&#34;&#34;Evaluates an linear expression in the current solution.
Expand All @@ -1802,8 +1802,8 @@ <h1 class="title">Module <code>cp_model</code></h1>
while to_process:
expr, coef = to_process.pop()
if isinstance(expr, _ProductCst):
to_process.append(
(expr.Expression(), coef * expr.Coefficient()))
to_process.append((expr.Expression(),
coef * expr.Coefficient()))
elif isinstance(expr, _SumArray):
for e in expr.Expressions():
to_process.append((e, coef))
Expand All @@ -1815,8 +1815,8 @@ <h1 class="title">Module <code>cp_model</code></h1>
elif isinstance(expr, IntVar):
value += coef * self.SolutionIntegerValue(expr.Index())
elif isinstance(expr, _NotBooleanVariable):
value += coef * (1 -
self.SolutionIntegerValue(expr.Not().Index()))
value += coef * (
1 - self.SolutionIntegerValue(expr.Not().Index()))
return value


Expand Down Expand Up @@ -4898,8 +4898,8 @@ <h2 id="returns">Returns</h2>
index = lit.Index()
return self.SolutionBooleanValue(index)
else:
raise TypeError(&#39;Cannot interpret %s as a boolean expression.&#39; %
lit)
raise TypeError(
&#39;Cannot interpret %s as a boolean expression.&#39; % lit)

def Value(self, expression):
&#34;&#34;&#34;Evaluates an linear expression in the current solution.
Expand All @@ -4923,8 +4923,8 @@ <h2 id="returns">Returns</h2>
while to_process:
expr, coef = to_process.pop()
if isinstance(expr, _ProductCst):
to_process.append(
(expr.Expression(), coef * expr.Coefficient()))
to_process.append((expr.Expression(),
coef * expr.Coefficient()))
elif isinstance(expr, _SumArray):
for e in expr.Expressions():
to_process.append((e, coef))
Expand All @@ -4936,8 +4936,8 @@ <h2 id="returns">Returns</h2>
elif isinstance(expr, IntVar):
value += coef * self.SolutionIntegerValue(expr.Index())
elif isinstance(expr, _NotBooleanVariable):
value += coef * (1 -
self.SolutionIntegerValue(expr.Not().Index()))
value += coef * (
1 - self.SolutionIntegerValue(expr.Not().Index()))
return value</code></pre>
</details>
<h3>Ancestors</h3>
Expand Down Expand Up @@ -4991,8 +4991,8 @@ <h2 id="raises">Raises</h2>
index = lit.Index()
return self.SolutionBooleanValue(index)
else:
raise TypeError(&#39;Cannot interpret %s as a boolean expression.&#39; %
lit)</code></pre>
raise TypeError(
&#39;Cannot interpret %s as a boolean expression.&#39; % lit)</code></pre>
</details>
</dd>
<dt id="cp_model.CpSolverSolutionCallback.OnSolutionCallback"><code class="name flex">
Expand Down Expand Up @@ -5052,8 +5052,8 @@ <h2 id="raises">Raises</h2>
while to_process:
expr, coef = to_process.pop()
if isinstance(expr, _ProductCst):
to_process.append(
(expr.Expression(), coef * expr.Coefficient()))
to_process.append((expr.Expression(),
coef * expr.Coefficient()))
elif isinstance(expr, _SumArray):
for e in expr.Expressions():
to_process.append((e, coef))
Expand All @@ -5065,8 +5065,8 @@ <h2 id="raises">Raises</h2>
elif isinstance(expr, IntVar):
value += coef * self.SolutionIntegerValue(expr.Index())
elif isinstance(expr, _NotBooleanVariable):
value += coef * (1 -
self.SolutionIntegerValue(expr.Not().Index()))
value += coef * (
1 - self.SolutionIntegerValue(expr.Not().Index()))
return value</code></pre>
</details>
</dd>
Expand Down Expand Up @@ -5299,14 +5299,14 @@ <h3>Inherited members</h3>
if self.__ct.enforcement_literal:
return &#39;%s(start = %s, size = %s, end = %s, is_present = %s)&#39; % (
self.__ct.name, ShortName(self.__model, interval.start),
ShortName(self.__model,
interval.size), ShortName(self.__model, interval.end),
ShortName(self.__model, interval.size),
ShortName(self.__model, interval.end),
ShortName(self.__model, self.__ct.enforcement_literal[0]))
else:
return &#39;%s(start = %s, size = %s, end = %s)&#39; % (
self.__ct.name, ShortName(self.__model, interval.start),
ShortName(self.__model,
interval.size), ShortName(self.__model, interval.end))
ShortName(self.__model, interval.size),
ShortName(self.__model, interval.end))

def Name(self):
return self.__ct.name</code></pre>
Expand Down Expand Up @@ -5419,8 +5419,8 @@ <h3>Methods</h3>
while to_process: # Flatten to avoid recursion.
expr, coef = to_process.pop()
if isinstance(expr, _ProductCst):
to_process.append(
(expr.Expression(), coef * expr.Coefficient()))
to_process.append((expr.Expression(),
coef * expr.Coefficient()))
elif isinstance(expr, _SumArray):
for e in expr.Expressions():
to_process.append((e, coef))
Expand Down Expand Up @@ -5608,8 +5608,8 @@ <h3>Methods</h3>
while to_process: # Flatten to avoid recursion.
expr, coef = to_process.pop()
if isinstance(expr, _ProductCst):
to_process.append(
(expr.Expression(), coef * expr.Coefficient()))
to_process.append((expr.Expression(),
coef * expr.Coefficient()))
elif isinstance(expr, _SumArray):
for e in expr.Expressions():
to_process.append((e, coef))
Expand Down
11 changes: 1 addition & 10 deletions makefiles/Makefile.gen.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,6 @@ objs/algorithms/knapsack_solver.$O: ortools/algorithms/knapsack_solver.cc \
ortools/base/commandlineflags.h ortools/base/timer.h \
ortools/util/running_stat.h ortools/base/stl_util.h \
ortools/linear_solver/linear_solver.h ortools/base/status.h \
ortools/gen/ortools/glop/parameters.pb.h \
ortools/linear_solver/linear_expr.h \
ortools/gen/ortools/linear_solver/linear_solver.pb.h \
ortools/gen/ortools/util/optional_boolean.pb.h \
Expand Down Expand Up @@ -1917,7 +1916,6 @@ objs/sat/optimization.$O: ortools/sat/optimization.cc \
ortools/sat/integer_search.h ortools/base/cleanup.h \
ortools/base/random.h ortools/base/stl_util.h \
ortools/linear_solver/linear_solver.h \
ortools/gen/ortools/glop/parameters.pb.h \
ortools/linear_solver/linear_expr.h \
ortools/gen/ortools/linear_solver/linear_solver.pb.h \
ortools/gen/ortools/util/optional_boolean.pb.h \
Expand Down Expand Up @@ -2689,7 +2687,6 @@ objs/linear_solver/cbc_interface.$O: \
ortools/base/integral_types.h ortools/base/logging.h \
ortools/base/macros.h ortools/base/timer.h \
ortools/linear_solver/linear_solver.h ortools/base/status.h \
ortools/gen/ortools/glop/parameters.pb.h \
ortools/linear_solver/linear_expr.h \
ortools/gen/ortools/linear_solver/linear_solver.pb.h \
ortools/gen/ortools/util/optional_boolean.pb.h \
Expand All @@ -2702,7 +2699,6 @@ objs/linear_solver/clp_interface.$O: \
ortools/base/integral_types.h ortools/base/logging.h \
ortools/base/macros.h ortools/base/timer.h \
ortools/linear_solver/linear_solver.h ortools/base/status.h \
ortools/gen/ortools/glop/parameters.pb.h \
ortools/linear_solver/linear_expr.h \
ortools/gen/ortools/linear_solver/linear_solver.pb.h \
ortools/gen/ortools/util/optional_boolean.pb.h \
Expand All @@ -2714,7 +2710,6 @@ objs/linear_solver/cplex_interface.$O: \
ortools/base/logging.h ortools/base/macros.h ortools/base/timer.h \
ortools/base/basictypes.h ortools/linear_solver/linear_solver.h \
ortools/base/commandlineflags.h ortools/base/status.h \
ortools/gen/ortools/glop/parameters.pb.h \
ortools/linear_solver/linear_expr.h \
ortools/gen/ortools/linear_solver/linear_solver.pb.h \
ortools/gen/ortools/util/optional_boolean.pb.h \
Expand Down Expand Up @@ -2756,7 +2751,6 @@ objs/linear_solver/glop_utils.$O: ortools/linear_solver/glop_utils.cc \
ortools/base/commandlineflags.h ortools/base/integral_types.h \
ortools/base/logging.h ortools/base/macros.h ortools/base/status.h \
ortools/base/timer.h ortools/base/basictypes.h \
ortools/gen/ortools/glop/parameters.pb.h \
ortools/linear_solver/linear_expr.h \
ortools/gen/ortools/linear_solver/linear_solver.pb.h \
ortools/gen/ortools/util/optional_boolean.pb.h \
Expand All @@ -2778,7 +2772,6 @@ objs/linear_solver/linear_expr.$O: ortools/linear_solver/linear_expr.cc \
ortools/base/integral_types.h ortools/base/macros.h \
ortools/linear_solver/linear_solver.h ortools/base/commandlineflags.h \
ortools/base/status.h ortools/base/timer.h ortools/base/basictypes.h \
ortools/gen/ortools/glop/parameters.pb.h \
ortools/gen/ortools/linear_solver/linear_solver.pb.h \
ortools/gen/ortools/util/optional_boolean.pb.h \
ortools/port/proto_utils.h | $(OBJ_DIR)/linear_solver
Expand All @@ -2789,8 +2782,7 @@ objs/linear_solver/linear_solver.$O: \
ortools/linear_solver/linear_solver.h ortools/base/commandlineflags.h \
ortools/base/integral_types.h ortools/base/logging.h \
ortools/base/macros.h ortools/base/status.h ortools/base/timer.h \
ortools/base/basictypes.h ortools/gen/ortools/glop/parameters.pb.h \
ortools/linear_solver/linear_expr.h \
ortools/base/basictypes.h ortools/linear_solver/linear_expr.h \
ortools/gen/ortools/linear_solver/linear_solver.pb.h \
ortools/gen/ortools/util/optional_boolean.pb.h \
ortools/port/proto_utils.h ortools/base/accurate_sum.h \
Expand Down Expand Up @@ -2829,7 +2821,6 @@ objs/linear_solver/scip_interface.$O: \
ortools/base/integral_types.h ortools/base/logging.h \
ortools/base/macros.h ortools/base/timer.h \
ortools/linear_solver/linear_solver.h ortools/base/status.h \
ortools/gen/ortools/glop/parameters.pb.h \
ortools/linear_solver/linear_expr.h \
ortools/gen/ortools/linear_solver/linear_solver.pb.h \
ortools/gen/ortools/util/optional_boolean.pb.h \
Expand Down
1 change: 0 additions & 1 deletion ortools/linear_solver/linear_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@
#include "ortools/base/macros.h"
#include "ortools/base/status.h"
#include "ortools/base/timer.h"
#include "ortools/glop/parameters.pb.h"
#include "ortools/linear_solver/linear_expr.h"
#include "ortools/linear_solver/linear_solver.pb.h"
#include "ortools/port/proto_utils.h"
Expand Down

0 comments on commit 23657e6

Please sign in to comment.