You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplifies the code to use clean, modern MTK v10 syntax:
**Before:**
```julia
@mtkcompile sys = let
eqs = [D(y[1]) ~ -y[1], ...]
ODESystem(eqs, t)
end
```
**After:**
```julia
eqs = [D(y[1]) ~ -y[1], ...]
@mtkcompile sys = ODESystem(eqs, t)
```
**Changes:**
- Require ModelingToolkit v10 only (removed v9 compatibility)
- Extract equation definitions outside let blocks for clarity
- Use direct `@mtkcompile sys = ODESystem(eqs, t)` syntax
- Eliminated unnecessary let blocks where possible
- Improved code readability and maintainability
**Systems Updated:**
- SA systems: sa1sys-sa4sys (simplified equation definitions)
- SB systems: sb1sys-sb2sys (extracted parameter-dependent equations)
- ND system: nd1sys (clean syntax with stack overflow fix)
- NA systems: na1sys-na2sys (simplified single-variable systems)
**Benefits:**
- Modern, idiomatic ModelingToolkit v10 code
- Cleaner separation of equation definition and system compilation
- Easier to read and maintain
- Follows current MTK best practices
More systems can be simplified using this pattern as needed.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
0 commit comments