ネットワーク フロー
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
コンピュータ サイエンスにおける多くの問題は、ノードとノード間のリンクで構成されるグラフで表すことができます。たとえば、鉄道システムなどのネットワークを介して商品や資材を輸送する場合に、ネットワーク フローの問題があります。
ノードが都市で、円弧がノード間の線であるグラフでネットワーク フローを表すことができます。(これらの特徴は、パイプのネットワークに流れる水の性質に似ているため「フロー」と呼ばれます)。
ネットワーク フローの主な制約事項は、各アークに容量(アーク全体で一定時間内に転送できる最大量)があることです。
最大フローの問題は、容量の制約に応じて、ネットワーク内のすべてのアークで転送できる最大合計量を決定することです。
この問題を最初に研究したのは、1930 年代にロシアの数学者 A.N. Tolstoi でした。以下の地図は、最大のフローを求める実際の鉄道網を示しています。

OR-Tools には、グラフ ライブラリのネットワーク フローの問題に対して、いくつかのソルバーが用意されています。
以降のセクションでは、ネットワーク フローの問題の例と、解決方法について説明します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-08-09 UTC。
[null,null,["最終更新日 2024-08-09 UTC。"],[[["\u003cp\u003eNetwork flow problems, like transporting goods across a railway system, can be represented by graphs with nodes and links, where links have capacity limits.\u003c/p\u003e\n"],["\u003cp\u003eThe maximum flow problem aims to find the maximum transportable amount across a network, respecting capacity constraints.\u003c/p\u003e\n"],["\u003cp\u003eOR-Tools offers various solvers in its graph libraries to address network flow problems like maximum flows and minimum cost flows.\u003c/p\u003e\n"],["\u003cp\u003eExample applications of network flows include assignments with individual workers or teams, solvable using OR-Tools.\u003c/p\u003e\n"]]],["Computer science utilizes graphs to model problems like network flow, where goods are transported across a network (e.g., railway). Each link (arc) in the network has a capacity, limiting transport volume. The maximum flow problem determines the highest total transport volume across all arcs, respecting these capacity constraints. This problem, first studied by A.N. Tolstoi, can be solved using solvers from the OR-Tools graph libraries, which are useful for problems such as maximum flows, minimum cost flows, and assignment problems.\n"],null,["# Network Flows\n\nMany problems in computer science can be represented by a graph consisting of\nnodes and links between them. Examples are **network flow** problems, which\ninvolve transporting goods or material across a network, such as a railway system.\n\nYou can represent a network flow by a graph whose nodes are cities and whose\narcs are rail lines between them. (They're called **flows** because their\nproperties are similar to those of water flowing through a network of pipes.)\n\nA key constraint in network flows is that each arc has a **capacity** ---\nthe maximum amount that can be transported across the arc in a fixed period of\ntime.\n\nThe **maximum flow problem** is to determine the maximum total amount that can\nbe transported across all arcs in the network, subject to the capacity\nconstraints.\n\nThe first person to study this problem was the Russian mathematician A.N.\nTolstoi, in the 1930s. The map below shows the actual railway network for which\nhe wanted to find a maximum flow.\n\nOR-Tools provides several solvers for network flow problems in its\n[graph](/optimization/reference/graph) libraries.\n\nThe following sections present examples of network flow problems and show how to\nsolve them:\n\n- [Maximum Flows](/optimization/flow/maxflow)\n- [Minimum Cost Flows](/optimization/flow/mincostflow)\n- [Assignment as a Minimum Cost Flows](/optimization/flow/assignment_min_cost_flow#example)\n- [Assignment with Teams of Workers](/optimization/flow/assignment_min_cost_flow#teams-workers)"]]