Skip to content

NEWS.md: document VectorContinuousCallback simultaneous-events change#3568

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:news-vcc-simultaneous-events
Apr 27, 2026
Merged

NEWS.md: document VectorContinuousCallback simultaneous-events change#3568
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:news-vcc-simultaneous-events

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Summary

PR #3230 was rolled into the v7 merge (#3242, shipped in 7.0.0), but NEWS.md never picked up an entry for it. The change has two user-visible aspects worth documenting separately:

  1. Behavior change. VectorContinuousCallback now fires every condition that crosses zero on a step, not just the first. Bouncing-balls-style and friction state-machine callbacks were affected.
  2. Breaking API change. The VCC affect! signature changed from affect!(integrator, event_index::Int) to affect!(integrator, simultaneous_events::Vector{Int8}), with each entry being 0 / -1 / +1 for "did not fire" / "upcrossing" / "downcrossing". affect_neg! is no longer called for VCC because the direction now rides on the mask.

This PR adds a new Callback changes section to NEWS.md, placed right after the existing DiffEqBase changes section (the affected code is in lib/DiffEqBase/src/callbacks.jl). The section covers:

  • The behavior change with one-line motivation.
  • The signature change with the Int8 encoding table.
  • A side-by-side v6 → v7 migration example.
  • Links back to #3230, #3242, and the post-merge stale-state fix #3549.
  • A short note on why the mask is Int8 rather than Bool (folding direction into the mask removes the affect! / affect_neg! split for VCC).

Test plan

  • Documentation-only change; verified the encoding table and migration code match the in-tree implementation in lib/DiffEqBase/src/callbacks.jl (docstring at line 488, apply_callback! dispatch at line 540).
  • CI — Markdown / spell check on this PR.

🤖 Generated with Claude Code

PR SciML#3230 was rolled into the v7 mega-PR SciML#3242 and ships in 7.0.0, but
NEWS.md never picked up an entry for it. Two distinct user-visible
changes need calling out:

1. Behavior: when multiple conditions of the same VCC cross zero on the
   same step, all of them now fire. The old implementation invoked the
   user's affect! only for the first crossing.

2. Breaking API: the VCC affect! signature changed from
       affect!(integrator, event_index::Int)
   to
       affect!(integrator, simultaneous_events::Vector{Int8})
   where each entry is 0 / -1 / +1 to encode "did not fire" /
   "upcrossing" / "downcrossing". affect_neg! is no longer called for
   VCC since direction lives in the mask.

Add a "Callback changes" section right after "DiffEqBase changes"
(callbacks.jl lives in lib/DiffEqBase) with the encoding table, a
side-by-side migration example, links to SciML#3230 / SciML#3242 / SciML#3549, and a
short note explaining why the mask is Int8 rather than Bool.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas merged commit 7cb01c4 into SciML:master Apr 27, 2026
75 of 85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants