44 #ifndef ROL_STOCHASTICPROBLEM_DEF_HPP 45 #define ROL_STOCHASTICPROBLEM_DEF_HPP 49 template<
typename Real>
53 :
Problem<Real>(obj,x,g), needRiskLessObj_(true) {}
55 template<
typename Real>
61 ROL_TEST_FOR_EXCEPTION(isFinalized(),std::invalid_argument,
62 ">>> ROL::StochasticProblem::makeObjectiveStochastic: Cannot set stochastic objective after problem has been finalized!");
64 ROL_TEST_FOR_EXCEPTION(fsampler == nullPtr,std::invalid_argument,
65 ">>> ROL::StochasticProblem::makeObjectiveStochastic: Objective function value sampler is null!");
67 ORIGINAL_obj_ = INPUT_obj_;
69 Ptr<SampleGenerator<Real>> _gsampler, _hsampler;
70 _gsampler = (gsampler == nullPtr ? fsampler : gsampler);
71 _hsampler = (hsampler == nullPtr ? _gsampler : hsampler);
73 std::string type = list.sublist(
"SOL").sublist(
"Objective").get(
"Type",
"Risk Neutral");
74 if ( type ==
"Risk Neutral" ) {
75 needRiskLessObj_ =
true;
77 bool storage = list.sublist(
"SOL").sublist(
"Objective").sublist(
"Risk Neutral").get(
"Use Storage",
true);
78 INPUT_obj_ = makePtr<RiskNeutralObjective<Real>>(ORIGINAL_obj_,fsampler,_gsampler,_hsampler,storage);
80 else if ( type ==
"Risk Averse" || type ==
"Deviation" || type ==
"Error" ||
81 type ==
"Regret" || type ==
"Probability" ) {
82 needRiskLessObj_ =
false;
83 objList_ = makePtr<ParameterList>();
84 objList_->sublist(
"SOL") = list.sublist(
"SOL").sublist(
"Objective");
85 INPUT_obj_ = makePtr<StochasticObjective<Real>>(ORIGINAL_obj_,*objList_,fsampler,_gsampler,_hsampler);
87 else if ( type ==
"Mean Value" ) {
88 needRiskLessObj_ =
true;
90 INPUT_obj_ = makePtr<MeanValueObjective<Real>>(ORIGINAL_obj_,fsampler);
93 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
94 ">>> ROL::StochasticProblem::makeObjectiveStochastic: Invalid stochastic optimization type!");
98 template<
typename Real>
104 ROL_TEST_FOR_EXCEPTION(isFinalized(),std::invalid_argument,
105 ">>> ROL::StochasticProblem::makeConstraintStochastic: Cannot set stochastic constraint after problem has been finalized!");
107 ROL_TEST_FOR_EXCEPTION(sampler == nullPtr,std::invalid_argument,
108 ">>> ROL::StochasticProblem::makeConstraintStochastic: Constraint sampler is null!");
110 auto it = INPUT_con_.find(name);
111 ROL_TEST_FOR_EXCEPTION(it == INPUT_con_.end(),std::invalid_argument,
112 ">>> ROL::StochasticProblem::makeConstraintStochastic: Constraint does not exist!");
113 ROL_TEST_FOR_EXCEPTION(ORIGINAL_con_.find(name) != ORIGINAL_con_.end(),std::invalid_argument,
114 ">>> ROL::StochasticProblem::makeConstraintStochastic: Constraint already set!");
115 ORIGINAL_con_.insert({name,it->second});
117 std::string type = list.sublist(
"SOL").sublist(name).get(
"Type",
"Risk Neutral");
118 Ptr<Constraint<Real>> con = it->second.constraint;
119 Ptr<Vector<Real>> mul = it->second.multiplier;
120 Ptr<Vector<Real>> res = it->second.residual;
121 Ptr<BoundConstraint<Real>> bnd = it->second.bounds;
122 if ( type ==
"Risk Neutral" ) {
123 ROL_TEST_FOR_EXCEPTION(bman == nullPtr,std::invalid_argument,
124 ">>> ROL::StochasticProblem::makeConstraintStochastic: Risk neutral constraints need a valid BatchManager!");
125 conList_.insert({name,std::pair<Ptr<ParameterList>,
bool>(nullPtr,
true)});
126 con = makePtr<RiskNeutralConstraint<Real>>(it->second.constraint,sampler,bman);
128 else if ( type ==
"Almost Sure" ) {
129 conList_.insert({name,std::pair<Ptr<ParameterList>,
bool>(nullPtr,
true)});
130 int nsamp = sampler->numMySamples();
131 con = makePtr<AlmostSureConstraint<Real>>(sampler,it->second.constraint);
132 std::vector<Ptr<Vector<Real>>> mvec(nsamp,nullPtr), rvec(nsamp,nullPtr);
133 for (
int j = 0; j < nsamp; ++j) {
134 mvec[j] = mul->clone(); mvec[j]->set(*mul);
135 rvec[j] = res->clone(); rvec[j]->set(*res);
137 mul = makePtr<DualSimulatedVector<Real>>(mvec,sampler->getBatchManager(),sampler);
138 res = makePtr<PrimalSimulatedVector<Real>>(rvec,sampler->getBatchManager(),sampler);
140 bnd = makePtr<SimulatedBoundConstraint<Real>>(sampler, bnd);
142 else if ( type ==
"Risk Averse" || type ==
"Deviation" || type ==
"Error" ||
143 type ==
"Regret" || type ==
"Probability" ) {
144 ROL_TEST_FOR_EXCEPTION(bnd == nullPtr,std::invalid_argument,
145 ">>> ROL::StochasticProblem::makeConstraintStochastic: Stochastic constraints must be inequalities!");
146 Ptr<ParameterList> clist = makePtr<ParameterList>();
147 clist->sublist(
"SOL") = list.sublist(
"SOL").sublist(name);
148 conList_.insert({name,std::pair<Ptr<ParameterList>,
bool>(clist,
false)});
149 con = makePtr<StochasticConstraint<Real>>(it->second.constraint,sampler,*clist);
151 else if ( type ==
"Mean Value" ) {
152 conList_.insert({name,std::pair<Ptr<ParameterList>,
bool>(nullPtr,
true)});
153 con = makePtr<MeanValueConstraint<Real>>(it->second.constraint,sampler);
156 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
157 ">>> ROL::StochasticProblem::makeConstraintStochastic: Invalid stochastic optimization type!");
164 template<
typename Real>
170 ROL_TEST_FOR_EXCEPTION(isFinalized(),std::invalid_argument,
171 ">>> ROL::StochasticProblem::makeLinearConstraintStochastic: Cannot set stochastic constraint after problem has been finalized!");
173 ROL_TEST_FOR_EXCEPTION(sampler == nullPtr,std::invalid_argument,
174 ">>> ROL::StochasticProblem::makeLinearConstraintStochastic: Constraint sampler is null!");
176 auto it = INPUT_linear_con_.find(name);
177 ROL_TEST_FOR_EXCEPTION(it == INPUT_linear_con_.end(),std::invalid_argument,
178 ">>> ROL::StochasticProblem::makeLinearConstraintStochastic: Constraint does not exist!");
179 ROL_TEST_FOR_EXCEPTION(ORIGINAL_linear_con_.find(name) != ORIGINAL_linear_con_.end(),std::invalid_argument,
180 ">>> ROL::StochasticProblem::makeLinearConstraintStochastic: Constraint already set!");
181 ORIGINAL_linear_con_.insert({name,it->second});
183 std::string type = list.sublist(
"SOL").sublist(name).get(
"Type",
"Risk Neutral");
184 Ptr<Constraint<Real>> con = it->second.constraint;
185 Ptr<Vector<Real>> mul = it->second.multiplier;
186 Ptr<Vector<Real>> res = it->second.residual;
187 Ptr<BoundConstraint<Real>> bnd = it->second.bounds;
188 if ( type ==
"Risk Neutral" ) {
189 ROL_TEST_FOR_EXCEPTION(bman == nullPtr,std::invalid_argument,
190 ">>> ROL::StochasticProblem::makeLinearConstraintStochastic: Risk neutral constraints need a valid BatchManager!");
191 con = makePtr<RiskNeutralConstraint<Real>>(it->second.constraint,sampler,bman);
193 else if ( type ==
"Almost Sure" ) {
194 int nsamp = sampler->numMySamples();
195 con = makePtr<AlmostSureConstraint<Real>>(sampler,it->second.constraint);
196 std::vector<Ptr<Vector<Real>>> mvec(nsamp,nullPtr), rvec(nsamp,nullPtr);
197 for (
int j = 0; j < nsamp; ++j) {
198 mvec[j] = mul->clone(); mvec[j]->set(*mul);
199 rvec[j] = res->clone(); rvec[j]->set(*res);
201 mul = makePtr<DualSimulatedVector<Real>>(mvec,sampler->getBatchManager(),sampler);
202 res = makePtr<PrimalSimulatedVector<Real>>(rvec,sampler->getBatchManager(),sampler);
204 bnd = makePtr<SimulatedBoundConstraint<Real>>(sampler, bnd);
206 else if ( type ==
"Mean Value" ) {
207 con = makePtr<MeanValueConstraint<Real>>(it->second.constraint,sampler);
210 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
211 ">>> ROL::StochasticProblem::makeLinearConstraintStochastic: Invalid stochastic optimization type!");
218 template<
typename Real>
220 ROL_TEST_FOR_EXCEPTION(isFinalized(),std::invalid_argument,
221 ">>> ROL::StochasticProblem::resetStochasticObjective: Cannot reset stochastic objective after problem has been finalized!");
222 if (ORIGINAL_obj_ != nullPtr) {
223 INPUT_obj_ = ORIGINAL_obj_;
224 needRiskLessObj_ =
true;
227 ORIGINAL_obj_ = nullPtr;
230 template<
typename Real>
232 ROL_TEST_FOR_EXCEPTION(isFinalized(),std::invalid_argument,
233 ">>> ROL::StochasticProblem::resetStochasticConstraint: Cannot reset stochastic constraint after problem has been finalized!");
234 auto it = ORIGINAL_con_.find(name);
235 if (it != ORIGINAL_con_.end()) {
236 Ptr<Constraint<Real>> con = it->second.constraint;
237 Ptr<Vector<Real>> mul = it->second.multiplier;
238 Ptr<Vector<Real>> res = it->second.residual;
239 Ptr<BoundConstraint<Real>> bnd = it->second.bounds;
243 conList_.erase(conList_.find(name));
244 ORIGINAL_con_.erase(it);
248 template<
typename Real>
250 ROL_TEST_FOR_EXCEPTION(isFinalized(),std::invalid_argument,
251 ">>> ROL::StochasticProblem::resetStochasticLinearConstraint: Cannot reset stochastic constraint after problem has been finalized!");
252 auto it = ORIGINAL_linear_con_.find(name);
253 if (it != ORIGINAL_linear_con_.end()) {
254 Ptr<Constraint<Real>> con = it->second.constraint;
255 Ptr<Vector<Real>> mul = it->second.multiplier;
256 Ptr<Vector<Real>> res = it->second.residual;
257 Ptr<BoundConstraint<Real>> bnd = it->second.bounds;
261 ORIGINAL_linear_con_.erase(it);
265 template<
typename Real>
267 ROL_TEST_FOR_EXCEPTION(isFinalized(),std::invalid_argument,
268 ">>> ROL::StochasticProblem::reset: Cannot reset stochastic problem after problem has been finalized!");
270 resetStochasticObjective();
272 std::vector<std::string> names;
273 for (
auto it = INPUT_con_.begin(); it != INPUT_con_.end(); ++it) {
274 names.push_back(it->first);
276 for (
auto it = names.begin(); it != names.end(); ++it) {
277 resetStochasticConstraint(*it);
281 for (
auto it = INPUT_linear_con_.begin(); it != INPUT_linear_con_.end(); ++it) {
282 names.push_back(it->first);
284 for (
auto it = names.begin(); it != names.end(); ++it) {
285 resetStochasticLinearConstraint(*it);
288 if (ORIGINAL_xprim_ != nullPtr) {
289 INPUT_xprim_ = ORIGINAL_xprim_;
290 ORIGINAL_xprim_ = nullPtr;
293 if (ORIGINAL_xdual_ != nullPtr) {
294 INPUT_xdual_ = ORIGINAL_xdual_;
295 ORIGINAL_xdual_ = nullPtr;
298 if (ORIGINAL_bnd_ != nullPtr) {
299 INPUT_bnd_ = ORIGINAL_bnd_;
300 ORIGINAL_bnd_ = nullPtr;
304 template<
typename Real>
306 ROL_TEST_FOR_EXCEPTION(!isFinalized(),std::invalid_argument,
307 ">>> ROL::StochasticProblem::getObjectiveStatistic: Cannot get statistic if problem has not been finalized!");
309 Ptr<std::vector<Real>> stat
310 = dynamicPtrCast<RiskVector<Real>>(INPUT_xprim_)->getStatistic();
311 if (stat != nullPtr)
return *stat;
312 else return std::vector<Real>();
314 catch (std::exception &e) {
315 return std::vector<Real>();
319 template<
typename Real>
321 ROL_TEST_FOR_EXCEPTION(!isFinalized(),std::invalid_argument,
322 ">>> ROL::StochasticProblem::getConstraintStatistic: Cannot get statistic if problem has not been finalized!");
323 auto it = statMap_.find(name);
324 ROL_TEST_FOR_EXCEPTION(it==statMap_.end(),std::invalid_argument,
325 ">>> ROL::StochasticProblem::getConstraintStatistic: Constraint does not exist!");
327 Ptr<std::vector<Real>> stat
328 = dynamicPtrCast<RiskVector<Real>>(INPUT_xprim_)->getStatistic(1,it->second);
329 if (stat != nullPtr)
return *stat;
330 else return std::vector<Real>();
332 catch (std::exception &e) {
333 return std::vector<Real>();
337 template<
typename Real>
339 ROL_TEST_FOR_EXCEPTION(!isFinalized(),std::invalid_argument,
340 ">>> ROL::StochasticProblem::getConstraintStatistic: Cannot get statistic if problem has not been finalized!");
341 ROL_TEST_FOR_EXCEPTION(comp>1||comp<0,std::invalid_argument,
342 ">>> ROL::StochasticProblem::getSolutionStatistic: Component must be either 0 or 1!");
346 val = dynamicPtrCast<StochasticObjective<Real>>(INPUT_obj_)->computeStatistic(*INPUT_xprim_);
348 catch (std::exception &e) {
349 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
350 ">>> ROL::StochasticProblem::getSolutionStatistic: Objective does not have a computeStatistic function!");
354 auto it = statMap_.find(name);
355 ROL_TEST_FOR_EXCEPTION(it==statMap_.end(),std::invalid_argument,
356 ">>> ROL::StochasticProblem::getSolutionStatistic: Constraint does not exist!");
358 auto it2 = INPUT_con_.find(name);
359 val = dynamicPtrCast<StochasticConstraint<Real>>(it2->second.constraint)->computeStatistic(*INPUT_xprim_);
361 catch (std::exception &e) {
362 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
363 ">>> ROL::StochasticProblem::getSolutionStatistic: Constraint does not have a computeStatistic function!");
369 template<
typename Real>
372 std::vector<Ptr<ParameterList>> conList;
374 risk_ = !needRiskLessObj_;
376 needRiskLessCon_.clear();
378 for (
auto it = INPUT_con_.begin(); it != INPUT_con_.end(); ++it) {
379 auto it2 = conList_.find(it->first);
380 if (it2==conList_.end()) {
381 conList.push_back(nullPtr);
382 needRiskLessCon_.push_back(
true);
385 conList.push_back(std::get<0>(it2->second));
386 needRiskLessCon_.push_back(std::get<1>(it2->second));
387 flag = std::get<1>(it2->second);
389 dynamicPtrCast<StochasticConstraint<Real>>(it->second.constraint)->setIndex(cnt);
393 statMap_.insert({it->first,cnt});
398 if (needRiskLessObj_) {
399 Ptr<Objective<Real>> obj = INPUT_obj_;
400 INPUT_obj_ = makePtr<RiskLessObjective<Real>>(obj);
403 ORIGINAL_xprim_ = INPUT_xprim_;
404 INPUT_xprim_ = makePtr<RiskVector<Real>>(objList_,conList,ORIGINAL_xprim_);
405 ORIGINAL_xdual_ = INPUT_xdual_;
406 INPUT_xdual_ = makePtr<RiskVector<Real>>(objList_,conList,ORIGINAL_xdual_);
407 if (objList_ != nullPtr) {
408 Real statObj = objList_->sublist(
"SOL").get(
"Initial Statistic",1.0);
409 dynamicPtrCast<RiskVector<Real>>(INPUT_xprim_)->setStatistic(statObj,0);
411 for (
size_t i = 0; i < conList.size(); ++i) {
412 if (conList[i] != nullPtr) {
413 Real statCon = conList[i]->sublist(
"SOL").get(
"Initial Statistic",1.0);
414 dynamicPtrCast<RiskVector<Real>>(INPUT_xprim_)->setStatistic(statCon,1,i);
418 if (INPUT_bnd_ != nullPtr) {
419 ORIGINAL_bnd_ = INPUT_bnd_;
420 INPUT_bnd_ = makePtr<RiskBoundConstraint<Real>>(objList_,conList,ORIGINAL_bnd_);
424 std::unordered_map<std::string,ConstraintData<Real>> riskless_con;
425 for (
auto it = INPUT_con_.begin(); it != INPUT_con_.end(); ++it) {
426 if (needRiskLessCon_[cnt]) {
427 Ptr<Constraint<Real>> con = makePtr<RiskLessConstraint<Real>>(it->second.constraint);
428 Ptr<Vector<Real>> mul = it->second.multiplier;
429 Ptr<Vector<Real>> res = it->second.residual;
430 Ptr<BoundConstraint<Real>> bnd = it->second.bounds;
432 if (ORIGINAL_con_.count(it->first) == size_t(0))
433 ORIGINAL_con_.insert({it->first,ConstraintData<Real>(it->second.constraint,mul,res,bnd)});
437 for (
auto it = riskless_con.begin(); it != riskless_con.end(); ++it) {
438 Ptr<Constraint<Real>> con = it->second.constraint;
439 Ptr<Vector<Real>> mul = it->second.multiplier;
440 Ptr<Vector<Real>> res = it->second.residual;
441 Ptr<BoundConstraint<Real>> bnd = it->second.bounds;
447 riskless_con.clear();
448 for (
auto it = INPUT_linear_con_.begin(); it != INPUT_linear_con_.end(); ++it) {
449 Ptr<Constraint<Real>> con = makePtr<RiskLessConstraint<Real>>(it->second.constraint);
450 Ptr<Vector<Real>> mul = it->second.multiplier;
451 Ptr<Vector<Real>> res = it->second.residual;
452 Ptr<BoundConstraint<Real>> bnd = it->second.bounds;
454 if (ORIGINAL_linear_con_.count(it->first) == size_t(0))
455 ORIGINAL_linear_con_.insert({it->first,ConstraintData<Real>(it->second.constraint,mul,res,bnd)});
457 for (
auto it = riskless_con.begin(); it != riskless_con.end(); ++it) {
458 Ptr<Constraint<Real>> con = it->second.constraint;
459 Ptr<Vector<Real>> mul = it->second.multiplier;
460 Ptr<Vector<Real>> res = it->second.residual;
461 Ptr<BoundConstraint<Real>> bnd = it->second.bounds;
472 template<
typename Real>
477 if (needRiskLessObj_ && ORIGINAL_obj_ != nullPtr) {
478 INPUT_obj_ = ORIGINAL_obj_;
479 ORIGINAL_obj_ = nullPtr;
481 if (ORIGINAL_xprim_ != nullPtr) INPUT_xprim_ = ORIGINAL_xprim_;
482 if (ORIGINAL_xdual_ != nullPtr) INPUT_xdual_ = ORIGINAL_xdual_;
483 if (ORIGINAL_bnd_ != nullPtr) INPUT_bnd_ = ORIGINAL_bnd_;
484 ORIGINAL_xprim_ = nullPtr;
485 ORIGINAL_xdual_ = nullPtr;
486 ORIGINAL_bnd_ = nullPtr;
489 std::unordered_map<std::string,ConstraintData<Real>> riskless_con;
490 for (
auto it = INPUT_con_.begin(); it != INPUT_con_.end(); ++it) {
491 if (needRiskLessCon_[cnt]) {
492 Ptr<Constraint<Real>> con = it->second.constraint;
493 Ptr<Vector<Real>> mul = it->second.multiplier;
494 Ptr<Vector<Real>> res = it->second.residual;
495 Ptr<BoundConstraint<Real>> bnd = it->second.bounds;
500 for (
auto it = riskless_con.begin(); it != riskless_con.end(); ++it) {
501 auto it2 = ORIGINAL_con_.find(it->first);
502 if (it2 != ORIGINAL_con_.end()) {
503 Ptr<Constraint<Real>> con = it2->second.constraint;
504 Ptr<Vector<Real>> mul = it2->second.multiplier;
505 Ptr<Vector<Real>> res = it2->second.residual;
506 Ptr<BoundConstraint<Real>> bnd = it2->second.bounds;
510 ORIGINAL_con_.erase(it2);
514 riskless_con.clear();
515 for (
auto it = INPUT_linear_con_.begin(); it != INPUT_linear_con_.end(); ++it) {
516 Ptr<Constraint<Real>> con = it->second.constraint;
517 Ptr<Vector<Real>> mul = it->second.multiplier;
518 Ptr<Vector<Real>> res = it->second.residual;
519 Ptr<BoundConstraint<Real>> bnd = it->second.bounds;
522 for (
auto it = riskless_con.begin(); it != riskless_con.end(); ++it) {
523 auto it2 = ORIGINAL_linear_con_.find(it->first);
524 if (it2 != ORIGINAL_linear_con_.end()) {
525 Ptr<Constraint<Real>> con = it2->second.constraint;
526 Ptr<Vector<Real>> mul = it2->second.multiplier;
527 Ptr<Vector<Real>> res = it2->second.residual;
528 Ptr<BoundConstraint<Real>> bnd = it2->second.bounds;
532 ORIGINAL_linear_con_.erase(it2);
537 needRiskLessCon_.clear();
543 #endif // ROL_STOCHASTICPROBLEM_DEF_HPP Provides the interface to evaluate objective functions.
void makeConstraintStochastic(std::string name, ParameterList &list, const Ptr< SampleGenerator< Real >> &sampler, const Ptr< BatchManager< Real >> &bman=nullPtr)
void addLinearConstraint(std::string name, const Ptr< Constraint< Real >> &linear_econ, const Ptr< Vector< Real >> &linear_emul, const Ptr< Vector< Real >> &linear_eres=nullPtr, bool reset=false)
Add a linear equality constraint.
void resetStochasticLinearConstraint(std::string name)
void removeLinearConstraint(std::string name)
Remove an existing linear constraint.
StochasticProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< Vector< Real >> &g=nullPtr)
Default constructor for StochasticProblem.
Defines the linear algebra or vector space interface.
virtual void finalize(bool lumpConstraints=false, bool printToStream=false, std::ostream &outStream=std::cout)
Tranform user-supplied constraints to consist of only bounds and equalities. Optimization problem can...
void resetStochasticObjective(void)
void addConstraint(std::string name, const Ptr< Constraint< Real >> &econ, const Ptr< Vector< Real >> &emul, const Ptr< Vector< Real >> &eres=nullPtr, bool reset=false)
Add an equality constraint.
void resetStochasticConstraint(std::string name)
void removeConstraint(std::string name)
Remove an existing constraint.
std::vector< Real > getObjectiveStatistic(void) const
void edit(void) override
Resume editting optimization problem after finalize has been called.
virtual void edit()
Resume editting optimization problem after finalize has been called.
void makeObjectiveStochastic(ParameterList &list, const Ptr< SampleGenerator< Real >> &fsampler, const Ptr< SampleGenerator< Real >> &gsampler=nullPtr, const Ptr< SampleGenerator< Real >> &hsampler=nullPtr)
void makeLinearConstraintStochastic(std::string name, ParameterList &list, const Ptr< SampleGenerator< Real >> &sampler, const Ptr< BatchManager< Real >> &bman=nullPtr)
void resetStochastic(void)
void finalize(bool lumpConstraints=false, bool printToStream=false, std::ostream &outStream=std::cout) override
Tranform user-supplied constraints to consist of only bounds and equalities. Optimization problem can...
std::vector< Real > getConstraintStatistic(std::string name) const
Real getSolutionStatistic(int comp=0, std::string name="") const