Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document the fully_determined kwarg to structural_simplify #2880

Merged
merged 2 commits into from
Jul 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/systems/systems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ end
$(SIGNATURES)

Structurally simplify algebraic equations in a system and compute the
topological sort of the observed equations. When `simplify=true`, the `simplify`
function will be applied during the tearing process. It also takes kwargs
`allow_symbolic=false`, `allow_parameter=true`, and `conservative=false` which
limits the coefficient types during tearing. In particular, `conservative=true`
limits tearing to only solve for trivial linear systems where the coefficient
has the absolute value of ``1``.
topological sort of the observed equations in `sys`.

The optional argument `io` may take a tuple `(inputs, outputs)`.
This will convert all `inputs` to parameters and allow them to be unconnected, i.e.,
simplification will allow models where `n_unknowns = n_equations - n_inputs`.
### Optional Arguments:
+ optional argument `io` may take a tuple `(inputs, outputs)`. This will convert all `inputs` to parameters and allow them to be unconnected, i.e., simplification will allow models where `n_unknowns = n_equations - n_inputs`.

### Optional Keyword Arguments:
+ When `simplify=true`, the `simplify` function will be applied during the tearing process.
+ `allow_symbolic=false`, `allow_parameter=true`, and `conservative=false` limit the coefficient types during tearing. In particular, `conservative=true` limits tearing to only solve for trivial linear systems where the coefficient has the absolute value of ``1``.
+ `fully_determined=true` controls whether or not an error will be thrown if the number of equations don't match the number of inputs, outputs, and equations.
"""
function structural_simplify(
sys::AbstractSystem, io = nothing; simplify = false, split = true,
allow_symbolic = true, allow_parameter = true, conservative = false, fully_determined = true,
kwargs...)
newsys′ = __structural_simplify(sys, io; simplify, kwargs...)
if newsys′ isa Tuple
Expand Down
Loading