Preferences in Noos are built by means of preference methods. A
preference method takes a set of elements and an ordering criterion and
builds a partially ordered set--a poset that will be noted
where A is a set of elements and
is a order
relation over elements of A. Since preference methods are full-fledged
Noos methods, they can be used freely as any other method.
Different kinds of ordering criteria give rise to different preference methods. An example of an ordering criterion is using a numeric value in some specific feature, e.g. consider the price of computers (brands are invented!) in the following example:
The first preference method, cheaper-pref builds an ordering based on
prices of computers for the set of computers in the set feature,
resulting in the poset
{PC-blue PC-red
PC-white}--namely a
poset where PCs are preferred from cheaper to more expensive. This
preference method is a refinement of increasing-preference, a built-in
preference method that takes a set of elements in feature
set and the identifier of a
numeric feature in feature-name and builds a poset where the preferred
elements are those with a lesser value in the specified feature.
The faster-pref is a refinement of the increasing-preference
built-in method that constructs a poset, in a similar way, using a numeric
feature with a preference for higher values with respect to lesser values.
In the Example 2.14 the poset generated is
{PC-white PC-red
PC-blue}.
In this case both preference methods induce a total order, but in general
only a partial order can be assured.
Finally, ppc-pref preference method is based on
subsumption-preference built-in that uses subsumption between Noos
terms. ppc-pref creates
a poset where all elements that are subsumed by the term in feature
pattern are preferred to those elements that are not subsumed. In
Example 2.14 the subsumed elements have to satisfy that they are
personal-computers with a power-pc CPU. As a result,
PC-blue and PC-white are preferred to PC-red--but no
preference exists between PC-blue and PC-white. That is to
say, poset {PC-white
PC-red,PC-blue
PC-red} is produced.