*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX* $ontext * Exercise (3): MY FARM Model with sets and sum *### The objective of the exercise: 1) Getting acquainted with the GAMS programming language. *### The problem: A farmer wants to maximize his profit using 200 ha of land and 10000 hours of labor available. He has the option of cultivating three types of crops: wheat, barley, rapeseed and sugarbeet. The profit received and labor hours required for producing one ha of each crop are presented in the table below. How much of each crop does he need to cultivate in order to maximize his profit? Item Wheat Barley Rapeseed Sugarbeet Profit in Euro/ha 253 443 284 516 Required labor hours/ha 25 36 27 87 *XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX* $offtext sets COLS / wheat barley rapeseed sugarbeet / ; Parameters p_uvag(COLS) gross margin p_lab(COLS) labour quantity ; p_uvag("wheat") = 253; p_uvag("barley") = 443; p_uvag("rapeseed") = 284; p_uvag("sugarbeet") = 516; p_lab("wheat") = 25; p_lab("barley") = 36; p_lab("rapeseed") = 27; p_lab("sugarbeet") = 87; Variables v_obje objective function value ; Positive variable v_actLevl(COLS) land area planted with crop ; Equations e_land land constraint e_labour labour constraint obje objective function ; obje .. v_obje =E= sum (COLS, v_actLevl(COLS)*p_uvag(COLS)); e_land .. sum (COLS, v_actLevl(COLS)) =L= 200; e_labour .. sum (COLS, p_lab(COLS)*v_actLevl(COLS)) =L= 10000; Model myfarm /all/; Solve myfarm using lp maximizing v_obje;