ag openstruct optimization