Skip to content

Instantly share code, notes, and snippets.

@fuglede
Last active February 9, 2024 08:03
Show Gist options
  • Save fuglede/5388f4246b161ce46b4989d880e2cb86 to your computer and use it in GitHub Desktop.
Save fuglede/5388f4246b161ce46b4989d880e2cb86 to your computer and use it in GitHub Desktop.
Knight's tour with graph traversal, constraint programming, and integer programming
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fuglede
Copy link
Author

fuglede commented Feb 9, 2024

@Ynfiniti Hah, good catch. What's happening is probably that one gets small floating point errors from Xpress, even though all variables were declared to be integers. Avoiding that amounts to rounding to the nearest integer instead of rounding down as the code does at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment