00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef SearchWithStepSizeAndStepDirection_h
00035 #define SearchWithStepSizeAndStepDirection_h
00036
00037 #include <FindDesignPointAlgorithm.h>
00038 #include <StepSizeRule.h>
00039 #include <SearchDirection.h>
00040 #include <ProbabilityTransformation.h>
00041 #include <GFunEvaluator.h>
00042 #include <GradGEvaluator.h>
00043 #include <HessianApproximation.h>
00044 #include <ReliabilityConvergenceCheck.h>
00045 #include <Matrix.h>
00046 #include <Vector.h>
00047 #include <ReliabilityDomain.h>
00048
00049 #include <fstream>
00050 using std::ofstream;
00051
00052 class SearchWithStepSizeAndStepDirection : public FindDesignPointAlgorithm
00053 {
00054
00055 public:
00056
00057
00058 SearchWithStepSizeAndStepDirection(
00059 int passedMaxNumberOfIterations,
00060 GFunEvaluator *passedGFunEvaluator,
00061 GradGEvaluator *passedGradGEvaluator,
00062 StepSizeRule *passedStepSizeRule,
00063 SearchDirection *passedSearchDirection,
00064 ProbabilityTransformation *passedProbabilityTransformation,
00065 HessianApproximation *theHessianApproximation,
00066 ReliabilityConvergenceCheck *theReliabilityConvergenceCheck,
00067 int printFlag,
00068 char *fileNamePrint,
00069 Vector *startPoint);
00070 ~SearchWithStepSizeAndStepDirection();
00071
00072 int findDesignPoint(ReliabilityDomain *theReliabilityDomain);
00073
00074 Vector get_x();
00075 Vector get_u();
00076 Vector get_alpha();
00077 Vector get_gamma();
00078 int getNumberOfSteps();
00079 Vector getSecondLast_u();
00080 Vector getSecondLast_alpha();
00081 Vector getLastSearchDirection();
00082 double getFirstGFunValue();
00083 double getLastGFunValue();
00084 Vector getGradientInStandardNormalSpace();
00085 int getNumberOfEvaluations();
00086
00087 protected:
00088
00089 private:
00090
00091
00092 ReliabilityDomain *theReliabilityDomain;
00093 GFunEvaluator *theGFunEvaluator;
00094 GradGEvaluator *theGradGEvaluator;
00095 StepSizeRule *theStepSizeRule;
00096 SearchDirection *theSearchDirection;
00097 ProbabilityTransformation *theProbabilityTransformation;
00098 HessianApproximation *theHessianApproximation;
00099 ReliabilityConvergenceCheck *theReliabilityConvergenceCheck;
00100
00101
00102 int doTheActualSearch(bool doRvProjection);
00103 int doRvProjection(Vector uOld, Vector uNew);
00104
00105
00106 int maxNumberOfIterations;
00107
00108
00109 Vector x;
00110 Vector u;
00111 Vector alpha;
00112 Vector gradientInStandardNormalSpace;
00113 Vector gamma;
00114 Vector uSecondLast;
00115 Vector alphaSecondLast;
00116 int i;
00117 Vector searchDirection;
00118 double Gfirst;
00119 double Glast;
00120
00121
00122 Vector *startPoint;
00123 Vector *designPoint_uStar;
00124
00125 int printFlag;
00126 char *fileNamePrint;
00127 int numberOfEvaluations;
00128 };
00129
00130 #endif