DREAM::GeneticOptimize Class Reference

Optimizes the scheduling of DREAM::System. More...

#include <GeneticAlgorithm.h>

List of all members.

Public Member Functions

 GeneticOptimize ()
 Creates a genetic algorithm.
virtual ~GeneticOptimize ()
 Destructor.
virtual void mutate (DREAM::Solution *solution) const
 Single source mutation.
virtual void mutate (DREAM::Solution *father, DREAM::Solution *mother, DREAM::Solution *child) const
 Mutation from two parents.
virtual void thread_level (DREAM::System *system_ptr)
 Thread-level optimization of fixed-priority scheduling using genetic algorithms.
virtual void CPU_level (DREAM::System *system_ptr)
 CPU-level optimization of fixed-priority scheduling using genetic algorithms.

Protected Attributes

std::vector< DREAM::Solution * > solution_vector_
 AVLTree that stores the potential solutions with their fitness as key.
DREAM::Systemsystem_ptr_
 Pointer to the system.


Detailed Description

Optimizes the scheduling of DREAM::System.

Definition at line 140 of file GeneticAlgorithm.h.


Constructor & Destructor Documentation

DREAM::GeneticOptimize::GeneticOptimize (  ) 

Creates a genetic algorithm.

Definition at line 291 of file GeneticAlgorithm.cpp.

virtual DREAM::GeneticOptimize::~GeneticOptimize (  )  [inline, virtual]

Destructor.

Definition at line 147 of file GeneticAlgorithm.h.


Member Function Documentation

void DREAM::GeneticOptimize::mutate ( DREAM::Solution solution  )  const [virtual]

Single source mutation.

Parameters:
solution is the solution to be mutated.

Definition at line 295 of file GeneticAlgorithm.cpp.

References DREAM::Solution::fitness(), DREAM::random(), DREAM::AVLTree< key_type, item_type >::size(), and DREAM::Solution::task_avltree_.

Referenced by CPU_level(), and thread_level().

void DREAM::GeneticOptimize::mutate ( DREAM::Solution father,
DREAM::Solution mother,
DREAM::Solution child 
) const [virtual]

Mutation from two parents.

Parameters:
father is one of the solution sources.
mother is the other solution source.
child is a pointer to the solution to be modified (it can be father or mother as well...).

Definition at line 313 of file GeneticAlgorithm.cpp.

References DREAM::Solution::fitness(), DREAM::random(), DREAM::AVLTree< key_type, item_type >::size(), and DREAM::Solution::task_avltree_.

void DREAM::GeneticOptimize::thread_level ( DREAM::System system_ptr  )  [virtual]

Thread-level optimization of fixed-priority scheduling using genetic algorithms.

We partition the solution space into 8 zones. One zone is reserved for the best solutions. Three zones are reserved for mutations from parents. Two zones are reserved for single mutations. Two zones are reserved for random generation only.

Parameters:
system_ptr is a pointer to the System.

Definition at line 359 of file GeneticAlgorithm.cpp.

References DREAM::for_each(), mutate(), Option::number_of_repetitions_, Option::optimization_space_, DREAM::random(), DREAM::System::reset(), solution_vector_, system_ptr_, and DREAM::System::visitor_update_task_avltree().

Referenced by main().

void DREAM::GeneticOptimize::CPU_level ( DREAM::System system_ptr  )  [virtual]

CPU-level optimization of fixed-priority scheduling using genetic algorithms.

Optimizes both priorities and subpriorities. We partition the solution space into 8 zones. One zone is reserved for the best solutions. Three zones are reserved for mutations from parents. Two zones are reserved for single mutations. Two zones are reserved for random generation only.

Parameters:
system_ptr is a pointer to the System.

Definition at line 461 of file GeneticAlgorithm.cpp.

References DREAM::for_each(), mutate(), Option::number_of_repetitions_, Option::optimization_space_, DREAM::random(), DREAM::System::reset(), solution_vector_, system_ptr_, and DREAM::System::visitor_update_task_avltree().

Referenced by main().


Member Data Documentation

std::vector<DREAM::Solution*> DREAM::GeneticOptimize::solution_vector_ [protected]

AVLTree that stores the potential solutions with their fitness as key.

Definition at line 181 of file GeneticAlgorithm.h.

Referenced by CPU_level(), and thread_level().

DREAM::System* DREAM::GeneticOptimize::system_ptr_ [protected]

Pointer to the system.

Definition at line 184 of file GeneticAlgorithm.h.

Referenced by CPU_level(), and thread_level().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 18:30:04 2007 for DREAM by  doxygen 1.5.1