Commit ae335e1
test/simulate_jumps: use setp instead of integrator.ps for callback param updates
JumpProcesses.SSAIntegrator does not expose a `ps` accessor (only
`derivative_discontinuity` is in its property list under SciMLBase v3),
so `integrator.ps[:k] = value` fails with FieldError. The four affected
callbacks were the actual cause of the 4 errors in
`Tests (*, Simulation)` jobs:
Higher-order MAJ parameter updates (combinatoric=true) — line 451
Higher-order MAJ parameter updates (combinatoric=false) — line 500
Mixed-order MAJ parameter updates (combinatoric=true) — line 545
Combinatoric true/false equivalence (3X→Y) — line ~645
Migration: capture the parameter setter via SymbolicIndexingInterface.setp
once at problem-construction time, then call it inside the callback. SII
is implemented on the integrator interface (not via getproperty), so it
flows through SSAIntegrator correctly:
setk! = setp(jprob_cb, :k)
function affect_cb!(integrator)
setk!(integrator, 24.0)
reset_aggregated_jumps!(integrator)
end
This is the v3-canonical pattern for symbolically-indexed parameter
updates inside callbacks; same shape works on ODEIntegrator,
SDEIntegrator, and SSAIntegrator alike.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>1 parent 190a7f9 commit ae335e1
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
| 451 | + | |
450 | 452 | | |
451 | | - | |
| 453 | + | |
452 | 454 | | |
453 | 455 | | |
454 | 456 | | |
| |||
496 | 498 | | |
497 | 499 | | |
498 | 500 | | |
| 501 | + | |
499 | 502 | | |
500 | | - | |
| 503 | + | |
501 | 504 | | |
502 | 505 | | |
503 | 506 | | |
| |||
541 | 544 | | |
542 | 545 | | |
543 | 546 | | |
| 547 | + | |
544 | 548 | | |
545 | | - | |
| 549 | + | |
546 | 550 | | |
547 | 551 | | |
548 | 552 | | |
| |||
641 | 645 | | |
642 | 646 | | |
643 | 647 | | |
| 648 | + | |
| 649 | + | |
644 | 650 | | |
645 | | - | |
| 651 | + | |
646 | 652 | | |
647 | 653 | | |
648 | 654 | | |
| |||
0 commit comments