Skip to contents

Can these features be selected together in one product? (A wish list, or partial configuration that only selects.)

Usage

vp_can_go_together(model, wishes)

Arguments

model

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

wishes

A character vector of features, or a list of such vectors to check several wish lists at once.

Value

A tibble with one row per wish list: wish, possible (FALSE: certainly not; TRUE: no two features stand in each other's way, which a rule over three or more features can still contradict) and reasons (the root conflicts that forbid it, separated by ";").

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_can_go_together(band, c("TouchScreen", "HeartRateSensor"))
#> # A tibble: 1 × 3
#>   wish                         possible reasons
#>   <chr>                        <lgl>    <chr>  
#> 1 TouchScreen, HeartRateSensor TRUE     ""     
vp_can_go_together(band, list(c("Screen", "BT40"), c("Screen", "NFC")))
#> # A tibble: 2 × 3
#>   wish         possible reasons               
#>   <chr>        <lgl>    <chr>                 
#> 1 Screen, BT40 FALSE    "Screen excludes BT40"
#> 2 Screen, NFC  TRUE     ""