Ensemble-based closed -loop production optimization