FOQUS: A Framework for Optimization and Quantification of Uncertainty