Skip to contents

The four kinds of triangle: three features all related to one another, by requirement (in either direction) or by conflict. Each kind is a modelling idiom. A fifth pattern must never occur: a feature that requires two features that exclude each other (it would be dead).

Usage

vp_triangles(model, minimal = FALSE)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

minimal

TRUE to count on the skeleton and the primitive conflicts, which drops the triangles that are mere consequences of others.

Value

A tibble with kind, meaning and count.

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_triangles(band)
#> # A tibble: 5 × 3
#>   kind            meaning                                                  count
#>   <chr>           <chr>                                                    <dbl>
#> 1 no conflict     a chain of requirements                                      8
#> 2 one conflict    alternatives with a common requirement                       6
#> 3 two conflicts   an inherited conflict                                       21
#> 4 three conflicts three alternatives                                           6
#> 5 impossible      a feature requiring, directly or through the third, two…     0