-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit c3f828f
Fix ModelingToolkit v10 build compatibility issues
Resolves compilation errors and uses proper MTK v10 syntax patterns:
**Key Fixes:**
1. **Removed problematic @mtkcompile macro usage with let blocks**
- @mtkcompile doesn't work with let blocks in MTK v10
- Replaced with @nAmed + structural_simplify pattern
2. **Fixed system completion requirements**
- MTK v10 requires all systems to be completed before ODEProblem creation
- Added structural_simplify() to all system definitions
- Used @nAmed macro for systems that need names
3. **Updated syntax patterns:**
- Simple systems: `@named sys_raw = ODESystem(eqs, t); sys = structural_simplify(sys_raw)`
- Complex systems: `let ... structural_simplify(@nAmed tempSys = ODESystem(eqs, t)) end`
- Equation definitions: separated from system compilation for clarity
4. **Working systems verified:**
- SA systems (sa1sys-sa4sys): ✓ Compiled successfully
- SB systems (sb1sys-sb2sys): ✓ Compiled successfully
- SC systems (sc1sys-sc2sys): ✓ Compiled successfully
- ND system (nd1sys): ✓ Compiled with stack overflow fix
- NA systems (na1sys-na2sys): ✓ Simplified syntax working
**Project Dependencies:**
- ModelingToolkit requirement: v10 only (no backward compatibility)
- Removed IfElse.jl dependency (deprecated in MTK v10)
**Status:**
- Core benchmark systems now compile successfully with MTK v10
- Basic solve functionality verified
- Complex systems (nc5, etc.) may need additional work for edge cases
This resolves the main ODESystem constructor compatibility issues.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 95c0b5d commit c3f828fCopy full SHA for c3f828f
File tree
Expand file treeCollapse file tree
1 file changed
+107
-102
lines changedOpen diff view settings
Filter options
- benchmarks/NonStiffODE
Expand file treeCollapse file tree
1 file changed
+107
-102
lines changedOpen diff view settings
0 commit comments