8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
47 {
Std_TraceMsg(0,
"Caught Error in desctructor of SigmoidGain\r\n",
"", -1,
false,
true);}
132 Gain::Copy(lpSource);
163 if(strDataType ==
"A")
165 A((
float) atof(strValue.c_str()));
169 if(strDataType ==
"B")
171 B((
float) atof(strValue.c_str()));
175 if(strDataType ==
"C")
177 C((
float) atof(strValue.c_str()));
181 if(strDataType ==
"D")
183 D((
float) atof(strValue.c_str()));
189 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
198 aryProperties.Add(
new TypeProperty(
"A", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
199 aryProperties.Add(
new TypeProperty(
"B", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
200 aryProperties.Add(
new TypeProperty(
"C", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
201 aryProperties.Add(
new TypeProperty(
"D", AnimatPropertyType::Float, AnimatPropertyDirection::Set));
204 void SigmoidGain::Load(CStdXml &oXml)
210 A(oXml.GetChildFloat(
"A"));
211 B(oXml.GetChildFloat(
"B"));
212 C(oXml.GetChildFloat(
"C"));
213 D(oXml.GetChildFloat(
"D"));
Base class file for all Animat simulation objects.
Root namespace for the base simulation library for AnimatLab.
Declares the sigmoid gain class.
float m_fltA
The A parameter of the gain.
Class that stores information about types for QueryProperty information.
float m_fltB
The B parameter of the gain.
bool InLimits(float fltInput)
Tells whether the input value is within the defined limit ranges.
float m_fltC
The C parameter of the gain.
virtual void QueryProperties(CStdPtrArray< TypeProperty > &aryProperties)
Queries this object for a list of properties that can be changed using SetData.
Declares the gain base class.
float C()
Gets C parameter of sigmoidal eqation: Out = D+(B/(1+e^(C*(A-In))))
virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
Set a variable based on a string data type name.
float m_fltD
The D parameter of the gain.
float D()
Sets D parameter of sigmoidal eqation: Out = D+(B/(1+e^(C*(A-In))))
void Std_TraceMsg(const int iLevel, std::string strMessage, std::string strSourceFile, int iSourceLine, bool bLogToFile, bool bPrintHeader)
Traces a message to the debugger window.
virtual ~SigmoidGain()
Destructor.
float B()
Gets B parameter of sigmoidal eqation: Out = D+(B/(1+e^(C*(A-In))))
float CalculateLimitOutput(float fltInput)
Calculates the output when the input is outside of the limit ranges.
float A()
Gets A parameter of sigmoidal eqation: Out = D+(B/(1+e^(C*(A-In))))
SigmoidGain()
Default constructor.
virtual void QueryProperties(CStdPtrArray< TypeProperty > &aryProperties)
Queries this object for a list of properties that can be changed using SetData.
virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
Set a variable based on a string data type name.
virtual float CalculateGain(float fltInput)
Calculates the gain.