Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correcting max-flow problem in MILP tutorial #38557

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/doc/en/thematic_tutorials/linear_programming.rst
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ just as much as they receive. We can model the flow problem with the
following LP

.. MATH::
\text{Max: } & \sum_{sv \in G} f_{sv}\\
\text{Max: } & \sum_{su \in G} f_{su} - \sum_{vs \in G} f_{vs}\\
\text{Such that: } & \forall v \in G, {\substack{v \neq s \\ v \neq t}}, \sum_{vu \in G} f_{vu} - \sum_{uv \in G} f_{uv} = 0\\
& \forall uv \in G, f_{uv} \leq 1\\

Expand Down Expand Up @@ -425,7 +425,7 @@ graph, in which all the edges have a capacity of 1::

::

sage: p.set_objective(p.sum(f[s,u] for u in g.neighbors_out(s)))
sage: p.set_objective(p.sum(f[s,u] for u in g.neighbors_out(s)) - p.sum(f[v,s] for v in g.neighbors_in(s)))

.. link

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@

Sage example in ./lp.tex, line 684::

sage: p.set_objective(p.sum( f[s,u] for u in g.neighbors_out(s)))
sage: p.set_objective(p.sum( f[s,u] for u in g.neighbors_out(s)) - p.sum(f[v,s] for v in g.neighbors_in(s)))

Sage example in ./lp.tex, line 687::

Expand Down
Loading