Repository navigation
Conversation
…of the continuous system Backend.ClockPartitioning, after the BDAE is created: clock variables and equations resolved to a base clock and a sub-clock (factor, shift), the partitions split at sample/hold and sub-clock operators, clocks inferred (clocked when-clauses, inferred factors, rational clocks related), the clocked partitions in BACKEND_DAE.clocked. translate refuses them until they are generated. Also: traverseExpTopDown and traverseExpClk handle clock constants, the BDAE printer prints them. All 75 MSL 4.1.0 Clocked models partition; four checked against omc's dumpSynchronous. Assisted-by: Claude Opus 5.5
ClockedLowering: one when-clause per base clock; sub-clocks by a tick counter and noEvent guards; previous, sample, hold, sub-clock operators, interval() (event clocks too), firstTick(); statements sorted by their data. Event clocks count whole ticks; compound event conditions become a lifted Boolean. Clocked partition variables stay out of the discrete synthesis (ClockPartitioning.clockedVariables). Tuple if-expressions use ifelse. Assisted-by: Claude Opus 5.5
The solution evaluates observed variables with the parameters' final values: der() of an if-equation's variable (MSL 4 KinematicPTP) read the last branch throughout. structural_simplify runs again with such readers irreducible, accepted with the same differential states. Assisted-by: Claude Opus 5.5
…aders getIrreducibleVars left out a state an if-equation defines (getAllVariables skips states outside der(); nested if-equations, residual equations): MSL 4 KinematicPTP's s became an observed ifelse read back with the final branch. The re-simplify now keeps only the direct readers of index-reduction derivatives of if-conditions (sd, sdd): kept as 130 unknowns, fullRobot's friction modes moved. Assisted-by: Claude Opus 5.5
Assisted-by: Claude Opus 5.5
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.
Clocked (synchronous) Modelica, MLS 16.
Backend.ClockPartitioning): clocks resolved (clock variables, rational, real, event and solver clocks, sub-clock operators), partitions bysample/holdboundaries and sub-clock operators, clock inference across sub-partitions.Backend.ClockedLowering): one when-clause per base clock; sub-clocks by a tick counter with noEvent guards;previous,sample,hold,subSample/superSample/shiftSample/backSample,interval()(event clocks too),firstTick(); statements sorted by their data; event clocks on compound conditions and their sub-clocks. Refused withUnsupportedLowering: solver clocks, Boolean whens inside a clocked partition, algebraic loops at a tick.Checked locally: tests 454/454; OM.jl tests pass (6 broken); MSL validate 3.2.3 347/425, 4.1.0 435/534 (before: 347, 366; the 77 Clocked models 73).
Version 0.6.0; compat OMFrontend 1.7.4 (OpenModelica/OMFrontend.jl#105, same branch).
🤖 Generated with Claude Code