-1

The purpose of the code is to solve the 'ABC' puzzle found at this link: https://www.brainbashers.com/abcview.asp

The letters on the perimeter tell you which column, row, or diagonal each letter must be placed and the next letter must be placed in a square adjacent to the previous letter. Our formulation works, but it is displays messy output. Our professor recommended we do a summation for each letter (1=A, 2=B...) and display it in a single matrix similar to how the grid is displayed on the website. I've attached what we have so far, but we continue to get an error.

Left is data file, right is model file

the last constraint 'MatrixY' is the matrix we are trying to create, but are not sure where we are going wrong. Any help would be much appreciated! Let me know if you need any additional info

lizard2020
  • 55
  • 2
  • 7

1 Answers1

0

You have Y indexed on row, column, and k. If you want Y to be a 2-dimensional matrix, then its indexing should be two-dimensional, so you may want to get rid of the k.