get_constraints function

Set up constraints for optimization