00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MSL_RRTDYN_H
00020 #define MSL_RRTDYN_H
00021
00022 #include "rrt.h"
00023
00024
00036 class RCRRT: public RRTGoalBias {
00037 public:
00039 int inputnum;
00040
00042 list<MSLVector> inputset;
00043
00046 bool issolutionexist;
00047
00049 MSLVector initexploreinfo;
00050
00052 double initcoltend;
00053
00054
00058 bool IsNodeExpanded(MSLNode* x, double& biasvalue,
00059 bool forward);
00060
00063 virtual bool IsInputApplied(const int& inputindex,
00064 const MSLVector& expolreinfo);
00065
00066
00068 virtual void BackWardBiasSet(MSLNode* n, MSLTree* t);
00069
00071 double BiasValue(int backstep);
00072
00073 RCRRT(Problem *problem);
00074 virtual ~RCRRT() {};
00075
00076 virtual MSLNode* SelectNode(const MSLVector& x, MSLTree* t,
00077 bool forward);
00078
00079 virtual bool Extend(const MSLVector& x, MSLTree* t,
00080 MSLNode*& nn,bool forward);
00081
00084 virtual MSLVector SelectInput(MSLNode* n1, const MSLVector& x2,
00085 MSLVector& nx_best, bool& success,
00086 bool forward);
00087
00088 virtual bool Connect(const MSLVector& x, MSLTree* t,
00089 MSLNode*& nn, bool forward);
00090
00091 virtual bool Plan();
00092 };
00093
00094
00096 class RCRRTDual: public RCRRT
00097 {
00098 protected:
00099 void RecoverSolution(MSLNode* n1, MSLNode* n2);
00100
00101 public:
00102
00103 RCRRTDual(Problem *p);
00104 virtual ~RCRRTDual() {};
00105
00106 virtual bool Plan();
00107 virtual bool GetConnected(MSLNode* n1, MSLNode* n2);
00108 };
00109
00110
00114 class RCRRTExtExt: public RCRRTDual
00115 {
00116 public:
00117 RCRRTExtExt(Problem *p);
00118 virtual ~RCRRTExtExt() {};
00119 virtual bool Plan();
00120 };
00121
00122
00125
00126 class RCRRTBall: public RCRRT
00127 {
00128 public:
00129
00131 double BallRadius;
00132
00135 int FailNumTh;
00136
00138 int FailNum;
00139
00140
00141 RCRRTBall(Problem *p);
00142 virtual ~RCRRTBall() {};
00143
00145 virtual MSLNode* SelectNode(const MSLVector &x, MSLTree* t,
00146 bool forward);
00147
00148 virtual bool Extend(const MSLVector &x, MSLTree* t,
00149 MSLNode*& nn, bool forward);
00150
00152 virtual bool Connect(const MSLVector& x, MSLTree* t, MSLNode*& nn,
00153 bool forward);
00154
00155 virtual bool Plan();
00156 };
00157
00159 class RCRRTBallDual: public RCRRTBall
00160 {
00161 protected:
00162 void RecoverSolution(MSLNode* n1, MSLNode* n2);
00163
00164 public:
00165
00166 RCRRTBallDual(Problem *p);
00167 virtual ~RCRRTBallDual() {};
00168
00169 virtual bool Plan();
00170 virtual bool GetConnected(MSLNode* n1, MSLNode* n2);
00171 };
00172
00173
00175 class RCRRTBallExtExt: public RCRRTBallDual
00176 {
00177 public:
00178 RCRRTBallExtExt(Problem *p);
00179 virtual ~RCRRTBallExtExt() {};
00180 virtual bool Plan();
00181 };
00182
00183 #endif
00184
00185
00186
00187
00188
00189
00190