Báo cáo bài tập lớn E - Marketing Xây dựng kế hoạch marketing điện tử cho nhã...
OR3_04_networkFlow.pptx
1. MCNFproblems LP formulation forMCNF Special network flowmodels
Operations Research: Theory Network Flow
OR III: NetworkFlow
Bui Trung Hiep
The Faculty of Business Administration
University of Economics – The University of Danang
Vận Trù Học: Lý Thuyết Về Lưu Thông Trên Mạng Lưới
2. MCNFproblems LP formulation forMCNF Special network flowmodels
MẠNG LƯỚI CUNG ỨNG CỦA P&G
► Proctor & Gamble sản xuất và bán hơn 300 thương hiệu sản phẩm tiêu
dùng trên toàn cầu.
► Công ty có hàng trăm Nhà cung cấp, hơn 60 Cơ sở sản xuất, 15 Trung
tâm phân phối và hơn 1000 ‘Vùng tiêu thụ’.
► Rất khó để Quản lý lưu thông sản phẩm trên mạng lưới lớn như vậy.
► Quy hoạch tuyến tính/Quy hoạch Nguyên có thể hỗ trợ giải quyết.
► Sử dụng Bài toán Lưu thông trên mạng.
►Công ty P&G tiết kiệm được $200 triệu dollar sau khi áp dụng OR1
OR III: NetworkFlow
1J. D. Camm, T. E. Chorman, F. A. Dill, J. R. Evans, D. J. Sweeney, and G.W. Wegryn (1997). “Blending OR/MS, Judgment,
and GIS: Restructuring P&G’s Supply Chain.” INFORMS Journal on Applied Analytics 27(1) 128-142.
3. MCNFproblems LP formulation forMCNF Special network flowmodels
Supply networks
► P&G makes and markets over 300 brands of consumer goods
worldwide.
► In the past, the company had hundreds of suppliers, over 60 plants, 15
distributing centers, and over 1000 consumer zones.
► Managing item flows over the huge supply network is challenging!
► An LP/IP model helps.
► The special structure of network transportation must also be utilized.
►$200 million are saved after an OR study!1
OR III: NetworkFlow
1J. D. Camm, T. E. Chorman, F. A. Dill, J. R. Evans, D. J. Sweeney, and G.W. Wegryn (1997). “Blending OR/MS, Judgment,
and GIS: Restructuring P&G’s Supply Chain.” INFORMS Journal on Applied Analytics 27(1) 128-142.
4. MCNFproblems LP formulation forMCNF Special network flowmodels
CÁC MÔ HÌNH “LƯU THÔNG TRÊN MẠNG”
► Hoạt động vận tải, chuyên chở hàng hóa trên mạng lưới.
► Chuyển nguyên vật liệu từ Nhà cung cấp đến Nơi sản xuất.
► Chuyển hàng hóa từ Nơi sản xuất đến Nơi phân phối.
► Chuyển hàng hóa từ Nơi phân phối tới các Cửa hàng bán lẻ.
► Vận chuyển hành khách bằng đường sắt/đường hàng không.
► Chuyển dữ liệu trên Internet.
► Vận chuyển nước sạch qua hệ thống ống dẫn.
► ...
► Bài toán Lưu thông trên mạng với chi phí thấp nhất (Minimum Cost
Network Flow - MCNF) bao hàm các dạng hoạt động vận tải trên.
► Bài toán này có nhiều lý thuyết liên quan.
► Bài toán này có thể dùng để ra các quyết định liên quan đến: Tồn kho,
Quản trị dự án, Phân công công việc, Thiết đặt vị trí sản xuất...
OR III: NetworkFlow
5. MCNFproblems LP formulation forMCNF Special network flowmodels
“Network flow” models
► A lot of operations are to transport items on a network.
► Moving materials from suppliers to factories.
► Moving goods from factories to distributing centers.
► Moving goods from distributing centers to retail stores.
► Sending passengers through railroads or by flights.
► Sending data packets on the Internet.
► Sending water through pipelines.
► And many more.
► A unified model, the minimum cost network flow (MCNF) model,
covers many network operations.
► It has some very nice theoretical properties.
► It can also be used for making decisions regarding inventory, project
management, job assignment, facility location, etc.
OR III: NetworkFlow
6. MCNFproblems LP formulation forMCNF Special network flowmodels
Road map
► MCNF problems.
► LP formulation for MCNF.
► Special network flow models.
OR III: NetworkFlow
► Các bài toán MCNF.
► Mô hình tuyến tính của bài toán MCNF.
► Một số mô hình lưu thông trên mạng.
7. MCNFproblems LP formulation forMCNF Special network flowmodels
MẠNG LƯỚI
► Cung có thể có hướng hoặc vô hướng.
► Ký hiệu (u,v): cung có hướng từ u tới v
► Ký hiệu [u,v]: cung vô hướng từ u tới v.
► Trong môn học này, mọi Cung đều được giả định là có hướng.
► Mạng lưới có hướng: nếu nó chứa các cung có hướng.
► Mạng lưới vô hướng: thường được gọi là Đồ thị (graph).
OR III: NetworkFlow
► Mạng lưới (đồ thị) gồm các Điểm (Đỉnh) và Cung (Liên kết).
► Hiểu nôm na như sau: Điểm là các địa điểm và Cung là các tuyến đường.
8. MCNFproblems LP formulation forMCNF Special network flowmodels
Networks
► A network (graph) has nodes (vertices) and arcs (edges/links).
► A typical interpretation: Nodes are locations and Arcs areroads.
► Arcs may be directed or undirected.
► For an arc from u to v: (u, v) if directed and [u, v] ifundirected.
► In this lecture, all arcs are directed.
► A network is directed if its arcs are directed.
► An undirected network is also called a graph (by some people).
OR III: NetworkFlow
9. MCNFproblems LP formulation forMCNF Special network flowmodels
ĐƯỜNG ĐI VÀ CHU TRÌNH
► Một đường đi (lộ trình) từ điểm s tới đỉnh t là một tập hợp các Cung
(s, v1), (v1, v2), ..., (vk−1, vk), và (vk, t) để nối s và t.
► s is được gọi là Điểm nguồn và t được gọi là Điểm đích của đường đi.
► Lưu ý: các cung có hướng!
► Chu trình là một đường đi có Điểm đích cũng chính là Điểm nguồn.
► Đường đi đơn giản khi nó không phải là Chu trình.
► Mạng lưới Phi chu trình khi nó không chưa một Chu trình nào.
OR III: NetworkFlow
10. MCNFproblems LP formulation forMCNF Special network flowmodels
Paths and cycles
► A path (route) from node s to node t is a set of arcs
(s, v1), (v1, v2), ..., (vk−1, vk), and (vk, t) such that s and t are connected.
► s is called the source and t is called the destination of the path.
► Direction matters!
► A cycle (equivalent to circuit in some textbooks) is a path whose
destination node is the source node.
► A path is a simple path if it is not a cycle.
► A network is an acyclic network if it contains no cycle.
OR III: NetworkFlow
11. MCNFproblems LP formulation forMCNF Special network flowmodels
LƯU THÔNG, TRỌNG SỐ, LƯU LƯỢNG TỐI ĐA
► Lưu thông trên cung: Là hành động vận chuyển diễn ra trên cung đó.
► Số lượng hàng vận chuyển trên cung gọi là Quy mô lưu thông của cung.
► Lưu thông trên mạng lưới: Là tập hợp tất cả các lưu thông trên các cung của
mạng lưới.
► Lưu thông trên mạng lưới là một kế hoạch thực hiện việc vận chuyển/lưu
thông trên tất cả các cung của mạng lưới đó.
► Mỗi cung đều có một “trọng số” (weight).
► “Trọng số” có thể hiểu là độ dài hay chi phí vận tải 1 sản phẩm trên cung...
► Mạng lưới có “trọng số”: Là mạng lưới mà các cung của nó có “trọng số”.
► Một cung có thể bị ràng buộc về lưu lượng tối đa.
► Lưu lượng tối đa: Cận trên / Cận dưới của Quy mô lưu thông trên cung.
► Mạng lưới có ràng buộc lưu lượng: Nếu tồn tại ít nhất một cung trong mạng lưới
đó có lưu lượng tối đa.
OR III: NetworkFlow
12. MCNFproblems LP formulation forMCNF Special network flowmodels
Flows, weights, capacities
► A flow on an arc is the action of sending some items through the arc.
► The number of units sent is called the flow size.
► A network flow is the collection of all arc flows.
► A network flow is just a plan for making flows on all arcs.
► An arc may have a weight.
► A weight may be a distance, a cost per unit flow, etc.
► A weighted network is a network whose arcs are weighted.
► An arc may have a capacity constraint.
► There may be an upper bound and/or an lower bound (typically 0) for
its flow size.
► A network is capacitated if there is an arc having capacity limits.
OR III: NetworkFlow
13. MCNFproblems LP formulation forMCNF Special network flowmodels
BÀI TOÁN LƯU THÔNG TRÊN MẠNG VỚI CHI PHÍ THẤP NHẤT
► Một mạng lưới có trọng số ký hiệu là: G = (V, E).
► G là mạng lưới, V là tập hợp các điểm, và E là tập hợp các cung.
► Mỗi điểm i∈V có quy mô cung ứng làbi.
► bi > 0: điểm i là một điểm cung ứng.
► bi < 0: điểm i là một điểm nhu cầu.
► bi = 0: điểm i là một điểm trung chuyển.
► ∑bi = 0: tại mỗi điểm sẽ có Tổng cung ứng bằng Tổng nhu cầu.
► Mỗi cung (i, j)∈E có trọng số cij ≥ 0: là chi phí lưu thông 1 đơn vị trên cung.
► “Tìm cách thức lưu thông/vận tải hàng hóa từ các điểm cung ứng đến đáp ứng
mọi điểm nhu cầu với chi phí tối thiểu?”
=> Bài toán Lưu thông trên mạng với chi phí thấp nhất (MCNF).
OR III: NetworkFlow
14. MCNFproblems LP formulation forMCNF Special network flowmodels
Minimum cost network flow problem
► Consider a weighted capacitated network G = (V,E).
► G is the network, V is the set of nodes, and E is the set of arcs.
► For node i ∈V, there is a supply quantitybi.
► bi > 0: i is a supply node
► bi < 0: i is a demand node
► bi = 0: i is a transshipment node
► ∑bi = 0: Total supplies equal Total demands
► For arc (i, j)∈E, the weight cij ≥ 0 is the cost of each unit of flow.
► How to satisfy all demands by sending a minimum-cost flow from supplies?
► This is called the minimum cost network flow (MCNF) problem.
OR III: NetworkFlow
15. MCNFproblems LP formulation forMCNF Special network flowmodels
VÍ DỤ
► Với mỗi điểm i, ký hiệu (bi) thể hiện quy mô cung ứng của điểm đó.
► Có 1 điểm cung ứng, 2 điểm nhu cầu và 2 điểm trung chuyển.
► Với mỗi cung (i, j), ký hiệu (uij, cij ) thể hiện giá trị cận trên/lưu lượng tối đa
uij và tải trọng/chi phí vận chuyển 1 đơn vị hàng hóa cij trên cung đó.
► Một số cung có thể không bị giới hạn lưu lượng tối đa.
► Giữa 2 điểm trên mạng lưới có thể tồn tại 2 hướng lưu thông đối chiều.
► Hãy tìm phương án lưu thông khả thi?
OR III: NetworkFlow
16. MCNFproblems LP formulation forMCNF Special network flowmodels
An example
► For each node i, the label (bi) means its supply quantity is bi.
► One supply node, two demand nodes, and two transshipment nodes.
► For each arc (i, j), the label (uij, cij ) means its upper bound of flow size is uij
and its unit cost of flow is cij .
► Some arcs may have unlimited capacity.
► Between two nodes there may be two arcs of different directions.
► Any feasible flow?
OR III: NetworkFlow
17. MCNFproblems LP formulation forMCNF Special network flowmodels
Road map
► MCNF problems.
► LP formulation for MCNF.
► Special network flow models.
OR III: NetworkFlow
► Vấn đề liên quan MCNF.
► Mô hình tuyến tính của bài toán
MCNF.
► Một số mô hình lưu thông trên mạng.
18. MCNFproblems LP formulation forMCNF Special network flowmodels
MÔ HÌNH HÓA BÀI TOÁN MCNF
► Biến xij : quy mô lưu thông trên cung (i, j)∈E.
► Hàm mục tiêu: min (4x12 + 3x13 + · · · + 2x45)
► Ràng buộc lưu lượng tối đa:
x12 ≤15, x13 ≤20, ..., x53 ≤5.
► Ràng buộc cân bằng lưu lượng:
► Điểm cung ứng: 25 = x12 + x13.
► Các điểm trung chuyển: x12 = x23 + x24 + x25; x13 + x23 + x53 = x34 + x35.
► Các điểm nhu cầu: x24 + x34 = x45 + 10; x25 + x35 + x45 = x53 + 15.
► Ràng buộc cân bằng lưu lượng giúp đảm bảo mọi điểm nhu cầu đều được
đáp ứng => Để đảm bảo tính khả thi của Phương án lưu thông.
OR III: NetworkFlow
19. MCNFproblems LP formulation forMCNF Special network flowmodels
Formulating the MCNF problem
► Decision variables:
Let xij= flow size of arc (i, j) for all (i, j) ∈E.
► Objective function: min ( 4x12 + 3x13 + ··· + 2x45)
► Capacity constraints: x12 ≤ 15, x13 ≤ 20, ..., x53 ≤ 5.
► Flow balancing constraints:
►Supply node: 25 = x12 +x13.
►Transshipment nodes:
x12 = x23 +x24 +x25, x13 + x23 +x53 = x34 +x35.
►Demand nodes: x24 + x34 = x45 + 10; x25 +x35 + x45 = x53 + 15.
► Flow balancing constraints ensure that all demands are satisfied.
► That total supplies equal total demands is required for feasibility.
OR III: NetworkFlow
20. MCNFproblems LP formulation forMCNF Special network flowmodels
MÔ HÌNH QUY HOẠCH TUYẾN TÍNH CỦA BÀI TOÁN
► Mô hình đầy đủ:
► Quy mô mô hình:
► Số lượng Điểm = Số lượng Ràng buộc dạng đẳng thức.
► Số lượng Cung = Số lượng Biến.
► Trên mỗi cột, biến chỉ mang hệ số +1 và -1!
► Nguyên nhân?
OR III: NetworkFlow
21. MCNFproblems LP formulation forMCNF Special network flowmodels
LP formulation
► Collectively, the complete formulation is
► Model size:
► The number of nodes is the number of equality constraints.
► The number of arcs is the number of variables.
► In each column, there are exactly one 1 and one −1!
► Is this always true? Why?
OR III: NetworkFlow
22. MCNFproblems LP formulation forMCNF Special network flowmodels
QUY HOẠCH NGUYÊN v/s QUY HOẠCH TUYẾN TÍNH?
► Chúng ta không cần thiết phải đặt điều kiện: Biến (giá trị Quy mô lưu thông
trên cung) phải nguyên.
► Chúng ta chỉ sử dụng điều kiện Biến phải nguyên khi:
► Việc làm tròn số các đáp án quá thiếu chính xác.
► Cần sử dụng Biến nhị phân (0/1) cho các tình huống lựa chọn.
► Trong bài toán MCNF, các biến sẽ tự động có giá trị nguyên. Bởi vì:
► Quy mô cung ứng và Lưu lượng tối đa đều mang giá trị nguyên, nên
đáp án sẽ là các Biến mang giá trị nguyên.
► Dạng thức Quy hoạch tuyến tính nới lỏng (LP relaxation) thu được từ Bài
toán Quy hoạch Nguyên ban đầu (IP formulation) sẽ cho đáp án là các
Biến mang giá trị nguyên (nếu bài toán khả thi).
► Nguyên nhân: Ma trận hệ số đặc biệt.
OR III: NetworkFlow
23. MCNFproblems LP formulation forMCNF Special network flowmodels
Integers for free!
► Our knowledge suggests that flow sizes should not be set to integers.
► Weuse integer variables only when:
► Approximation by rounding is too inaccurate.
► Binary variables are required for modeling complicated situations.
► What if we must get an integer solution?
► For MCNF problems, we will get integer solutions for free.
► As long as supply quantities and upper bounds are all integers, the
solution of the LP for MCNF must be an integer solution.
► For MCNF, the LP relaxation of the IP formulation always gives an
integer solution (if it is feasible).
► This is because the coefficient matrix is very special.
OR III: NetworkFlow
24. MCNFproblems LP formulation forMCNF Special network flowmodels
Road map
► MCNF problems.
► LP formulation for MCNF.
► Special network flow models.
OR III: NetworkFlow
► Vấn đề liên quan MCNF.
► Mô hình tuyến tính của bài toán MCNF.
► Một số mô hình lưu thông trên mạng.
25. MCNFproblems LP formulation forMCNF Special network flowmodels
MỘT SỐ MÔ HÌNH LƯU THÔNG TRÊN MẠNG
► Có rất nhiều bài toán có bản chất là một MCNF, ví dụ:
► Bài toán Vận tải.
► Bài toán Phân công công việc / gán nhiệm vụ.
► Bài toán Trung chuyển.
► Bài toán Lưu thông/lưu lượng tối đa.
► Bài toán Đường đi ngắn nhất.
► Nếu một vấn đề thực tế có thể định dạng thành một trong các bài toán ở
trên thì chúng ta hoàn toàn có thể giải quyết vấn đề đó.
► Có các thuật toán đặc biệt chuyên để giải các bài toán ở trên.
► Chúng ta chỉ cần biết rằng: Phương pháp đơn hình (simplex method)
cũng có thể giải các bài toán đó.
OR III: NetworkFlow
26. MCNFproblems LP formulation forMCNF Special network flowmodels
MCNF is more than MCNF
► Many well-known problems are all special cases of the MCNF problem.
► Transportation problems.
► Assignment problems.
► Transshipment problems.
► Maximum flow problems.
► Shortest path problems.
► If a given problem can be formulated as one of the above, it is solved.
► Each of these problems can be solved by some special algorithms.
► All we need to know is: They can all be solved by the simplex method.
OR III: NetworkFlow
27. MCNFproblems LP formulation forMCNF Special network flowmodels
BÀI TOÁN VẬN TẢI
► Công ty A chỉ sản xuất một loại sản phẩm. Công ty
có n Nhà máy và m Thị trường.
► Công suất của nhà máy i là si, i= 1, ..., n.
► Nhu cầu của thị trường j là dj, j= 1, ..., m.
► Tồn tại một tuyến đường vận chuyển hàng hóa
giữa Nhà máy i và Thị trường j.
► Chi phí vận tải một sản phẩm từ Nhà máy i tới Thị
trường j là cij .
► Tìm cách sản xuất và vận chuyển hàng hóa để đáp
ứng tất cả các Thị trường với chi phí thấp nhất.
OR III: NetworkFlow
28. MCNFproblems LP formulation forMCNF Special network flowmodels
Transportation problems
► A firm owns n factories that supply one product
in m markets.
► The capacity of factory i is si, i= 1,...,n.
► The demand of market j is dj, j= 1,...,m.
► Between factory i and market j, there is a route.
► The unit cost for shipping one unit from factory i
to market j is cij .
► How to produce and ship the product to fulfill all
demands while minimizing the total costs?
OR III: NetworkFlow
29. MCNFproblems LP formulation forMCNF Special network flowmodels
► Giả sử 𝑖=1
𝑛
𝑠𝑖 = 𝑗=1
𝑚
𝑑𝑗
► Gọi xi j là quy mô vận chuyển trên cung (i, j), i =1, ...,n, j= 1, ...,m.
► Đây là một bài toán MCNF:
► Nhà máy là Điểm cung ứng với quy mô cung ứng si.
► Thị trường là các Điểm nhu cầu với quy mô cung ứng (−dj ).
► Không có Điểm trung chuyển.
► Trọng số của cung là Chi phí vận chuyển 1 sản phẩm trên cung c ij.
► Các cung không có giới hạn lưu lượng tối đa.
OR III: NetworkFlow
BÀI TOÁN VẬN TẢI
30. MCNFproblems LP formulation forMCNF Special network flowmodels
Transportation problems
► Suppose 𝑖=1
𝑛
𝑠𝑖 = 𝑗=1
𝑚
𝑑𝑗
► Let xi j be the shipping quantity on arc (i, j), i = 1, ..., n, j = 1, ..., m.
► This is an MCNF problem:
► Factories are supply nodes whose supply quantity is si.
► Markets are demand nodes whose supply quantity is −dj .
► No transshipment nodes.
► Arc weights are unit transportation costs c ij.
► Arcs have unlimited capacities.
OR III: NetworkFlow
31. MCNFproblems LP formulation forMCNF Special network flowmodels
► Trường hợp: 𝒊=𝟏
𝒏
𝒔𝒊 > 𝒋=𝟏
𝒎
𝒅𝒋
Cần tạo một điểm Thị trưởng ảo (Ký hiệu là Thị trường 0) có Quy mô
nhu cầu là: d0 = 𝑖=1
𝑛
𝑠𝑖 − 𝑗=1
𝑚
𝑑𝑗
Cung (i,0) có chi phí ci,0 = 0: Vận chuyển từ Nhà máy i đến Thị
trường 0 sẽ đồng nghĩa với việc không vận chuyển sản phẩm ra khỏi
Nhà máy i.
► Trường hợp: các Nhà máy có chi phí sản xuất 1 sản phẩm 𝒄𝒊
𝑷
khác nhau? ci,j sẽ được thay đổi thành: ci,j + 𝑐𝑖
𝑃
► Trường hợp: các Thị trường có chi phí tiêu thụ 1 sản phẩm 𝒄𝒋
𝑹
khác nhau? ci,j sẽ được thay đổi thành: ci,j + 𝑐𝑗
𝑅
OR III: NetworkFlow
BIẾN THỂ CỦA BÀI TOÁN VẬN TẢI
32. MCNFproblems LP formulation forMCNF Special network flowmodels
Variants of transportation problems
► What if 𝒊=𝟏
𝒏
𝒔𝒊 > 𝒋=𝟏
𝒎
𝒅𝒋?
Let’s create a “virtual market” (labeled as market 0)
whose demand quantity is d0 = 𝑖=1
𝑛
𝑠𝑖 − 𝑗=1
𝑚
𝑑𝑗
Arcs (i,0) have costs ci,0 = 0: Shipping to market 0 just means
some factory capacities are unused.
► What if different factories have different unit production costs
𝒄𝒊
𝑷
? E.g., cases with outside suppliers.
ci,j is updated to ci,j + 𝑐𝑖
𝑃
► What if different markets have different unit retailing costs 𝒄𝒋
𝑹
?
E.g., countries have different tariffs.
ci,j is updated to ci,j + 𝑐𝑗
𝑅
OR III: NetworkFlow
33. MCNFproblems LP formulation forMCNF Special network flowmodels
► Cần phân công n công việc cho n lao động.
► Mỗi lao động chỉ được nhận 1 công việc.
► Các công việc không thể chia nhỏ.
► Chi phí để lao động j thực hiện công việc i là cij
► Cách để tối thiểu chi phí phân công công việc?
► Đây là trường hợp đặc biệt của Bài toán Vận tải!
► Các công việc là các ‘Nhà máy’ và các lao động là các ‘Thị trường’.
► Mỗi ‘Nhà máy’ chỉ tạo ra 1 sản phẩm và mỗi ‘Thị trường’ chỉ cần 1 sản phẩm.
► Chi phí vận chuyển từ ‘Nhà máy’ i tới ‘Thị trường’ j là cij.
► Biến thể của Bài toán Phân công công việc: Trường hợp số lượng công việc ít
hơn số lượng lao động?
OR III: NetworkFlow
BÀI TOÁN PHÂN CÔNG CÔNG VIỆC
34. MCNFproblems LP formulation forMCNF Special network flowmodels
Assignment problems
► A manager is assigning n jobs to n workers.
► The assignment must be one-to-one.
► A job cannot be split.
► The cost for worker j to complete job i is cij
► How to minimize the total costs?
► This is actually a special case of the transportation problem!
► Jobs are factories and workers are markets.
► Each factory produces one item and each market demands one item.
► The cost of shipping one item from factory i to market j is cij.
► What if there are fewer jobs than workers?
OR III: NetworkFlow
35. MCNFproblems LP formulation forMCNF Special network flowmodels
MÔ HÌNH BÀI TOÁN QUY HOẠCH NGUYÊN
OR III: NetworkFlow
► Gọi I là tập hợp các Nhà máy/Công việc.
► Gọi J là tập hợp các Thị trường/Lao động.
► Bài toán Vận tải: ► Bài toán Phân công công việc:
36. MCNFproblems LP formulation forMCNF Special network flowmodels
IP formulations
► For TU, put rows for I in one group and rows in J in the other.
► Relaxing the integer constraint is critical for the assignment problem!
OR III: NetworkFlow
► Let I and J be the sets of factories/jobs and markets/workers.
► For the transportation problem: ► For the assignment problem:
37. MCNFproblems LP formulation forMCNF Special network flowmodels
► Bài toán Trung chuyển cũng chính là Bài toán Vận tải trong đó có chứa
các Điểm trung chuyển.
► Đó cũng là bài toán MCNF với các cung không bị giới hạn lưu lượng tối đa.
► Dạng thức chung của bài toán MCNF:
min cT x
s.t. Ax = b
x ≤ u x ≥ 0.
OR III: NetworkFlow
BÀI TOÁN TRUNG CHUYỂN
38. MCNFproblems LP formulation forMCNF Special network flowmodels
► If there are transshipment nodes in a transportation problem, the
problem is called a transshipment problem
► It is just an MCNF problem with unlimited arc capacities.
► General MCNF formulation:
min cT x
s.t. Ax = b
x ≤ u x ≥ 0.
OR III: NetworkFlow
Transshipment problems
39. MCNFproblems LP formulation forMCNF Special network flowmodels
► Mỗi cung trong mạng lưới có trọng số là độ dài giữa 2 điểm i và j là dij
► Tìm đường đi ngắn nhất giữa Điểm nguồn s và Điểm đích t
► Giả định rằng dij ≥ 0.
► Đây cũng là một dạng của bài toán MNCF
► Đặt vấn đề: Tìm cách gửi 01 sản phẩm từ s tới t với chi phí thấp nhất.
Trong đó, chi phí của mỗi cung chính là độ dài của cung đó.
► Chỉ có 1 Điểm cung ứng s có công suất bằng 1 sản phẩm
► Chỉ có 1 Điểm nhu cầu t có nhu cầu bằng 1 sản phẩm.
► Các điểm khác đều là Điểm trung chuyển.
OR III: NetworkFlow
BÀI TOÁN ĐƯỜNG ĐI NGẮN NHẤT
40. MCNFproblems LP formulation forMCNF Special network flowmodels
► For a given network on which each arc has a weight dij as a distance,
what is the shortest path to go from a given source node s to a given
destination node t?
► Let’s assume that dij ≥ 0 in this course.
► How is a shortest path problem an MCNF problem?
► We simply ask how to send one unit from s to t with the minimum cost,
where arc costs are just arc distances.
► One supply node s and one demand node t.
► All other nodes are transshipment nodes.
► The supply and demand quantities are both 1.
OR III: NetworkFlow
Shortest path problems
41. MCNFproblems LP formulation forMCNF Special network flowmodels
► Gọi T là tập hợp các điểm trung chuyển
► Mô hình của Bài toán Đường đi ngắn nhất:
OR III: NetworkFlow
MÔ HÌNH BÀI TOÁN QUY HOẠCH NGUYÊN
42. MCNFproblems LP formulation forMCNF Special network flowmodels
► Let T be the set of transshipment nodes.
► For the shortest path problem:
► For TU, group rows for s and T and leave the row for t alone.
► Relaxing the integer constraint is critical for the shortest pathproblem!
OR III: NetworkFlow
IP formulations
43. MCNFproblems LP formulation forMCNF Special network flowmodels
► Mạng lưới gồm các cung có Lưu lượng tối đa nhưng không có Chi phí lưu thông.
Xác định số sản phẩm tối đa có thể chuyển từ Điểm nguồn s tới Điểm đích t
► Cố gắng vận chuyển tối đa số sản phẩm => Bài toán Tối đa hóa thay vì các bài
toán Tối thiểu hóa như trước đây.
► Để chuyển thành bài toán MNCF, chúng ta cần:
► Thiếtđặt một ‘cung ảo’ từ t đếns và cóchi phí vậnchuyểnmang giátrị âm.
► Cung ảo từ t đến s: Không có lưu lượng tối đa và Chi phí bằng -1.
► Mọi cung sẵn có đều có lưu lượng tối đa và chi phí bằng 0.
► Tất cả các điểm trong mạng lưới đều là điểm trung chuyển
OR III: NetworkFlow
BÀI TOÁN LUỒNG/LƯU LƯỢNG CỰC ĐẠI
44. MCNFproblems LP formulation forMCNF Special network flowmodels
► For a network whose arcs have capacities but no cost, how many units
may we send from a given source node s to a given destination node
t?
► How is a maximum flow problem an MCNF problem?
► We want to send as many units as possible.
► We solve a maximization problem, not a minimization one.
► We try to send units from t to s to “pay negative costs”.
► All original arcs have their capacities and no cost.
► The added arc from t to s has unlimited capacity and cost −1.
► All nodes are transshipment nodes.
OR III: NetworkFlow
Maximum flow problems
45. MCNFproblems LP formulation forMCNF Special network flowmodels
► Gọi xts là quy mô lưu lượng của ‘cung ảo’ (t,s)
► Chi phí cts = -1
► Mô hình của Bài toán Luồng/Lưu lượng tối đa:
OR III: NetworkFlow
MÔ HÌNH BÀI TOÁN QUY HOẠCH NGUYÊN
46. MCNFproblems LP formulation forMCNF Special network flowmodels
► Let xts be the flow size of the added arc (t, s).
► Let cts = −1 be the unit cost.
► For the maximum flow problem:
OR III: NetworkFlow
IP formulations