-
-
Notifications
You must be signed in to change notification settings - Fork 232
add input-affine equation decomposition #3912
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
base: master
Are you sure you want to change the base?
Conversation
Benchmark Results (Julia vlts)Time benchmarks
Memory benchmarks
|
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
src/input_affine_form.jl
Outdated
""" | ||
function input_affine_form(eqs, inputs) | ||
# Extract the input matrix g(x) by taking coefficients of each input | ||
g = [Symbolics.coeff(Symbolics.simplify(eq, expand = true), u) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simplify
and especially expand
are pretty expensive. This should ideally be done with semilinear_form
or repeated application of Symbolics.linear_expansion
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semilinear_form
appeared to be buggy and not doing what I wanted
https://juliahub.slack.com/archives/C03UEC0P6G0/p1756812154880999
linear_expansion
has this issue
help?> Symbolics.linear_expansion
│ Warning
│
│ The following bindings may be internal; they may change or be removed in future versions:
│
│ • Symbolics.linear_expansion
and it has failed to work for me in similar situations in the past JuliaSymbolics/Symbolics.jl#550
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can look into semilinear_form
. The linked linear_expansion
issue is simply that the expression was not affine. That isn't the case if this function requires the system to be affine in the inputs.
Adds explicit DiffEqBase import to resolve UndefVarError that occurs when running tests in SafeTestsets environment. The error manifested in CI at line 70 where DiffEqBase.ODEFunction is called but DiffEqBase was not directly imported, only available through transitive dependencies. Fixes CI failure in PR SciML#3912 InterfaceI test group. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Useful for nonlinear control-systems analysis and design