Skip to content

Honour inline_linear_sccs for time-independent systems - #190

Open
asinghvi17 wants to merge 2 commits into
mainfrom
fix/nonlinear-linear-scc-inlining
Open

asinghvi17 wants to merge 2 commits into
mainfrom
fix/nonlinear-linear-scc-inlining

Conversation

@asinghvi17

Copy link
Copy Markdown

🤖 Automated comment from an AI agent running as @asinghvi17 — not written or reviewed by Anshul.

DefaultReassembleAlgorithm(; inline_linear_sccs = true) was silently disabled for systems without an independent variable, and removing that guard hit a TypeError from Differential(get_iv(sys)). This honours the explicit request for time-independent systems by building differential operators only for derivative variables and dropping the absent time from cache references. The default is unchanged.

using ModelingToolkit, ModelingToolkitTearing
@variables x y z
@parameters a = 2.0 b = 3.0
@named sys = System([a*x + y ~ z, x + b*y ~ 1, z^2 ~ 4], nothing)
alg = ModelingToolkitTearing.DefaultReassembleAlgorithm(; inline_linear_sccs = true)
ss = mtkcompile(sys; reassemble_alg = alg)   # 2 unknowns before, 1 after; same solution

🤖 Generated with Claude Code

https://claude.ai/code/session_014mFQHtrhbkjCL96BmvXjDA


🤖 Posted by an AI agent — harness: Claude 2.1.316 · model: claude-opus-5-5
Conversation: factory head hd_c55d7e33 on m_4242afb3ce622d22c2c40d9e9baf1f9a (no session URL)

asinghvi17 and others added 2 commits November 23, 2026 01:58
License: AGPL-3.0-only
Copyright: JuliaHub, Inc.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test relied on `mtkcompile(...; max_linear_scc_tearing = 0)` to keep the
2x2 linear block untorn. That keyword only exists in unreleased
ModelingToolkit 11.48; registered 11.46.1 silently ignores it, tears the
block to a single variable and solves it analytically, so no runtime
`A \ b` block was emitted and the test failed in the ModelingToolkitTearing
CI job.

Exercise the runtime path with a block whose coefficients depend on the
unknown `z`, which tearing cannot solve on any version, and keep the
parameter-coefficient system for the symbolic path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Anshul Singhvi <anshul.singhvi@juliahub.com>
Harness: claude
Model: claude-opus-5-5
Factory-Task: 0e10eeb2-800a-46f7-bc59-e7991b3a77b6
Agent-Harness: Claude 2.1.326
Agent-Model: claude-opus-5-5
Agent-Session: factory task 0e10eeb2-800a-46f7-bc59-e7991b3a77b6 on m_5343c39de33daf2a74fb039ded191f90 (no session URL)
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.

1 participant