www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conswitch/contwostage.m

    function c = contwostage( con )
%CONTWOSTAGE convert switch to two-stage constraint model
%
%  c = contwostage( con )

%  Copyright 2008 The MathWorks, Inc. 


cif = getInputFactors(con);
nloc = nFactors(con.ConList{1});

clocal= conrange(cif(1:nloc));
globalModel = makeXregmodel( cif(nloc+1:end), 'xreginterprbf' );

c  = contwostage( clocal , globalModel);