Constraint Handling In Life-Cycle Optimization Using Ensemble Gradients