In goal programming a distinction is made between hard constraints that cannot be violated and soft constraints, which represent goals or targets one would like to achieve. The objective function in goal programming is to minimize the weighted sum of deviations from the goals set by the soft constraints.
This example illustrates how the goal programming can be easily implemented using the Violation Penalty of a mathematical program.
Goal Programming, Violation penalty.
A zip file with this example can be downloaded here.