Skip to contents

Focus on part of a model: keep only some features, with the links among them. Whether two features are related does not depend on the other features, so the result is exactly the graphs of the model restricted to that part (property P3 of the future-work report): no solver has to run again.

Usage

vp_subset(model, features, name = paste0(model$name, " (part)"))

Arguments

model

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

features

The variable features to keep (for example those of one subsystem, chosen by name with grepl()).

name

A name for the part.

Value

A model, like that of vp_read(), with only those features (core and dead features are kept in its list).

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
part <- vp_subset(band, c("Screen", "TouchScreen", "BT40", "BLEv40"))
vp_links(part, "excludes")
#> # A tibble: 4 × 2
#>   from        to    
#>   <chr>       <chr> 
#> 1 Screen      BT40  
#> 2 TouchScreen BLEv40
#> 3 TouchScreen BT40  
#> 4 BLEv40      BT40