Home

GANetXL User Manual

image

Contents

1. Note Please be careful when editing the settings directly because the values read from this sheet are not validated against any errors 9 5 Performing a Run After configuring all the parameters the algorithm can be executed by pressing the Run button in application s toolbar SP Configuration b Run gt Resume amp d Results M About Figure 32 Starting the optimization 9 5 1 Saving the Results Before the computation process starts a pop up window appears requiring to enter a name of worksheet into which results will be saved at the end of computation Note Bear in mind that maximum length of the name of a worksheet is limited to 30 characters 25 Save Results Please choose or enter the name of worksheet where obtained solutions will be stored and press OK button Press Cancel button to not to execute current run Result Sheet Name Results Cancel Figure 33 The Save Results Form It is possible to choose a name of existing worksheet with results by clicking the down arrow on the right side of the edit box Please note that the Overwrite data checkbox must be ticked when entering the name of an existing worksheet The algorithm can be started by pressing the Ok button or the run can be aborted using the Cancel button 9 5 2 Displaying the Progress of a Run When the algorithm is running it displays some variables reflecting its progress see Figure 34 The overall progress of the algorith
2. an Administrator Currently it is not possible to install this application under the limited account in Windows XP Home Please ensure that Microsoft Excel isn t running before starting the installation Setup has detected that Microsoft Excel running To continue the installation please close Microsoft Excel and press the Retry button or press Cancel to abort the installation process Figure 2 GANetXL cannot be installed while Microsoft Excel is running To install the application it is necessary to download installation package from the following address http www exeter ac uk cws qanetxl After downloading the compressed installation package run the installer GANetXL A B C D exe and follow the instructions CD caen seo lee a Welcome to the GAMetXI 1 0 5 1 Setup Wizard This wizard will guide you through the installation of GANetXL It is recommended that you close all other applications before starting Setup This will make it possible to update relevant system files without having to reboot your computer Click Mext to continue Figure 3 Setup Wizard welcome screen of the It is recommended to install the application with typical options This installs all the available features including all examples Choose which features of GANetXL you want to install Check the components you want to install and uncheck the components you don t want to Or select the optional GAMetXL Core Files componen
3. penalty multipliers that take inta Run Cell Address GE account progress of the algorithm Generation Cell Address BE Cancel Figure 25 Writing values of run amp generation into Excel 9 3 Setting Up Program Options This section describes all the parameters that can be set under the Options tab 9 3 1 Running This tab displayed in Figure 26 specifies parameters of a run The most important variable is the number of generations in every run It is also possible to create a batch consisting of multiple runs Each of the runs then lasts N generations Multiple runs can be used to find out the influence of different initial populations on the performance of GA If multiple runs are used results are then stored in a summary worksheet In order to be able to resume the calculation of one of the runs it is necessary to use the auto saving feature and save the population at the end of each run Random Seed This number modifies the starting point of the random number generator Changing this value causes GA to start the computation with different initial population 21 GANetXL 2006 Configuration Wizard Running This tab specifies parameters of arun The most important Iterations variable iz the number of generations in every run It iz also possible to create a batch consisting of multiple Fuss Each Number of Generations 50C B of the runs then lasts M generations Multiple runs can be uzed to find out the in
4. Entistand WSCA Cancel Figure 15 Defining the size of the population 12 9 1 2 Algorithm Type In the third tab see Figure 16 the genetic algorithm is selected The appearance of the tab varies according to the problem type settings In MO version there is only one algorithm available NSGA II however in SO there are three algorithms to choose from Generational The generational genetic algorithm is the most widely used At each iteration an entire new population is created from the old by using the selection crossover and mutation operators This means that a new population must be evaluated for each new population Therefore the generational GA can be more effective but also more time consuming Generational Elitist Similar to the generational algorithm but in this version the top one or two solutions are copied without alteration into the next population The remainder of the population is filled with the products of crossover and mutation This ensures that the best solution s are retained from one population to the next When this algorithm is selected a text box enabling to define the level of elitism appears The level of elitism corresponds to the number of best organisms that are directly copied to next generation Steady State The steady state algorithm generates only a handful of new individuals in each generation These new solutions generated by the selection crossover and mutation operators are added to the
5. Public Sub openNetwork ERROR S ENOPen input Tile inp ty Treeport rfllexrepi II ERROR ENopenH End Su Public Sub closeNetwork ERROR ENclIose End Sub Public Sub solve Dim t As Long Dim tstep As Long ENinitH 10 Do ENTOUNA E ENnextH tstep Loop While tstep gt 0 End Sub Sub simulation Dim e q AS Bong ActiveSheet Calculate For 1 1 To selectedLinkCount Call EPANetInterface setLinkDiameter linkIndexAddr Cells i quis diamAddr Cells i 1 value Next i 31 EPANetInterface solve For j 1 To nodeCount nodeAddr Cells j 1 value EPANetInterface getNodeHead j Next J ActiveSheet Calculate End Sub 12 Writing user defined Penalty multipliers Penalty multipliers can be used to modify the penalty function according to the progress of the GA To use penalty multipliers it is necessary to get the current generation and run from the GA This can be achieved by enabling the write back feature in Excel Link Write Back tab see the section 9 2 5 on page 21 12 1 Example of a multiplier This example demonstrates creation of a simple penalty multiplier which changes its value every run after 100 generations Let us assume that value of generation is written into cell B2 and current run is stored in cell B1 The penalty function which is defines the constraint is stored in cell B7 and contains following formula some function B5 The actual value of the penalty multiplier
6. cost of a solution and the budget is only 2M then solutions outside of this are useless and should be discouraged Constraints in GAMNetAL are defined by Excel formulas To enable use of constraints tick the corresponding checkbox and enter address of an Excel cell which contains penalty cost SO or Infeasibulity WiO af given solution Cancel Figure 23 Defining the constraints or infeasibility 9 2 4 Simulation Support Simulation allows linking GANetXL with other simulation packages used to evaluate fitness of solutions To enable this feature tick the appropriate checkbox on this tab and enter the name of VB macro to be called to evaluate fitness of an organism see Figure 24 For more details refer to chapter 11 page 30 Please note that automatic re calculation of the worksheet is disabled while GA computation is running It is the responsibility of user defined macro to ensure that worksheet is recalculated at the end of the evaluation if this is necessary GANetXL 2006 Configuration Wizard m Excel Link Following tab allows to enable GANetXL 2006 to use capabilities of various simulation tools e g EPANET Enable support for simulation tools Simulation tool parametes Please enter the name of Excel macro that should be called instead of asking Excel to recalculate the worksheet Please note that the name of the macro must be in following format Module Macro e g Module 1 simulate Macro name Mod
7. current population by replacing weaker solutions in the population To use steady state an extra operator a Replacer is needed to determine which weaker solutions to replace When Steady state algorithm is used an extra tab appears see Figure 20 Choosing replacer used in SO Steady StateFigure 20 to allow user specify the type of a replacer NSGA Il NSGA II is multi objective optimization algorithm based on non dominated sorting At first offspring population is created by using the parent population The two populations are combined together to form population of size 2N Then a non dominated sorting is used to classify the entire population After that the new population is filled by solutions of different fronts one at a time The filling starts with the best non dominated front and continues with solutions form other fronts until the population size of N is reached GANetXL 2006 Configuration Wizard Genetic Algorithm Excel Link Options HSGA Il Type Population Algorithm Crossover Selector Mutator MSGA I is multi objective optimization algorithm based on non dominated sorting At first Algorithm offspring population is created by using the parent population The two populations are combined together ta form population of size 2M Then a Steady State non dominated sorting if used to classify the entire population NSG Il After that the neve population iz filled by solutions af different Please choose algorithm ta be used
8. for GA Information about available algorithms are displayed in the right panel Generational Generational E litist Stochastic HGA an stochastic NSGA II fronts one at a time The filling starts with the best non dominated frant and continues with solutions form other trants until the population size of M is reached a Ww Cancel Figure 16 Choosing a genetic algorithm MO problem type 13 9 1 3 Crossover Type The crossover operator is designed to share information between individuals to create entirely new solutions which have some of the attributes of their parents similar to the way in which sexual reproduction occurs in nature Normally two offspring are created by crossing over two parents and they are often better solutions that either of their parents but also occasionally worse The choice of crossover operator can influence the effectiveness of the genetic algorithm GANetXL currently supports three crossover types see Figure 17 Simple One Point Simple Multi Point and Uniform Random After selecting the desired crossover it is also necessary to enter the crossover rate which corresponds to the probability of a crossover to be performed Crossover occurs by splicing the chromosome at a particular point s on each chromosome and then recombining one section of chromosome A with the opposite section of chromosome B Simple One Point A single location in the chromosome is chosen The first child consis
9. of water networks These gene types should be used with pipe sizing problems 9 2 2 Defining the Objectives Exactly one objective must be specified in Single objective version or at least two objectives in multiple objective version Objectives must occupy continuous range of cells Type in the address of the range e g A1 C5 and press the Update button to populate the grid containing parameters of objectives Each objective is described by address of an Excel cell the function that is applied to it and its name Objective function can be either minimize or maximize Hint To set the value of a whole column click on its heading with right mouse button and choose or type in the desired value 18 GANetXL 2006 Configuration Wizard m Excel Link Enter range or single cell where objective functions are stored Objectives Range E1 eF12 Update e g 41 or CZ F5 Dbjectives Exactly one objective must be specified in Single objective version or at least two objectives in Mu tip es objective version Objectives must occupy continuous range af celle Type inthe address of the range e g 41 05 and press the update button to populate the arid containing parameters of objectives Each objective is described by address of an Excel cell the function that is applied to it and its name Objective function can be either ae or maximize Cancel Figure 22 Defining objective functions 9 2 3 Defining the Constraint
10. second MO example represents the Purchasing with Quantity Discounts The task is to buy at least 155 litres of solvent while keeping the cost as low as possible These easy to understand examples should help the user to learn how to setup GANetXL and use it to solve various tasks using the flexibility of Excel s functions The single objective example is only a modification of the first MO example This can be useful for comparison of solutions that are found by both versions Note All the examples are based on the samples shipped with the Evolver package 11 Linking GANetXL with Other Simulation Tools GANetXL can use other simulation tools and packages to evaluate fitness of organisms In order to use this functionality simulation software must expose its API in form of DLL library e g EPANET or any other way that allows invoking its functions from Visual Basic for Applications To enable cooperation with other tools it is necessary to enable this feature in the Configuration This can be done in the Excel Link Simulation tab sheet Tick the Enable support for simulation tools checkbox and fill in the name of the Macro which is then called in the evaluate fitness method Note The name of the macro must also contain the name of its module For example Module1 Macro_name To determine the name of the module in Excel press Alt F11 to get to VBA Editor Expand the folders in the right panel see Figure 37 to find out the nam
11. GANetXL User Manual EXETER Centre for Water Systems August 2011 Table of Contents MEE UU RY gt NN m 3 2 Reporting bugs and Probleme se neas sauce boten ole o bete t une Nautec alti cen n ead c aue vae aces 3 SM nude CUI OU ETE ES 3 4 installations rien uri scr cio NU Fari so eleciulnsbetr acetone acted onde DEPO U wea paso Nu aTU M MERE 3 5 Upgrades and Uninstallling cccccecccsecccseccececseecceeeceucecseeseueessueeseeeseusessueeseeessusensss 9 6 ohsttalnts addimiltatlofiS ssseii asbl estem a Pom did aub este eine edtemais 10 6 1 Microsolt 8 1119274010 FAMEM 10 7 Wokna WI SPRING Lerten se itd uid he dette teh icai a Uds 11 7 1 Workbook FCGUIKCIMCINS e PL 11 9 Gonligurng QUANGEXL id eoi ote ES PERI E e E SEHE ADEM e P aieei sete 3 11 8 1 Configuring GA Parameters cccccseccceeeeeceeceeeececeeeeceeeesseesesseeeeseeeesseeesseeeessaees 11 8 1 1 lODHIStON SIZE coges eE as ques eb quee ptus te tucdass cute tebmusua ta pHucte deua unas 12 8 1 2 ATQOE DVD rseson e tu duce entten Fete Quz teu anu Fete Qu ttv dU Fete Du ttv daa etc ttv du D Deedes 13 8 1 3 Sie cte T Mio eer PEE 14 8 1 4 SECO TYD eee Caen CC Ma C E E 14 8 1 5 yilsirztro ME Bo 16 8 1 6 Replacer Type 16 8 2 Defining Link to Excel WorkSheel cccceccneceneeeseeeneeeneeeneeeseeeaeeenseeaeeeneeeaeeeaaes 17 8 2 1 Defining the CHrOMOSOME ccccssccccesceceeeeeceececaeeceseuseseuseeseeees
12. IVERSITY OF EXETER Version 1 0 5 1 Centre for Water Systems Se edis rici deis MERE 1 21 7 K we Ys We as Enter New Serial Number TANG OLLI URE I Pe apse B Figure 11 About box registered Note Never try to copy an already installed application from one computer to another During the installation process important information are stored in system registry Without these registry entries the application will not work properly 6 Upgrades and Uninstalling Before upgrading GANetXL it is not necessary to uninstall the previous version Simply run the installation of the newer version and everything should be done automatically for you Please make sure that Microsoft Excel is not running while upgrading or uninstalling GANetXL can be uninstalled by removing it using Add or Remove Programs from Control Panel or by clicking the Uninstall icon which is located in GANetXL s folder under Start All Programs Please note that removing GANetXL does not remove any of your documents unless they are stored in the folder where the add in was installed by default C Program Files GanetXL The uninstallation process does not remove the folder with GANetXL s examples Uninstall GANet XI Remove GAMetXL from your computer GANetxL will be uninstalled from the following folder Click Uninstall to start the uninstallation Uninstalling from C Program Files x86 3ANetXLY Figure 12 Removing GANetXL 7 Const
13. Multiple Objective Results Results in MO version are represented by the Pareto Front and are stored in the Results sheet of the Workbook Please note that the whole population is stored in the worksheet and that the best pareto front is formed only by organisms with rank equal to 0 The true pareto front can be easily obtained using Excel s automatic filter which can be found under Data Filter Automatic Filter To display the results in a form of a chart similar to the one that was displayed during the computation process activate the sheet that contains the desired values and click the Results icon located in the GANetXL s toolbar 28 When the results are displayed it is possible to change the objective functions that are displayed in the chart and also to zoom to certain parts of the chart by drawing a rectangle If you move your mouse over a point in the chart the values of both objective functions are displayed To update the decision variables in the Problem worksheet please click on the point representing desired solution with left mouse button 5 GANetXL 2006 Results Results to be displayed Results D 1 Results 0 2 Results D 3 Results 0 4 Results 0 5 Results D 6 fi Select objectives to be displayed x fi Ye f2 r Refresh Figure 36 Results Browser 9 7 3 Summary Worksheets When multiple runs are selected then the application generates summary worksheet at the end of the computat
14. bar in Microsoft Excel 2007 2010 2 Reporting bugs and problems To report a bug or problem related to GANetXL please send an email to j bicik exeter ac uk describing the issue and if possible attach an Excel Worksheet that can be used to reproduce the problem 3 Citing GANetXL Please include the following reference in your publications if you used GANetXL Savi D A Bicik J amp Morley M S 2011 A DSS Generator for Multiobjective Optimisation of Spreadsheet Based Models Environmental Modelling and Software 26 5 551 561 4 Introduction GANetXL is a successor of GenetXL which is an add in for Microsoft Excel that adds the possibility of use of genetic algorithms to solve various tasks To be able to work with this add in user is required to have only basic knowledge of MS Excel to enter appropriate formulas that represent given problem Some basic knowledge of genetic algorithms is also essential in order to configure the algorithm properly to obtain best results The new version of the add in uses Mark Morley s GA library which should perform much faster in comparison to the original library written in Pascal 5 Installation Before installing GANetXL please make sure that your system meets following configuration requirements Operating system Windows 2000 XP Vista 7 MS Excel Microsoft Excel 2000 XP 2003 2007 2010 To install GANetXL the user performing this operation must have sufficient privileges i e be
15. bug which causes GANetXL not to be able to operate if the language version of Office does not match the locale used in Windows The only workaround in the moment is to change the locale in Windows to match the language version of Microsoft Office or maybe to download Multilanguage pack for Office Further information about this bug can be found at http support microsoft com kb 320369 References 1 Microsoft Excel 2003 Limits http office microsoft com en gb excel HP051 99291 1033 aspx 2 Microsoft Excel 2007 Limits http ologs msdn com excel archive 2005 09 26 474258 aspx 3 EPANet Project http Awww epa qgov nrmrl wswrd epanet html 33
16. ded Run To resume a run which was stopped using the Stop button or any save point created using the auto save feature It is necessary to select appropriate worksheet containing the population and press the Resume button In order to be able to resume the GA the population size number of genes and objectives must not be changed Other parameters such as number of runs generations or GA settings can be modified Please bear in mind that changing GA settings might lead to unwanted effects 2 Note If the computation has reached the maximum number of generations then the application displays an error and does not allow resuming of the run There are several ways how to bypass this The easiest way is to increase the number of generations in the Configuration wizard refer to section 9 3 1 on page 21 9 6 1 Resuming Computation Comprising of Multiple Runs When resuming the results that were obtained from multiple runs then the algorithm normally completes current run and continues on consequent runs This behaviour might not be wanted in certain situations One might use multiple runs to see the effect of different initial populations and then just continue the computation with the best results obtained so far In order to do this it is necessary to change the configuration of the GA and also to modify the worksheet containing the results In the configuration the number of runs must be set back to 0 and the number of generations incr
17. disable the progress chart Note Updating the chart is a time consuming operation which can significantly decrease the performance of the application It is recommended to disable updating of a chart and grid when working with population sizes greater than 1000 GANetXI 2006 Configuration Wizard Float Precision Genetic Algorithm Excel Link Options z s The value of this variable controls Running Cache Auto Saving Backup Miscellaneous the precision of Real Bounded Genes if they are utilized The default value is 4 digits however the Float Precision i precision can be increased up to 8 digits Chart Update Interval v generations Chart Update Interval Bg UU ERA This variable specifies the update interval af chart and grid displaying the progress of GA during a run Please note that updating the chart is time consuming operation which can significantly decrease the performance of the application It is recommended to disable updating of a chart and grid when working with population sizes greater than 1000 Display Progress Chart Cancel Figure 31 Miscellaneous options 9 4 Advanced Configuration The previous version of GANetXL was exposing a worksheet called Settings which contained all the configuration parameters In the current version this worksheet is hidden by default however it is possible to unhide it To do so open your workbook and go to Format Sheet gt Unhide and select the Settings sheet
18. e character of the problem and assumed duration time Recovery after a crash Cancel Figure 29 Backup of population into an external file Recovery after a crash To recover the information saved using the backup function Just press the Run button If any backup was created it is inspected and in case that it contains any information a new worksheet is created containing the whole population from the last backup before a crash occurred Confirm d Backup File From previous run was Found tl Do you want to recover the results Figure 30 A message box displayed when restoring population from a backup file 9 3 5 Miscellaneous This is the last tab of the configuration wizard It allows user to define several options but also to enter new serial number in order to extend the expiry date of the application Please contact the author if your version of GANetXL has expired and you would like to continue using it Float Precision The value of this variable controls the precision of Real Bounded Genes if they are utilised The default value is 4 however the precision can be increased up to 8 Chart Update Interval This variable specifies the update interval of the chart and grid displaying the progress of GA during a run Please Display Progress Chart 24 The state of this variable indicates whether progress chart will be displayed during the computation In case that the application is crashing unexpectedly try to
19. e of the module where the macro is stored EAProject Example Multiple Objective xls Microsoft Excel Objects AA Listi fev HiddenInfo t8 Listz Problem 3 amp ThisWorkbaak 5 3 Modes 4t ENS D 8 vBAPr jerr Sesitl j amp Microsoft Excel Objects 8 Listi Prablem Figure 37 A panel in VBA showing the name of the module 30 11 1 Using EPANET to Evaluate Fitness of Organisms The easiest way how to run simulations with EPANET is to modify one of the examples shipped with GANetXL The example code in VB comprises of two modules EPANetDLL and EPANetlnterface e EPANetDLL is module which was imported into the project The original file epanet2 bas is part of the epanet toolkit EN2toolkit zip which can be downloaded from EPANet website 3 To insert this module into an existing workbook press Alt F11 to get to the VBA editor right click the Modules folder and choose mport file e EPANetlnterface is a set of functions exploiting the EPANet interface created to simplify calling of original methods The key functions are openNetwork opens the EPANET input file and initializes hydraulic solver closeNetwork shuts down the EPANET and closes all files solve runs the hydraulic simulation of the network simulation main function which writes new pipe diameters to EPANET runs hydraulic simulation and then reads node heads from EPANET and stores them in the Excel worksheet O OOO
20. eased to a desired value Then the worksheet with results has to be changed Find the value indicating the Run highlighted in Figure 35 and ensure that it is set to O 8 RESULTS 29 11 200 16 38 15 Fopulation 5l 4 Run Generation 5l B Random Seed 1 Randamize Count 184 78 Figure 35 Resetting the number of a run to 0 9 7 The Results After completing a run either reaching the given number of generations or terminating it using the Stop button the obtained results are saved to the worksheet which was selected prior to starting the GA 9 7 1 Single Objective Results After SO algorithm finishes it updates the Problem worksheet with gene values of the best organism found and generates a worksheet containing the whole population and the global best organism stored at the end The global best organism is used by the GA library to store the best organism from multiple runs and necessarily does not have to be the best organism The organisms are sorted according to fitness function thus the best organism can always be found on the top of the table Note When using Generational algorithm the organism which is written into the Problem sheet does not need to exist in the results worksheet containing the population This is due to the character of Generational algorithm which unlike the Elitist version of this algorithm does not guarantee that any of the fittest organisms propagates to the next generation 9 7 2
21. ector supports only one MO specific 9 Crowded Tournament selector Crowded Tournament similar to the standard Tournament Selection two solutions are chosen at random from the population and compared The solution with better lower rank wins If both solutions have the same rank then the solution with larger crowvding distance wins In case that both solutions have the same rank and alza crowding a Cancel Figure 18 Choosing GA selector 15 9 1 5 Mutator Type The mutation operator is designed to provide new genetic material during an optimisation Without the mutation operator the algorithm could find locally optimal solutions without searching for better globally optimal solutions The mutation operator works by selecting a gene at random in a chromosome and changing it to a random value within the bounds of the gene This is performed within a certain probability soecified by the user There are two mutators available in GANetXL see Figure 19 Simple Mutation is performed on a gene when a random value is bigger than the user selected mutation rate This gene will be given a random value within its range Simple by Gene An integer value is calculated by multiplying the mutation probability times the chromosome length MutationRate Chormosome Length When this value is smaller then a random value mutation is performed The value of the probability of mutation needs to be carefully thought out If the probabi
22. eeeceeeceeeeceueeseessusecueeseeessusenaess 28 8 7 3 summa VVOIKSHBelS ci ueni or ete Enna Sata dtceyeesd adie ean Sek aa 29 9 iObpenidileExampleSnssesccutusid bitrate ron eser edes Eres mb exte e eodem festes 30 10 Linking GANetXL with Other Simulation Tools cccccsecceceseeeeeeeeeeeeesseeeeeeeesaeees 30 10 1 Using EPANET to Evaluate Fitness of Organisms ccccseeeeeeeeeeeeeeeeeeeesaeeeees 31 11 Writing user defined Penalty multipliers ccc cccseeeceeeeceeeeeeeeseeeeseeeeeeeeseeeeseeeeaes 32 Ht EXAMPLE Ol amulip CT itc 32 12 KNOWN DF ODI GINS ices iiia sicui C aed ocak teh ser tes oceans dann ice os utu DM UAE oe leet ann P cA dooce oes 32 12 1 Application crashing with access violation error cccceecceeeceeeeeeeeeeeseeeeeeeseeeseeees 32 12 2 Excel 2007 Worksheet running in compatibility mode eesseuuesssse 33 12 3 English version of O2k7 and different Windows locale 33 Rice Kc 33 1 Current Version Version number can be determined in the About box that can be accessed from GANetXL s toolbar To make sure that you are running the latest version visit the website of the application http www exeter ac uk cws ganetxl and see the change log Home Insert Page Layout Formulas Data Review View Developer Add Ins Team ao x NT Configuration b Run Resume 4d Results About Custom Toolbars Figure 1 GANetXL s Tool
23. fluence of Random Number Generator different initial populations on the performance of GA Fandom Seed Value ki Generate If multiple runs are used results are then stored in a summary worksheet In order ta be able to resume the calculation af ane af the runs it is necessary to use the auto saving feature and save the population at the end af each Setup parameters of a run Mumber of Runs Cancel Figure 26 Specifying parameters of runs 9 3 2 Caching Caching is an experimental feature which maintains certain number of organisms and stores their fitness This is done to reduce the time normally needed to re evaluate fitness of existing solutions which might be an issue when complex formulas or external simulation packages are used The benefits of caching are still under intensive research and therefore it is not recommended to use this feature GANetXL 2006 Configuration Wizard Cache Caching is an experimental feature which maintains certain number af organisms and caches their fitness This is done to reduce the time cost of re evaluating fitness of existing solutions which might be an issue when complex formulas or external Maximum Cache Size 4000 gt simulation packages are used The benefits of caching are still under intensive research and therefore it is nat recommended to use this feature Initial Cache Size 40 Cancel Figure 27 Using cache to improve the performance 9 3 3 Automat
24. ic Saving This feature displayed in Figure 28 allows saving of intermediate populations in user specified interval This might be useful when performing optimization containing multiple runs to save the population at the end of each run Without using this option only the best organism SO or pareto front MO is saved to summary result sheet which does not allow to resume the computation at later time 22 Hint To save the population at the end of each run set the interval to the number of generations comprising single run Note Automatic saving of population negatively affects the performance of the algorithm and might produce enormous number of worksheets It might be desired to use the backup function which is faster and does not create any worksheets refer to section 9 3 4 Overwrite This specifies whether new result sheets which are created either manually or automatically are overwritten This variable is also controlled by the Save Results dialog displayed in Figure 33 GANetXL 2006 Configuration Wizard ET Autosaving Auto Saving Backup This feature allows saving Overvrite Result Sheets intermediate populations in user specified interval This might be Autosave Population ta a Worksheet useful when performing optimization containing multiple Automatic Results 5 aving rung to save the population at Semanal l ws the end of each run yithout SITE ett generation using this option only the best organism So
25. ight mouse button and choose or type in the desired value GANetXL 2006 Configuration Wizard 3rihmm Excel Link Options a Chromosome Chromosome Objectives Each af the decision variables for a problem constitutes a gene in the genetic algorithm All of the Genes Range IS amp q amp 1 C5 Update Denes ale abpencen Hoener to form a chromosome Therefore the choice of genes determines what variables the genetic algorithm uses to discover optimal solutions Excel cells Integer Bounded corresponding genes must Integer Bounded DCUM continuous area range Type in the range address e g Integer Bounded A1 C5j and press the update button to populate the grid containing parameters of genes Please enter starting and ending cell of range containing genes and specify their parameters Integer Bounded Integer Bounded Hint Ta set the value of a whole column click its heading with right mouse button and choose Cancel Figure 21 Defining the chromosome Hybrid Integer Bounded Gene The gene is an integer number i e 1 23 456 and its value is within the range upper bound lower bound Hybrid Real Bounded Gene The gene is a real number i e 1 2 3 45 and its value is within the range upper bound lower boung The precision of real gene is defined in Options Miscellaneous tab Hybrid Gray Integer Real Bounded Gene and These are special cases of the two previously stated gene types used especially in optimization
26. ion The content of the worksheet is different for SO and MO problems Summary worksheet of a single objective problem contains only the best organisms found at the end of each run So the number of organisms on the worksheet is equal to the number of runs In multiple objective version the summary worksheet contains best pareto fronts obtained at the end of each run Each of the pareto fronts can be formed by different number of organisms however the number never exceeds the size of the population Note It is not possible to resume GA from a summary worksheet It is either necessary to abort the execution using the Stop button in this case normal worksheet containing results is created or to enable the automatic saving of population and save population at the end of each run The use of automatic saving of population at the end of each run is recommended because it gives the possibility to resume the GA later refer to section 9 3 3 on page 22 29 10 Opening the Examples The application is shipped with 2 Multiple Objective examples and 1 Single Objective example All the examples are easily accessible from the All Programs gt GANetXL gt Examples folder located in the Start menu The first MO example and the single objective example represent the Advertising selection The task is to select the most effective advertising campaign within your budget to reach the largest audience while meeting necessary restrictions The
27. ion introduces the Resume function which significantly distinguishes it from the previous version To create an empty Excel workbook it is recommended to use the Empty Project template which is located in GANetXL s folder in Start menu This template creates an initial workbook e Configuration used to configure the application e Run starts the optimization or attempts to recover crashed computation from a backup file if automatic backup is enabled e Resume resumes suspended optimization the active worksheet is resumed e Results displays the pareto front in MO version e About displays information about license expiration date and limitations 8 1 Workbook Requirements The only requirement a workbook compatible with GANetXL must meet is that it contains one worksheet named Problem The worksheet containing configuration is created automatically after pressing the Configuration button This worksheet is by default hidden 9 Configuring GANetXL Configuration wizard is used to configure all required parameters of the application It allows setting up various options of genetic algorithm defining cells containing values of genes objective functions etc To navigate between the tabs in the Configuration wizard one can either use the Next gt and Back buttons or directly click the name of the tab located at the top of the window It is recommended to go through all the tabs using the Next gt b
28. irmation of Start menu folder Please launch Microsoft Excel after the installation is completed If the installation was successful a toolbar similar to the one depicted in Figure 8 should appear in Microsoft Excel Click the About button on GANetXL s toolbar m D a Configuration Run Resume 4a Results 9 About Figure 8 GANetXL disabled toolbar To obtain a trial 3 month license please register online on http centres exeter ac uk cws technology qanetxl addin form You will have to enter your unique hardware identifier e g 5E2EE818 so that a unique serial number can be generated for you based on this information Click the button as displayed in the next picture in order to copy the identifier to clipboard UNIVERSITY OF GANetXL 2006 Version 1 0 1 11 Centre for Water Systems Enter New Serial Number Figure 9 About box unregistered After you submit the registration form you should shortly receive a serial number 32 alphanumeric characters Click the Enter new serial number button and paste the number as displayed in the following picture Y aur Identifier is ERCDZ ER Please enter new serial number FIOBD163D2C1 557869 3E BE0S9285365 Uk Cancel Figure 10 About box entering S N GANetXL should now display information about your license including expiration date and all limitations of your copy UN
29. is stored in cell B5 A screenshot of the worksheet is in Figure 38 Penalty implied by violation of some constraints e g IFCH10 50 1 07 Current run Current generation j values filled in by GA Penalty multiplier modifier PO VER 1 1 B1 Penalty multiplier IF B4 gt 100 641 First penalty second penalty Penalty function GB B5 Third penalty Faurth penalty Bee 5 en en e ca iol Total penalty Fj Figure 38 Example of creation of user defined penalty multiplier 13 Known problems This chapter highlights some of the known problems related to GANetXL and provides the user with possible solutions where applicable 13 1 Application crashing with access violation error This problem is related to the TChart component which is used to display the progress chart during the run The only known workaround is to hide the progress chart to prevent it from updating and thus crashing 32 13 2Excel 2007 Worksheet running in compatibility mode Please note that when Excel 2007 opens a workbook created using an older version the workbook is opened in compatibility mode This implies that the limits of ranges in Excel remain the same as in the previous version and might cause problems when working with larger worksheets over 255 columns or over 65535 rows In order to resolve this problem please save the worksheet in new format 13 3English version of O2k7 and different Windows locale Excel 2007 contains a
30. it is assigned and greater the chance that it undertakes mating Goldberg and Deb 1990 Tournament Tournament selection involves the random selection of a designated number of individuals from the population who compete in a tournament for inclusion into the mating pool Tournament selection in its simplest form consists of a binary tournament involving the direct competition of two individuals for survival by the comparison of their fitness function with the fitter of the two surviving The tournament size can be increased thereby increasing the selection pressure in the GA This ranking of the population allows for a constant selection pressure as in rank based fitness allocation Use of tournament selection has shown better performance than the roulette wheel selection Goldberg and Deb 1990 Crowded Tournament oimilar to the standard Tournament Selection two solutions are chosen at random from the population and compared The solution with better lower rank wins If both solutions have the same rank then the solution with larger crowding distance wins In case that both solutions have the same rank and also crowding distance then winner is chosen randomly GANetXL 2006 Configuration Wizard Genetic Algorithm Excel Link Options Multi Objective Selector Type Population Algorithm Crossover Sel ector Mutator The mutti objective algorithm can require specialist selection operators GAMetAL currently Choose selector Sel
31. lity of mutation is less than 1 chromosome length then no mutation will occur If 1 chromosome length lt MutationRate lt 2 chromosome length then one mutation can be expected per chromosome In effect the choice of mutation rate implies how many bits will undergo mutation The Ammended Morley GA Library Adaptive Mutation This is an experimental feature The algorithm records a history of mutations and tracks mutations that lead to improvement of the fitness of the organism Use of adaptive mutation can increase the performance of GA however the learning time is rather long and should be thousands of generations GANetXL 2006 Configuration Wizard GeneticAlgorithm Excel Link Options Mutator Type Population Algorithm Crossover Selector Mutator The mutation operator iz designed to provide new genetic I utator material during an optimisation Simple without the mutation operator the algorithm could find locally e Simple By Gene optimal solutions without searching for better globally optimal solutions The mutation Choose mutator type and enter probabile of mutation Mutation Rate 0 05 operator works by selecting a gene at random in a chromosome Use Adaptive mutation and changing it to a random value within the bounds of the gene This is performed within a certain probability zpecified by the user There are three mutators available in amp s amp MetxL Simple Cancel Figure 19 Ch
32. m is displayed on the progress bar According to the value of the Chart Update Interval which can be set on the Options gt Miscellaneous tab see Figure 31 The algorithm displays the obtained solutions in form of a grid containing values of genes objective functions penalty infeasibility and other statistical indicators To visualise the progress a chart is used to display the best pareto front in MO or just the fitness of the best organism in SO 26 GANet L 7006 Running Computation Statistics Chart Options Run 0 Xx Price Generation 40 E See eeo0o Y Audience PTT Chart m T 5 z 10 O00 20 000 30 000 Price 1500 00 2700 00 3500 00 4700 00 5300 00 EEDn nn Resume Figure 34 Form showing the progress of the algorithm The chart can be disabled or enabled by clicking at the minimise arrow as depicted in Figure 34 Disabling the chart might be especially useful when the application crashes regularly at the same phase of computation Note Setting too low value of chart update interval negatively affects the performance of the algorithm because chart and grid updating is a time consuming operation In case of MO run it is possible to select the objectives that are displayed on the chart This can be done using the combo boxes corresponding to the X amp Y axes in the Chart Options panel the chart is not updated immediately after changing these values 9 6 Resuming Suspen
33. of the genetic algorithm There are three crossover operators in GANEtAL CO Uniform Random Cancel Figure 17 Choosing crossover type and its parameters 9 1 4 Selector Type In the genetic algorithm solutions must be selected for progression into the next generation or for input to the crossover and mutation procedures The method by which the algorithm selects solutions for this purpose then is highly important for the correct operation of the 14 algorithm The type of selector used depends on the problem type There are currently three single objective selection operators Roulette Roulette by Rank and Tournament and one multiple objective operator Crowded Tournament depicted in Figure 18 supported by GANetXL Roulette Each individual is assigned a probability of selection or section of a roulette wheel according to the ratio of its fitness over the total fitnesses of the entire population This roulette wheel is then spun to determine the selected individual The higher the individual s fitness the larger the proportion of the wheel it is assigned and greater the chance that it undertakes mating Goldberg and Deb 1990 Roulette by Rank The population is sorted and each individual is assigned a probability of selection or section of a roulette wheel according to its rank This roulette wheel is then spun to determine the selected individual The higher the individual s rank the larger the proportion of the wheel
34. oosing Mutator and defining its parameters 9 1 6 Replacer Type When using a Steady State genetic algorithm the new solutions created are added to the current population rather than creating a whole new population To maintain the population size therefore some solutions must be replaced Deciding which solutions to replace is the 16 job of the Replacer There are number of criteria for deciding which solutions are replaced in GANetXL see Figure 20 Weakest The new individual is added to the population which is then sorted according to fitness The solution with the worst fitness is then deleted note that this could be the new solution Weakest unconditional The population is sorted according to fitness before new individual is added and the solution with the worst fitness is then deleted note that unlike in the case of Weakest replacer the new individual is added every time First Weaker This starts with the best individual and works its way down the population The first solution it encounters with worse fitness than the new solution is replaced By Rank his is similar to the First Weaker method but uses rank values instead of raw fitness values Uniform Random The solution which is replaced is selected randomly GANetXL 2006 Configuration Wizard Genetic Algorithm Excel Link Options mie Replacer Type Population Algorithm Crossover Selector Mutator Replacer When using a Steady State genetic algorithm
35. or pareto front MO is saved to summary result sheet which does not allow ta resume the computation at later time To save the population at the end of each run set the interval to the number of generations comprising single run Cancel Figure 28 Automatic saving of the population 9 3 4 Backups This function allows storing population and other information that can be used to recover the computation into external file In case that the addin crashes and Excel is closed the computation can be restored later from the file Note Backup negatively affects the performance of the algorithm however the impact is not as significant as when auto saving is used The backup interval should be chosen wisely with respect to the character of the problem and assumed duration time 23 GANetXL 2006 Configuration Wizard Genetic Algorithm Excel Link Options Backup Running Cache Auto Saving Backup Miscellaneous l This function allows storing Backup Population to External File population and other information that can be used to recover the Backup computation into external file In case that the addin crashes and Saving Interval ce generation Excel is closed the computation can be restored later Filename C Mest bin d Mote Backup negatively affects the performance of the algorithm however the impact is not as significant as when auto saving is used The backup interval should be chosen wisely with respect to th
36. raints and Limitations When formulating a problem and deciding whether to use GANetXL it must be kept in mind that there are certain restrictions imposed by Microsoft Excel applies to Microsoft Excel 2003 Maximum number of rows 65 536 Maximum number of columns 256 Number precision 15 digits Length of formula contents 1 024 characters Sheets in a workbook limited by available memory The maximum number of columns is the biggest issue One might think that about putting genes into rows instead of columns but when the results are saved every organism occupies one row and thus the maximum number of decision variables genes is limited to around 250 Full list of other limits can be found in 1 7 1 Microsoft Office 2007 Microsoft Office 2007 is supported by the latest version of GANetXL and significantly extends the limits applied to worksheets e Maximum number of rows 1 048 576 e Maximum number of columns 16 384 e Length of formula contents 8 192 characters For further information about new features of Microsoft Excel 2007 see 2 10 8 Working with GANetXL After successful installation GANetXL integrates within MS Excel and creates a toolbar containing 5 control buttons Configuration Run Resume Results and About displayed in Figure 13 es Configuration amp Run Resume amp d Results n About Figure 13 GANetXL Toolbar Each of the buttons controls one of the key components of GANetXL This new vers
37. s Constraints are used when it is wanted to penalise certain variables for going out of the bounds For instance in a multiple objective problem if one of the objectives is the cost of a solution and the budget is only 2M then solutions outside of this are useless and should be discouraged Constraints in GANetXL are handled by Excel It is users responsibility to write the formulas To enable use of constraints tick the corresponding checkbox and enter address of an Excel cell which contains penalty cost SO or infeasibility MO of given solution see Figure 23 Example of a Constraint The value of objective function must not exceed 50 Let us assume that the objective function is stored in cell C5 The value of the penalty cell might look similar to this LE C5590 105 50 L000 0 The above formula penalises all solutions violating given constraint 19 GANetXL 2006 Configuration Wizard m Excel Link Options Constraints This tabsheet allows specification of constraints IF the use constraints is wanted then tick the Use Constraints checkbox and enter address of cell which contains penalty of given solution in SO case or infeasibility of the solution in MU Use Constraints lnfeasibulity Infeasibility Cell E1 3 Constraints Constraints are used when it is wanted to penalize certain variables for going aut of bounds For instance in a multiple objective problem if one of the objectives is the
38. seeesseeeesaaees 17 8 2 2 DSTIAING HG OD CCUN OS reread reeset OO OO 18 8 2 3 Defining the Constraints sereni 19 8 2 4 Simulan SUD DOM nesnenin ce Gticte as ttee eco suet aa dees ease Su tnt dese ee Soit ase E EE 20 8 2 5 Writing Values Back to EXCell ccccccscccsccceeeceeeceeeceeeceeeseeeceeeceeeseeeneeeneeenes 21 8 3 Setting Up Prograi Options 2 Ine Poo a a 21 8 3 1 mi RB Qre me NT PES 21 8 3 2 GAG WAG iret eset TP 22 8 3 3 Automate SaVvlldOsscestest oni veles put en oe E Menu tse Mic ec dE 22 8 3 4 ACD Sin nits nana marinas Mert aac etd pert Meno nan Mend parts Mert pan Keke pert ene pant dd pda MRS panel amen 23 8 3 5 WISCCHANCOUS sgrnan EEEa 24 9 4 Advanced CohflgUratlor aoro ctore rotten te ae petente Eit cito pto te eot este Dee e e Coa 25 8 5 SELON INCI Tal a RUN es gece esptin ae cinsiGurida E caine aed onsilunane EE 25 8 5 1 Saving the lesulls uuu oat eer el heheh oat ek er ut ci eal 25 8 5 2 Displaying the Progress of a Run cccccecccsccceccceeeceeeceeecsecceeeceeecueeeeeenass 26 8 6 Resuming Suspended Run ccccceccsececsceceeeceuceceueccueeceusecueseusessueseeeessueseeeeeaes 27 8 6 1 Resuming Computation Comprising of Multiple Runs 28 8 TAG RES UIE c 28 8 7 1 Sitigle ODICCIV GAC SUIS ogc eet hears ese ate tenti eut eee netted 28 8 7 2 Multiple Objective Results ccccecccseccceeec
39. the new Heplacer solutions created are added t the current population rather Weakest than creating a whole new T ditor population To maintain the eae lur oraiemal population size therefore some lutions must be replaced First Weaker O Deciding which solutions to Bu Bonk replace is the job of the idit Replacer There are number of Unit Seer criteria for deciding which O FAITE KIA solutions are replaced in Choose replacer The newe individual iz added to the population which is then sorted according to fitness The Cancel Figure 20 Choosing replacer used in SO Steady State 9 2 Defining Link to Excel Worksheet This section describes all the options that can be set under the Excel Link tab 9 2 1 Defining the Chromosome Each of the decision variables for a problem constitutes a gene in the genetic algorithm All of the genes are appended together to form a chromosome Therefore the choice of genes determines what variables the genetic algorithm uses to discover optimal solutions Excel cells corresponding genes must occupy continuous area range Type in the range address e g A1 C5 and press the Update button to populate the grid containing parameters of genes Please note that the after the pressing the Update button the values of existing cells are preserved and new cells are filled in with default values 17 Hint To set the value of a whole column click on its heading with r
40. the wizard without saving any changes that have been made press the Cance Cancel Figure 14 Selecting the problem type 9 1 1 Population Size The second tab see Figure 15 allows defining the size of the population GA works with The population size is important as it determines the diversity of the population at the start of the run and also how long it takes to complete a run The population size must be an integer value The higher the value of population size is the longer it takes the algorithm to complete its run This is especially problem of the Generational Generational Elitist and NSGA ll algorithms It is recommended to enter value lower than 1000 as it might be difficult to stop the algorithm using Stop or Pause buttons on slower machines GANetXL 2006 Configuration Wizard Genetic Algorithm T Population BBEEEES Population The genetic algorithm works by maintaining a population af ealutions chromosomes fram which to select mutate and crossover The population size iz important az it determines the diversity of the population at the start of the run and also how long it takes to run GAMNetXL requires an integer number representing the size of the population ta be entered Please enter population size Population Size The higher the value af population size is the longer it takes the algorithm to complete its run This is especially problem af the Generational JGenerationa
41. ts of all the genes located before this crossover point of the chromosome A and the genes after this crossover point of chromosome B Similarly the second child consists of the first portion of chromosome B and the second portion of chromosome B Simple Multi Point Multi point crossover acts in the same way as single point but multiple points are selected along the chromosome This leads to a better distribution of genes across the offspring Uniform Random Uniform crossover is essentially the ultimate case of multi point crossover in that it selects each gene at random to be part of either child A or child B This makes the distribution of genetic material independent of the position of the gene in the chromosome GANetXL 2006 Configuration Wizard Genetic Algorithm Excel Link Options Crossover Type Population Algorithm Crossover Selector Mutator Choose crossover type and enter probability of crossover The crossover operator m designed to share information Crossover between individuals ta create Simple One Point entirely new solutions which have some of the attributes of Da their parents similar ta the way ampie Muk Boim in which sexual reproduction occurs in nature Morrmally twea offspring are created by crossing over two parents and they are often better solutions Crossover Rate 0 55 that either of their parents but also occasionally worse The choice of crossover operator can influence the effectiveness
42. ts you wish to of Position your mouse install Documentation over a component to i Examples see its description EPANET Demo 3A MeERL Figure 4 Selecting Setup type GANetXL can be installed into any folder on your computer However it should be installed on your hard drive and not on any removal devices Install Location Setup will install GAMetXL in the following folder To install in a different folder dick Browse and select another folder Click Next to continue C Program Files x86 GANet L Space required 10 9MB Space available 153 2GB 3A MeERL Figure 5 Choosing the target folder to install GANetXL If any examples were selected during the installation these would be put into the folder selected in the following step Install Location Choose the folder in which to install GANetxL Setup will install example spreadsheets shipped with GANetXL into the following folder ib240 Documents V3 ANetXL Space required 10 9MB Space available 153 26GB Aahetesl Figure 6 Choosing the target folder for examples In the following step it is possible to select a Start menu folder where GANetXL s shortcuts will be placed Start Menu Folder Choose a Start Menu folder for the GANetXL shortcuts Select the Start Menu folder in which you would like to create the program s shortcuts You can also enter a name to create a new folder I3AMetxL F Do not create shortcuts aA NerxL Figure 7 Conf
43. ule 1 Example Test Simulation Simulation allows linking G4Net lt L with other simulation packages used to evaluate fitness of solutions To enable this feature tick the appropriate checkbox on this tab and enter the name of VB macro to be called to evaluate fitness of an organism To ensure that the name of the macro has been entered correctly please press the Test button to try to execute the macro Please note that automatic re calculation of worksheet is disabled while GA computation is running It is the responsibility of user defined macro to ensure that worksheet is recalculated at the end of the evaluation if this is necessary Cancel Figure 24 Setting up GANetXL to work with other simulation packages To verify that a macro of the specified name can be executed by GANetXL please press the Test button to attempt to execute it 20 9 2 5 Writing Values Back to Excel This feature displayed in Figure 25 allows writing current generation and run back into specified Excel cells This might be used to implement user defined penalty multipliers that take into account progress of the algorithm GANetXL 2006 Configuration Wizard GeneticAlgorithm Excel Link Options Exposing GA Variables to Excel This feature allows writing current Write Current Run and Generation back to Excel generation and run back into specified Excel cells This might be Write Values Back to Excel used to implement user defined
44. utton at least for the first time in order not to skip any configuration parameters At the end of the set up process the last tab the Next gt button disappears Press the Ok button to save the settings or Cancel to leave Configuration without saving any changes Read the help on the right side of the wizard that contains explanation of the parameters that are configured 9 1 Configuring GA Parameters The first screen of the Configuration wizard see Figure 14 specifies the type of the problem If it is desired to optimize more than one objective function select Multiple Objective MO otherwise select Single Objective SO Depending on problem type chosen different options will be provided in the following steps 11 GANetXL 2006 Configuration Wizard GeneticAlgorithm Excel Link Welcome To set up all required Welcome to BAHN et L Add In Configuration Wizard This wizard helps you parameters fill in all the values to set up all required parameters you re required on each tab and press the ex button After Problem Type reaching the final tab in the Single Objective configuration wizard save the changes by pressing the OX Multiple Objectives button It iz only necessary to qo through all of the tabs in the wizard for the first time amp fter becoming familiar with configuring the parameters it is sufficient to change values in specific tabs and save the changes using the Os button To leave

Download Pdf Manuals

image

Related Search

Related Contents

VX user manual  inyector de fertilizante tipo venturi: construcción y evaluación  EastWest/Quantum Leap Pianos Silver Manual  "取扱説明書"  CA-D4000  hd 1080p wristwatch user`s manual  別添113 衝突被害軽減制動制御装置の技術基準 1. 適用範囲 この技術    

Copyright © All rights reserved.
Failed to retrieve file