From 21a75358b1fa7104e7286a59ab0d9dd0a0db03c8 Mon Sep 17 00:00:00 2001 From: Mikael Zayenz Lagerkvist Date: Mon, 13 Jul 2026 17:09:23 +0200 Subject: [PATCH] Fix zero-cost edges in TSP example --- changelog.in | 10 ++++++++++ examples/tsp.cpp | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/changelog.in b/changelog.in index 80921440fe..8e1d88ae49 100755 --- a/changelog.in +++ b/changelog.in @@ -116,6 +116,16 @@ Thanks: Yuri Victorovich Do not create empty MiniZinc directories when FlatZinc is disabled in an Autotools build. +[ENTRY] +Module: example +What: bug +Rank: minor +Issue: 151 +Thanks: Ioannis Papatsoris +[DESCRIPTION] +Treat zero entries in the TSP example as valid zero-cost edges. This lets the +br17 instance reach its optimum. + [ENTRY] Module: flatzinc What: new diff --git a/examples/tsp.cpp b/examples/tsp.cpp index 4344e13f5e..564026cbe3 100644 --- a/examples/tsp.cpp +++ b/examples/tsp.cpp @@ -244,12 +244,6 @@ class TSP : public IntMinimizeScript { // Cost matrix IntArgs c(n*n, p.d()); - // Disallow disconnected nodes - for (int i=0; i