graphenv.examples.tsp.graph_utils

Functions

calc_greedy_dist

Calculate the distance for a greedy search tour over the given graph.

make_complete_planar_graph

Returns a fully connected graph with xy positions for each node and edge weights equal to pairwise distances.

plot_network

Plots the network and a path if specified.

random_tsp

Return a baseline cost cycle starting at source and its cost.