% Clean up script for the Traffic Light Negotiation Test Bench Example
%
% This script cleans up the example model. It is triggered by the
% CloseFcn callback.
%
%   This is a helper script for example purposes and may be removed or
%   modified in the future.

%   Copyright 2019-2020 The MathWorks, Inc.

clear actor_Profiles
clear assigThresh
clear BusActors1
clear BusVehiclePose
clear BusDetectionConcatenation1
clear BusDetectionConcatenation1Detections
clear BusDetectionConcatenation1DetectionsMeasurementParameters
clear BusLaneBoundaries1
clear BusLaneBoundaries1LaneBoundaries
clear BusLanes
clear BusLanesLaneBoundaries
clear BusMultiObjectTracker1
clear BusMultiObjectTracker1Tracks
clear BusRadar
clear BusRadarDetections
clear BusRadarDetectionsMeasurementParameters
clear BusRadarDetectionsObjectAttributes
clear BusVision
clear BusVisionDetections
clear BusVisionDetectionsMeasurementParameters
clear BusVisionDetectionsObjectAttributes
clear BusVehicleToWorldActors1
clear BusLaneCenterInfo
clear Cf
clear clusterSize
clear Cr
clear default_spacing
clear Iz
clear LaneSensor
clear LaneSensorBoundaries
clear lf
clear lr
clear m
clear M
clear max_ac
clear max_steer
clear min_ac
clear min_steer
clear N
clear numSensors
clear numTracks
clear posSelector
clear PredictionHorizon
clear scenario
clear tau
clear time_gap
clear Ts
clear v0_ego
clear v_set
clear velSelector
clear egoVehDyn
clear driver_decel
clear FB_decel
clear headwayOffset
clear PB1_decel
clear PB2_decel
clear timeMargin
clear timeToReact
clear max_dc
clear scenarioFcnName
clear tau1
clear tau2
clear intersectionCenter
clear referencePathInfo
clear referencePathSwitchThreshold
clear trafficLightStateTriggerThreshold
clear ReferencePathInfo
clear waypointsSize
clear refpathSize
clear intersectionInfo
clear LateralJerkMax
clear LongitudinalJerkMax
clear hFigResults
clear hFigScenario




% If ans was created by the model, clean it too
if exist('ans','var') && ischar(ans) && (strcmpi(ans,'BusMultiObjectTracker1')) %#ok<NOANS>
    clear ans
end
