Model-Year Transitions
Two assets under <oem>/<market>/transitions/ record what changed between each base
model's newest model year and the year before it. The synthetic-candidate rules and demand
rules for a new model year are written from these changes.
| Asset | Component | One row per |
|---|---|---|
transitions/features | FeatureTransitionsComponent | option code of a base model |
transitions/attributes | AttributeTransitionsComponent | attribute of a base model |
The logic is in ai_dagster.derived.feature_transitions and
ai_dagster.derived.attribute_transitions.
Which years are compared
The years come from each base model (base_model_id). The newer year is the base model's
newest model_year. The older year is the latest year before it that the base model has,
so a base model that skipped a year is compared across the gap. A base model with one year
has a null prev_model_year, and each of its codes has the change type
BASE_MODEL_ADDED.
An OEM publishes the base models of one model group in a new model year at different times. If the years were chosen per model group, a base model not yet published in the group's newest year would be compared against that year and reported as removed.
model_group_newest_model_year is the newest model_year of any base model in the
base model's model group. A base model whose model_year is older than
model_group_newest_model_year either has not been published in that year yet or has been
discontinued. No column of the models table distinguishes the two cases.
Base models pair across years on base_model_id. An OEM that renames a model code
between years maps the new code to the old one in the base_model_id_aliases setting
of its consolidated component, so the two years still pair.
Feature transitions
A row is keyed by (base_model_id, option_code). model_group_id is the base model's
model group in the newer year. A code can appear on several feature rows in one year, one
outside every package and one inside each package that includes it. Those rows are
combined into one value for each year:
| Column | Value for one year |
|---|---|
feature_ids | the feature_id of every feature row of the code |
is_configurable | true if any row is configurable |
price | the price of the row outside every package; null if every row is inside a package |
parent_package_codes | the packages that include the code |
package_children | the codes inside the code, when the code is a package |
Each column is written once for each year, as new_<column> and prev_<column>. A code
missing from one year has nulls in that year's new_ or prev_ columns.
change_types lists every change that applies:
| Change | Meaning |
|---|---|
BASE_MODEL_ADDED | the base model has no earlier year |
FEATURE_ADDED, FEATURE_REMOVED | the code is in one of the base model's two years |
BECAME_CONFIGURABLE, BECAME_STANDARD | is_configurable changed |
PARENT_CHANGED | parent_package_codes changed |
NOW_PACKAGE_ONLY, NOW_STANDALONE | the configured standalone_field changed |
PRICE_CHANGED | the price outside every package changed |
PACKAGE_CONTENT_CHANGED | the package's codes changed, including a package emptied or newly filled |
NO_CHANGE | none of the above |
new_in_model_group is true when any base model of model_group_id has the code in
model_year. prev_in_model_group is true when any base model of the base model's model
group in prev_model_year has the code in that year. prev_in_model_group is null when
prev_model_year is null. These columns distinguish a code removed from every base model
of the group from a code that only one base model lost. A base model of the group not yet
published in model_year does not count toward new_in_model_group.
Attribute transitions
A row is keyed by (base_model_id, attribute_type, attribute_value). A code counts
toward an attribute in a year only where the code is configurable that year. The
attributes come from featurization/features.
The codes that map to each attribute are listed by what happened to them:
entered_featureslists the codes that gained the attribute. Each code'sprovenanceis the code's own change (BASE_MODEL_ADDED,FEATURE_ADDEDorBECAME_CONFIGURABLE), orMAPPING_ONLYwhen only the code's attributes changed.exited_featureslists the codes that lost the attribute. Each code'sprovenanceisFEATURE_REMOVED,BECAME_STANDARDorMAPPING_ONLY.carryover_featureslists the codes that have the attribute in both years.price_changeslists the carryover codes whose price changed.package_changeslists the carryover codes whose package membership changed.
change_types lists every change that applies:
| Change | Meaning |
|---|---|
ATTRIBUTE_ADDED | the attribute is in the newer year only |
ATTRIBUTE_REMOVED | the attribute is in the older year only |
COMPOSITION_CHANGED | the attribute is in both years, and a code entered or exited it |
PRICE_CHANGED | the attribute is in both years, and price_changes is not empty |
PACKAGE_MEMBERSHIP_CHANGED | the attribute is in both years, and package_changes is not empty |
NO_CHANGE | none of the above |