10 #ifndef ROL_OPTIMIZATIONPROBLEM_HPP
11 #define ROL_OPTIMIZATIONPROBLEM_HPP
78 std::vector<Ptr<BatchManager<Real>>>
ecbman_;
80 std::vector<Ptr<BatchManager<Real>>>
icbman_;
87 Ptr<BoundConstraint<Real>>
bnd_;
88 Ptr<Constraint<Real>>
con_;
111 int esize =
static_cast<int>(econ.size());
112 int isize =
static_cast<int>(icon.size());
113 std::vector<Ptr<Constraint<Real>>> cvec;
114 std::vector<Ptr<Vector<Real>>> lvec;
115 std::vector<Ptr<BoundConstraint<Real>>> bvec;
116 for (
int i = 0; i < esize; ++i) {
117 if ( econ[i] != nullPtr ) {
122 cvec.push_back(econ[i]);
124 lvec.push_back(emul[i]);
125 bvec.push_back(nullPtr);
128 for (
int i = 0; i < isize; ++i) {
129 if ( icon[i] != nullPtr ) {
134 cvec.push_back(icon[i]);
136 lvec.push_back(imul[i]);
137 bvec.push_back(ibnd[i]);
141 conManager_ = makePtr<ConstraintManager<Real>>(cvec,lvec,bvec,x,bnd);
146 Ptr<Objective<Real>> obj0;
154 obj_ = makePtr<SlacklessObjective<Real>>(obj0);
161 if(
bnd_ == nullPtr || !
bnd_->isActivated() ) {
169 if(
bnd_ == nullPtr || !
bnd_->isActivated() ) {
182 return makePtr<RiskLessConstraint<Real>>(con);
191 return makePtr<RiskLessObjective<Real>>(obj);
200 int dim = sampler->getMyPoint(0).size(), nsamp = sampler->numMySamples();
201 std::vector<Real> loc(dim), mean(dim), pt(dim);
203 for (
int i = 0; i < nsamp; i++) {
204 pt = sampler->getMyPoint(i);
205 wt = sampler->getMyWeight(i);
206 for (
int j = 0; j <
dim; j++) {
210 sampler->sumAll(&loc[0],&mean[0],dim);
238 if (parlistObj_ != nullPtr) {
239 Real statObj = parlistObj_->sublist(
"SOL").get(
"Initial Statistic",1.0);
243 for (
int i = 0; i < nc; ++i) {
244 if (parlistCon_[i] != nullPtr) {
245 Real statCon = parlistCon_[i]->sublist(
"SOL").get(
"Initial Statistic",1.0);
295 std::vector<Ptr<Constraint<Real>>> econ0(1,econ);
296 std::vector<Ptr<Vector<Real>>> emul0(1,emul);
316 std::vector<Ptr<Constraint<Real>>> icon0(1,icon);
317 std::vector<Ptr<Vector<Real>>> imul0(1,imul);
318 std::vector<Ptr<BoundConstraint<Real>>> ibnd0(1,ibnd);
338 std::vector<Ptr<Constraint<Real>>> econ0(1,econ);
339 std::vector<Ptr<Vector<Real>>> emul0(1,emul);
340 std::vector<Ptr<Constraint<Real>>> icon0(1,icon);
341 std::vector<Ptr<Vector<Real>>> imul0(1,imul);
342 std::vector<Ptr<BoundConstraint<Real>>> ibnd0(1,ibnd);
534 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setMeanValueObjective: Objective function value sampler is null!");
563 const bool storage =
true) {
569 if ( gsampler == nullPtr ) {
572 if ( hsampler == nullPtr ) {
577 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setRiskNeutralObjective: Objective function value sampler is null!");
611 if ( gsampler == nullPtr ) {
614 if ( hsampler == nullPtr ) {
619 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setRiskAverseObjective: Objective function value sampler is null!");
639 std::string type = parlist.sublist(
"SOL").get(
"Type",
"Risk Neutral");
640 if ( type ==
"Risk Neutral" ) {
641 bool storage = parlist.sublist(
"SOL").get(
"Store Sampled Value and Gradient",
true);
644 else if ( type ==
"Risk Averse" ||
645 type ==
"Deviation" ||
648 type ==
"Probability" ) {
651 else if ( type ==
"Mean Value" ) {
655 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setStochasticObjective: Invalid stochastic optimization type!");
668 if (
INPUT_econ_[index] != nullPtr && sampler != nullPtr ) {
675 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setMeanValueEquality: Either SampleGenerator or Constraint is NULL!");
686 const int index = 0) {
691 && xsampler != nullPtr
692 && cbman != nullPtr ) {
694 = makePtr<RiskNeutralConstraint<Real>>(
INPUT_econ_[index],xsampler,cbman);
698 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetRiskNeutralEquality: Either SampleGenerator, Constraint or BatchManager is NULL!");
708 const int index = 0) {
711 if (
INPUT_econ_[index] != nullPtr && sampler != nullPtr ) {
712 int nsamp = sampler->numMySamples();
714 = makePtr<AlmostSureConstraint<Real>>(sampler,
INPUT_econ_[index]);
715 std::vector<Ptr<Vector<Real>>> emul(nsamp,nullPtr);
716 for (
int j = 0; j < nsamp; ++j) {
721 = makePtr<DualSimulatedVector<Real>>(emul, sampler->getBatchManager(), sampler);
724 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetAlmostSureEquality: Either SampleGenerator or Constraint is NULL!");
739 if ( nc != static_cast<int>(xsampler.size()) || nc != static_cast<int>(cbman.size()) ) {
740 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setStochasticEquality: Constraint vector and SampleGenerator vector are not the same size!");
742 for (
int i = 0; i < nc; ++i) {
743 if (xsampler[i] != nullPtr) {
744 std::string type = parlist[i].sublist(
"SOL").get(
"Type",
"Risk Neutral");
745 if ( type ==
"Risk Neutral" ) {
748 else if ( type ==
"Almost Sure" ) {
751 else if ( type ==
"Mean Value" ) {
755 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetStochasticEquality: Invalid stochastic constraint type!");
773 std::vector<ParameterList> cparlist(1,parlist);
774 std::vector<Ptr<SampleGenerator<Real>>> cxsampler(1,xsampler);
775 std::vector<Ptr<BatchManager<Real>>> ccbman(1,cbman);
781 const int index = 0) {
784 if (
INPUT_icon_[index] != nullPtr && sampler != nullPtr ) {
792 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetMeanValueInequality: Either Constraint or SampleGenerator is NULL!");
803 const int index = 0) {
808 && xsampler != nullPtr
809 && cbman != nullPtr ) {
811 = makePtr<RiskNeutralConstraint<Real>>(
INPUT_icon_[index],xsampler,cbman);
816 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetRiskNeutralInequality: Either Constraint, SampleGenerator or BatchManager is NULL!");
827 const int index = 0) {
830 if (
INPUT_icon_[index] != nullPtr && sampler != nullPtr ) {
834 = makePtr<StochasticConstraint<Real>>(
INPUT_icon_[index],sampler,parlist,index);
839 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetRiskAverseInequality: Either Constraint or SampleGenerator is NULL!");
849 const int index = 0) {
852 if (
INPUT_icon_[index] != nullPtr && sampler != nullPtr ) {
853 int nsamp = sampler->numMySamples();
855 = makePtr<AlmostSureConstraint<Real>>(sampler,
INPUT_icon_[index]);
856 std::vector<Ptr<Vector<Real>>> imul(nsamp,nullPtr);
857 for (
int j = 0; j < nsamp; ++j) {
862 = makePtr<DualSimulatedVector<Real>>(imul, sampler->getBatchManager(), sampler);
864 = makePtr<SimulatedBoundConstraint<Real>>(sampler,
INPUT_ibnd_[index]);
867 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetAlmostSureInequality: Either Constraint or SampleGenerator is NULL!");
881 if ( nc != static_cast<int>(xsampler.size()) || nc != static_cast<int>(cbman.size()) ) {
882 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setStochasticInequality: Constraint vector and SampleGenerator vector are not the same size!");
884 for (
int i = 0; i < nc; ++i) {
885 if ( xsampler[i] != nullPtr ) {
886 std::string type = parlist[i].sublist(
"SOL").get(
"Type",
"Risk Neutral");
887 if ( type ==
"Risk Neutral" ) {
890 else if ( type ==
"Risk Averse" ||
891 type ==
"Deviation" ||
894 type ==
"Probability" ) {
897 else if ( type ==
"Almost Sure" ) {
900 else if ( type ==
"Mean Value" ) {
904 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetStochasticInequality: Invalid stochastic constraint type!");
923 std::vector<ParameterList> cparlist(1,parlist);
924 std::vector<Ptr<SampleGenerator<Real>>> cxsampler(1,xsampler);
925 std::vector<Ptr<BatchManager<Real>>> ccbman(1,cbman);
940 catch (std::exception &e) {
941 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::getSolutionStatistic: Objective does not have computeStatistic function!");
944 else if (comp == 1) {
946 if (np <= index || index < 0) {
952 catch (std::exception &e) {
953 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::getSolutionStatistic: Constraint does not have computeStatistic function!");
964 Ptr<std::vector<Real>> stat
966 if (stat != nullPtr) {
970 std::vector<Real> empty;
974 catch (std::exception &e) {
975 std::vector<Real> empty;
982 Ptr<std::vector<Real>> stat
984 if (stat != nullPtr) {
988 std::vector<Real> empty;
992 catch (std::exception &e) {
993 std::vector<Real> empty;
1009 std::ostream &outStream = std::cout ) {
1019 std::ostream &outStream = std::cout ) {
1023 if (
obj_ != nullPtr) {
1024 outStream <<
"\nPerforming OptimizationProblem diagnostics." << std::endl << std::endl;
1026 outStream <<
"Checking vector operations in optimization vector space X." << std::endl;
1034 std::ostream &outStream = std::cout,
1036 const int order = 1 ) {
1045 std::ostream &outStream = std::cout,
1047 const int order = 1 ) {
1051 if (
obj_ != nullPtr) {
1052 outStream << std::endl <<
"Performing OptimizationProblem diagnostics."
1053 << std::endl << std::endl;
1054 outStream <<
"Checking objective function." << std::endl;
1056 outStream << std::endl;
1058 outStream << std::endl;
1060 outStream << std::endl;
1067 std::ostream &outStream = std::cout ) {
1076 std::ostream &outStream = std::cout ) {
1080 if(
con_ != nullPtr) {
1081 outStream <<
"\nPerforming OptimizationProblem diagnostics." << std::endl << std::endl;
1083 outStream <<
"Checking vector operations in constraint multiplier space C*." << std::endl;
1093 std::ostream &outStream = std::cout,
1095 const int order = 1 ) {
1106 std::ostream &outStream = std::cout,
1108 const int order = 1 ) {
1112 if(
con_ != nullPtr) {
1113 outStream <<
"\nPerforming OptimizationProblem diagnostics." << std::endl << std::endl;
1115 outStream <<
"Checking equality constraint." << std::endl;
1117 outStream << std::endl;
1119 outStream << std::endl;
1121 outStream << std::endl;
1126 void check( std::ostream &outStream = std::cout,
1128 const int order = 1 ) {
1130 check(data,outStream,numSteps,order);
1134 std::ostream &outStream = std::cout,
1136 const int order = 1 ) {
1141 Ptr<Vector<Real>> x, y, u, v;
1143 x =
sol_->clone(); x->randomize();
1144 y =
sol_->clone(); y->randomize();
1145 u =
sol_->clone(); u->randomize();
1146 v =
sol_->clone(); v->randomize();
1151 catch (std::exception &e) {
1155 if(
con_ != nullPtr) {
1156 Ptr<Vector<Real>> c, l, w, q;
1158 c =
mul_->dual().clone(); c->randomize();
1159 l =
mul_->clone(); l->randomize();
1160 w =
mul_->clone(); w->randomize();
1161 q =
mul_->clone(); q->randomize();
1166 catch (std::exception &e) {
1167 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::check: Elementwise is not implemented for constraint space vectors");
1175 template<
template<
typename>
class V,
1176 template<
typename>
class Obj,
1177 typename Real,
typename P=Ptr<OptimizationProblem<Real>>,
typename...Args>
1178 inline typename std::enable_if<std::is_base_of<Objective<Real>,
Obj<Real>>
::value &&
1181 return makePtr<OptimizationProblem<Real>>(obj,x,std::forward<Args>(args)...);
1186 #endif // ROL_OPTIMIZATIONPROBLEM_HPP
Ptr< Vector< Real > > INTERMEDIATE_sol_
std::vector< Real > checkSolutionVector
Provides the interface to evaluate objective functions.
void setRiskNeutralObjective(const Ptr< SampleGenerator< Real >> &vsampler, const Ptr< SampleGenerator< Real >> &gsampler=nullPtr, const Ptr< SampleGenerator< Real >> &hsampler=nullPtr, const bool storage=true)
Set objective function to risk neutral objective.
Ptr< Constraint< Real > > con_
void checkConstraint(OptimizationProblemCheckData< Real > &data, Vector< Real > &x, Vector< Real > &u, Vector< Real > &v, Vector< Real > &c, Vector< Real > &l, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
std::vector< Ptr< Vector< Real > > > INTERMEDIATE_imul_
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< BoundConstraint< Real >> &bnd)
void checkObjective(Vector< Real > &x, Vector< Real > &u, Vector< Real > &v, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
std::vector< Ptr< BoundConstraint< Real > > > INPUT_ibnd_
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< Constraint< Real >> &econ, const Ptr< Vector< Real >> &emul, const Ptr< Constraint< Real >> &icon, const Ptr< Vector< Real >> &imul, const Ptr< BoundConstraint< Real >> &ibnd)
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x)
void setRiskNeutralEquality(const Ptr< SampleGenerator< Real >> &xsampler, const Ptr< BatchManager< Real >> &cbman, const int index=0)
Ptr< SampleGenerator< Real > > hsampler_
void checkSolutionVector(OptimizationProblemCheckData< Real > &data, Vector< Real > &x, Vector< Real > &y, Vector< Real > &u, std::ostream &outStream=std::cout)
std::vector< Ptr< Constraint< Real > > > INTERMEDIATE_econ_
void checkMultiplierVector(Vector< Real > &w, Vector< Real > &q, Vector< Real > &l, std::ostream &outStream=std::cout)
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const std::vector< Ptr< Constraint< Real >>> &econ, const std::vector< Ptr< Vector< Real >>> &emul, const Ptr< Constraint< Real >> &icon, const Ptr< Vector< Real >> &imul, const Ptr< BoundConstraint< Real >> &ibnd)
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< BoundConstraint< Real >> &bnd, const std::vector< Ptr< Constraint< Real >>> &econ, const std::vector< Ptr< Vector< Real >>> &emul, const Ptr< Constraint< Real >> &icon, const Ptr< Vector< Real >> &imul, const Ptr< BoundConstraint< Real >> &ibnd)
void initStochastic(void)
void setRiskNeutralInequality(const Ptr< SampleGenerator< Real >> &xsampler, const Ptr< BatchManager< Real >> &cbman, const int index=0)
std::vector< Ptr< SampleGenerator< Real > > > ixsampler_
virtual Ptr< Objective< Real > > getObjective(void)
void setMeanValueInequality(const Ptr< SampleGenerator< Real >> &sampler, const int index=0)
ROL::Objective_SimOpt value
virtual Ptr< BoundConstraint< Real > > getBoundConstraint(void)
void setStochasticInequality(std::vector< ParameterList > &parlist, const std::vector< Ptr< SampleGenerator< Real >>> &xsampler, const std::vector< Ptr< BatchManager< Real >>> &cbman)
void setStochasticObjective(ParameterList &parlist, const Ptr< SampleGenerator< Real >> &vsampler, const Ptr< SampleGenerator< Real >> &gsampler=nullPtr, const Ptr< SampleGenerator< Real >> &hsampler=nullPtr)
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< BoundConstraint< Real >> &bnd, const std::vector< Ptr< Constraint< Real >>> &econ, const std::vector< Ptr< Vector< Real >>> &emul, const std::vector< Ptr< Constraint< Real >>> &icon, const std::vector< Ptr< Vector< Real >>> &imul, const std::vector< Ptr< BoundConstraint< Real >>> &ibnd)
OptimizationProblem(void)
void setAlmostSureEquality(const Ptr< SampleGenerator< Real >> &sampler, const int index=0)
void setStochasticEquality(std::vector< ParameterList > &parlist, const std::vector< Ptr< SampleGenerator< Real >>> &xsampler, const std::vector< Ptr< BatchManager< Real >>> &cbman)
std::enable_if< std::is_base_of< Objective< Real >, Obj< Real > >::value &&std::is_base_of< Vector< Real >, V< Real > >::value, P >::type make_OptimizationProblem(const Ptr< Obj< Real >> &obj, const Ptr< V< Real >> &x, Args &&...args)
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< Constraint< Real >> &econ, const Ptr< Vector< Real >> &emul, const std::vector< Ptr< Constraint< Real >>> &icon, const std::vector< Ptr< Vector< Real >>> &imul, const std::vector< Ptr< BoundConstraint< Real >>> &ibnd)
virtual std::vector< Real > checkVector(const Vector< Real > &x, const Vector< Real > &y, const bool printToStream=true, std::ostream &outStream=std::cout) const
Verify vector-space methods.
std::vector< Ptr< Vector< Real > > > INTERMEDIATE_emul_
std::vector< Ptr< ParameterList > > parlistCon_
void checkObjective(OptimizationProblemCheckData< Real > &data, Vector< Real > &x, Vector< Real > &u, Vector< Real > &v, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
std::vector< Ptr< BoundConstraint< Real > > > INTERMEDIATE_ibnd_
Objective_TimeSimOpt< Real > Obj
Defines the linear algebra or vector space interface.
std::vector< Ptr< SampleGenerator< Real > > > exsampler_
Ptr< Vector< Real > > INPUT_sol_
Ptr< BoundConstraint< Real > > INPUT_bnd_
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< BoundConstraint< Real >> &bnd, const std::vector< Ptr< Constraint< Real >>> &econ, const std::vector< Ptr< Vector< Real >>> &emul)
void setAlmostSureInequality(const Ptr< SampleGenerator< Real >> &sampler, const int index=0)
std::vector< Ptr< Constraint< Real > > > INTERMEDIATE_icon_
std::vector< Ptr< Constraint< Real > > > INPUT_econ_
Real checkAdjointConsistencyJacobian
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< BoundConstraint< Real >> &bnd, const Ptr< Constraint< Real >> &econ, const Ptr< Vector< Real >> &emul)
std::vector< bool > needRiskLessEcon_
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< BoundConstraint< Real >> &bnd, const std::vector< Ptr< Constraint< Real >>> &icon, const std::vector< Ptr< Vector< Real >>> &imul, const std::vector< Ptr< BoundConstraint< Real >>> &ibnd)
void setMeanValueObjective(const Ptr< SampleGenerator< Real >> &sampler)
Set objective function to mean value objective.
Ptr< Objective< Real > > INPUT_obj_
Real getSolutionStatistic(int comp=0, int index=0)
Returns the statistic from the soluton vector.
void initialize(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< BoundConstraint< Real >> &bnd, const std::vector< Ptr< Constraint< Real >>> &econ, const std::vector< Ptr< Vector< Real >>> &emul, const std::vector< Ptr< Constraint< Real >>> &icon, const std::vector< Ptr< Vector< Real >>> &imul, const std::vector< Ptr< BoundConstraint< Real >>> &ibnd)
virtual Ptr< Vector< Real > > getSolutionVector(void)
void buildRiskBnd(Ptr< BoundConstraint< Real >> &bnd)
Ptr< Vector< Real > > sol_
Ptr< ConstraintManager< Real > > conManager_
void setMeanValueEquality(const Ptr< SampleGenerator< Real >> &sampler, const int index=0)
Ptr< SampleGenerator< Real > > vsampler_
virtual ~OptimizationProblem(void)
void setRiskAverseObjective(ParameterList &parlist, const Ptr< SampleGenerator< Real >> &vsampler, const Ptr< SampleGenerator< Real >> &gsampler=nullPtr, const Ptr< SampleGenerator< Real >> &hsampler=nullPtr)
Set objective function to risk averse objective.
std::vector< std::vector< Real > > checkApplyAdjointJacobian
void check(OptimizationProblemCheckData< Real > &data, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
void checkConstraint(Vector< Real > &x, Vector< Real > &u, Vector< Real > &v, Vector< Real > &c, Vector< Real > &l, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const std::vector< Ptr< Constraint< Real >>> &icon, const std::vector< Ptr< Vector< Real >>> &imul, const std::vector< Ptr< BoundConstraint< Real >>> &ibnd)
Ptr< ParameterList > parlistObj_
std::vector< Real > checkHessSym
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< BoundConstraint< Real >> &bnd, const Ptr< Constraint< Real >> &econ, const Ptr< Vector< Real >> &emul, const std::vector< Ptr< Constraint< Real >>> &icon, const std::vector< Ptr< Vector< Real >>> &imul, const std::vector< Ptr< BoundConstraint< Real >>> &ibnd)
virtual Ptr< Vector< Real > > getMultiplierVector(void)
EProblem getProblemType(void)
void setStochasticInequality(ParameterList &parlist, const Ptr< SampleGenerator< Real >> &xsampler, const Ptr< BatchManager< Real >> &cbman)
std::vector< Real > getObjectiveStatistic(void) const
Provides the interface to apply upper and lower bound constraints.
Ptr< BoundConstraint< Real > > bnd_
#define ROL_NUM_CHECKDERIV_STEPS
Number of steps for derivative checks.
std::vector< Real > getConstraintStatistic(const int index=0) const
Ptr< Objective< Real > > obj_
std::vector< std::vector< Real > > checkApplyAdjointHessian
void setRiskAverseInequality(ParameterList &parlist, const Ptr< SampleGenerator< Real >> &sampler, const int index=0)
std::vector< Ptr< Vector< Real > > > INPUT_imul_
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< BoundConstraint< Real >> &bnd, const Ptr< Constraint< Real >> &econ, const Ptr< Vector< Real >> &emul, const Ptr< Constraint< Real >> &icon, const Ptr< Vector< Real >> &imul, const Ptr< BoundConstraint< Real >> &ibnd)
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< BoundConstraint< Real >> &bnd, const Ptr< Constraint< Real >> &icon, const Ptr< Vector< Real >> &imul, const Ptr< BoundConstraint< Real >> &ibnd)
Ptr< Vector< Real > > mul_
std::vector< std::vector< Real > > checkGradient
void buildRiskVec(Ptr< Vector< Real >> &x)
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const std::vector< Ptr< Constraint< Real >>> &econ, const std::vector< Ptr< Vector< Real >>> &emul, const std::vector< Ptr< Constraint< Real >>> &icon, const std::vector< Ptr< Vector< Real >>> &imul, const std::vector< Ptr< BoundConstraint< Real >>> &ibnd)
void checkSolutionVector(Vector< Real > &x, Vector< Real > &y, Vector< Real > &u, std::ostream &outStream=std::cout)
const Ptr< Constraint< Real > > setRiskLessCon(const Ptr< Constraint< Real >> &con, const bool needRiskLess) const
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const std::vector< Ptr< Constraint< Real >>> &econ, const std::vector< Ptr< Vector< Real >>> &emul)
std::vector< Real > checkMultiplierVector
Ptr< SampleGenerator< Real > > gsampler_
void check(std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
std::vector< std::vector< Real > > checkHessVec
void checkMultiplierVector(OptimizationProblemCheckData< Real > &data, Vector< Real > &w, Vector< Real > &q, Vector< Real > &l, std::ostream &outStream=std::cout)
std::vector< Ptr< BatchManager< Real > > > ecbman_
std::vector< std::vector< Real > > checkApplyJacobian
Ptr< Objective< Real > > INTERMEDIATE_obj_
void setStochasticEquality(ParameterList &parlist, const Ptr< SampleGenerator< Real >> &xsampler, const Ptr< BatchManager< Real >> &cbman)
std::vector< Ptr< Vector< Real > > > INPUT_emul_
std::vector< Real > computeSampleMean(const Ptr< SampleGenerator< Real >> &sampler) const
std::vector< Ptr< Constraint< Real > > > INPUT_icon_
Defines the general constraint operator interface.
const Ptr< Objective< Real > > setRiskLessObj(const Ptr< Objective< Real >> &obj, const bool needRiskLess) const
std::vector< bool > needRiskLessIcon_
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< Constraint< Real >> &icon, const Ptr< Vector< Real >> &imul, const Ptr< BoundConstraint< Real >> &ibnd)
Ptr< BoundConstraint< Real > > INTERMEDIATE_bnd_
virtual Ptr< Constraint< Real > > getConstraint(void)
std::vector< Ptr< BatchManager< Real > > > icbman_
OptimizationProblem(const Ptr< Objective< Real >> &obj, const Ptr< Vector< Real >> &x, const Ptr< Constraint< Real >> &econ, const Ptr< Vector< Real >> &emul)