Flexibility analysis and optimization of chemical plants with uncertain parameters