finesse.symbols.Symbol.expand_symbols

Symbol.expand_symbols()[source]

A method that expands any symbolic parameter references that are themselves symbolic. This can be used to get an expression that only depends on references that are numeric.

Parameters
symSymbolic

Symbolic equation to expand

Examples

>>> import finesse
>>> model = finesse.Model()
>>> model.parse(
...     '''
...     var d 300
...     var c 6000
...     var b c+d
...     var a b+1
...     '''
... )
>>> model.a.value.expand_symbols()
<Symbolic='((c.value+d.value)+1)' @ 0x7faa4d351c10>