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

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

?? seg_approx_sd_ode.m

?? CheckMate is a MATLAB-based tool for modeling, simulating and investigating properties of hybrid dyn
?? M
字號:
function [SEG,SPf] = seg_approx_SD_ode(sys_eq,ode_param,X0,SP0,t0,tf,Pcon)

% Approximate a single segment of a flow pipe for a `nonlinear` dynamics.
%
% Syntax:
%   "[SEG,SPf] = seg_approx_ode(sys_eq,ode_param,X0,SP0,t0,tf)"
%
% Description:
%   Compute a conservative approximation of a flow pipe segment in the time
%   interval "[t0,tf]" for the `nonlinear` dynamics "dx/dt = f(x)". The
%   inputs to this function are
%
%   * "sys_eq": string containing file name of the derivative function
%     for the ODE (i.e., overall_system_ode in the directory \util)
%
%   * "ode_param": optional parameters for the ODE file
%
%   * "X0": a "linearcon" object representing initial set
%
%   * "SP0": sample points that are simulated to construct the convex hull,
%     given at time t0
%
%   * "t0"/"tf" : start/final time with respect to "X0"
%
%   * Pcon : linearcon object representing the constraint on the parameters.
%
%   The outputs of this function are
%
%   * "SEG": a "linearcon" object (a polytope) representing the flow pipe
%     segment approximation.
%   
%   * "SFf":  sample points the are simulated from "SP0" to the time "tf".
%
% Implementation:
%   To approximate the flow pipe segment, we first simulate the sample
%   points from times "t = t0" to "t = tf" and compute the convex hull of
%   the sample points at time "t = t0" and "t = tf". 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)" denotes the
%   solution to the nonlinear differential equation. The above optimization
%   problem is solved by calling the MATLAB routine for solving constrained
%   nonlinear optimization problem "constr". The computation of the
%   objective function, which includes numerical intregration of the ODE to
%   find the solution "x(t,x0)" from "x0" at time "t" is done in the
%   function "stretch_func_ode()".
%
%
%
%   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

% [SEG,SPf] = seg_approx_ode(sys_eq,ode_param,X0,SP0,t0,tf)
% Compute the outer approximation of the flow pipe segment from t0 to tf

global GLOBAL_APPROX_PARAM

% Simulate sample points from t0 to tf
if tf~=t0
   [SPi,Siminfi] = simulate_points(SP0,sys_eq,ode_param,t0,Pcon);
   [SPf,Siminff] = simulate_points(SP0,sys_eq,ode_param,tf,Pcon);
   SPi=vertices(polyhedron(SPi)); % Removes unnecessary vertices
   CH = polyhedron(SPi | SPf);
elseif t0==0
   SPf = SP0;
   SEG=linearcon(polyhedron(SP0));
   return
else
   [SPf,Siminff] = simulate_points(SP0,sys_eq,ode_param,t0,Pcon);
   CH = polyhedron(SPf);
end

SPf=vertices(polyhedron(SPf)); % Removes unnecessary vertices

% Compute convex hull from these extreme points
[CE,dE,CI,dI] = linearcon_data(linearcon(CH));
[CInew,dInew] = shwrap_ode(CI,sys_eq,ode_param,X0,t0,tf,Pcon,Siminff);
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
SEG = clean_up(linearcon([],[],CI,dI));
return

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

function [Pf, Siminf] = simulate_points(X0,sys_eq,ode_param,tf,Pcon);
X0=vertices(X0);
Siminf=[];
Param=vertices(Pcon);
Pf = vertices;
if isempty(Param) 
    for k = 1:length(X0)
        % syntax: ODE45('F',TSPAN,Y0,OPTIONS,P1,P2,...)
        [T,X] = ode45(sys_eq,[0 tf],X0(k),[],ode_param,[]);
        Pf = Pf | X(end,:)';
        Siminf=[Siminf; struct('X0',X0(k),'P0',[],'T',T,'X',X)];
    end;
else
    for i=1:length(Param)
        for k = 1:length(X0)
            % syntax: ODE45('F',TSPAN,Y0,OPTIONS,P1,P2,...)
            [T,X] = ode45(sys_eq,[0 tf],X0(k),[],ode_param,Param(i));
            Pf = Pf | X(end,:)';
            Siminf=[Siminf; struct('X0',X0(k),'P0',Param(i),'T',T,'X',X)];
        end;
    end;
end;
return

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

function [C,d] = shwrap_ode(C,sys_eq,ode_param,X0,t0,tf,Pcon,Siminf)

% 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 t0 to tf.
% C             : a set of directions stacked together in a matrix
% sys_eq        : a string containing file name of the derivative
%                 function for the ODE
% ode_param     : optional parameters for the ODE file
% X0            : a constraint representing initial set X0
% t0/tf         : start/final time with respect to X0
% Pcon : A linearcon object representing the constraint on the parameters.
%   Siminf : A structure that records information about the trajectory
%       Siminf.X0 = initial point for the trajectory
%       Siminf. P0 = parameter used for computing the trajectory
%       Siminf.T = vector of simulation times for the trajectory
%       Siminf.X = vector of simulated points. 

