MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / nqueens.py

File nqueens.py

examples/nqueens.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1# This is an example of the N-Queens problem, which is a classic combinatorial problem.
2# The problem is to place N queens on an N x N chessboard so that no two queens attack each other.
3#
4# We show how to model the problem as a MIP and solve it using highspy.

Callers

nothing calls this directly

Calls 9

rangeFunction · 0.85
HighsMethod · 0.80
addBinariesMethod · 0.80
addConstrsMethod · 0.80
sumMethod · 0.80
valsMethod · 0.80
joinMethod · 0.80
silentMethod · 0.45
solveMethod · 0.45

Tested by

no test coverage detected