tsp

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package tsp solves Traveling Salesman Problem with genetic algorithm.

Index

Constants

View Source
const (
	DefaultNumberOfGenerations = 100
	DefaultPopulationSize      = 600
)

Defaults.

Variables

This section is empty.

Functions

func Order

func Order(points []gpx.GPXPoint, numberOfGenerations, populationSize int) ([]gpx.Point, float64, float64)

Order solves traveling sales person problem with genetic algorithm. It returns ordered points, initial and final distances. Use DefaultNumberOfGenerations and DefaultPopulationSize when in doubt.

Types

This section is empty.

Directories

Path Synopsis
internal
base
Package base holds basic entities.
Package base holds basic entities.
ga
Package ga implements genetic algorithm.
Package ga implements genetic algorithm.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL