generateDriveCycles
R2026bSyntax
Description
generateDriveCycles( generates the number
of drive cycles specified by the obj)NTrips property that satisfy all
configured UNECE Real Driving Emissions (RDE) constraints. The function exports generated
drive cycles as CSV files to OutputFolder and stores them in the
Data property of the RDE.DriveCycles object.
Note
Every property must be set before calling generateDriveCycles.
If any property is unset, the function returns an Index exceeds array
bounds error.
Examples
Input Arguments
Algorithms
For each of the NTrips trips, the
generateDriveCycles function completes these steps:
Retrieves constraint function handles for all configured RDE boundary conditions.
Generates a candidate trip using a gamma probability distribution parameterized by
ShapeParameterto produce velocity samples. The function then smooths the velocity profile usingsmoothdatawith the specifiedSmoothingMethodandSmoothingWindowLength.Evaluates the candidate trip against all constraints: trip duration, distance composition, average speeds, stop conditions, 95th percentile velocity times positive acceleration (VA95) high dynamic boundary, and relative positive acceleration (RPA) low dynamic boundary.
If the candidate trip does not satisfy all constraints, the function repeats steps 2 and 3 up to
NumberOfIterationstimes.Exports the valid trip as a timetable and writes it to a CSV file in
OutputFolder.
If the output folder specified by OutputFolder does not exist, the
function creates the folder automatically.
Version History
Introduced in R2024b