亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? seg_approx_lin.m

?? CheckMate is a MATLAB-based tool for modeling, simulating and investigating properties of hybrid dyn
?? M
字號:
function SEG = seg_approx_lin(A,Ainv,b,X0,SP0,T)

% Approximate a single segment of a flow pipe for a `linear` dynamics.
%
% Syntax:
%   "SEG = seg_approx_lin(A,Ainv,b,X0,SP0,T)"
%
% Description:
%   Compute a conservative approximation of a flow pipe segment in the time
%   interval "[0,T]" for the `linear` (affine) dynamics "dx/dt = A*x +
%   b". The inputs to this function are
%
%   * "A": the system matrix
%
%   * "Ainv": the inverse of "A" if it exists, otherwsie it should be
%     "[]"
%
%   * "b": constant input vector for the affine dynamics
%
%   * "X0": a "linearcon" object represeting the initial set
%
%   * "SP0": sample points on "X0" that are simulated to construct the
%     convex hull. Typically, "SP0" contains the vertices of "X0".
%
%   * "T": the time step for the flow pipe approximation
%
%   The output "SEG" is a "linearcon" object (a polytope) representing the
%   flow pipe segment approximation.
%
% Implementation:
%   To approximate the flow pipe segment, we first simulate the sample
%   points from time "t = 0" to "t = T" and compute the convex hull of the
%   sample points at time "t = 0" and "t = T". For the affine dynamics, the
%   sample points at time "t = T" can be found by the affine transformation
%
%
%
%   "x(T) = e^{A*T}*x(0) + e^{A*T} * integral_{s=0}^{s=T} e^{-A*s}*b ds"
%
%
%
%   The second term, the displacement in the affine transformation, in the
%   above expression is computed by the function "step_response()". The
%   affine transformation performed by calling the function "transform" for
%   the corresponding object type. After the convex hull is obtained, we
%   extract the matrix-vector pair "[CI,dI]" that represents the linear
%   inequality "CI*x <= dI" for the convex hull. The normal vectors for the
%   faces of the conex hull, which are the rows of the matrix "CI", are used
%   to solve the optimization problem.
%
%
%   
%   "max (x0 in X0, t in [0,T]) ci'*x(t,x0)"
%
%
%
%   where "ci" is the "i"-th normal vector and "x(t,x0)" denote the solution
%   to the affine differential equation. 

%   The optimization is performed by using the 'medium-scale' algorithm
%   'fmincon'. As the maximum x0 must lie inside the initial set X0, 
%   the constraints are represented by the hyperplanes defining the initial 
%   set and the time constraint is given by the maximum time T. 
% 
%   As for linear systems it is easy to compute the gradient function
%   analytically, 'fmincon' is provided with the analytical gradient value
%   for the optimization problem. This gradient value consists of the
%   gradient w.r.t time and the gradient w.r.t the initial conditions.
%   (K.S. 02/09/2004)
%
%
%   After solving the optimization problem, we adjust the inequality
%   constraints for the convex hull to be "CI*x <= dInew" where "dInew(i)"
%   is the solution obtained for the "i"-th optimization problem. This, in
%   effect, expands the convex hull to cover the flow pipe segment. Put the
%   new linear inequality constraints into a "linearcon" object, call the
%   function "clean_up()" to remove redundant constraints, and return the
%   result.
%   
%
% See Also:
%   stretch_func_lin,step_response,psim_lin,fs_lin_map,linearcon,transform,
%   clean_up

global GLOBAL_APPROX_PARAM GLOBAL_OPTIM_PAR

timing = 0;

eAT = expm(A*T);
displacement = step_response(A,Ainv,b,T);
% Transfrom sample points by eAT
SPf = transform(SP0,eAT,displacement);
Xf = transform(X0,eAT,displacement);

% Compute convex hull from these sample points
CH = polyhedron(SP0 | SPf);
[CE,dE,CI,dI] = linearcon_data(linearcon(CH));

