Modeling Quality 4

Adding a link to Clafer Moo Visualizer.


Defining quality attributes.

  • basic feature with cost and mass.
abstract Feature
cost : integer
mass : integer
  • feature that impacts comfort
abstract ComfortFeature : Feature
comfort : integer
  • feature that impacts fuel consumption
abstract FuelFeature : ComfortFeature
fuel : integer

Specifying individual contributions of features to quality and defining formulas for total variant quality.

abstract Car
ABS : ComfortFeature ?
[ cost = 2 ]
[ mass = 1 ]
[ comfort = 1 ]
xor Transmission : Feature
[ cost = 0 ]
[ mass = 0 ]
Automatic : FuelFeature
[ fuel = 2 ]
[ mass = 1 ]
[ comfort = 2 ]
[ cost = 4 ]
Manual : FuelFeature
[ fuel = 0 ]
[ mass = 1 ]
[ comfort = 1 ]
[ cost = 3 ]
FCA : FuelFeature ?
[ fuel = 2 ]
[ mass = 2 ]
[ comfort = 4 ]
[ cost = 5 ]
xor Sensor : Feature
[ cost = 0 ]
[ mass = 0 ]
Radar : Feature
[ cost = 3 ]
[ mass = 1 ]
Lidar : Feature
[ cost = 5 ]
[ mass = 1 ]
xor Alert : Feature ?
[ cost = 0 ]
[ mass = 0 ]
Haptic : ComfortFeature
[ comfort = 4 ]
[ cost = 2 ]
[ mass = 1 ]
Audible : ComfortFeature
[ comfort = 2 ]
[ cost = 1 ]
[ mass = 1 ]
CC : FuelFeature ?
[ fuel = 1 ]
[ mass = 1 ]
[ comfort = 3 ]
[ cost = 4 ]
ACC : FuelFeature ?
[ fuel = 2 ]
[ mass = 2 ]
[ comfort = 6 ]
[ cost = 3 ]
[ ACC => FCA ]
total_cost : integer = sum Feature.cost
total_comfort : integer = sum ComfortFeature.cost
total_fuel : integer = sum FuelFeature.cost
total_mass : integer = sum FuelFeature.mass

Defining an optimal car aCar and its optimization goals.

aCar : Car
<<min aCar.total_cost>>
<<min aCar.total_fuel>>
<<min aCar.total_mass>>
Module Downloads: | [.cfr] | [.html] |

Back to Intro