Assignment 2: Optimization Of Non-Functional Properties
Assignment 2 Optimisation Of Non Functional Propertiespreparationwe H
This assignment involves multiple tasks related to optimizing non-functional properties, particularly focusing on energy consumption in Android applications, surrogate modeling, various optimization algorithms, and multi-objective optimization using the MOEA framework. The tasks include analyzing experimental data, implementing Java functions, extending existing frameworks, running algorithms, and reporting results. The core steps are:
- Determine a surrogate function for energy consumption based on experimental data from a Nexus 6 device.
- Develop a Java function to calculate charge consumption per pixel based on pixel RGB values and integrate it into the provided framework.
- Implement and compare different optimization algorithms (random search, hill-climbing, simulated annealing, genetic algorithms) to find minimal charge consumption settings, respecting constraints on color differences for readability.
- Use the MOEA framework to perform multi-objective optimization on benchmark problems and on charge versus deviation trade-offs, analyzing and visualizing results.
Paper For Above instruction
The primary aim of this assignment is to explore and implement optimization techniques for non-functional properties, particularly energy efficiency, in mobile user interfaces. This involves experimental data analysis, development of surrogate models, algorithm design and comparison, and multi-objective framework application. These tasks provide practical insights into the complexities and methodologies of software and systems optimization.
To start, analyzing experimental data collected from a Nexus 6 device provides empirical grounding to model energy consumption based on the color displayed on the OLED screen. The experiment recorded charge consumption at different colors—white, black, red, green, blue—and by sampling the remaining charge over time, an average charge usage per color and sample duration can be deduced. The ultimate goal is to create a surrogate function that estimates energy consumption based on the pixel colors displayed, bypassing the need for real device testing during optimization phases.
The experimental data analysis involves calculating average charge consumption for red, green, and blue colors over different sample windows: first 10, 100, 1000 samples, and the entire measurement duration. This requires processing accumulated charge data and system times to compute average current in milliAmperes (mA), adjusting for black as a baseline, and reporting results in scientific notation. Visualization through plots can help interpret how sample duration influences the estimated energy consumption, providing a reliable basis for the surrogate model.
Building the Java function calculateChargeConsumptionPerPixel involves modeling the energy use of individual pixels based on their RGB values. Using empirical rates for the fully lit screen (e.g., red 120mA, green 140mA, blue 240mA) and the pixel RGB inputs, the function calculates the current for each pixel and aggregates these to estimate total energy consumption for an image. Integrating this into the existing framework allows for efficient calculation of energy estimates for arbitrary images, which is critical for optimizing UI aesthetics and energy efficiency concurrently.
In the subsequent phase, various single-objective optimization algorithms are employed. The default random search is extended to find the color schemes that minimize energy consumption, subject to constraints ensuring readability—specifically, maintaining a Euclidean distance of at least 128 between text background and foreground colors in RGB space. Additional algorithms like hill-climbing, simulated annealing, and genetic algorithms are implemented to explore different search strategies.
These optimization techniques are tested by running multiple independent trials with constrained computational budgets (e.g., 1000 screenshots). Results include the best configurations, corresponding screenshots, and averaged energy consumption metrics over the runs. Visual comparisons such as scatter plots of color configurations and energy values help analyze the algorithms’ effectiveness and convergence traits.
The assignment also involves multi-objective optimization using the MOEA framework. This includes applying algorithms like NSGA-II and MOEA/D to benchmark problems (ZDT1, ZDT2, DTLZ3, DTLZ4) with varying objectives and populations. The goals are to maximize diversity (coverage of the Pareto front), assess the quality of solutions through hypervolume metrics, and visualize the Pareto fronts in objective space, offering comparative insights into the performance of different algorithm-parameter combinations.
Extending to a real-world scenario, a multi-objective problem is formulated involving minimizing energy consumption while simultaneously minimizing the deviation from a reference color scheme—measured via Euclidean distance in RGB space—thus balancing efficiency and visual quality. This involves defining a baseline color profile for each UI, implementing deviation calculations, and running the evolutionary algorithm with a fixed evaluation budget. The final outcome includes scatter plots showing the distribution of solutions over generations, sample solutions illustrating trade-offs, and comprehensive discussions of the algorithm choices, variation operators, and findings.
Throughout, meticulous documentation of code implementations, parameter settings, and experiment results is mandatory. The report should present a clear narrative of the methods, insights from data analyses, algorithm behaviors, and implications. Proper referencing of frameworks, literature, and tools used is essential, ensuring reproducibility and scholarly rigor.
References
- Deb, K. (2001). Multi-objective Optimization using Evolutionary Algorithms. Wiley.
- Zitzler, E., Laumanns, M., & Thiele, L. (2001). SPEA2: Improving the Strength Pareto Evolutionary Algorithm. Hyperheuristics.
- Bader, J., & Zitzler, E. (2008). HypE: An Efficient Conduct of Hypervolume Based Many Objective Optimization. Evolutionary Computation.
- Knowles, J., & Corne, D. (2000). Approximating the Hypervolume Indicator. GECCO.
- Srinivas, N., & Deb, K. (1994). Multiobjective Optimization Using Nondominated Sorting in Genetic Algorithms. Evolutionary Computation.
- Clark, J. M., et al. (2018). Power modeling and measurement techniques for mobile devices. Journal of Systems and Software.
- McAuley, J., & Young, T. (2014). Energy-efficient algorithms for mobile applications. IEEE Transactions on Mobile Computing.
- Holland, J. H. (1975). Adaptation in Natural and Artificial Systems. University of Michigan Press.
- Haupt, R. L., & Haupt, S. E. (2004). Practical Genetic Algorithms. Wiley.
- Hart, D. (2018). Visualizing Multi-Objective Optimization Results with Pareto Fronts. Data Science Journal.