Abstract class. More...
#include <MixedIntegerES.h>
Public Member Functions | |
MixedIntegerES (unsigned n_r_, unsigned n_z_, unsigned n_d_, unsigned n_sigma_r_, unsigned n_sigma_z_, unsigned n_prob_, unsigned n_f_, unsigned mu_, unsigned rho_, unsigned kappa_, unsigned lambda_, vector< double > &lBound_r_, vector< double > &uBound_r_, vector< int > &lBound_z_, vector< int > &uBound_z_, vector< int > &lBound_d_, vector< int > &uBound_d_, double prob_min_, double prob_max_, bool disRec_r_, bool disRec_z_, bool disRec_sigma_r_, bool disRec_sigma_z_, bool disRec_prob_, bool selfAdaptation_, vector< int > &direction_, unsigned evaluations_, vector< double > &optimalF_, double initialSigma_r_, double initialSigma_z_, double initialProb_, ifstream *initialPopFile_, int randomSeed_, bool feedback_) | |
virtual | ~MixedIntegerES () |
virtual void | run () |
Execute the MIES. | |
Protected Member Functions | |
virtual void | initialize () |
Initialize Individuals in population P with uniform randomly chosen values within various variable and parameter domains or read previously generated population in from file. | |
virtual void | evaluate () |
Determine fitness values for population P or O. | |
virtual void | simulate (Individual *I)=0 |
Run simulator using the object variables contained in Individual I. | |
virtual void | writePop (time_t id)=0 |
Write current population P to file. | |
void | increaseAge () |
Increase age of Individuals in population P by one. | |
virtual void | recombineMutate () |
Create lambda offspring by recombination and mutation. | |
void | recombineMutateSingleParent () |
Create lambda offspring by mutation of a single (recombined) parent. | |
virtual void | writeStep (time_t id) |
Output stepsizes. | |
void | applyRecomb (Individual *I, vector< int > &parents) |
void | applyMut (Individual *I) |
double | transformR (double x, double a, double b) |
Reflect double x back into domain [a,b]; b must be strictly greater than a. | |
int | transformZ (int x, int a, int b) |
Reflect integer x back into domain [a,b]; b must be strictly greater than a. | |
double | fixedConvergence (double x, double threshold, double varPart) |
Fixed convergence for supplied stepsize or probability. | |
virtual void | select ()=0 |
Select mu Individuals from O and optionally P to form new population P. | |
virtual void | writeLog (time_t elapsed, time_t id)=0 |
Log time that was needed to complete generation. | |
virtual bool | optimumReached ()=0 |
In case of convergence study (i.e., with known optima supplied) determine whether optima have been reached. | |
Protected Attributes | |
unsigned | n_r |
unsigned | n_z |
unsigned | n_d |
unsigned | n_sigma_r |
unsigned | n_sigma_z |
unsigned | n_prob |
unsigned | n_f |
unsigned | mu |
unsigned | rho |
unsigned | kappa |
unsigned | lambda |
vector< double > | lBound_r |
vector< double > | uBound_r |
vector< int > | lBound_z |
vector< int > | uBound_z |
vector< int > | lBound_d |
vector< int > | uBound_d |
double | prob_min |
double | prob_max |
bool | disRec_r |
bool | disRec_z |
bool | disRec_sigma_r |
bool | disRec_sigma_z |
bool | disRec_prob |
bool | selfAdaptation |
vector< double > | maxSigma_r |
vector< double > | maxSigma_z |
vector< int > | direction |
vector< double > | bestF |
unsigned | evaluations |
unsigned | generations |
unsigned | currGen |
vector< double > | optimalF |
double | initialSigma_r |
double | initialSigma_z |
double | initialProb |
ifstream * | initialPopFile |
int | randomSeed |
bool | feedback |
bool | debug |
time_t | id |
vector< Individual * > | P |
Parents. | |
vector< Individual * > | O |
Offspring. |
Abstract class.
Definition at line 9 of file MixedIntegerES.h.
MixedIntegerES::MixedIntegerES | ( | unsigned | n_r_, |
unsigned | n_z_, | ||
unsigned | n_d_, | ||
unsigned | n_sigma_r_, | ||
unsigned | n_sigma_z_, | ||
unsigned | n_prob_, | ||
unsigned | n_f_, | ||
unsigned | mu_, | ||
unsigned | rho_, | ||
unsigned | kappa_, | ||
unsigned | lambda_, | ||
vector< double > & | lBound_r_, | ||
vector< double > & | uBound_r_, | ||
vector< int > & | lBound_z_, | ||
vector< int > & | uBound_z_, | ||
vector< int > & | lBound_d_, | ||
vector< int > & | uBound_d_, | ||
double | prob_min_, | ||
double | prob_max_, | ||
bool | disRec_r_, | ||
bool | disRec_z_, | ||
bool | disRec_sigma_r_, | ||
bool | disRec_sigma_z_, | ||
bool | disRec_prob_, | ||
bool | selfAdaptation_, | ||
vector< int > & | direction_, | ||
unsigned | evaluations_, | ||
vector< double > & | optimalF_, | ||
double | initialSigma_r_, | ||
double | initialSigma_z_, | ||
double | initialProb_, | ||
ifstream * | initialPopFile_, | ||
int | randomSeed_, | ||
bool | feedback_ | ||
) |
Definition at line 8 of file MixedIntegerES.cpp.
MixedIntegerES::~MixedIntegerES | ( | ) | [virtual] |
Definition at line 99 of file MixedIntegerES.cpp.
void MixedIntegerES::applyMut | ( | Individual * | I ) | [protected] |
Definition at line 554 of file MixedIntegerES.cpp.
void MixedIntegerES::applyRecomb | ( | Individual * | I, |
vector< int > & | parents | ||
) | [protected] |
Definition at line 434 of file MixedIntegerES.cpp.
void MixedIntegerES::evaluate | ( | ) | [protected, virtual] |
Determine fitness values for population P or O.
Reimplemented in WDN_MIES.
Definition at line 307 of file MixedIntegerES.cpp.
double MixedIntegerES::fixedConvergence | ( | double | x, |
double | threshold, | ||
double | varPart | ||
) | [protected] |
Fixed convergence for supplied stepsize or probability.
Definition at line 726 of file MixedIntegerES.cpp.
void MixedIntegerES::increaseAge | ( | ) | [protected] |
Increase age of Individuals in population P by one.
Definition at line 345 of file MixedIntegerES.cpp.
void MixedIntegerES::initialize | ( | ) | [protected, virtual] |
Initialize Individuals in population P with uniform randomly chosen values within various variable and parameter domains or read previously generated population in from file.
Reimplemented in WDN_MIES.
Definition at line 207 of file MixedIntegerES.cpp.
virtual bool MixedIntegerES::optimumReached | ( | ) | [protected, pure virtual] |
In case of convergence study (i.e., with known optima supplied) determine whether optima have been reached.
Implemented in APriori_MIES, and NSGAII_MIES.
void MixedIntegerES::recombineMutate | ( | ) | [protected, virtual] |
Create lambda offspring by recombination and mutation.
Reimplemented in WDN_MIES, and NSGAII_Steady_MIES.
Definition at line 352 of file MixedIntegerES.cpp.
void MixedIntegerES::recombineMutateSingleParent | ( | ) | [protected] |
Create lambda offspring by mutation of a single (recombined) parent.
Definition at line 385 of file MixedIntegerES.cpp.
void MixedIntegerES::run | ( | ) | [virtual] |
Execute the MIES.
Definition at line 113 of file MixedIntegerES.cpp.
virtual void MixedIntegerES::select | ( | ) | [protected, pure virtual] |
Select mu Individuals from O and optionally P to form new population P.
Implemented in APriori_MIES, NSGAII_MIES, and NSGAII_Steady_MIES.
virtual void MixedIntegerES::simulate | ( | Individual * | I ) | [protected, pure virtual] |
Run simulator using the object variables contained in Individual I.
Implemented in WDN_MIES, APriori_MIES, NSGAII_MIES, and TestFunctions_MIES.
double MixedIntegerES::transformR | ( | double | x, |
double | a, | ||
double | b | ||
) | [protected] |
Reflect double x back into domain [a,b]; b must be strictly greater than a.
Definition at line 693 of file MixedIntegerES.cpp.
int MixedIntegerES::transformZ | ( | int | x, |
int | a, | ||
int | b | ||
) | [protected] |
Reflect integer x back into domain [a,b]; b must be strictly greater than a.
Definition at line 714 of file MixedIntegerES.cpp.
virtual void MixedIntegerES::writeLog | ( | time_t | elapsed, |
time_t | id | ||
) | [protected, pure virtual] |
Log time that was needed to complete generation.
Implemented in WDN_MIES, APriori_MIES, NSGAII_MIES, and TestFunctions_MIES.
virtual void MixedIntegerES::writePop | ( | time_t | id ) | [protected, pure virtual] |
Write current population P to file.
Implemented in WDN_MIES, APriori_MIES, NSGAII_MIES, and TestFunctions_MIES.
virtual void MixedIntegerES::writeStep | ( | time_t | id ) | [inline, protected, virtual] |
vector<double> MixedIntegerES::bestF [protected] |
Definition at line 31 of file MixedIntegerES.h.
unsigned MixedIntegerES::currGen [protected] |
Definition at line 32 of file MixedIntegerES.h.
bool MixedIntegerES::debug [protected] |
Definition at line 34 of file MixedIntegerES.h.
vector<int> MixedIntegerES::direction [protected] |
Definition at line 31 of file MixedIntegerES.h.
bool MixedIntegerES::disRec_prob [protected] |
Definition at line 30 of file MixedIntegerES.h.
bool MixedIntegerES::disRec_r [protected] |
Definition at line 30 of file MixedIntegerES.h.
bool MixedIntegerES::disRec_sigma_r [protected] |
Definition at line 30 of file MixedIntegerES.h.
bool MixedIntegerES::disRec_sigma_z [protected] |
Definition at line 30 of file MixedIntegerES.h.
bool MixedIntegerES::disRec_z [protected] |
Definition at line 30 of file MixedIntegerES.h.
unsigned MixedIntegerES::evaluations [protected] |
Definition at line 32 of file MixedIntegerES.h.
bool MixedIntegerES::feedback [protected] |
Definition at line 34 of file MixedIntegerES.h.
unsigned MixedIntegerES::generations [protected] |
Definition at line 32 of file MixedIntegerES.h.
time_t MixedIntegerES::id [protected] |
Definition at line 34 of file MixedIntegerES.h.
ifstream* MixedIntegerES::initialPopFile [protected] |
Definition at line 34 of file MixedIntegerES.h.
double MixedIntegerES::initialProb [protected] |
Definition at line 33 of file MixedIntegerES.h.
double MixedIntegerES::initialSigma_r [protected] |
Definition at line 33 of file MixedIntegerES.h.
double MixedIntegerES::initialSigma_z [protected] |
Definition at line 33 of file MixedIntegerES.h.
unsigned MixedIntegerES::kappa [protected] |
Definition at line 28 of file MixedIntegerES.h.
unsigned MixedIntegerES::lambda [protected] |
Definition at line 28 of file MixedIntegerES.h.
vector<int> MixedIntegerES::lBound_d [protected] |
Definition at line 29 of file MixedIntegerES.h.
vector<double> MixedIntegerES::lBound_r [protected] |
Definition at line 29 of file MixedIntegerES.h.
vector<int> MixedIntegerES::lBound_z [protected] |
Definition at line 29 of file MixedIntegerES.h.
vector<double> MixedIntegerES::maxSigma_r [protected] |
Definition at line 31 of file MixedIntegerES.h.
vector<double> MixedIntegerES::maxSigma_z [protected] |
Definition at line 31 of file MixedIntegerES.h.
unsigned MixedIntegerES::mu [protected] |
Definition at line 28 of file MixedIntegerES.h.
unsigned MixedIntegerES::n_d [protected] |
Definition at line 27 of file MixedIntegerES.h.
unsigned MixedIntegerES::n_f [protected] |
Definition at line 27 of file MixedIntegerES.h.
unsigned MixedIntegerES::n_prob [protected] |
Definition at line 27 of file MixedIntegerES.h.
unsigned MixedIntegerES::n_r [protected] |
Definition at line 27 of file MixedIntegerES.h.
unsigned MixedIntegerES::n_sigma_r [protected] |
Definition at line 27 of file MixedIntegerES.h.
unsigned MixedIntegerES::n_sigma_z [protected] |
Definition at line 27 of file MixedIntegerES.h.
unsigned MixedIntegerES::n_z [protected] |
Definition at line 27 of file MixedIntegerES.h.
vector<Individual*> MixedIntegerES::O [protected] |
Offspring.
Definition at line 40 of file MixedIntegerES.h.
vector<double> MixedIntegerES::optimalF [protected] |
Definition at line 32 of file MixedIntegerES.h.
vector<Individual*> MixedIntegerES::P [protected] |
Parents.
Definition at line 37 of file MixedIntegerES.h.
double MixedIntegerES::prob_max [protected] |
Definition at line 29 of file MixedIntegerES.h.
double MixedIntegerES::prob_min [protected] |
Definition at line 29 of file MixedIntegerES.h.
int MixedIntegerES::randomSeed [protected] |
Definition at line 34 of file MixedIntegerES.h.
unsigned MixedIntegerES::rho [protected] |
Definition at line 28 of file MixedIntegerES.h.
bool MixedIntegerES::selfAdaptation [protected] |
Definition at line 31 of file MixedIntegerES.h.
vector<int> MixedIntegerES::uBound_d [protected] |
Definition at line 29 of file MixedIntegerES.h.
vector<double> MixedIntegerES::uBound_r [protected] |
Definition at line 29 of file MixedIntegerES.h.
vector<int> MixedIntegerES::uBound_z [protected] |
Definition at line 29 of file MixedIntegerES.h.