|
17 | 17 | - SimulationBuilder sets `_id_to_rownum` identity mapping for static simulations (`build_default_simulation`, `build_from_dict` / `build_from_entities`), for dynamic-population support. |
18 | 18 | - Add `PYTHON` variable to `tasks/lint.mk` so `make lint PYTHON=.venv/bin/python` works; fix style in `test_link_accessors.py` and remove unused variable in `test_many2one.py`. |
19 | 19 |
|
20 | | -## 44.3.0 |
| 20 | +## 44.3.0 [#1365](https://github.com/openfisca/openfisca-core/pull/1365) |
21 | 21 |
|
22 | | -#### New Features |
| 22 | +#### New features |
23 | 23 |
|
24 | 24 | - **Generic Entity Links (Phase 1-6)**: Introduced a new Liam2-inspired generic entity linking system avoiding rigid hierarchies like `Person -> Household`. |
25 | 25 | - Added new `Many2OneLink` and `One2ManyLink` models to create powerful inter-entity networks (e.g., `Person -> Employer`). |
26 | 26 | - Added implicit links directly binding members arrays. This powers the new `population.links` property natively inside `TaxBenefitSystem.instantiate_entities()`. |
27 | 27 | - Full capability to chain relationships via python: `person.mother.household.get("rent", period)`. |
28 | 28 | - Powerful vectorized declarative aggregations out-of-the-box (e.g., `households.persons.sum("salary", period, condition=is_female)`). |
| 29 | +- Add `as_of` attribute to `Variable` for persistent vector variables. |
| 30 | + - A variable declared with `as_of = True` (or `"start"` / `"end"`) stores its value at a given instant and automatically returns that value for any later period, until a new value is explicitly set — the vectorial analogue of OpenFisca parameters. |
| 31 | + - `as_of = "start"` (default when `True`): lookup uses the start of the requested period as reference instant. |
| 32 | + - `as_of = "end"`: lookup uses the end of the requested period (useful for annual variables like income tax). |
| 33 | + - Lookup is O(log P) via `bisect` on a sorted instants index. |
| 34 | + - Reference sharing: when consecutive stored values are identical, the same array object is reused, reducing memory usage for stable variables (e.g. `marital_status`, `housing_occupancy_status`). |
| 35 | + - Stored arrays are read-only (`writeable=False`) to prevent accidental in-place mutation. |
| 36 | + - Combining `as_of` with `set_input` dispatch helpers raises a `ValueError` at variable definition time. |
29 | 37 |
|
30 | | -#### Technical Changes |
| 38 | +#### Technical changes |
31 | 39 |
|
32 | 40 | - Backward compatibility is 100% maintained. Existing syntax via Projectors natively redirects to implicit links via modified `__getattr__`. |
33 | 41 |
|
|
0 commit comments