Hi everyone, I hope there is someone who can urgently help me. How can I model the problem below in GAMS ? A quantity y is known to depend upon another quatity x. A set of corresponding values has been collected for x and y as is presented in the following table. x 0.0 0.5 1.0 1.5 1.9 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.6 7.0 7.6 8.5 9.0 10.0 y 1.0 0.9 0.7 1.5 2.0 2.4 3.2 2.0 2.7 3.5 1.0 4.0 3.6 2.7 5.7 4.6 6.0 6.8 7.3 - Fit the best straigth line y = bx + a to this set of data points. The objective is to minimize the sum of absolute deviations of each observed value of y from the value predicted by the linear relationship.
- Fit the best straigth line where the objective is to minimize the maximum deviation of all the observed values of y from the value predicted by the linear relationship.
- Fit the best quadratic curve y = cx 2 + bx + a to this set of data points using the same objectives as in (1) and (2).
Regards, Atif
asked
Atıf |

When I applied the model below, I got error which says " Symbol declared but no values have been assigned. Check for missing data definition, assignment, data loading or implicit assignment via a solve statement. A wild shot: You may have spurious commas in the explanatory text of a declaration. Check symbol reference list." Model Sets
i indices/ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 /;
Parameters
x(i) x values
/ 1 0
2 0.5
3 1.0
answered
Atıf |

Looks like problem 11 in

Model Building in Mathematical Programmingby H. Paul Williams.Sounds like you have a homework or take-home exam problem which is urgently due. Forget about GAMS for the moment, and figure out what optimization problems you can or should formulate. Then worry about how to implement them in GAMS. Hint: Do you know anything about norms?