General framework for decomposition analysis in optimal design