% Siminfo contains information from the simulation in order to make a better 
% initial guess

% extract linear inequality constraints defining X0

[CE,dE,CI,dI] = linearcon_data(X0);
[CPE,dPE,CPI,dPI] = linearcon_data(Pcon);

% (1) inequality constraints

    [CIn,CIm]=size(CI);
    [CPIn,CPIm]=size(CPI);

    % Remember the dimensions of the state space.
    dimension=CIm;


    if tf~=t0
       fminCI=[CI,zeros(CIn,CPIm+1);zeros(1,CIm) 1 zeros(1,CPIm); zeros(1,CIm) -1 zeros(1,CPIm);zeros(CPIn,CIm+1), CPI];
       fmindI=[dI;tf;-t0;dPI];
    else
       fminCI=[CI,zeros(CIn,CPIm);zeros(CPIn,CIm), CPI];
       fmindI=[dI;dPI];
    end

    % (2) equality constraints (not dependent on t)
    [CEn,CEm]=size(CE);
    [CPEn,CPEm]=size(CPE);

    fminCE=[];
    fmindE=[];
    if ~isempty(CE)
        fminCE=[CE,zeros(CEn,CPIm+1)];%CPIm+1
        fmindE=dE;
    end;
    if ~isempty(CPE)
        fminCE=[fminCE;zeros(CPEn,CIm+1),CPE];%CIm+1
        fmindE=[fmindE;dPE];
    end;

% (3) Set the optimization parameters

V = vertices(X0);
P = vertices(Pcon);
options = optimset;
options.TolFun =0.2*1e-9;%f(3) of foptions
options.iter = 4e8*size(C,2);%f(14) of foptions
options.Display=['off'];
options.Diagnostics=['off'];
options.LargeScale=['off'];

% Stretch along each given direction to cover the flow pipe segment
d = zeros(size(C,1),1);        


% (4) Optimize for each direction

for l = 1:size(C,1)
  n_vector = C(l,:)';
  dlmax = Inf;
  
  if tf~=t0
      % compute the best initial state 
      % Store in " tindex"  the index of the time elements of  the vector Siminf(1).T that are greater than t0
      %
      [ts,tindex]=setdiff(Siminf(1).T.*(Siminf(1).T>=t0),0);
      % Computer the max arg i C'x(i)
      [minnx,nx_index]=min(-n_vector'*Siminf(1).X(tindex,:)');
      Pinit=Siminf(1).P0;
      Xinit=Siminf(1).X0;
      Tinit=Siminf(1).T(tindex(nx_index));
      for k0=2:length(Siminf)
          [ts,tindex]=setdiff(Siminf(k0).T.*(Siminf(k0).T>=t0),0);
          [nx,nx_index]=min(-n_vector'*Siminf(k0).X(tindex,:)');
          if nx<minnx
              minnx=nx;
              Pinit=Siminf(k0).P0;
              Xinit=Siminf(k0).X0;
              Tinit=Siminf(k0).T(tindex(nx_index));
          end;
      end;

    else % tf==t0
      Pinit=Siminf(1).P0;
      Xinit=Siminf(1).X0;
      Tinit=[];

    end;
        
    [Xopt,dl] = fmincon('stretch_func_ode',[Xinit;Tinit;Pinit], fminCI,fmindI, fminCE,fmindE,[],[],[],options,...
             sys_eq,ode_param,n_vector,t0,tf,dimension);
    
    % The end of my hack  <- Ansgar
    if (dl < dlmax)
        dlmax = dl;
    end
    d(l) = -dlmax;
