Skip to content

Migrate scenario2 intervention events to discrete variables - #343

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:codex/fix-scenario2-event-api
Sep 12, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:codex/fix-scenario2-event-api

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Change

Migrate scenario2's three event-updated β values to @discretes and replace equation-form event affects with Pair updates. Event times, update values, original unknowns, thresholds, and optimizer budgets are unchanged. Add concise docs guidance to check numerical validity as well as execution.

This branch includes the separate scenario2 observable-defaults prerequisite commit; only the final commit is the event migration.

Failing before / passing after

The runner evaluates the actual nine named scenario2 documentation blocks:

$ julia --startup-file=no --project=docs ../EasyModelAnalysis-intervention-audit/.validation/run-scenario2.jl <page-before-event-fix>
ERROR: LoadError: The equations of a system must involve the unknowns/observables. The following equations were found to have no unknowns/observables:
[block 6; three β equations; exit 1]

$ julia --startup-file=no --project=docs ../EasyModelAnalysis-intervention-audit/.validation/run-scenario2.jl docs/src/scenarios/scenario2.md
PASS scenario2 block 9
[all nine blocks executed; exit 0]

Separate analytical checks: old discrete API failed; migrated discrete API 4/4, continuous control 3/3 passed. Local QA 23/23; Core 31/31, exit 0. Scoped formatting, spelling, and diff checks passed.

Execution is not numerical success: the unchanged timed optimizer returned MaxTime, objective Inf, u=[45,45], and maximum hospitalization 0.0527007069 > 0.05. The separate parameterized-times follow-up addresses that failure. This PR alone must not be described as fixing the optimization.

Full strict docs did not pass: exit 124 at six hours, with 46 failed blocks elsewhere and no final completion summary.

Validation scope

Historical results below were run locally with Julia 1.11.9 before rebasing onto current main (which now includes #336 and #337). The changed page is preserved by the rebase. These are not claims that the full documentation or all downstream packages pass. The user requested draft publication with these outstanding gates disclosed.

Native test/build commands, with a workspace-local TMPDIR and headless plotting:

GROUP=QA julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()'
GROUP=Core julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()'
GKSwstype=100 timeout 21600 julia --startup-file=no --project=docs docs/make.jl

GPU paths, downstream packages, and deployment were not verified. No tests or documentation errors were disabled.

Please ignore this draft until reviewed by @ChrisRackauckas.

The post-rebase page is byte-identical to its locally validated pre-rebase version. Fresh post-rebase QA and focused page checks were launched on September 12 and remain pending at publication; they are not counted as passes. Post-rebase spelling and diff checks passed.

Prerequisite draft: #342

🤖 Generated with Codex CLI 0.153.4 (model: gpt-6-astra; session: local session ID 01a0598f-11b9-72d1-91d9-b2fbb186557d).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.153.4
Agent-Model: gpt-6-astra
Agent-Session: local session ID 01a0598f-11b9-72d1-91d9-b2fbb186557d
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review September 12, 2026 12:02
@ChrisRackauckas
ChrisRackauckas force-pushed the codex/fix-scenario2-event-api branch from 8e5847c to 6f2ddcb Compare September 12, 2026 12:02
@ChrisRackauckas
ChrisRackauckas merged commit f17e3d1 into SciML:main Sep 12, 2026
3 of 4 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