function mpc_chkadaptivecompatible(Obj)
% Utility:  check Obj.Model.Plant for compatability with adaptive mode

%   Authors: N L Ricker
%   Copyright 2014 The MathWorks, Inc.

% Criteria:
% 1)  state-space
% 2)  same Ts as controller
% 3)  delay free
Plant = Obj.Model.Plant;
Criteria = {'OK', 'OK', 'OK'};
if ~isa(Plant, 'ss')
    Criteria{1} = 'Violated';
end
if Plant.Ts ~= Obj.Ts
    Criteria{2} = 'Violated';
end
if hasdelay(Plant)
    Criteria{3} = 'Violated';
end
if ~all(strcmp({'OK'}, Criteria))
    ctrlMsgUtils.error('MPC:utility:AdaptiveDesignBasis',Criteria{1},Criteria{2},Criteria{3});
end