Skip to main content
eFleet compares fleet replacement strategies using vehicle purchases, energy consumption, maintenance, emissions costs, and model penalties. It produces vehicle replacement plans and annual fleet results.

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 ss be StartYear, HH be Horizon, and Amax⁡A_{\max} be the largest retirement age.
  • Annual replacement decisions iterate over s,…,H−1s,\ldots,H-1.
  • Cost and energy arrays extend through H+Amax⁡H+A_{\max}, inclusive.
  • Input validation requires the relevant time series to cover H+Amax⁡+1H+A_{\max}+1.
  • EndYear is also used by the penalty calculation for ICE vehicles continuing after that year.
The cost comparison sums annual values without a discount factor. It should not be interpreted as a discounted net-present-value calculation.

Calculate energy consumption

Let DD be annual distance, II annual idle hours, and NN working days. Daily distance is d=D/Nd=D/N, and daily idle hours are i=I/Ni=I/N.

ICE vehicles

With driving fuel intensity fdf_d and idle fuel intensity fif_i: FICE=Dfd+IfiF_{\mathrm{ICE}}=D f_d+I f_i

Battery-electric vehicles

With driving electricity intensity ede_d and idle electricity intensity eie_i: EBEV=Ded+IeiE_{\mathrm{BEV}}=D e_d+I e_i 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: de=B−ieied,FPHEV=N(d−de)fd,EPHEV=NBd_e=\frac{B-i e_i}{e_d}, \qquad F_{\mathrm{PHEV}}=N(d-d_e)f_d, \qquad E_{\mathrm{PHEV}}=NB Here BB 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 FF, electricity use EE, and year-specific energy prices pf,tp_{f,t} and pe,tp_{e,t}: Cenergy,t=Fpf,t+Epe,tC_{\mathrm{energy},t}=F p_{f,t}+E p_{e,t} The Excel field Fuel Costs includes both purchased fuel and electricity. If emissions intensities gf,tg_{f,t} and ge,tg_{e,t} are expressed in grams of CO₂-equivalent per fuel unit and per kWh: Gt=Fgf,t+Ege,t106,CGHG,t=Gtpcarbon,tG_t=\frac{F g_{f,t}+E g_{e,t}}{10^6}, \qquad C_{\mathrm{GHG},t}=G_t p_{\mathrm{carbon},t} GtG_t is in tonnes. The code applies the 10610^6 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: J=∑t(Ccapital,t+Cenergy,t+Cmaintenance,t+CGHG,t+Pt)J=\sum_t \left( C_{\mathrm{capital},t} +C_{\mathrm{energy},t} +C_{\mathrm{maintenance},t} +C_{\mathrm{GHG},t} +P_t \right) PtP_t 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:
  1. Evaluate the available replacement options for each fleet need. EV availability years and the permitted number of PHEV purchases restrict the options.
  2. Keep the option with the largest positive reduction in summed costs.
  3. Rank the fleet needs by that reduction, largest first.
  4. Select purchases within the whole-fleet and subtype limits. If early replacement is disabled for a vehicle, it must be eligible for retirement.
  5. Carry the selected decisions into the next year.

Replacement limits

Percentages are converted to counts using the number of fleet needs: Lfleet,t=round⁡(pfleet,t100nfleet)L_{\mathrm{fleet},t} =\operatorname{round}\left(\frac{p_{\mathrm{fleet},t}}{100}n_{\mathrm{fleet}}\right) 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 WorkingDays does not override that value. Direct FleetNeed construction 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

The efleet command uses run.py and fleet_results.py. The separate efleet_old command uses the older implementation. Source package and installation guide