2D GA Instance. More...

#include <rinst2d.h>

Inheritance diagram for RInst2D< cInst, cChromo, cFit, cThreadData, cInfo >:
[legend]
Collaboration diagram for RInst2D< cInst, cChromo, cFit, cThreadData, cInfo >:
[legend]

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)
 
RProblem2DGetProblem (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 &notification)
 
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

RProblem2DProblem
 
bool bLocalOpti
 
RString Heuristic
 
bool ComputeFreePolygons
 
bool UseFreePolygons
 
bool AllOrientations
 
RParamStructHeurDist
 
RParamStructHeurArea
 
RParamStructSelectDist
 
RParamStructSelectWeight
 
- 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 >
RDebugDebug
 
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
popsizeThe size of the population.
probPointer to the problem.
hName of the heuristic that has to be used.
nameName of the genetic algorithm.
heurdistDistance criteria parameters for the heuristic.
heurareaArea criteria parameters for the heuristic.
selectdistDistance criteria parameters for the objects selection.
selectweightWeight criteria parameters for the objects selection.
debugDebugger.

Member Function Documentation

virtual void Init ( void  )
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

RProblem2D* Problem
protected

The problem.

bool bLocalOpti
protected

Local Optimization.

RString Heuristic
protected

Name of the heuristic that used.

bool ComputeFreePolygons
protected

Calculate free polygons.

bool UseFreePolygons
protected

Use free polygons.

bool AllOrientations
protected

Test all possible orientation.

RParamStruct* HeurDist
protected

PROMETHEE Parameters for Heuristic Distance.

RParamStruct* HeurArea
protected

PROMETHEE Parameters for Heuristic Area.

RParamStruct* SelectDist
protected

PROMETHEE Parameters for Selection Distance.

RParamStruct* SelectWeight
protected

PROMETHEE Parameters for Selection Weight.