function this = initializeParallel(this)
%

%   Copyright 2016-2022 The MathWorks, Inc.

if this.PrivOptions.UseParallel
    this.Parallel = bayesoptim.BayesoptParallel(this.ObjectiveFcn, this.PrivOptions.NumCoupledConstraints, this.PrivOptions.Verbose);
    this = checkAndSetMinWorkerUtilization(this);
    if ~isempty(this.Parallel.ObjectiveNargout)
        this.PrivOptions.ObjectiveNargout = this.Parallel.ObjectiveNargout;
    end
end
end