t_start = clock;
[CInew,dInew] = shwrap_lin(CI,A,Ainv,b,X0,T,SP0);
if timing
  fprintf(1,'time to shrink wrap segment = %f sec\n',etime(clock,t_start))
end
for k = 1:length(dI)
  if (dInew(k) > dI(k))
    dI(k) = dInew(k);
 else
   if (dInew(k) < dI(k) - GLOBAL_APPROX_PARAM.poly_epsilon)
      fprintf(1,['Warning: Optimization result is not reliable, falling' ...
	    ' back to the convex hull approximation\n']);
    end
  end
end
t_start = clock;
SEG = clean_up(linearcon([],[],CI,dI));
if timing
  fprintf(1,'time to clean up = %f sec\n',etime(clock,t_start))
end
return

% -----------------------------------------------------------------------------

function [C,d] = shwrap_lin(C,A,Ainv,b,X0,T,SP0)

% Shrink wrap the flow pipe segment in a polytope using the normal vectors
% stored in the rows of the given matrix C, i.e. compute the smallest linear
% constraint set given the set of directions C that contains the flow pipe
% segment from 0 to T.
% C             : a set of directions stacked together in a matrix
% X0            : a constraint representing initial set X0
% A             : system matrix
% Ainv          : inverse of A if exists, otherwise should be []
% b             : constant input vector
% T             : time step with respect to X0
%
% Revised by K.S. on 02/09/2004

global GLOBAL_APPROX_PARAM GLOBAL_OPTIM_PAR

calls = GLOBAL_APPROX_PARAM.max_func_calls;
tolerance = GLOBAL_APPROX_PARAM.func_tol;

% set parameters for the constraint optimization with 
%
%
%       BoundMatrix*x <= Boundvector
%
%
% the first 2n rows of BoundMatrix and BoundVector define the constraints on the state
% vector given by the initial region X0 and the 2 last rows of BoundMatrix and
% BoundVector define the time constraint 0 <= t <= T, whereas t is the
% simulation time. 

% Compute the constraint matrices

n = size(A,1);

% Define the constraints for time and state variables

[Ce de BoundMatrix BoundVector] = linearcon_data(X0);
BoundMatrix(end+1:end+2,end+1) = [1;-1];
BoundVector(end+1:end+2) = [T;0];

% Setting some options for the MATLAB optimization toolbox
tolerance = GLOBAL_APPROX_PARAM.func_tol;
options = optimset('LargeScale','off','GradObj','on','MaxIter',inf,'MaxFunEvals',1000,'TolFun',tolerance*T,'Display','off');

% These are the initial conditions for the optimization

Xinit = SP0(1); % One of the vertices of X0 is used as a feasible point for the optimization
Tinit = T/2;

% Compute the initial (t==0) and final (t==T) regions

[CE0,dE0,CI0,dI0] = linearcon_data(X0);
displacement = step_response(A,Ainv,b,T);
XT = transform(X0,expm(A*T),displacement);
[CET,dET,CIT,dIT] = linearcon_data(XT);

% Stretch along each given direction of C to cover reachability region 
    
d = zeros(size(C,1),1);
for l = 1:size(C,1)
    n_vector = C(l,:);
  
    % Changed by OS: (1) 'fmincon'
    %                (2) initialization: instead of calling the nonlinear optimization twice for
    %                    X0=0.01*T and X0=0.99*T now: one optimization for X0=0.5*T
    %                    and comparison with the values for t=0 and t=T
    % Changed by K.S.:   use 'fmincon' with 'GradObj' turned on and optimize
    %                    for time as well as inital state. 
  
    [Xopt,dopt,dummy,output] = fmincon('stretch_func_lin',[Xinit;Tinit],BoundMatrix,BoundVector,[],[],[],[],[],options,...
    A,Ainv,b,n_vector,n);

    % Comparison of the optimized value with the optimal values for t==0 and
    % t==T.
    x0 = linprog(-n_vector,CI0,dI0,CE0,dE0,[],[],[],GLOBAL_OPTIM_PAR);
    xt = linprog(-n_vector,CIT,dIT,CET,dET,[],[],[],GLOBAL_OPTIM_PAR);
    
    dl(1)= -dopt;
    dl(2)= n_vector*xt;
    dl(3)= n_vector*x0;
  
    [dlmax,idx] = max(dl);
    d(l) = dl(idx);

