4.4.3. Vehicle Routing Problem
Vehicle Routing Problem を列生成法で解くサンプルです.
vehicle_routing.py
-
class sample.vehicle_routing.VehicleRouting(capacity: int, volume: dict[str, int], dis: dict[tuple[str, str], float])[ソース]
ベースクラス: ColumnGenerator
Vehicle Routing Problem
-
create_init_pattern() → None[ソース]
倉庫 X と店舗 i を往復するルート
-
create_new_pattern(lmbval: Table, *, silent: bool = True) → tuple[Table, Table][ソース]
Sum(pattern[p,i]*lmb[i], i) < rd[p] となる p を見つける
-
update_pattern(zval: Table) → None[ソース]
update self.pattern, self.c
-
visualize(zval: Table) → None[ソース]
結果表示
-
sample.vehicle_routing.create_init_data(*, N: int) → tuple[int, dict[str, int], dict[tuple[str, str], float]][ソース]
N: 店舗数