Curve Fitting: Fitting a Curve to a Set of Data Points


Constraints

The following constraints are used in this example:

  • bounds on variables

  • for $i \in \text {POINTS}$,

    \[ \Variable{Estimate[i]} = \Variable{Beta[0]} + \sum _{k=1}^\Argument {order} \Variable{Beta[k]} \cdot \Argument{x[i]}^ k \]
  • for $i \in \text {POINTS}$,

    \[ \Variable{Estimate[i]} - \Variable{Surplus[i]} + \Variable{Slack[i]} = \Argument{y[i]} \]
  • for $i \in \text {POINTS}$,

    \[ \Variable{MinMax} \ge \Variable{Surplus[i]} + \Variable{Slack[i]} \]