Robust optimization: Sensitivity to uncertainty in scalar and vector cases, with applications