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

Conversation

MasonProtter
Copy link
Contributor

@MasonProtter MasonProtter commented Jul 20, 2024

This provides a bit more information about the options available to structural_simplify.

Before:

help?> structural_simplify
search: structural_simplify structural_simplify!

  structural_simplify(sys; ...)
  structural_simplify(sys, io; simplify, split, kwargs...)
  

  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.

  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.

after:

help?> structural_simplify
search: structural_simplify structural_simplify!

  structural_simplify(sys; ...)
  structural_simplify(
      sys,
      io;
      simplify,
      split,
      allow_symbolic,
      allow_parameter,
      conservative,
      fully_determined,
      kwargs...
  )
  

  Structurally simplify algebraic equations in a system and compute the topological
  sort of the observed equations in sys.

  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.

@ChrisRackauckas
Copy link
Member

Actually, let me take a shot at sorting this a bit.

@MasonProtter MasonProtter force-pushed the document-fully-determined branch from 5edbcb1 to e46d155 Compare July 20, 2024 20:09
@ChrisRackauckas
Copy link
Member

did you just delete my changes?

@MasonProtter
Copy link
Contributor Author

MasonProtter commented Jul 20, 2024

Oh crap, did I? I didn't know you were pushing directly to my branch I'm sorry. Must have happened when I was trying to fix the merge conflict

@MasonProtter
Copy link
Contributor Author

MasonProtter commented Jul 20, 2024

you can re-force push them if you still have them locally

@ChrisRackauckas
Copy link
Member

this is good.

@ChrisRackauckas ChrisRackauckas merged commit 31059a3 into SciML:master Jul 20, 2024
18 of 22 checks passed
@MasonProtter MasonProtter deleted the document-fully-determined branch July 21, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants