Repository navigation
Conversation
…on per element, array DAE) - Reduced models with arrays kept go to ArrayODEGen: derivative unknowns solved in array form (IndexReduction.solvedInArrays, checked against the element view), an OMJLIR front half (ArrayODEGenerationIR.jl); the scalarized path stays the fallback. - ArrayODEGen: per-element algebraic loops solved by one generated Newton solve per family of blocks; loops through the elements (blocks above NEWTON_BLOCK_SIZE) as an index-1 DAE (mass matrix, consistent initialization); an unknown read twice solved linearly. Only in models with arrays. - Evaluation: sum/product/min/max of an array literal. RHS algebraic buffer kept per problem. Assisted-by: Claude Opus 5.5
A maximum matching and the strongly connected blocks of the initialization rows (with the initialization equations' rows), solved block by block before the simultaneous phases. MSL EngineV6 initializes (the slider-crank loops' positions first; before, the gas forces at the zero guesses stalled the phases and the free initialization moved load.w). Assisted-by: Claude Opus 5.5
…uations - Slicing (ArraySlicing.jl): arrays the plan or the array-form solve treats element by element differently are split into element variables, readers unrolled, then retried. - resolveBindingReferences!: a binding reading an array element (I_31 = I[3, 1]) takes that element, not the whole array's binding. - OMJLIR front half: record/array arguments and record results of functions, subscripted expressions, scalar products, if-equations, fixed = false parameters. - Tests: IndexReduction.BoundaryWithArray, RecordsArray. Assisted-by: Claude Opus 5.5
…S, off) - rollComponents!: separately declared components of one class as arrays over the instances (OMJLIR T_COMPONENTS part; elements keep their names), their equations rolled into for-equations. - Slicing: rolled arrays split along inner dimensions only; requests collected per commit; new derivative arrays name their model array; slice references resolved. - Inlining, differentiation and the array-form solve for rolled records and slices. - Test: IndexReduction.SeparatePairs. Assisted-by: Claude Opus 5.5
…TS, off) - DAE unknowns solved block by block in schedule order by a sparse Newton (colored differences on the model's pattern), with the initial equations and in every event iteration; solver initialization off for array DAEs. - Differentiation of parts and elements of arrays that are no variable (record fields expanded into element variables) element by element. - Scalarized fallback of rolled models: SimCode names by the component member. - Test: ArrayPath.CoupledLoopEvents. Assisted-by: Claude Opus 5.5
…, invariants - Loops of more than NEWTON_BLOCK_SIZE instances torn (greedy, strict, pivoting within a variable) and solved where the equations reach them (ArrayBlockSolve.jl: factorization kept between calls, polished to round-off); the array DAE and OMBACKEND_ARRAY_DAE_EVENTS removed. - Before matching: literal operations folded, alias variables read through one representative. - After index reduction: calls inlined where a function's body runs into one expression. - invariants!: parameter-only values once per solve; crossings!: what the relations need. - Events: the relation whose crossing the root finder found flips (by its direction). - MSL EngineV6 (rolled): 0.12 s for 0.25 s (scalar path 0.20 s); matches it to 1.5e-8. Assisted-by: Claude Opus 5.5
…rors, time gradient - OMBACKEND_ROLL_COMPONENTS on by default. - StepRejectingRHS: an error in the array RHS rejects the step; kept until the run ends (a failed run throws it). The per-element Newton makes its unknowns NaN on non-finite residuals or a singular Jacobian. - tgrad!: central differences in t, near t = 0 a billionth of the run (the solver's step 6e-6 spanned MSL DifferenceAmplifier's 0.2 GHz sources). Assisted-by: Claude Opus 5.5
The model's own tgrad! type in the problem compiled the solver again for each array model (OM.jl suite with rolling on: 29 min; wrapped: 11 min). Precompile workload warms the wrapped type. Assisted-by: Claude Opus 5.5
Member
Author
|
Superseded by #94 (the same work, squashed). |
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.
Models translated with their arrays kept now stay in array code after index reduction, including models whose components are declared separately (MSL EngineV6's six cylinders), and that array code is faster than the scalar path on EngineV6.
solvedInArrays), an OMJLIR front half for ArrayODEGen; slicing of arrays the plan treats per element; records, functions and if-equations in array code.rollComponents!,OMBACKEND_ROLL_COMPONENTS, now on by default): separately declared components of one class rolled into arrays over the instances; elements keep their names.ArrayBlockSolve.jl), so the solver integrates the states only.invariants!), crossing functions from what the relations need (crossings!).EngineV6 (MSL 4.1.0), warm: 0.12 s for 0.25 s (scalar path 0.20 s); 1 s at tolerance 1e-8: 4.6 s (scalar path 16.6 s), load.w matching the scalar path to 1.5e-8.
Coverage-relevant defaults: array index reduction with rolling, and models with large loops plus events or initial equations, now take the array code. MSL 4.1.0 coverage with rolling on is running locally; results follow here.
test/runtests.jl1069/1069; OM.jl suite (all groups) 1773 pass, 0 failures, 11 min. Version not bumped yet.🤖 Generated with Claude Code