update D using ipopt