Skip to content

Instantly share code, notes, and snippets.

View henriquebecker91's full-sized avatar

Henrique Becker henriquebecker91

View GitHub Profile
@henriquebecker91
henriquebecker91 / stsp_subtour_elimination.jl
Created March 3, 2020 17:02
STSP Subtour Elimination with half-done Callback Interface
using CPLEX
using JuMP
using Test
# TSPLIB could be more clear on how to compute the distances.
function euclidean_distance(x1, y1, x2, y2)
round(√((x1 - x2)^2 + (y1 - y2)^2))
end
function get_instance()