optiwindnet.baselines.lkh

Module Contents

optiwindnet.baselines.lkh.make_edge_listing(A: networkx.Graph, scale: float) str[source]

LKH’s EDGE_FILE param (follows Concorde format) node numbering starts from 0 every node number will be incremented by 1 when loaded by LKH

optiwindnet.baselines.lkh.lkh_acvrp(A: networkx.Graph, *, capacity: int, time_limit: int, scale: float = 10000.0, vehicles: int | None = None, runs: int = 50, per_run_limit: float = 15.0) networkx.Graph[source]

Lin-Kernighan-Helsgaun via LKH-3 binary. Asymmetric Capacitated Vehicle Routing Problem.

Parameters:
  • A – graph with allowed edges (if it has 0 edges, use complete graph)

  • capacity – maximum vehicle capacity

  • time_limit – [s] solver run time limit

  • scale – factor to scale lengths (should be < 1e6)

  • vehicles – number of vehicles (if None, use the minimum feasible)

  • runs – consult LKH manual

  • per_run_limit – consult LKH manual