Running an Optimization Simulation

  1. The 3D window will not be able to be re-positioned after starting the optimization. Maneuver the geometry so that all corners of the module can be seen, a Top View may be beneficial.

  2. Click the Run button at the bottom right corner of the Optimization Controller Window. The window shown in Figure 10 will appear before the optimization simulation starts, warning that some of the capabilities will be disabled in the main Detect3D window during the simulation. The 3D window will not be able to be re-positioned after pressing run.

  3. You will be able to see the progress of the calculation in the current generation from the progress bar that appears below the chart, shown in Figure 11.


    Tutorial 12 - Figure 10 - Warning for entering Optimization Mode



    Tutorial 12 - Figure 11 - Progress bar of the optimization controller


  4. While the generation is calculating, check the Preview checkbox on the bottom right. A preview of the currently calculated layout will appear after the first generation is calculated.

    1. You will notice that the first few layouts show detectors pointing at strange angles, such as away from the zone. This is normal, and due to the fact that the algorithm starts from a set of completely random layouts but improves with each new generation. Read more about the optimization algorithm in the How It Works section.

    2. The default number of detectors to be added at the start of the layout is 5. This will be reduced as the calculation progresses.



      Tutorial 12 - Figure 12 - Beginning of an optimization simulation, showing a preview of the best layout after the first generation.


  5. The coverage tab of the Optimization Controller shows the coverage of the currently calculated best layout plotted against the generations of the optimization. The blue line indicates 1ooN coverage and the red line indicates 2ooN. After 30 generations, your Coverage chart may look similar to Figure 13. It is important to note that the Genetic Algorithm is a stochastic process – no two simulations are the same. Therefore, your results will not look exactly like the ones below. However, the main points of an initial increase in coverage, followed by an eventual flat-line should be roughly consistent.


    Note: Since the genetic algorithm is a stochastic process, your graphs will not be exactly the same as the ones shown in this tutorial. Read more about the Key Points of Understanding for more information.



    Tutorial 12 - Figure 13 - Chart of the achieved coverage for each generation. The initial increase from generation 0 to 6 is due to the gradual improvements in the layout found by the Genetic Algorithm


  6. Click the Fitness Tab to open up the fitness chart of the simulation. After 40 generations, your chart should look similar to the image below. The green line indicates the Fitness of the Fittest Individual, and is the most important indicator on this graph. The dark gray line indicates the mean fitness of the population, while the light gray line indicates the diversity of the population.

    1. The fitness of the fittest individual (green line) should always increase except when a detector is removed, then the fitness should decrease. From Figure 14, we can see two times when the maximum fitness decreased, indicating that two detectors were removed. A rule of thumb is that the algorithm can remove a detector when the maximum fitness is approximately 1.

    2. Given this information, we can see that not only is the maximum fitness flat-lining, but its final value of about 0.68 is a long way from 1, so we can deduce that further detector count reductions are unlikely. The flat-lining of the max fitness is the best indication that the genetic algorithm cannot improve on the layout any further and may be stopped.




      Tutorial 12 - Figure 14 - Chart of the fitness of the simulation for each generation.



  7. When the green Max Fitness Line become flat for more than 30 generations, press Stop.

  8. Click on the # Detectors tab. This shows how many detectors were required to achieve the target coverage. For this tutorial, 5 detectors were initially used, which was reduced to 4 detectors and then reduced further to 3 detectors. This aligns with our understanding of the maximum fitness graph, where two reductions in fitness were shown.



    Tutorial 12 - Figure 15 - Chart of the number of detectors in each generation


  9. Click on the Log Tab. This displays text information about each generation, and various events that have occurred during the simulation. Clicking on the text expands the information.


    Tutorial 12 - Figure 16 - A log for each generation is stored in this tab of the optimization controller


  10. Click on the Best Layouts tab. Here a list of all the layouts found by the Genetic Algorithm that have a fitness greater than the target coverage and have the same number of the detectors as the best layout (3, in this case). This gives you options to manually choose between viable layouts. Sometimes, only 1 layout may be listed as only 1 layout has achieved the coverage target with the minimum number of detectors.

    1. Clicking on each layout will update the preview in the 3D window as well as the coverage summary at the top right of the window.



      Tutorial 12 - Figure 17 - Best Layouts Tab of the Optimization Controller, allowing you to choose the final layout added to the project.



  11. Choose the layout that is most suitable and click ADD to Project. The detectors of the selected layout will then be added to the project, appearing with green FOVs, as in the image below.



    Tutorial 12 - Figure 18 - Project with optimized layout added.


  12. Save the project by clicking Save from the menu bar.


Note: For this small square module, you can achieve the performance target criteria yourself (manually) with 3 detectors and probably achieve better coverage than the optimization was able to. However, the goal set for the algorithm was to reduce detector count with a goal of 1ooN above 90% and 2ooN above 50%. For some cases it is much faster to manually define the devices yourself than the run an optimization. Read more about beating the optimization in the "Beating" the Algorithm section.


Optimization data is stored within the zone that it is preformed on. As long as the zone is not deleted the optimization data will be saved.


Continue to the next section to add a sub-zone to the project and running a multi-goal optimization.