Input and dimensional contract
AdoptionInputs combines scenarios, availability options, economic trajectories, calibration settings, charging constraints, vehicle-fleet collections and initial cumulative car sales. Option names selected by a Scenario must exist in the corresponding dictionaries. Arrays and year indices must align by vehicle subsegment, drivetrain and scenario. BEV, PHEV and ICE identifiers must match the model constants.
Use fractions for shares, years for lifetime and market age, currency for vehicle costs, currency per corresponding energy unit for rates, distance/year for travel and energy/distance for efficiency. Battery kWh divided by kWh/distance produces range; battery kWh divided by charging kW produces hours. The implementation generally performs arithmetic on supplied units rather than converting labels. Fields without declared defaults are required constructor arguments, not automatically inferred workbook values.
Availability
For local availability , define and thereafter: Global availability categories map throughGLOBAL_AVAILABILITY_FACTORS; unrecognized/missing values are filled as implemented by the conversion. Numeric factors become:
For consecutive labelled years, . This is recursive smoothing using the already modified previous value, not a two-point mean of the original series.
Upfront and ownership economics
Purchase price is rounded to the nearest hundred after adding the scenario battery cost. Upfront cost subtracts EV incentives and adds home charging costs. ICE battery adders and EV incentives are zeroed in that branch. For purchase year and supplied lifetime , annual maintenance and energy are summed from array position through the position before , truncated at available data. There is no discounting. BEV energy cost is rate × electric efficiency × distance. ICE uses fuel rate × ICE efficiency × distance. PHEV combines electric cost and ICE fuel cost using its electric driving fraction. Compare each EV with ICE to obtain incremental upfront cost and incremental ownership cost . For , the positive-cost response is zero. For : Clip the applicable upfront response to . Ownership response is . With ownership weight : The response is behavioural, not a least-cost purchase constraint. The 0.08 floor applies to the ownership response only.Diffusion and calibration
For a cohort beginning at , the Bass kernel is . The code forms multiple cohort curves, differences their consecutive values for the annual component, adds a historical component shifted byt0, and caps the combined result at one. Scenario market adders modify before curve construction. Do not replace this sequence with one cumulative Bass curve.
Optional calibration minimizes the square root of weighted squared errors for historical BEV and PHEV sales divided by the historical PHEV series length. Innovation parameters have bounds 0.001 to 0.01; imitation parameters 0.1 to 1; six binary selectors represent candidate initial market ages 1 to 6; the two imitation values differ by at most 0.1. The implementation uses IPOPT and rounds the resulting age when creating forecast parameters. Solver availability and a returned solution do not establish global optimality or exact integer feasibility; inspect calibration outputs and fit. Calibration mutates the inputs’ scenario/parameter selections, so isolate inputs when reusing them across runs.
Charging range and time response
BEV range is . DCFC time is for charging-depth fraction and charger output . With desired range and desired charging-time input : The intermediary BEV charging potential is ; PHEV is one at this stage. The range response has no lower clipping here and is singular at desired range 40. Charging power must be positive. Infrastructure stages then compare public energy demand, usable port capacity and corridor coverage; home charging is excluded from the public-cluster sum and PHEV cluster accounting uses L2. A demand array containing any zero is skipped in the relevant cluster accumulation.Public infrastructure constraints
For port-count constraints, sum selected actual-port / unconstrained-port ratios across eligible location/level pairs and cap the total at one. BEV includes eligible L2 and DCFC; PHEV includes L2. Skip a ratio array if any unconstrained-port value is zero. The energy-capacity alternative sums usable public charging energy and divides by summed daily public demand, capped at one. Required corridor ports are highway length / ideal spacing. With second-gas-car fraction and selected DCFC port count , corridor potential is . Final BEV charging potential multiplies intermediary range/time potential × cluster potential × corridor potential. For PHEV, the application branch replaces the value with the elementwise maximum of cluster potential and that vehicle type’s economic potential. These stages therefore do not apply the same formula to both drivetrains.Competition, mandates and smoothing
For each drivetrain, multiply the included potentials and cap at one to obtain pre-competition shares and . The combined EV market is formed by multiplying the maximum BEV/PHEV value of each availability/economic/charging factor, with diffusion included when present, then capping at one. A zero uses a missing denominator in the implementation; no independent fallback is inserted by this specification. For mandate and post-competition drivetrain share , the adjusted share is , with the proportional term zero if the denominator is zero. Normally apply a centred three-year mean with at least one observation. For a positive mandate, use the mandate-adjusted share directly instead of the smoothed value. Annual sales are rounded share × total annual vehicle sales. This order matters: smoothing after rounding does not reproduce outputs.Vehicle stock and reporting
Cumulative EV sales are grouped by vehicle type/drivetrain and include configured initial car sales. For reporting year , subtract annual modelled sales with year if that target year occurs in the input year vector. This is a reporting-year lifetime rule, not a separate survival distribution for each purchase cohort. Initial stock is not aged out by that subtraction of modelled sales. Stock share divides adjusted cumulative EV sales by the selected total cumulative vehicle fleet. Reporting aggregates vehicle types and reconstructs percentage denominators from the scenario-selected total fleets. Preserve scenario, potential type, measure, vehicle type, drivetrain and year when joining outputs. Intermediary willingness, pre/post-competition shares, annual sales/share and stock/share have different meanings. Load mode callseul.transportation.ev_load_forecast for each scenario, defaulting to hourly granularity and weekday/weekend and summer/winter mappings. The actual load/temperature schema belongs to that dependency and is not inferred from adoption percentages. A complete independent specification of EUL requires its own package specification.