Closed
Description
The detailed-save API calculates economy reports one year at a time (#1049, #1051). Budget-window reports, which compare a reform with its baseline in each year of a window of up to 75 years, have no detailed-save path yet. The draft #982 built one on the simulation service's own tables, which no longer exist, and scheduled its years through call reports, which were removed.
What's needed
POST /reportsaccepts a budget window (report_type: "budget_window",budget_window_size1 to 75, ending by 2200) and creates, in one transaction, the report, onebudget_window_runsrow and a report run per year naming it and the year.- At most five years of a window are under way at once. The simulation service starts the first ones; each year's coordinator, when its year ends, starts the window's earliest waiting years.
- The window is marked succeeded when every year has succeeded, and failed as soon as a year fails, with no further years started.
- The stuck-run sweep leaves a window's waiting years to the window, fails the window when it fails one of its years, and settles a window that no year advances any more.
- The v2 functions' Modal container limits leave room for windows running at their cap.
The Public API grants the roles the updates of budget_window_runs this needs in PolicyEngine/policyengine-api#4267.
Metadata
Metadata
Assignees
Labels
No labels
Activity