Question: Consider the hexagonal shape shown in Figure 2(a). The goal of this problem is to assign an integer number to each cell in such a

Consider the hexagonal shape shown in Figure 2(a). The goal of this problem is to assign an integer number to each cell in such a way that the numbers in each row, and all upward and downward diagonals sum to the same number (rows and diagonals are the red lines in Figure 2(b). The rules are: (1) You can only use integer numbers in the interval [1, 19], (2) Numbers cannot be repeated, and (3) Numbers in each row and diagonal must sum to 38 1. Suppose that the hexagon is currently empty i.e., no number has been assigned yet). (a) Formulate a linear integer optimization model to solve this problem. Specify param- eters, decision variables, constraints, and objective function. The mathematical formulation must be general and compact (i.e., using and ) for any hexagonal shape with 19 cells. (b) Implement and solve this problem in AMPL. Use Gurobi as a solver. Report the details of your implementation (i.e., code and data used) (c) Illustrate the optimal number arrangement in a figure 17 19 13 Figure 2: Hexagon problem illustration Consider the hexagonal shape shown in Figure 2(a). The goal of this problem is to assign an integer number to each cell in such a way that the numbers in each row, and all upward and downward diagonals sum to the same number (rows and diagonals are the red lines in Figure 2(b). The rules are: (1) You can only use integer numbers in the interval [1, 19], (2) Numbers cannot be repeated, and (3) Numbers in each row and diagonal must sum to 38 1. Suppose that the hexagon is currently empty i.e., no number has been assigned yet). (a) Formulate a linear integer optimization model to solve this problem. Specify param- eters, decision variables, constraints, and objective function. The mathematical formulation must be general and compact (i.e., using and ) for any hexagonal shape with 19 cells. (b) Implement and solve this problem in AMPL. Use Gurobi as a solver. Report the details of your implementation (i.e., code and data used) (c) Illustrate the optimal number arrangement in a figure 17 19 13 Figure 2: Hexagon problem illustration
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
