PySCIPOpt
Python Interface to the SCIP Optimization Suite
read_tsplib.py File Reference

read standard instances of the traveling salesman problem More...

Go to the source code of this file.

Functions

def distL2 (x1, y1, x2, y2)
 
def distL1 (x1, y1, x2, y2)
 
def distLinf (x1, y1, x2, y2)
 
def distATT (x1, y1, x2, y2)
 
def distCEIL2D (x1, y1, x2, y2)
 
def distGEO (x1, y1, x2, y2)
 
def read_explicit_lowerdiag (f, n)
 
def read_explicit_upper (f, n)
 
def read_explicit_upperdiag (f, n)
 
def read_explicit_matrix (f, n)
 
def read_tsplib (filename)
 
def read_atsplib (filename)
 

Variables

 V
 
 c
 
 x
 
 y
 

Detailed Description

read standard instances of the traveling salesman problem

Definition in file read_tsplib.py.

Function Documentation

def read_tsplib.distATT (   x1,
  y1,
  x2,
  y2 
)
Compute the ATT distance between two points (see TSPLIB documentation)

Definition at line 42 of file read_tsplib.py.

def read_tsplib.distCEIL2D (   x1,
  y1,
  x2,
  y2 
)
returns smallest integer not less than the distance of two points

Definition at line 53 of file read_tsplib.py.

def read_tsplib.distL1 (   x1,
  y1,
  x2,
  y2 
)
Compute the L1-norm (Manhattan) distance between two points.

The distance is rounded to the closest integer, for compatibility
with the TSPLIB convention.

The two points are located on coordinates (x1,y1) and (x2,y2),
sent as parameters

Definition at line 27 of file read_tsplib.py.

def read_tsplib.distL2 (   x1,
  y1,
  x2,
  y2 
)
Compute the L2-norm (Euclidean) distance between two points.

The distance is rounded to the closest integer, for compatibility
with the TSPLIB convention.

The two points are located on coordinates (x1,y1) and (x2,y2),
sent as parameters

Definition at line 14 of file read_tsplib.py.

def read_tsplib.distLinf (   x1,
  y1,
  x2,
  y2 
)
Compute the Linfty distance between two points (see TSPLIB documentation)

Definition at line 38 of file read_tsplib.py.