end

return

% -----------------------------------------------------------------------------

function [v] = feasible_point(X0)

[CE dE CI dI] = linearcon_data(X0);

v = vertices;

n_total = size(CI,2);
n_free = n_total-length(dE);

if length(dI)>=n_free
   
COMBO = nchoosek([1:length(dI)],n_free);

	for i = 1:size(COMBO,1)
      C = CE; d = dE;
      for j = 1:length(COMBO(i,:))
        C = [C; CI(COMBO(i,j),:)];
        d = [d; dI(COMBO(i,j),:)];
      end
      if rank(C) == n_total
        vi = C\d;
        if feasible_point(X0,vi)
          v = v | vi;
          break;
        end
      end
	end
end

return

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av成人免费在线观看| 日韩午夜三级在线| 成人精品国产一区二区4080| 国产在线一区观看| 精品一区二区影视| 九色|91porny| 国产伦理精品不卡| 成人小视频在线观看| 99久久婷婷国产综合精品电影| 成人精品gif动图一区| 成人精品国产一区二区4080| 91一区二区三区在线播放| 91丨porny丨最新| 色欧美片视频在线观看在线视频| 91美女片黄在线观看91美女| 在线观看日韩毛片| 欧美一区二区三区视频在线| 日韩欧美一区在线| 久久久av毛片精品| 国产精品久久久久久久久免费相片 | 亚洲日本青草视频在线怡红院| 亚洲色图第一区| 亚洲电影一区二区三区| 日韩高清不卡一区二区三区| 久久国产婷婷国产香蕉| 国产一区二区三区四区五区入口| 国产成人免费9x9x人网站视频| 成人福利视频网站| 在线看日本不卡| 欧美一区二区二区| 欧美高清在线一区二区| 一区二区三区免费网站| 日本午夜一区二区| 国产福利91精品| 91国在线观看| 日韩一区二区免费电影| 亚洲国产高清在线观看视频| 亚洲精品视频在线看| 日本中文一区二区三区| 高清不卡一二三区| 欧美男男青年gay1069videost| 日韩精品在线看片z| 国产精品久久久久四虎| 五月综合激情网| 国产精品综合视频| 欧美在线免费观看亚洲| 精品国产青草久久久久福利| 中文字幕欧美一| 日韩国产在线一| bt欧美亚洲午夜电影天堂| 884aa四虎影成人精品一区| 国产亚洲一区二区三区四区| 一区二区免费在线| 国产精品99久久久久久宅男| 欧美日本精品一区二区三区| 国产欧美一区二区精品性色| 亚洲国产视频直播| 国产精品66部| 7777精品伊人久久久大香线蕉超级流畅| 久久久久久久久久久久久女国产乱| 一区二区三区日韩精品| 国产二区国产一区在线观看| 67194成人在线观看| 中文字幕亚洲视频| 国产在线看一区| 欧美日韩中文另类| 中文字幕中文字幕在线一区| 久久精品国产亚洲高清剧情介绍| 色综合久久久久久久久久久| 久久久久久日产精品| 午夜电影一区二区| 日本电影亚洲天堂一区| 国产精品女同互慰在线看 | 欧美精品v国产精品v日韩精品| 欧美国产成人精品| 国产精品综合视频| 精品久久国产老人久久综合| 亚洲国产裸拍裸体视频在线观看乱了 | 日本特黄久久久高潮| 91丨porny丨首页| 国产目拍亚洲精品99久久精品| 麻豆精品新av中文字幕| 欧美日本乱大交xxxxx| 亚洲综合在线电影| 92国产精品观看| 国产精品萝li| 国产精品自拍毛片| 精品国产乱码久久久久久图片| 成人美女视频在线看| 日韩美女一区二区三区| 亚洲乱码中文字幕| 99在线精品免费| 亚洲国产高清不卡| 国产麻豆9l精品三级站| 精品人在线二区三区| 欧美亚洲国产一卡| 欧美一卡在线观看| 91精品国产综合久久福利| 亚洲免费观看高清在线观看| 欧美天天综合网| 久久精工是国产品牌吗| 久久精品夜色噜噜亚洲aⅴ| 成人av免费在线观看| 亚洲中国最大av网站| 欧美一个色资源| 国产二区国产一区在线观看 | 粉嫩aⅴ一区二区三区四区 | 欧美日本国产一区| 国产精品一区二区黑丝| 亚洲精品国产视频| 日韩欧美一区二区不卡| 成人av网址在线| 三级精品在线观看| 国产欧美精品区一区二区三区 | 一区二区三区免费| 精品福利在线导航| 日本伦理一区二区| 久久精品免费看| 综合精品久久久| 欧美成人猛片aaaaaaa| 97久久精品人人做人人爽50路| 日本欧美一区二区| 亚洲欧美影音先锋| 欧美岛国在线观看| 色综合久久久久久久久| 精品一区二区三区蜜桃| 亚洲激情校园春色| 欧美精品一区二区三区在线| 色婷婷激情久久| 韩国一区二区三区| 亚洲午夜在线视频| 中文欧美字幕免费| 制服丝袜中文字幕一区| 国产情人综合久久777777| 欧美日韩久久一区二区| 成人免费三级在线| 老司机精品视频一区二区三区| 中文字幕制服丝袜成人av| 日韩欧美中文一区二区| 色婷婷久久久久swag精品| 国产精品 日产精品 欧美精品| 午夜日韩在线观看| 亚洲欧美日韩国产中文在线| 久久人人超碰精品| 欧美疯狂做受xxxx富婆| 色女孩综合影院| 国产91富婆露脸刺激对白| 秋霞午夜av一区二区三区| 亚洲精品日日夜夜| 日韩激情视频在线观看| 国产欧美精品国产国产专区| 欧美美女喷水视频| a亚洲天堂av| 国内外精品视频| 人人爽香蕉精品| 午夜精品久久久久久久久久久| 国产精品丝袜在线| 精品国产凹凸成av人网站| 欧美精选一区二区| 色视频一区二区| caoporn国产精品| 成人一区二区三区在线观看| 国产麻豆一精品一av一免费| 久久精品久久99精品久久| 日韩国产欧美在线视频| 一区二区三区四区国产精品| 亚洲欧美韩国综合色| 国产精品美女一区二区三区| 国产丝袜美腿一区二区三区| 精品国产一区二区亚洲人成毛片| 欧美一级欧美三级| 欧美日韩国产影片| 欧美日韩三级一区二区| 欧美网站一区二区| 欧美亚洲综合一区| 在线观看日韩精品| 欧美视频中文一区二区三区在线观看| 一本大道久久a久久精品综合| 99久久精品国产一区| 色综合天天视频在线观看 | 亚洲成人激情av| 亚洲国产综合人成综合网站| 亚洲成av人片在www色猫咪| 亚洲第一会所有码转帖| 丝袜美腿亚洲综合| 日本不卡一区二区| 乱中年女人伦av一区二区| 激情国产一区二区 | 国产精品水嫩水嫩| 国产精品毛片久久久久久久| 国产精品成人午夜| 亚洲啪啪综合av一区二区三区| 亚洲精品日韩专区silk| 亚洲综合色在线| 亚洲一区二区三区四区在线观看| 亚洲电影第三页| 久久精品国产第一区二区三区| 国产精品一线二线三线精华| 成av人片一区二区| 色屁屁一区二区|