end
return


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线视频亚洲一区| 精品久久久久久久一区二区蜜臀| 成人激情免费电影网址| 久久99久久久久久久久久久| 天天综合色天天综合色h| 亚洲在线视频免费观看| 亚洲美女淫视频| 伊人色综合久久天天人手人婷| 日韩理论片在线| 18涩涩午夜精品.www| 国产精品久久久久久久第一福利| 亚洲欧洲日韩在线| 中文乱码免费一区二区| 国产精品国产三级国产普通话蜜臀| 国产精品网站在线观看| 欧美精品一区视频| 久久久精品欧美丰满| 国产亚洲欧美激情| 日韩一区欧美一区| 一区二区三区精品视频| 一区二区三区精品久久久| 亚洲成人av电影| 午夜视频一区二区三区| 蜜臀国产一区二区三区在线播放| 国产一区二区三区免费观看| 粉嫩一区二区三区性色av| 99这里只有久久精品视频| 欧美在线免费播放| 777午夜精品视频在线播放| 日韩一级二级三级精品视频| 精品蜜桃在线看| 国产精品嫩草影院av蜜臀| 亚洲欧美日韩综合aⅴ视频| 亚洲成av人综合在线观看| 精品一区二区三区欧美| 国产盗摄一区二区| 色婷婷综合激情| 欧美精品电影在线播放| 久久综合视频网| 成人免费一区二区三区在线观看| 亚洲自拍偷拍av| 九九热在线视频观看这里只有精品| 国产成人综合在线观看| 97精品国产97久久久久久久久久久久| 成人av网站免费| 91在线视频免费观看| 欧美日韩在线播放三区| 久久人人97超碰com| 亚洲女与黑人做爰| 美脚の诱脚舐め脚责91 | 日韩高清欧美激情| 精品夜夜嗨av一区二区三区| av中文字幕一区| 91精品国产综合久久福利 | 免费人成精品欧美精品| 国产成人av电影| 宅男在线国产精品| 国产精品福利影院| 日本欧洲一区二区| 91视频你懂的| 久久亚洲春色中文字幕久久久| 亚洲激情成人在线| 国产伦精品一区二区三区免费| 在线亚洲一区观看| 日本一区二区久久| 日本不卡一区二区三区| 91色乱码一区二区三区| 久久久久久久久久久久久女国产乱| 亚洲激情五月婷婷| 国产91精品一区二区麻豆网站 | 色先锋资源久久综合| 精品国产乱码久久久久久牛牛| 一区二区三区四区视频精品免费| 国产一区日韩二区欧美三区| 欧美日韩精品一区二区| 国产精品白丝在线| 国产一区二区三区国产| 欧美电影一区二区| 亚洲黄色小视频| 懂色av中文一区二区三区| 日韩美女视频在线| 爽爽淫人综合网网站| 色香蕉成人二区免费| 国产精品二三区| 国产麻豆欧美日韩一区| 日韩一区和二区| 舔着乳尖日韩一区| 欧美日韩一区二区三区在线| 亚洲欧美怡红院| 成人v精品蜜桃久久一区| 久久久亚洲综合| 久久er99热精品一区二区| 7777女厕盗摄久久久| 亚洲国产sm捆绑调教视频| 972aa.com艺术欧美| 欧美激情一区三区| 国产毛片一区二区| 久久久美女艺术照精彩视频福利播放| 日本欧美大码aⅴ在线播放| 欧美日韩一区二区三区在线| 一区二区三区欧美日韩| 色综合久久久久| 日韩美女视频一区二区| 成人美女视频在线观看18| 国产人成亚洲第一网站在线播放| 韩国一区二区视频| 久久九九99视频| 成人一区二区三区视频| 日本一区二区三级电影在线观看 | 国产黄色精品网站| 欧美精品一区二区三区蜜桃视频| 蜜臀久久久久久久| 精品欧美一区二区三区精品久久| 九九视频精品免费| 国产日产欧美一区| 成人免费毛片高清视频| 国产精品久久久久久久久久免费看 | 日韩精品免费专区| 91精品国产色综合久久ai换脸 | 欧美专区亚洲专区| 亚洲国产欧美在线| 在线不卡欧美精品一区二区三区| 日韩不卡免费视频| 久久久影院官网| 99久久久精品免费观看国产蜜| 亚洲男人的天堂在线aⅴ视频| 91小宝寻花一区二区三区| 一区av在线播放| 欧美一区日韩一区| 国产美女精品人人做人人爽| 国产精品白丝在线| 欧美熟乱第一页| 久久精品99国产精品| 欧美韩国日本综合| 日本丰满少妇一区二区三区| 日本视频免费一区| 久久精品亚洲精品国产欧美| www.成人在线| 日本强好片久久久久久aaa| 国产性做久久久久久| 一本大道综合伊人精品热热| 日本午夜一区二区| 国产欧美精品国产国产专区| 91久久一区二区| 久久国产精品一区二区| 国产精品久久久久aaaa| 欧美日韩五月天| 国产一区二区91| 一区二区三区在线免费观看| 欧美r级在线观看| 一本大道久久a久久综合婷婷| 美女网站色91| 18成人在线观看| 欧美成人一区二区| 日本精品一区二区三区高清| 久久电影国产免费久久电影| 国产精品第四页| 91精品国产美女浴室洗澡无遮挡| 国产精品一区二区久激情瑜伽| 亚洲一区二区三区自拍| 久久一留热品黄| 欧美日韩国产成人在线免费| 成人免费高清在线| 日本美女一区二区三区| 国产精品日韩成人| 日韩精品一区二区三区四区视频| 91片黄在线观看| 国产精品一区2区| 午夜精品久久久久久久| 国产精品少妇自拍| 欧美日韩国产综合视频在线观看 | 欧美巨大另类极品videosbest | 亚洲精品一区二区三区蜜桃下载| 日本道色综合久久| 亚洲精品乱码久久久久久日本蜜臀| 精品一区二区免费在线观看| 亚洲丝袜精品丝袜在线| 日韩一区二区三| 欧美色综合久久| 97久久精品人人做人人爽50路 | 99视频超级精品| 理论片日本一区| 亚洲成精国产精品女| 椎名由奈av一区二区三区| 久久嫩草精品久久久精品一| 91.xcao| 日本韩国精品在线| 99r国产精品| 成人黄色一级视频| 国产成人在线影院| 国产综合久久久久影院| 日韩av高清在线观看| 夜夜亚洲天天久久| 亚洲免费av观看| 亚洲欧美电影一区二区| 日韩理论片一区二区| 国产精品美女久久福利网站| 国产农村妇女精品| 欧美国产丝袜视频| 中日韩av电影|