Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
tpl_multicommodity_example.cc File Reference

Educational examples for multi-commodity flow networks. More...

#include <iostream>
#include <tpl_graph.H>
Include dependency graph for tpl_multicommodity_example.cc:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Educational examples for multi-commodity flow networks.

WHAT IS MULTI-COMMODITY FLOW?

Extension of max-flow where MULTIPLE types of flow (commodities) share the SAME network infrastructure

Each commodity has:

  • Its own source and sink nodes
  • Its own demand/supply
  • But shares arc capacities with other commodities!

KEY CHALLENGE:

Multiple commodities compete for LIMITED capacity Must route all commodities without exceeding capacities NP-hard in general, requires optimization algorithms

REAL-WORLD EXAMPLES:

  • Telecommunications: Multiple calls share same network
  • Transportation: Different goods share roads/railways
  • Data centers: Multiple data streams share bandwidth
  • Supply chains: Multiple products through warehouses

COMPILE & RUN:

g++ -std=c++20 -I.. -o tpl_multicommodity_example tpl_multicommodity_example.cc ./tpl_multicommodity_example

Definition in file tpl_multicommodity_example.cc.

Function Documentation

◆ main()

int main ( )

Definition at line 40 of file tpl_multicommodity_example.cc.

References Aleph::maps().