Placement of Entities in Object-oriented Systems by means of a Single-objective Genetic Algorithm Margaritis Basdavanos Alexander Chatzigeorgiou University.

Slides:



Advertisements
Similar presentations
Population-based metaheuristics Nature-inspired Initialize a population A new population of solutions is generated Integrate the new population into the.
Advertisements

CS6800 Advanced Theory of Computation
Using Parallel Genetic Algorithm in a Predictive Job Scheduling
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
1 Wendy Williams Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Genetic Algorithms are good at taking large, potentially huge search spaces and.
Non-Linear Problems General approach. Non-linear Optimization Many objective functions, tend to be non-linear. Design problems for which the objective.
Evolutionary Computational Intelligence
Genetic Algorithm for Variable Selection
Learning from Experience: Case Injected Genetic Algorithm Design of Combinational Logic Circuits Sushil J. Louis Genetic Algorithm Systems Lab(gaslab)
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Selecting Informative Genes with Parallel Genetic Algorithms Deodatta Bhoite Prashant Jain.
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
Application of Graph Theory to OO Software Engineering Alexander Chatzigeorgiou, Nikolaos Tsantalis, George Stephanides Department of Applied Informatics.
Genetic Algorithm What is a genetic algorithm? “Genetic Algorithms are defined as global optimization procedures that use an analogy of genetic evolution.
Coordinative Behavior in Evolutionary Multi-agent System by Genetic Algorithm Chuan-Kang Ting – Page: 1 International Graduate School of Dynamic Intelligent.
Reliability-Redundancy Allocation for Multi-State Series-Parallel Systems Zhigang Tian, Ming J. Zuo, and Hongzhong Huang IEEE Transactions on Reliability,
Optimal Arrangement of Ceiling Cameras for Home Service Robots Using Genetic Algorithms Stefanos Nikolaidis*, ** and Tamio Arai** *R&D Division, Square.
Genetic Algorithms: A Tutorial
1 Reasons for parallelization Can we make GA faster? One of the most promising choices is to use parallel implementations. The reasons for parallelization.
SBSE Course 4. Overview: Design Translate requirements into a representation of software Focuses on –Data structures –Architecture –Interfaces –Algorithmic.
1. Optimization and its necessity. Classes of optimizations problems. Evolutionary optimization. –Historical overview. –How it works?! Several Applications.
A Budget Constrained Scheduling of Workflow Applications on Utility Grids using Genetic Algorithms Jia Yu and Rajkumar Buyya Grid Computing and Distributed.
Cristian Urs and Ben Riveira. Introduction The article we chose focuses on improving the performance of Genetic Algorithms by: Use of predictive models.
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
Lecture 8: 24/5/1435 Genetic Algorithms Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Genetic Algorithms Michael J. Watts
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
ASC2003 (July 15,2003)1 Uniformly Distributed Sampling: An Exact Algorithm for GA’s Initial Population in A Tree Graph H. S.
Introduction to GAs: Genetic Algorithms How to apply GAs to SNA? Thank you for all pictures and information referred.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
1 “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions.
Derivative Free Optimization G.Anuradha. Contents Genetic Algorithm Simulated Annealing Random search method Downhill simplex method.
Effect of Modified Permutation Encoding Mutation in Genetic Algorithm Sandeep Bhowmik Archana Jha Sukriti Sinha Department of Computer Science & Engineering,
C OMPARING T HREE H EURISTIC S EARCH M ETHODS FOR F UNCTIONAL P ARTITIONING IN H ARDWARE -S OFTWARE C ODESIGN Theerayod Wiangtong, Peter Y. K. Cheung and.
Genetic Algorithms Przemyslaw Pawluk CSE 6111 Advanced Algorithm Design and Analysis
Genetic Algorithms Czech Technical University in Prague, Faculty of Electrical Engineering Ondřej Vaněk, Agent Technology Center ZUI 2011.
 Genetic Algorithms  A class of evolutionary algorithms  Efficiently solves optimization tasks  Potential Applications in many fields  Challenges.
ECE 103 Engineering Programming Chapter 52 Generic Algorithm Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
Genetic Algorithms. 2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman.
Genetic Algorithms Abhishek Sharma Piyush Gupta Department of Instrumentation & Control.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Heterogeneous redundancy optimization for multi-state series-parallel systems subject to common cause failures Chun-yang Li, Xun Chen, Xiao-shan Yi, Jun-youg.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Neural Networks And Its Applications By Dr. Surya Chitra.
1 Chapter 3 GAs: Why Do They Work?. 2 Schema Theorem SGA’s features: binary encoding proportional selection one-point crossover strong mutation Schema.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms. Overview “A genetic algorithm (or GA) is a variant of stochastic beam search in which successor states are generated by combining.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
1 Comparative Study of two Genetic Algorithms Based Task Allocation Models in Distributed Computing System Oğuzhan TAŞ 2005.
Genetic Algorithms. Solution Search in Problem Space.
Genetic Algorithm(GA)
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Hirophysics.com The Genetic Algorithm vs. Simulated Annealing Charles Barnes PHY 327.
Implementation & Integration Research Paper Presentation Nick Conway.
Evolutionary Computation: Advanced Algorithms and Operators
Using GA’s to Solve Problems
Genetic Algorithm in TDR System
Genetic Algorithms.
Optimization Of Robot Motion Planning Using Genetic Algorithm
USING MICROBIAL GENETIC ALGORITHM TO SOLVE CARD SPLITTING PROBLEM.
Genetic Algorithms overview
Genetic Algorithms: A Tutorial
GENETIC ALGORITHM A biologically inspired model of intelligence and the principles of biological evolution are applied to find solutions to difficult.
○ Hisashi Shimosaka (Doshisha University)
EE368 Soft Computing Genetic Algorithms.
Traveling Salesman Problem by Genetic Algorithm
Genetic Algorithms: A Tutorial
Presentation transcript:

