Commit f96bc90
committed
Remove ModelingToolkit dependency from ODEProblemLibrary for faster compilation
This PR rewrites the ModelingToolkit-dependent example problems to use direct ODE function definitions instead of symbolic computation, which significantly improves compilation speed and eliminates circular dependency issues.
## Changes Made
- **Removed ModelingToolkit dependency**: Eliminated ModelingToolkit from dependencies in Project.toml
- **Rewritten ODE problems**: Converted all symbolic ODE definitions to direct function definitions
- **Maintained API compatibility**: All problem exports remain the same
- **Preserved problem accuracy**: Same initial conditions, parameters, and mathematical formulations
## Problems Rewritten
### ode_simple_nonlinear_prob.jl
- Van der Pol equations (prob_ode_vanderpol, prob_ode_vanderpol_stiff)
- ROBER biochemical reactions (prob_ode_rober)
- Rigid body equations (prob_ode_rigidbody)
- Hires problem (prob_ode_hires)
- Orego problem (prob_ode_orego)
### strange_attractors.jl
- Thomas cyclically symmetric attractor (prob_ode_thomas)
- Lorenz equations (prob_ode_lorenz)
- Aizawa equations (prob_ode_aizawa)
- Dadras equations (prob_ode_dadras)
- Chen equations (prob_ode_chen)
- Rössler equations (prob_ode_rossler)
- Rabinovich-Fabrikant equations (prob_ode_rabinovich_fabrikant)
- Sprott equations (prob_ode_sprott)
- Hindmarsh-Rose equations (prob_ode_hindmarsh_rose)
## Benefits
- **Faster compilation**: No symbolic computation overhead
- **Eliminated circular dependencies**: No more ModelingToolkit → DiffEqCallbacks → ODEProblemLibrary → ModelingToolkit cycle
- **Reduced dependency footprint**: Fewer dependencies to install and manage
- **Better test reliability**: No more precompilation failures due to circular dependencies
## Testing
- All tests pass (Aqua.jl quality assurance)
- All rewritten problems maintain correct dimensions, initial conditions, and parameters
- ODE functions are callable and produce finite derivatives
- Maintains backward compatibility with existing code
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 27dbd53 commit f96bc90
File tree
4 files changed
+228
-191
lines changed- lib/ODEProblemLibrary
- src
4 files changed
+228
-191
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | 9 | | |
12 | | - | |
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 14 | | |
21 | 15 | | |
22 | 16 | | |
23 | 17 | | |
24 | 18 | | |
25 | 19 | | |
26 | | - | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | 4 | | |
9 | 5 | | |
10 | 6 | | |
11 | 7 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 8 | | |
16 | 9 | | |
17 | 10 | | |
| |||
30 | 23 | | |
31 | 24 | | |
32 | 25 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 26 | + | |
40 | 27 | | |
| 28 | + | |
41 | 29 | | |
42 | 30 | | |
43 | 31 | | |
44 | 32 | | |
45 | | - | |
46 | 33 | | |
47 | 34 | | |
48 | | - | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 51 | + | |
54 | 52 | | |
55 | | - | |
56 | | - | |
57 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
73 | | - | |
74 | | - | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
101 | 106 | | |
102 | 107 | | |
103 | 108 | | |
| |||
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
121 | | - | |
122 | | - | |
123 | | - | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| |||
174 | 177 | | |
175 | 178 | | |
176 | 179 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
186 | 193 | | |
187 | 194 | | |
188 | 195 | | |
| |||
207 | 214 | | |
208 | 215 | | |
209 | 216 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 217 | + | |
214 | 218 | | |
215 | 219 | | |
216 | 220 | | |
| |||
356 | 360 | | |
357 | 361 | | |
358 | 362 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
372 | 378 | | |
373 | 379 | | |
374 | 380 | | |
375 | 381 | | |
376 | 382 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
| 383 | + | |
381 | 384 | | |
382 | 385 | | |
383 | 386 | | |
| |||
401 | 404 | | |
402 | 405 | | |
403 | 406 | | |
404 | | - | |
405 | | - | |
| 407 | + | |
406 | 408 | | |
407 | | - | |
408 | | - | |
| 409 | + | |
409 | 410 | | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
414 | 419 | | |
415 | 420 | | |
416 | 421 | | |
| |||
430 | 435 | | |
431 | 436 | | |
432 | 437 | | |
433 | | - | |
434 | | - | |
435 | | - | |
| 438 | + | |
0 commit comments