www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@mdevtestplan/MakeBdryData.m

    function [broot,TP] = MakeBdryData( TP )
%MAKEBDRYDATA Collects relevant info from test-plan and makes a bdry dev tree
%
%  [broot,TP] = MAKEBDRYDATA( TP )
%
%  See also XREGBDRYROOT, MDEVTESTPLAN.

%  Copyright 2000-2012 The MathWorks, Inc. and Ford Global Technologies, Inc.


nStages = numstages(TP);

broot = xregbdryroot( name( TP ), nStages, xregbdrydata(address(TP)) );

if numstages(TP)==2
    % make branches for two-stage boundary tree
    
    % Response model
    bd = makechildren( broot, [], 1 );
    broot = AddChild( broot, bd );
    broot = addbest( broot, 1 );
    
    % Global Model
    bd = makechildren( broot, [], 2 );
    broot = AddChild( broot, bd );
    broot = addbest( broot, 2 );
    
    % Response Model
    bd = makechildren( broot, [], 0 );
    broot = AddChild( broot, bd );
    broot = addbest( broot, 3 );
end

% set input info in tree 
broot = setInputFactors( broot, coninputfactor( HSModel( TP.DesignDev ) ) );

TP.ConstraintData = address(broot);
xregpointer(TP);

end