Open
Conversation
Contributor
Benchmark Results (Julia vlts)Time benchmarks
Memory benchmarks
|
Contributor
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) |
Member
There was a problem hiding this comment.
simplify and especially expand are pretty expensive. This should ideally be done with semilinear_form or repeated application of Symbolics.linear_expansion.
Contributor
Author
There was a problem hiding this comment.
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
Member
There was a problem hiding this comment.
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.
5 tasks
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/ModelingToolkit.jl
that referenced
this pull request
Sep 3, 2025
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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Useful for nonlinear control-systems analysis and design