Repository navigation
Conversation
`dummy_derivative` now passes a numeric Jacobian evaluated at the initial point of the system to `StateSelection.dummy_derivative_graph!`, which re-selects only when the structural choice is rank-deficient there. Only structurally incident pairs are differentiated. The initial point comes from the initial conditions, bindings and `tspan` of the system, or from the new `initial_point` keyword of `mtkcompile`. Problem construction warns when `u0` contains non-finite values, telling values given by the caller apart from values derived by initialization, the symptom of a selection or solve direction that is singular at `t0`. Requires StateSelection 1.12 and ModelingToolkitTearing 1.21. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
|
To the AI bot, please run the tests of MultibodyComponents.jl with this PR before merging. |
Contributor
Author
My bot (too scared to talk to you) says it did:
|
This branch has not been deployed
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.
Fixes #5212. Index reduction could pick states, or tearing a solve direction, that are singular at
t0(car axis:λ1eliminated by dividing by0.1 sin(10t); slider crank and Andrews' squeezer: the coordinate made algebraic has a vanishing or parallel constraint-Jacobian column at the initial configuration), withNaNinu0orUnstableat the first step as the only signal.dummy_derivativepasses a numeric Jacobian at the initial point toStateSelection.dummy_derivative_graph!, which only re-selects when the structural choice is rank-deficient there (Use the initial point to avoid singular dummy-derivative selections and solve directions JuliaComputing/StateSelection.jl#164). The initial point comes frominitial_conditions, bindings and the system'stspan; the newmtkcompile(sys; initial_point = ...)keyword supplies it explicitly (e.g. theu0map orguesses(sys)). Guesses are not used implicitly.u0contains non-finite values, distinguishing values given by the caller from values derived by initialization (the symptom of a selection that is singular att0).Tested:
test/structural_transformation/initial_point_selection.jl(fails before, passes after; includes cases asserting the selection is unchanged when the structural choice is non-singular or the initial point is unknown). Requires StateSelection 1.12 and ModelingToolkitTearing 1.21.🤖 Generated with Claude Code