Revision 8a57f3b03992351f46c4537fd0d9351592278d2b (click the page title to view the current version)

Android Phone Example with four Objectives

Back to Introduction

Here’s a simple example of a model suitable for optimization using ClaferMoo. In order to analyze the model and explore the Pareto front in ClaferMoo Visualizer, click the link below:


If you’re not sure what you can do in the analyzer, try the following workflow.

In this model, we have a product line of phones that consists of Features and SecurityFeatures. We want to find all optimal configurations of aPhone.

var gwr=document.getElementById('graphWithRefs0'); gwr.style.display='block'; gwr.scrollLeft=this.scrollLeft; this.style.display='none'; var gwr=document.getElementById('graphWithRefs0'); gwr.style.display='block'; gwr.scrollLeft=this.scrollLeft; this.style.display='none'; -4,4 -4,-150.6 244,-150.6 244,4 -4,4 c0_Feature abstract Feature 11.00 c0_SecurityFeature abstract SecurityFeature : Feature 11.00 c0_SecurityFeature->c0_Feature 152.94,-120.27 156.44,-130.27 159.94,-120.27 152.94,-120.27 c0_MobilePhone abstract MobilePhone 11.00 c0_MobilePhone->c0_Feature 114.62,-135.18 108.2,-136.64 112.27,-134.71 108.74,-133.99 108.74,-133.99 108.74,-133.99 112.27,-134.71 109.27,-131.35 114.62,-135.18 c0_MobilePhone->c0_Feature 114.65,-133.85 108.17,-134.98 112.33,-133.26 108.83,-132.37 108.83,-132.37 108.83,-132.37 112.33,-133.26 109.5,-129.75 114.65,-133.85 c0_MobilePhone->c0_Feature 114.98,-132.2 108.45,-132.98 112.7,-131.49 109.26,-130.4 109.26,-130.4 109.26,-130.4 112.7,-131.49 110.07,-127.83 114.98,-132.2 c0_MobilePhone->c0_SecurityFeature 142.38,-95.03 135.82,-94.55 140.28,-93.89 137.11,-92.17 137.11,-92.17 137.11,-92.17 140.28,-93.89 138.39,-89.8 142.38,-95.03 c0_MobilePhone->c0_SecurityFeature 145.91,-95 139.38,-94.24 143.86,-93.78 140.76,-91.92 140.76,-91.92 140.76,-91.92 143.86,-93.78 142.15,-89.61 145.91,-95 c0_aPhone aPhone : MobilePhone 11.00 c0_aPhone->c0_MobilePhone

From the graph, we can see that the phone product line consists of four features and two security features.

Modeling the Optimization Problem

First, we need to define features with some quality attributes performance, energy, and mass:

abstract Feature
performance -> integer
energy -> integer
mass -> integer

There’s also a special kind of feature, SecurityFeature, which has another quality attribute security:

abstract SecurityFeature : Feature
security -> integer

Next, we need to write a model of our product line with some variability regarding the features. We need to set the values for quality attributes of each feature.

abstract MobilePhone
or Connectivity
Bluetooth : Feature
[ this.performance = 9 ]
[ this.energy = 10 ]
[ this.mass = 2 ]
USB : Feature
[ this.performance = 10 ]
[ this.energy = 5 ]
[ this.mass = 3 ]
Wifi : Feature
[ this.performance = 22 ]
[ this.energy = 17 ]
[ this.mass = 6 ]
PasswordProtection : SecurityFeature ?
[ this.security = 5 ]
[ this.performance = 1 ]
[ this.energy = 2 ]
[ this.mass = 0 ]
FingerprintProtection : SecurityFeature ?
[ this.mass = 0 ]
[ this.security = 5 ]
[ this.performance = 2 ]
[ this.energy = 4 ]
total_performance -> integer = sum Feature.performance
total_energy -> integer = sum Feature.energy
total_security -> integer = sum SecurityFeature.security
total_mass -> integer = sum Feature.mass

Next, we define our product aPhone.

aPhone : MobilePhone

The product is underspecified allowing for all possible valid combinations of features.

Finally, we define the following four optimization goals.

“Minimize total energy”:

<<minimize aPhone.total_energy>>

“Maximize total performance”:

“Minimize total mass”:

<<minimize aPhone.total_mass>>

“Maximize total security”:

<<maximize aPhone.total_security>>

In order to analyze the model and explore the Pareto front in ClaferMoo Visualizer, click the link below: