12#ifndef WSFSIXDOFTUNERGASPECIMEN_HPP
13#define WSFSIXDOFTUNERGASPECIMEN_HPP
15#include "wsf_six_dof_export.h"
19#include "UtRandom.hpp"
40 void GenerateChromosome();
42 void Mutate(
double aMutationProbability);
54 void SetKpRange(
double aLowerBound,
double aUpperBound);
57 void SetKiRange(
double aLowerBound,
double aUpperBound);
60 void SetKdRange(
double aLowerBound,
double aUpperBound);
63 void SetRandomPtr(ut::Random* aRandom);
66 double GetKp()
const {
return std::pow(10.0, mLogKp); }
69 double GetKi()
const {
return std::pow(10.0, mLogKi); }
72 double GetKd()
const {
return std::pow(10.0, mLogKd); }
78 void DetermineChromosomeLengths();
79 std::string IntToBinString(
size_t aInt,
size_t aLength);
80 unsigned int BinStringToInt(
const std::string& aBinString);
81 void UpdateBasedOnChromosome();
83 double mObjectiveValue = -1.0;
87 double mLowPassAlpha = 0.0;
88 double mLogKpRange[2]{-9.0, 2.0};
89 double mLogKiRange[2]{-9.0, 2.0};
90 double mLogKdRange[2]{-9.0, 2.0};
91 double mLowPassAlphaRange[2] = {0.0, 1.0};
92 std::string mChromosome;
93 size_t mChromosomeLengths[4]{0, 0, 0, 0};
95 double mErrorWeight = 1.0;
96 double mOvershootWeight = 1.0;
97 ut::Random* mRandomPtr =
nullptr;
Definition WsfSixDOF_TunerGASpecimen.hpp:27
double GetKd() const
Definition WsfSixDOF_TunerGASpecimen.hpp:72
double GetErrorWeight() const
Definition WsfSixDOF_TunerGASpecimen.hpp:47
double GetObjectiveValue() const
Definition WsfSixDOF_TunerGASpecimen.hpp:39
double GetKp() const
Definition WsfSixDOF_TunerGASpecimen.hpp:66
void SetOvershootWeight(double aOvershootWeight)
Definition WsfSixDOF_TunerGASpecimen.hpp:50
TunerGASpecimen()=default
double GetKi() const
Definition WsfSixDOF_TunerGASpecimen.hpp:69
std::string GetChromosome() const
Definition WsfSixDOF_TunerGASpecimen.hpp:41
void SetErrorWeight(double aErrorWeight)
Definition WsfSixDOF_TunerGASpecimen.hpp:46
double GetLowPassAlpha() const
Definition WsfSixDOF_TunerGASpecimen.hpp:75
double GetOvershootWeight() const
Definition WsfSixDOF_TunerGASpecimen.hpp:51
double AssessObjective(std::vector< PidLogElement > &aSimData)
Definition WsfSixDOF_TunerGASpecimen.cpp:66
void GenerateSpecimen()
Definition WsfSixDOF_TunerGASpecimen.cpp:20
Definition WsfSA_Processor.hpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Definition WsfSixDOF_VehicleData.hpp:96
Definition WsfSixDOF_TunerGASpecimen.hpp:30
SinglePidValueData pidValues
Definition WsfSixDOF_TunerGASpecimen.hpp:31
double timeStamp
Definition WsfSixDOF_TunerGASpecimen.hpp:32