Solving a real world constraint problem