2D GA Instance. More...
#include <rinst2d.h>
Inheritance diagram for RInst2D< cInst, cChromo, cFit, cThreadData, cInfo >:
Collaboration diagram for RInst2D< cInst, cChromo, cFit, cThreadData, cInfo >:
Public Member Functions | |
RInst2D (size_t popsize, RProblem2D *prob, const RString &h, const RString &name, RParamStruct *heurdist, RParamStruct *heurarea, RParamStruct *selectdist, RParamStruct *selectweight, RDebug *debug=0) | |
virtual void | Init (void) |
RString | GetHeuristic (void) const |
bool | LocalOpti (void) |
RProblem2D * | GetProblem (void) const |
Public Member Functions inherited from RInst< cInst, cChromo, cFit, cThreadData > | |
RInst (size_t popsize, const RString &name, RDebug *debug=0) | |
virtual RCString | GetClassName (void) const |
void | SetMutationParams (size_t agemut, size_t agebestmut, size_t nbmut) |
void | SetVerify (bool verify) |
bool | GetVerify (void) const |
bool | MustOptimisation (void) const |
void | SetOptimisation (bool opti) |
cChromo * | GetBestChromosome (void) const |
void | SetSeed (int seed) |
int | GetSeed (void) const |
virtual void | AnalyzePop (void) |
virtual void | PostEvaluate (void) |
virtual void | RandomConstruct (void) |
virtual bool | StopCondition (void)=0 |
virtual void | PostRun (void) |
virtual void | DisplayInfos (void) |
virtual void | Crossover (void) |
virtual void | Mutation (void) |
virtual void | StrongMutation (void) |
virtual void | Inversion (void) |
void | Generation (void) |
virtual void | Run (void) |
virtual void | Verify (void) |
virtual void | HandlerNotFound (const RNotification ¬ification) |
long | RRand (long max) |
template<class T > | |
void | RandOrder (T *array, size_t size) |
virtual | ~RInst (void) |
Public Member Functions inherited from RObject | |
RObject (const RString &name=RString::Null) | |
int | Compare (const RObject &obj) const |
RString | GetName (void) const |
void | PostNotification (const hNotification handle) |
void | PostNotification (const RCString &name) |
void | PostNotification (const hNotification handle, T data) |
void | PostNotification (const RCString &name, T data) |
void | InsertObserver (tNotificationHandler handler, const hNotification handle, RObject *object) |
void | InsertObserver (tNotificationHandler handler, const RCString &name, RObject *object) |
void | InsertObserver (tNotificationHandler handler, const hNotification handle) |
void | InsertObserver (tNotificationHandler handler, const RCString &name) |
void | InsertObserver (tNotificationHandler handler, RObject *object) |
void | InsertObserver (tNotificationHandler handler) |
void | DeleteObserver (void) |
void | DeleteObserver (const hNotification handle, RObject *object) |
void | DeleteObserver (const RCString &name, RObject *object) |
hNotification | GetNotificationHandle (const RCString &name) const |
RCString | GetNotificationName (const hNotification handle) const |
virtual | ~RObject (void) |
Public Member Functions inherited from iRInst | |
size_t | GetPopSize (void) const |
size_t | GetGen (void) const |
size_t | GetAgeBest (void) const |
size_t | GetAgeBestPop (void) const |
virtual | ~iRInst (void) |
Protected Attributes | |
RProblem2D * | Problem |
bool | bLocalOpti |
RString | Heuristic |
bool | ComputeFreePolygons |
bool | UseFreePolygons |
bool | AllOrientations |
RParamStruct * | HeurDist |
RParamStruct * | HeurArea |
RParamStruct * | SelectDist |
RParamStruct * | SelectWeight |
Protected Attributes inherited from RInst< cInst, cChromo, cFit, cThreadData > | |
cThreadData ** | thDatas |
bool | bRandomConstruct |
bool | VerifyGA |
bool | DoPostEvaluation |
bool | DoOptimisation |
Protected Attributes inherited from RObject | |
RString | Name |
Protected Attributes inherited from iRInst | |
size_t | PopSize |
size_t | Gen |
size_t | AgeBest |
size_t | AgeBestPop |
bool | Pause |
Additional Inherited Members | |
Static Public Member Functions inherited from RInst< cInst, cChromo, cFit, cThreadData > | |
static int | sort_function_cChromosome (const void *a, const void *b) |
Public Attributes inherited from RInst< cInst, cChromo, cFit, cThreadData > | |
RDebug * | Debug |
RRandom | Random |
cChromo ** | Chromosomes |
cChromo ** | Ranked |
cChromo * | BestChromosome |
cChromo * | BestInPop |
Static Public Attributes inherited from RInst< cInst, cChromo, cFit, cThreadData > | |
static const char | instMaster =0 |
static const char | instSlave =1 |
static const char | instMultiProcess =2 |
static const char | instMultiComputers =4 |
static const char | instMultiEchos =8 |
Protected Member Functions inherited from iRInst | |
iRInst (size_t popsize) | |
Detailed Description
template<class cInst, class cChromo, class cFit, class cThreadData, class cInfo>
class R::RInst2D< cInst, cChromo, cFit, cThreadData, cInfo >
2D GA Instance.
Instance for the 2D placement GA.
Constructor & Destructor Documentation
RInst2D | ( | size_t | popsize, |
RProblem2D * | prob, | ||
const RString & | h, | ||
const RString & | name, | ||
RParamStruct * | heurdist, | ||
RParamStruct * | heurarea, | ||
RParamStruct * | selectdist, | ||
RParamStruct * | selectweight, | ||
RDebug * | debug = 0 |
||
) |
Construct the instance. The instance is not responsible for the deallocation of the objects to place.
- Parameters
-
popsize The size of the population. prob Pointer to the problem. h Name of the heuristic that has to be used. name Name of the genetic algorithm. heurdist Distance criteria parameters for the heuristic. heurarea Area criteria parameters for the heuristic. selectdist Distance criteria parameters for the objects selection. selectweight Weight criteria parameters for the objects selection. debug Debugger.
Member Function Documentation
|
virtual |
Initialization of the instance.
Reimplemented from RInst< cInst, cChromo, cFit, cThreadData >.
RString GetHeuristic | ( | void | ) | const |
Return the heuristic type.
bool LocalOpti | ( | void | ) |
Return true if a local optimization is needed.
RProblem2D* GetProblem | ( | void | ) | const |
Get a pointer to the problem to treat.
- Returns
- a pointer to RProblem2D.
Member Data Documentation
|
protected |
The problem.
|
protected |
Local Optimization.
|
protected |
Name of the heuristic that used.
|
protected |
Calculate free polygons.
|
protected |
Use free polygons.
|
protected |
Test all possible orientation.
|
protected |
PROMETHEE Parameters for Heuristic Distance.
|
protected |
PROMETHEE Parameters for Heuristic Area.
|
protected |
PROMETHEE Parameters for Selection Distance.
|
protected |
PROMETHEE Parameters for Selection Weight.