Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #
00016
00017 #ifndef NN_ESC_1D_H_
00018 #define NN_ESC_1D_H_
00019
00020 #include <vector>
00021 #include <string>
00022 #include "esc_common/esc.h"
00023 #include "stdio.h"
00024 class NNESC1D : public ESC {
00025 public:
00026 enum { monitorSwitch, monitorPeak };
00027
00028 protected:
00029 double A_,M_,ddelta_,delta_,B_, mpd_init_, w_switch_old_, a_switch_old_,yr_,period_;
00030 double min_peak_,vel_ref_,w_switch_,obj_val_cycle_init_;
00031 double stoping_min_val_,vel_ref_old_;
00032 int stopping_cycle_number_,nn_cycle_count_;
00033 bool initialized_,min_peak_detect_init_;
00034
00035 public:
00036 NNESC1D();
00037
00038 NNESC1D(double A,double M, double B, double ddelta, double delta, double period, int stopping_cycle_number, double stoping_min_val);
00039
00040 void init(double A, double M, double B, double ddelta, double delta, double period, int stopping_cycle_number, double stoping_min_val);
00041
00042 std::vector<double> step(double obj_val);
00043 inputType getInputType();
00044 outputType getOutputType();
00045 std::vector<double> monitor();
00046 std::vector<std::string> monitorNames();
00047 protected:
00048 double wSwitch(double e_minus);
00049 double minPeakDetect(double e_minus);
00050 double aSwitch(double e);
00051 void reset();
00052 bool isStoppingConditionsMet();
00053
00054 };
00055
00056
00057 #endif