Skip to contents

compose(sys, subsystems) adds subsystems; extend(sys, base) merges the equations, variables and maps of sys into base; flatten(sys) collapses the hierarchy into one system whose variables are namespaced; complete(sys) marks a system as finished so its variables are accessed without the top level namespace and problems can be built from it.

Usage

compose(sys, ..., name = NULL)

extend(sys, base, name = nameof(sys), ...)

flatten(sys, ...)

complete(sys, flatten = TRUE)

toggle_namespacing(sys, value)

hierarchy(sys)

Arguments

sys

A System.

...

Subsystems (for compose), or arguments passed on.

name

Name of the result.

base

The system to extend.

flatten

Whether complete() flattens the system first.

value

Whether variables are namespaced on access.

Value

A System.

Details

flatten(), compose() and extend() also accept non-system arguments and then behave as symcompR's functions of the same names (extend() of a symcompR DimensionSystem or UnitSystem), so attaching both packages is safe.