44#ifndef ROL_OPTIMIZATIONPROBLEM_HPP
45#define ROL_OPTIMIZATIONPROBLEM_HPP
121 Ptr<BoundConstraint<Real>>
bnd_;
145 int esize =
static_cast<int>(econ.size());
146 int isize =
static_cast<int>(icon.size());
147 std::vector<Ptr<Constraint<Real>>> cvec;
148 std::vector<Ptr<Vector<Real>>> lvec;
149 std::vector<Ptr<BoundConstraint<Real>>> bvec;
150 for (
int i = 0; i < esize; ++i) {
151 if ( econ[i] != nullPtr ) {
156 cvec.push_back(econ[i]);
158 lvec.push_back(emul[i]);
159 bvec.push_back(nullPtr);
162 for (
int i = 0; i < isize; ++i) {
163 if ( icon[i] != nullPtr ) {
168 cvec.push_back(icon[i]);
170 lvec.push_back(imul[i]);
171 bvec.push_back(ibnd[i]);
175 conManager_ = makePtr<ConstraintManager<Real>>(cvec,lvec,bvec,x,bnd);
180 Ptr<Objective<Real>> obj0;
188 obj_ = makePtr<SlacklessObjective<Real>>(obj0);
195 if(
bnd_ == nullPtr || !
bnd_->isActivated() ) {
203 if(
bnd_ == nullPtr || !
bnd_->isActivated() ) {
216 return makePtr<RiskLessConstraint<Real>>(con);
225 return makePtr<RiskLessObjective<Real>>(obj);
234 int dim = sampler->getMyPoint(0).size(), nsamp = sampler->numMySamples();
235 std::vector<Real> loc(
dim), mean(
dim), pt(
dim);
237 for (
int i = 0; i < nsamp; i++) {
238 pt = sampler->getMyPoint(i);
239 wt = sampler->getMyWeight(i);
240 for (
int j = 0; j <
dim; j++) {
244 sampler->sumAll(&loc[0],&mean[0],
dim);
273 Real statObj =
parlistObj_->sublist(
"SOL").get(
"Initial Statistic",1.0);
277 for (
int i = 0; i < nc; ++i) {
279 Real statCon =
parlistCon_[i]->sublist(
"SOL").get(
"Initial Statistic",1.0);
329 std::vector<Ptr<Constraint<Real>>> econ0(1,econ);
330 std::vector<Ptr<Vector<Real>>> emul0(1,emul);
350 std::vector<Ptr<Constraint<Real>>> icon0(1,icon);
351 std::vector<Ptr<Vector<Real>>> imul0(1,imul);
352 std::vector<Ptr<BoundConstraint<Real>>> ibnd0(1,ibnd);
372 std::vector<Ptr<Constraint<Real>>> econ0(1,econ);
373 std::vector<Ptr<Vector<Real>>> emul0(1,emul);
374 std::vector<Ptr<Constraint<Real>>> icon0(1,icon);
375 std::vector<Ptr<Vector<Real>>> imul0(1,imul);
376 std::vector<Ptr<BoundConstraint<Real>>> ibnd0(1,ibnd);
568 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setMeanValueObjective: Objective function value sampler is null!");
597 const bool storage =
true) {
603 if ( gsampler == nullPtr ) {
606 if ( hsampler == nullPtr ) {
611 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setRiskNeutralObjective: Objective function value sampler is null!");
636 void setRiskAverseObjective(ParameterList &parlist,
645 if ( gsampler == nullPtr ) {
648 if ( hsampler == nullPtr ) {
653 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setRiskAverseObjective: Objective function value sampler is null!");
668 void setStochasticObjective(ParameterList &parlist,
669 const Ptr<SampleGenerator<Real>> &vsampler,
670 const Ptr<SampleGenerator<Real>> &gsampler = nullPtr,
671 const Ptr<SampleGenerator<Real>> &hsampler = nullPtr) {
673 std::string type = parlist.sublist(
"SOL").get(
"Type",
"Risk Neutral");
674 if ( type ==
"Risk Neutral" ) {
675 bool storage = parlist.sublist(
"SOL").get(
"Store Sampled Value and Gradient",
true);
678 else if ( type ==
"Risk Averse" ||
679 type ==
"Deviation" ||
682 type ==
"Probability" ) {
683 setRiskAverseObjective(parlist,vsampler,gsampler,hsampler);
685 else if ( type ==
"Mean Value" ) {
689 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setStochasticObjective: Invalid stochastic optimization type!");
702 if (
INPUT_econ_[index] != nullPtr && sampler != nullPtr ) {
709 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setMeanValueEquality: Either SampleGenerator or Constraint is NULL!");
720 const int index = 0) {
725 && xsampler != nullPtr
726 && cbman != nullPtr ) {
728 = makePtr<RiskNeutralConstraint<Real>>(
INPUT_econ_[index],xsampler,cbman);
732 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetRiskNeutralEquality: Either SampleGenerator, Constraint or BatchManager is NULL!");
742 const int index = 0) {
745 if (
INPUT_econ_[index] != nullPtr && sampler != nullPtr ) {
746 int nsamp = sampler->numMySamples();
748 = makePtr<AlmostSureConstraint<Real>>(sampler,
INPUT_econ_[index]);
749 std::vector<Ptr<Vector<Real>>> emul(nsamp,nullPtr);
750 for (
int j = 0; j < nsamp; ++j) {
755 = makePtr<DualSimulatedVector<Real>>(emul, sampler->getBatchManager(), sampler);
758 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetAlmostSureEquality: Either SampleGenerator or Constraint is NULL!");
773 if ( nc !=
static_cast<int>(xsampler.size()) || nc !=
static_cast<int>(cbman.size()) ) {
774 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setStochasticEquality: Constraint vector and SampleGenerator vector are not the same size!");
776 for (
int i = 0; i < nc; ++i) {
777 if (xsampler[i] != nullPtr) {
778 std::string type = parlist[i].sublist(
"SOL").get(
"Type",
"Risk Neutral");
779 if ( type ==
"Risk Neutral" ) {
782 else if ( type ==
"Almost Sure" ) {
785 else if ( type ==
"Mean Value" ) {
789 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetStochasticEquality: Invalid stochastic constraint type!");
807 std::vector<ParameterList> cparlist(1,parlist);
808 std::vector<Ptr<SampleGenerator<Real>>> cxsampler(1,xsampler);
809 std::vector<Ptr<BatchManager<Real>>> ccbman(1,cbman);
815 const int index = 0) {
818 if (
INPUT_icon_[index] != nullPtr && sampler != nullPtr ) {
826 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetMeanValueInequality: Either Constraint or SampleGenerator is NULL!");
837 const int index = 0) {
842 && xsampler != nullPtr
843 && cbman != nullPtr ) {
845 = makePtr<RiskNeutralConstraint<Real>>(
INPUT_icon_[index],xsampler,cbman);
850 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetRiskNeutralInequality: Either Constraint, SampleGenerator or BatchManager is NULL!");
861 const int index = 0) {
864 if (
INPUT_icon_[index] != nullPtr && sampler != nullPtr ) {
868 = makePtr<StochasticConstraint<Real>>(
INPUT_icon_[index],sampler,parlist,index);
873 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetRiskAverseInequality: Either Constraint or SampleGenerator is NULL!");
883 const int index = 0) {
886 if (
INPUT_icon_[index] != nullPtr && sampler != nullPtr ) {
887 int nsamp = sampler->numMySamples();
889 = makePtr<AlmostSureConstraint<Real>>(sampler,
INPUT_icon_[index]);
890 std::vector<Ptr<Vector<Real>>> imul(nsamp,nullPtr);
891 for (
int j = 0; j < nsamp; ++j) {
896 = makePtr<DualSimulatedVector<Real>>(imul, sampler->getBatchManager(), sampler);
898 = makePtr<SimulatedBoundConstraint<Real>>(sampler,
INPUT_ibnd_[index]);
901 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetAlmostSureInequality: Either Constraint or SampleGenerator is NULL!");
915 if ( nc !=
static_cast<int>(xsampler.size()) || nc !=
static_cast<int>(cbman.size()) ) {
916 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::setStochasticInequality: Constraint vector and SampleGenerator vector are not the same size!");
918 for (
int i = 0; i < nc; ++i) {
919 if ( xsampler[i] != nullPtr ) {
920 std::string type = parlist[i].sublist(
"SOL").get(
"Type",
"Risk Neutral");
921 if ( type ==
"Risk Neutral" ) {
924 else if ( type ==
"Risk Averse" ||
925 type ==
"Deviation" ||
928 type ==
"Probability" ) {
931 else if ( type ==
"Almost Sure" ) {
934 else if ( type ==
"Mean Value" ) {
938 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::SetStochasticInequality: Invalid stochastic constraint type!");
957 std::vector<ParameterList> cparlist(1,parlist);
958 std::vector<Ptr<SampleGenerator<Real>>> cxsampler(1,xsampler);
959 std::vector<Ptr<BatchManager<Real>>> ccbman(1,cbman);
974 catch (std::exception &e) {
975 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::getSolutionStatistic: Objective does not have computeStatistic function!");
978 else if (comp == 1) {
980 if (np <= index || index < 0) {
986 catch (std::exception &e) {
987 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::getSolutionStatistic: Constraint does not have computeStatistic function!");
998 Ptr<std::vector<Real>> stat
1000 if (stat != nullPtr) {
1004 std::vector<Real> empty;
1008 catch (std::exception &e) {
1009 std::vector<Real> empty;
1016 Ptr<std::vector<Real>> stat
1018 if (stat != nullPtr) {
1022 std::vector<Real> empty;
1026 catch (std::exception &e) {
1027 std::vector<Real> empty;
1043 std::ostream &outStream = std::cout ) {
1053 std::ostream &outStream = std::cout ) {
1057 if (
obj_ != nullPtr) {
1058 outStream <<
"\nPerforming OptimizationProblem diagnostics." << std::endl << std::endl;
1060 outStream <<
"Checking vector operations in optimization vector space X." << std::endl;
1068 std::ostream &outStream = std::cout,
1070 const int order = 1 ) {
1079 std::ostream &outStream = std::cout,
1081 const int order = 1 ) {
1085 if (
obj_ != nullPtr) {
1086 outStream << std::endl <<
"Performing OptimizationProblem diagnostics."
1087 << std::endl << std::endl;
1088 outStream <<
"Checking objective function." << std::endl;
1090 outStream << std::endl;
1092 outStream << std::endl;
1094 outStream << std::endl;
1101 std::ostream &outStream = std::cout ) {
1110 std::ostream &outStream = std::cout ) {
1114 if(
con_ != nullPtr) {
1115 outStream <<
"\nPerforming OptimizationProblem diagnostics." << std::endl << std::endl;
1117 outStream <<
"Checking vector operations in constraint multiplier space C*." << std::endl;
1127 std::ostream &outStream = std::cout,
1129 const int order = 1 ) {
1140 std::ostream &outStream = std::cout,
1142 const int order = 1 ) {
1146 if(
con_ != nullPtr) {
1147 outStream <<
"\nPerforming OptimizationProblem diagnostics." << std::endl << std::endl;
1149 outStream <<
"Checking equality constraint." << std::endl;
1151 outStream << std::endl;
1153 outStream << std::endl;
1155 outStream << std::endl;
1160 void check( std::ostream &outStream = std::cout,
1162 const int order = 1 ) {
1164 check(data,outStream,numSteps,order);
1168 std::ostream &outStream = std::cout,
1170 const int order = 1 ) {
1175 Ptr<Vector<Real>> x, y, u, v;
1177 x =
sol_->clone(); x->randomize();
1178 y =
sol_->clone(); y->randomize();
1179 u =
sol_->clone(); u->randomize();
1180 v =
sol_->clone(); v->randomize();
1185 catch (std::exception &e) {
1189 if(
con_ != nullPtr) {
1190 Ptr<Vector<Real>> c, l, w, q;
1192 c =
mul_->dual().clone(); c->randomize();
1193 l =
mul_->clone(); l->randomize();
1194 w =
mul_->clone(); w->randomize();
1195 q =
mul_->clone(); q->randomize();
1200 catch (std::exception &e) {
1201 throw Exception::NotImplemented(
">>> ROL::OptimizationProblem::check: Elementwise is not implemented for constraint space vectors");
1209template<
template<
typename>
class V,
1210 template<
typename>
class Obj,
1211 typename Real,
typename P=Ptr<OptimizationProblem<Real>>,
typename...Args>
1212inline typename std::enable_if<std::is_base_of<Objective<Real>,
Obj<Real>>
::value &&
1215 return makePtr<OptimizationProblem<Real>>(obj,x,std::forward<Args>(args)...);
#define ROL_NUM_CHECKDERIV_STEPS
Objective_TimeSimOpt< Real > Obj
virtual Real value(const Vector< Real > &u_old, const Vector< Real > &u_new, const Vector< Real > &z, Real &tol)
Compute contribution to objective value from this time step.
virtual Real computeStatistic(const Ptr< const std::vector< Real > > &xstat) const
Compute statistic.
Provides the interface to apply upper and lower bound constraints.
Defines the general constraint operator interface.
Provides the interface to evaluate objective functions.
void setStochasticEquality(ParameterList &parlist, const Ptr< SampleGenerator< Real > > &xsampler, const Ptr< BatchManager< Real > > &cbman)
void check(OptimizationProblemCheckData< Real > &data, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
void setStochasticEquality(std::vector< ParameterList > &parlist, const std::vector< Ptr< SampleGenerator< Real > > > &xsampler, const std::vector< Ptr< BatchManager< Real > > > &cbman)
void initStochastic(void)
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)
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)
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)
Ptr< Objective< Real > > INTERMEDIATE_obj_
Ptr< Vector< Real > > INTERMEDIATE_sol_
void setRiskAverseInequality(ParameterList &parlist, const Ptr< SampleGenerator< Real > > &sampler, const int index=0)
OptimizationProblem(const Ptr< Objective< Real > > &obj, const Ptr< Vector< Real > > &x, const Ptr< Constraint< Real > > &econ, const Ptr< Vector< Real > > &emul)
Ptr< Constraint< Real > > con_
std::vector< Real > computeSampleMean(const Ptr< SampleGenerator< Real > > &sampler) const
const Ptr< Objective< Real > > setRiskLessObj(const Ptr< Objective< Real > > &obj, const bool needRiskLess) const
void setMeanValueEquality(const Ptr< SampleGenerator< Real > > &sampler, const int index=0)
Set objective function to risk averse objective.
Ptr< BoundConstraint< Real > > INTERMEDIATE_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, 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 std::vector< Ptr< Constraint< Real > > > &icon, const std::vector< Ptr< Vector< Real > > > &imul, const std::vector< Ptr< BoundConstraint< Real > > > &ibnd)
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)
std::vector< Ptr< ParameterList > > parlistCon_
virtual Ptr< Vector< Real > > getMultiplierVector(void)
Ptr< ParameterList > parlistObj_
virtual ~OptimizationProblem(void)
std::vector< Ptr< Vector< Real > > > INTERMEDIATE_imul_
EProblem getProblemType(void)
OptimizationProblem(const Ptr< Objective< Real > > &obj, const Ptr< Vector< Real > > &x)
std::vector< Ptr< Constraint< Real > > > INTERMEDIATE_econ_
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)
void check(std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
std::vector< Ptr< Vector< Real > > > INPUT_emul_
std::vector< Ptr< SampleGenerator< Real > > > ixsampler_
std::vector< Ptr< SampleGenerator< Real > > > exsampler_
Ptr< Vector< Real > > mul_
void setMeanValueInequality(const Ptr< SampleGenerator< Real > > &sampler, const int index=0)
void setRiskNeutralEquality(const Ptr< SampleGenerator< Real > > &xsampler, const Ptr< BatchManager< Real > > &cbman, const int index=0)
Ptr< SampleGenerator< Real > > vsampler_
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)
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)
virtual Ptr< Vector< Real > > getSolutionVector(void)
void buildRiskBnd(Ptr< BoundConstraint< Real > > &bnd)
std::vector< bool > needRiskLessEcon_
const Ptr< Constraint< Real > > setRiskLessCon(const Ptr< Constraint< Real > > &con, const bool needRiskLess) const
virtual Ptr< BoundConstraint< Real > > getBoundConstraint(void)
std::vector< Ptr< Constraint< Real > > > INPUT_econ_
void buildRiskVec(Ptr< Vector< Real > > &x)
std::vector< Ptr< BoundConstraint< Real > > > INPUT_ibnd_
std::vector< Ptr< BatchManager< Real > > > ecbman_
void setAlmostSureEquality(const Ptr< SampleGenerator< Real > > &sampler, const int index=0)
void checkSolutionVector(Vector< Real > &x, Vector< Real > &y, Vector< Real > &u, std::ostream &outStream=std::cout)
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)
Ptr< SampleGenerator< Real > > gsampler_
void checkSolutionVector(OptimizationProblemCheckData< Real > &data, Vector< Real > &x, Vector< Real > &y, Vector< Real > &u, std::ostream &outStream=std::cout)
std::vector< Ptr< BatchManager< Real > > > icbman_
std::vector< Ptr< Vector< Real > > > INPUT_imul_
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)
Ptr< Vector< Real > > sol_
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< Constraint< Real > > > INPUT_icon_
Ptr< BoundConstraint< Real > > INPUT_bnd_
std::vector< Real > getObjectiveStatistic(void) const
Ptr< BoundConstraint< Real > > bnd_
Real getSolutionStatistic(int comp=0, int index=0)
Returns the statistic from the soluton vector.
std::vector< Ptr< Constraint< Real > > > INTERMEDIATE_icon_
void setStochasticInequality(ParameterList &parlist, const Ptr< SampleGenerator< Real > > &xsampler, const Ptr< BatchManager< Real > > &cbman)
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)
void setAlmostSureInequality(const Ptr< SampleGenerator< Real > > &sampler, const int index=0)
void setStochasticInequality(std::vector< ParameterList > &parlist, const std::vector< Ptr< SampleGenerator< Real > > > &xsampler, const std::vector< Ptr< BatchManager< Real > > > &cbman)
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)
Ptr< SampleGenerator< Real > > hsampler_
std::vector< bool > needRiskLessIcon_
virtual Ptr< Constraint< Real > > getConstraint(void)
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)
void checkMultiplierVector(OptimizationProblemCheckData< Real > &data, Vector< Real > &w, Vector< Real > &q, Vector< Real > &l, std::ostream &outStream=std::cout)
Ptr< Vector< Real > > INPUT_sol_
Ptr< Objective< Real > > INPUT_obj_
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)
virtual Ptr< Objective< Real > > getObjective(void)
Ptr< Objective< Real > > obj_
void setMeanValueObjective(const Ptr< SampleGenerator< Real > > &sampler)
Set objective function to mean value objective.
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)
void checkMultiplierVector(Vector< Real > &w, Vector< Real > &q, Vector< Real > &l, std::ostream &outStream=std::cout)
std::vector< Ptr< BoundConstraint< Real > > > INTERMEDIATE_ibnd_
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 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(void)
Ptr< ConstraintManager< Real > > conManager_
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.
void setRiskNeutralInequality(const Ptr< SampleGenerator< Real > > &xsampler, const Ptr< BatchManager< Real > > &cbman, const int index=0)
std::vector< Ptr< Vector< Real > > > INTERMEDIATE_emul_
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)
OptimizationProblem(const Ptr< Objective< Real > > &obj, const Ptr< Vector< Real > > &x, const Ptr< BoundConstraint< Real > > &bnd)
std::vector< Real > getConstraintStatistic(const int index=0) const
Defines the linear algebra or vector space interface.
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::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)
std::vector< std::vector< Real > > checkApplyAdjointJacobian
std::vector< Real > checkMultiplierVector
std::vector< std::vector< Real > > checkApplyAdjointHessian
std::vector< std::vector< Real > > checkHessVec
std::vector< std::vector< Real > > checkApplyJacobian
std::vector< Real > checkHessSym
Real checkAdjointConsistencyJacobian
std::vector< std::vector< Real > > checkGradient
std::vector< Real > checkSolutionVector