I am looking at the 8 queens puzzle. I used the below R code, which is directly from the R lpsolve documentation. The parameter num.bin.solution is set equal to 3. In R documentation it says that num.bin.solns stands for a numeric indicator of number of solutions returned. In that case how can I see 3 possible solutions? I used command chessing$solution, but the output is not easy to understand. Also is there a way to return all possible solutions?
chess.obj <- rep (1, 64)
q8 <- make.q8 ()
chess.dir <- rep (c("=", "<"), c(16, 26))#first 16 cosntraints are for row and columns, remaining constraints are for diagonals
chess.rhs <- rep (1, 42)
chessing=lp ('max', chess.obj, , chess.dir, chess.rhs, dense.const = q8,
all.bin=TRUE, num.bin.solns=3)
chessing$solution
Update: I got my main question answered. But still wondering if there is any efficient way to get all possible solutions.