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
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
#ifndef __INVERTCONTROLLER_H
00060
#define __INVERTCONTROLLER_H
00061
00062
#include "abstractcontroller.h"
00063
#include <stdlib.h>
00064
#include <string.h>
00065
00066
00067
00068
00069
00070
00071
00072 class InvertController :
public AbstractController {
00073
public:
00074 InvertController(
const std::string& name,
const std::string& revision)
00075 :
AbstractController(name, revision){
00076
eps=0.3;
00077
rho=0.0;
00078
s4delay=1;
00079
s4avg=1;
00080
delta=0.01;
00081
factor_a=1.0;
00082
desens=0.0;
00083
number_it=0;
00084
epsilon_it= 0;
00085
damping_c=0.0;
00086 }
00087
00088 virtual paramval
getParam(
const paramkey& key)
const{
00089
if(key ==
"eps")
return eps;
00090
else if(key ==
"rho")
return rho;
00091
else if(key ==
"desens")
return desens;
00092
else if(key ==
"s4delay")
return s4delay;
00093
else if(key ==
"s4avg")
return s4avg;
00094
else if(key ==
"factor_a")
return factor_a;
00095
else if(key ==
"number_it")
return number_it;
00096
else if(key ==
"epsilon_it")
return epsilon_it;
00097
else if(key ==
"delta")
return delta;
00098
else if(key ==
"damping_c")
return damping_c;
00099
else return AbstractController::getParam(key) ;
00100 }
00101
00102 virtual bool setParam(
const paramkey& key, paramval val){
00103
if(key ==
"eps")
eps=val;
00104
else if(key ==
"rho")
rho=val;
00105
else if(key ==
"desens")
desens=val;
00106
else if(key ==
"s4delay")
s4delay=val;
00107
else if(key ==
"s4avg")
s4avg=val;
00108
else if(key ==
"factor_a")
factor_a=val;
00109
else if(key ==
"number_it")
number_it=val;
00110
else if(key ==
"epsilon_it")
epsilon_it=val;
00111
else if(key ==
"delta")
delta=val;
00112
else if(key ==
"damping_c")
damping_c=val;
00113
else return AbstractController::setParam(key, val);
00114
00115
return true;
00116 }
00117
00118 virtual paramlist
getParamList()
const{
00119 paramlist list;
00120 list.push_back(std::pair<paramkey, paramval> (
"eps",
eps));
00121 list.push_back(std::pair<paramkey, paramval> (
"rho",
rho));
00122 list.push_back(std::pair<paramkey, paramval> (
"desens",
desens));
00123 list.push_back(std::pair<paramkey, paramval> (
"s4delay",
s4delay));
00124 list.push_back(std::pair<paramkey, paramval> (
"s4avg",
s4avg));
00125 list.push_back(std::pair<paramkey, paramval> (
"factor_a",
factor_a));
00126 list.push_back(std::pair<paramkey, paramval> (
"number_it",
number_it));
00127 list.push_back(std::pair<paramkey, paramval> (
"epsilon_it",
epsilon_it));
00128 list.push_back(std::pair<paramkey, paramval> (
"delta",
delta));
00129 list.push_back(std::pair<paramkey, paramval> (
"damping_c",
damping_c));
00130
00131
return list;
00132 }
00133
00134
protected:
00135 paramval
eps;
00136 paramval
rho;
00137 paramval
desens;
00138 paramval
s4delay;
00139 paramval
s4avg;
00140 paramval
factor_a;
00141 paramval
number_it;
00142 paramval
epsilon_it;
00143 paramval
delta;
00144 paramval
damping_c;
00145
00146 };
00147
00148
#endif