Placement of Entities in Object-oriented Systems by means of a Single-objective Genetic Algorithm Margaritis Basdavanos Alexander Chatzigeorgiou University of Macedonia Thessaloniki, Greece 5 th International Conference on Software Engineering Advances (ICSEA’2010)

Design System The decomposition into modules The design (in any technical field) consists in:

Design The design (in any technical field) consists in: The decomposition into modules System The definition of the relationships among them

Design The design (in any technical field) consists in: The decomposition into modules System The definition of the relationships among them Functionality A Fields: X, Y Functionality B Fields: Y, Z The assignment of responsibilities and state information

“Old” problem The distribution of responsibilities and state information among system modules is an “old” problem in SE How to achieve an optimal design?

“Old” problem – Why is it important? Coupling Cohesion

Why is coupling and cohesion important? Empirical studies have shown that they affect a large number of –ilities in OO design comprehensibility maintainability testability reusability Attributes in Quality Models €

Software Ageing well-designed code Design quality decays

Problem Given a system S : (methods, attributes, classes) Find an optimal assignment that minimizes coupling and maximizes cohesion Search problem in the space of alternative arrangements

Optimal Placement Placing 4 entities into 2 classes For x classes and n entities the search space consists of x n possible allocations !!

Crash Course on Genetic Algorithms GAs are heuristics that can generate useful solutions to optimization and search problems Inspired by evolution and natural selection (Darwin's theory)

Crash Course on GAs – Brief Overview Select initial population of individuals Evaluate the fitness of each individual in that population Breed new individuals through crossover and mutation operations

Crash Course on Gas - Terminology Potential Solutions are usually encoded as binary or integer strings called chromosomes chromosome Elements of chromosomes are called genes genes The values that a gene can take are called alleles alleles The positions of genes in the chromosome are called loci loci

Our fitness function: Entity Placement Constituents of an OO system: methods and attributes Methods can access attributes and methods of the class that they belong to directly and also attributes and methods of other classes through references. Attributes can be accessed directly from methods of the class that they belong to and also from methods of other classes that have reference to that class. For each entity it is possible to define a set of entities that it accesses (if it is a method) or a set of entities that it is accessed from (if it is an attribute). Entity Set of a Class: contains all of its members

Entity Placement It is reasonable to assume that the similarity between an entity and a class is high when the number of common entities is large Jaccard Distance

Example of Distance Calculation 16 f1 S m = {Source.field, Target.f1, Target.m2}S Target = {Target.f1, Target.m2, Target.m1} field S m  S Target = {Target.f1, Target.m2} S m  S Target = {Source.field, Target.f1, Target.m2, Target.m1} distance(S m, S Target ) = 1 – 2/4 = 0.5

Global Measure of Entity Placement cohesion coupling

Simplified Case Studies Entity SetsClass Sets S x = {m 2 } => S 0 = {3} S A = { x, m 1 } => S 0 = {0,1} S m1 = {y} => S 1 = {2} S B = { y, m 2 } => S 1 = {2,3} S y = {m 1 } => S 2 = {1} S m2 = {x} => S 3 = {0}

Simplified Case Studies Chromosome of the initial model System Entity Placement = 2 Number of possible arrangements: 2 4 = 16 Decoded Form Encoded Form

Optimal Placement Placing 4 entities into 2 classes

Simplified Case Studies GA population size 2*m = 2*4 = 8 Crossover Rate:50%, Mutation Rate: 12,5% Selection rate: 80% –Chromosome of the optimal solution Resulting Entity Placement value = 0 –Average execution time: 14 ms (Pentium IV 3,2GHz) –Average number of generations : 3

Simplified Case Studies Optimal Class Diagram Evolution of the fitness function

Simplified Case Studies - #2

Chromosome for OrderManagement Κωδικοποιημένη κατανομή οντοτήτων στις κλάσεις του συστήματος Entity Placement OrderManagement = 0,7141 Number of possible arrangements: 6 38

Simplified Case Studies - #2 GA population [1,2*38] = 46 –Configuration: p c = 50% p m = 2,63% p s = 60% Final Entity Placement value = 0,6878 –Average execution time: 15,7 s (Pentium IV 3,2GHz) –Number of generations : 86

Simplified Case Studies - #2 Evolution of Entity Placement

Eclipse Plugin Project to be analyzed Analysis by clicking here Results of the GA

Eclipse Plugin

Conclusions Optimal solutions can be reached within reasonable time (much faster than Multi-Objective GAs) Feasible distribution of entities among classes avoiding the generation of “God” classes Entity Placement captures efficiently coupling and cohesion

Future Work Handling of user constraints Proper handling of inheritance Empirical Studies on large systems

Thank you for your attention !! 5 th International Conference on Software Engineering Advances (ICSEA’2010)