Choose a workflow
Use models.dunsky.com for the EV Fleet workflow. Follow the platform run guide to configure a run and retrieve its results. For local execution, install the eFleet package and run:What the model represents
A fleet need is one vehicle service requirement: its region, facility, subtype, annual distance, idle hours, and initial vehicle. Replacement options describe ICE, BEV, and PHEV technologies for that subtype.
“Optimal” is the output label for a sequential, greedy annual selection. It is not a guarantee of the globally lowest-cost fleet schedule across all years and vehicles.
Prepare the input workbook
Keep distance, energy, fuel, price, and emissions units consistent. Regional prices and intensities fall back to the
all region when the regional series is unavailable.
Time horizon
Let beStartYear, be Horizon, and be the largest retirement age.
- Annual replacement decisions iterate over .
- Cost and energy arrays extend through , inclusive.
- Input validation requires the relevant time series to cover .
EndYearis also used by the penalty calculation for ICE vehicles continuing after that year.
Calculate energy consumption
Let be annual distance, annual idle hours, and working days. Daily distance is , and daily idle hours are .ICE vehicles
With driving fuel intensity and idle fuel intensity :Battery-electric vehicles
With driving electricity intensity and idle electricity intensity : The usage calculation assigns the whole distance to electricity. It assumes recharging can supply the required energy; battery range does not constrain BEV service feasibility in this calculation.Plug-in hybrid vehicles
If one battery cycle covers the day’s driving and idling, the PHEV uses electricity only. Otherwise, electricity use is capped at one daily battery cycle and the remaining driving distance uses fuel: Here is battery energy capacity. The partially electric branch assumes positive battery capacity; idling is supplied electrically. Use physically consistent inputs so idling does not exceed the available battery energy.Calculate annual costs and emissions
For annual fuel use , electricity use , and year-specific energy prices and : The Excel field Fuel Costs includes both purchased fuel and electricity. If emissions intensities and are expressed in grams of CO₂-equivalent per fuel unit and per kWh: is in tonnes. The code applies the conversion directly, so the emissions inputs must match that convention. ICE and BEV maintenance costs equal annual distance times their respective maintenance cost per distance. PHEV maintenance uses a distance-weighted blend of electric and ICE maintenance rates.Cash costs and model penalties
The selection calculation compares: is a model penalty used to encourage replacement when age or mileage thresholds are exceeded and to penalize continued ICE use after the configured end year. It is not a cash expenditure. Review Penalty Costs separately when interpreting financial results.Select annual replacements
For each decision year:- Evaluate the available replacement options for each fleet need. EV availability years and the permitted number of PHEV purchases restrict the options.
- Keep the option with the largest positive reduction in summed costs.
- Rank the fleet needs by that reduction, largest first.
- Select purchases within the whole-fleet and subtype limits. If early replacement is disabled for a vehicle, it must be eligible for retirement.
- Carry the selected decisions into the next year.
Replacement limits
Percentages are converted to counts using the number of fleet needs: Whole-fleet limits use rounding. For a subtype, a strictly positive fractional count below one is raised to one; a zero count stays zero. The whole-fleet cap still applies. Retirement eligibility considers both initial vehicle age and mileage. Subsequent replacement cycles use the smaller of retirement age and the floored mileage-based life.Worked energy and operating-cost example
The following values are illustrative assumptions, not recommended defaults.
At a carbon price of $100/t, the annual calculations are:
The BEV reduces those annual costs by $3,623.70. This comparison excludes vehicle purchases and model penalties; it does not determine a replacement year on its own.
Interpret the Excel outputs
TCO comparison values and annual strategy costs answer different questions. Do not treat the lowest single-vehicle TCO as a complete fleet replacement schedule.
Assumptions and interpretation limits
- Annual distance, idle hours, and technology efficiency determine energy use. Energy prices and emissions intensities vary by year.
- The annual purchase ranking does not solve a joint, globally optimal fleet scheduling problem.
- BEV range, charger availability, depot capacity, and hourly charging schedules are not feasibility constraints in the usage calculation.
- Workbook runs currently use 250 working days; supplying
WorkingDaysdoes not override that value. DirectFleetNeedconstruction can use another value. - Discounting is not applied in the annual strategy comparison or the TCO export.
- Optimal and TCO Comparison should be interpreted alongside model penalties, replacement caps, and vehicle service assumptions.
Implementation and validation
Theefleet command uses run.py and fleet_results.py. The separate efleet_old command uses the older implementation.
Source package and installation guide