**set** ROWS := 1…9;

**set** COLS := 1…9;

**set** BLOCKS := 1…9;

**param** s: 1 2 3 4 5 6 7 8 9 :=

1 9 4 3 7 1

2 3 8 7 1

3 2 7 3 1 5

4 5 6 4

5 7 8 6 9

6 4 7 3

7 9 4 7 3

8 4

9 6

**set** COLS;

**set** BLOCKS;

**set** ROWS := 1…9;

**param** s{ROWS,COLS};

**var** x{i **in** ROWS, j **in** COLS, v **in** 1…9} **binary**;

**minimize** dummy_obj:

**sum** {i **in** ROWS, j **in** COLS, v **in** 1…9} x[i,j,v];

**subject** **to** row_constr {i **in** ROWS, v **in** 1…9}:

**sum** {j **in** COLS} x[i,j,v] = 1;

**subject** **to** col_constr {j **in** COLS, v **in** 1…9}:

**sum** {i **in** ROWS} x[i,j,v] = 1;

**subject** **to** block_constr {k **in** BLOCKS, v **in** 1…9}:

**sum** {i **in** ROWS, j **in** COLS: (i,j) **in** BLOCKS[k]} x[i,j,v] = 1;

# …other constraints

**option** solver cplex;

**data** SAHC-hw5;

**solve**;

Not getting a feasible solution. the sodoku code is supposed to

Find an assignment of the numbers 1, 2, …, 9 to the empty cells of this

matrix such that

In each row all numbers appear exactly once.

In each column all numbers appear exactly once.

In each 3 × 3 block all numbers appear exactly once.

Please help me fix the errors