Complete example of problem using ipopt