highly-constrained non-convex optimization and uncertainty quantification