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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? eqnsolv.m

?? matlab7 gads工具箱
?? M
字號:
function [X,Aineq,Bineq,Aeq,Beq,msg,how,exitflag]= eqnsolv(X,Aineq,Bineq,Aeq,Beq,LB,UB,verbosity)
%EQNSOLV Helper function for PFMINLCON. 
%   Removes dependent equality constraints.

%   Copyright 2004 The MathWorks, Inc.
%   $Revision: 1.7 $  $Date: 2004/01/16 16:50:12 $


how = '';
msg = '';
exitflag = 1;
numberOfVariables = length(X);
tolDep = 100*numberOfVariables*eps;
%Make sure that the constraints are not sparse; 
if issparse(Aeq)
    warning('gads:EQNSOLV:sparseToFull','The equality constraint matrix is sparse; converting to a full matrix.');
    Aeq = full(Aeq);
    Beq = full(Beq);
end
if issparse(Aineq)
    warning('gads:EQNSOLV:sparseToFull','The inequality constraint matrix is sparse; converting to a full matrix.');
    Aineq = full(Aineq);
    Binq  = full(Bineq);
end
% Build A and B by combining all the constraints.
I = eye(numberOfVariables);
A = [Aeq;Aineq;I;-I];
B = [Beq;Bineq;UB;-LB];

eqix = 1:size(Aeq,1);
%Form the active set index (active region is equality constraints
ACTIND = eqix;
%Number of equality constraints
neqcstr = length(eqix);
ncstr   = size(A,1);
%Total number of constraints will also include the bounds
ncstr = ncstr+numberOfVariables;
%Index of equality constraints is 'eqix'
%A logical variable 'aix' to denote equality constraints
aix = zeros(ncstr,1);
%We set equality constraints to true (ONE).
aix(ACTIND) = 1;
ACTCNT = length(ACTIND);
ACTSET = A(ACTIND,:);

remove =[];

% First see if the equality constraints form a consistent system.
[Qa,Ra]=qr(A(eqix,:));

% Form vector of dependent indices.
if min(size(Ra))==1 % Make sure Ra isn't a vector
    depInd = find( abs(Ra(1,1)) < tolDep);
else
    depInd = find( abs(diag(Ra)) < tolDep );
end
if neqcstr > numberOfVariables
    depInd = [depInd; ((numberOfVariables+1):neqcstr)'];
end      

if ~isempty(depInd)    % equality constraints are dependent
    msg = sprintf('The equality constraints are dependent.\n');
    if verbosity > 2
        fprintf(msg);
    end
    how='dependent';
    exitflag = 1;
    bdepInd =  abs(Qa(:,depInd)'*B(eqix)) >= tolDep ;
    
    if any( bdepInd ) % Not consistent
        how='infeasible';   
        exitflag = -2;
        msg = [msg,sprintf('The system of equality constraints is not consistent.\n')];
        if ncstr > neqcstr
            msg = [msg sprintf('The inequality constraints may or may not be satisfied.\n')];
        end
        msg = [msg, sprintf('There is no feasible solution.\n')];
   else % the equality constraints are consistent
        % Delete the redundant constraints
        % By QR factoring the transpose, we see which columns of A'
        %   (rows of A) move to the end
        [Qat,Rat,Eat]=qr(A(eqix,:)');        
        [i,j] = find(Eat); % Eat permutes the columns of A' (rows of A)
        remove = i(depInd);
        numDepend = nnz(remove);
        if verbosity > 2
            fprintf('The system of equality constraints is consistent.\n');
            fprintf('Removing the following dependent constraints before continuing:\n');
            disp(remove)
        end
        A(eqix(remove),:)=[];
        B(eqix(remove))=[];
        %Taking care of equality
        Aeq(eqix(remove),:)=[];
        Beq(eqix(remove))=[];
        neqcstr = neqcstr - numDepend;
        ncstr = ncstr - numDepend;
        eqix = 1:neqcstr;
        aix(remove) = [];
        ACTIND(1:numDepend) = [];
        ACTIND = ACTIND - numDepend;      
        ACTSET = A(ACTIND,:);
        ACTCNT = ACTCNT - numDepend;
    end % consistency check
end % dependency check

% Now that we have done all we can to make the equality constraints
% consistent and independent we will check the inequality constraints
% in the working set.  First we want to make sure that the number of 
% constraints in the working set is only greater than or equal to the
% number of variables if the number of (non-redundant) equality 
% constraints is greater than or equal to the number of variables.
if ACTCNT >= numberOfVariables
    ACTCNT = max(neqcstr, numberOfVariables-1);
    ACTIND = ACTIND(1:ACTCNT);
    ACTSET = A(ACTIND,:);
    aix = zeros(ncstr,1);
    aix(ACTIND) = 1;
end

% Now check to see that all the constraints in the working set are
% linearly independent.
if ACTCNT > neqcstr
    [Qat,Rat,Eat]=qr(ACTSET');
    
    % Form vector of dependent indices.
    if min(size(Rat))==1 % Make sure Rat isn't a vector
        depInd = find( abs(Rat(1,1)) < tolDep);
    else
        depInd = find( abs(diag(Rat)) < tolDep );
    end
    
    if ~isempty(depInd)
        [i,j] = find(Eat); % Eat permutes the columns of A' (rows of A)
        remove2 = i(depInd);
        removeEq   = remove2(find(remove2 <= neqcstr));
        removeIneq = remove2(find(remove2 > neqcstr));
        
        if ~isempty(removeEq)
            % Just take equalities as initial working set.
            ACTIND = 1:neqcstr; 
        else
            % Remove dependent inequality constraints.
            ACTIND(removeIneq) = [];
        end
        aix = zeros(ncstr,1);
        aix(ACTIND) = 1;
        ACTSET = A(ACTIND,:);
        ACTCNT = length(ACTIND);
    end  
end

[Q,R]=qr(ACTSET');

if ~strcmp(how,'infeasible') && ACTCNT > 0
    % Find point closest to the given initial X which satisfies
    % working set constraints.
    minnormstep = Q(:,1:ACTCNT) * ...
        ((R(1:ACTCNT,1:ACTCNT)') \ (B(ACTIND) - ACTSET*X));
    X = X + minnormstep; 
    % Sometimes the "basic" solution satisfies Aeq*x= Beq 
    % and A*X < B better than the minnorm solution. Choose the one
    % that the minimizes the max constraint violation.
    err = A*X - B;
    err(eqix) = abs(err(eqix));
    if any(err > eps)
        Xbasic = ACTSET\B(ACTIND);
        errbasic = A*Xbasic - B;
        errbasic(eqix) = abs(errbasic(eqix));
        if max(errbasic) < max(err) 
            X = Xbasic;
        end
    end
end

% End of eqnsolv.m


?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产香蕉久久精品综合网| av中文字幕不卡| 欧美激情资源网| 欧美三级视频在线观看| 老司机免费视频一区二区| 国产精品电影一区二区| 日韩午夜电影av| 色系网站成人免费| 国产成人午夜精品影院观看视频| 一区二区三区自拍| 日本一区二区三区dvd视频在线| 欧美三级电影在线看| 成人小视频在线| 久久爱另类一区二区小说| 亚洲一区二区三区激情| 国产精品久久久久久福利一牛影视 | 午夜精品国产更新| 国产精品日产欧美久久久久| 日韩一二三区视频| 欧美美女喷水视频| 色拍拍在线精品视频8848| 丁香啪啪综合成人亚洲小说| 麻豆91在线播放免费| 亚洲妇熟xx妇色黄| 亚洲视频你懂的| 中文字幕成人在线观看| 2021久久国产精品不只是精品| 欧美一区二区三区在线看| 欧洲精品一区二区| 91久久国产最好的精华液| caoporn国产一区二区| 国产精品18久久久久久久久久久久| 日韩精彩视频在线观看| 天堂成人免费av电影一区| 亚洲国产乱码最新视频| 一区二区欧美在线观看| 亚洲黄网站在线观看| 亚洲永久免费av| 亚洲一区二区三区免费视频| 夜夜嗨av一区二区三区| 一区二区高清在线| 亚洲一区二区欧美激情| 天天综合日日夜夜精品| 日本欧美大码aⅴ在线播放| 日韩不卡一区二区| 日本成人中文字幕在线视频| 日韩 欧美一区二区三区| 亚洲成av人片一区二区| 爽好久久久欧美精品| 麻豆免费看一区二区三区| 麻豆国产欧美日韩综合精品二区 | 精品久久久久一区二区国产| 日韩欧美国产午夜精品| 欧美大黄免费观看| 久久久久久久久久久久久久久99 | 蜜臀精品久久久久久蜜臀 | 国产白丝网站精品污在线入口| 国产精品综合一区二区| 国产成人小视频| 91丝袜高跟美女视频| 欧美日韩综合不卡| 91精品国产91久久久久久最新毛片| 5566中文字幕一区二区电影| 日韩免费在线观看| 国产香蕉久久精品综合网| 亚洲视频1区2区| 亚洲高清免费一级二级三级| 视频一区中文字幕国产| 国产乱人伦偷精品视频不卡| 91在线一区二区| 欧美撒尿777hd撒尿| 精品成人在线观看| 国产精品精品国产色婷婷| 亚洲综合一区二区三区| 男男成人高潮片免费网站| 国产精品乡下勾搭老头1| 91麻豆免费观看| 91精品国产美女浴室洗澡无遮挡| 久久亚洲二区三区| 亚洲欧美日韩系列| 日本特黄久久久高潮| 成人avav影音| 欧美一三区三区四区免费在线看| 久久久久久久综合色一本| 亚洲你懂的在线视频| 久久精品国产**网站演员| av网站一区二区三区| 欧美高清视频一二三区| 国产三级欧美三级| 午夜成人免费电影| 国产真实乱对白精彩久久| 色婷婷综合久久| xf在线a精品一区二区视频网站| 国产精品福利一区| 久久不见久久见免费视频7| 在线免费观看日本欧美| 日韩欧美在线网站| 亚洲综合在线五月| 国产成人精品aa毛片| 7777精品伊人久久久大香线蕉最新版| 国产午夜亚洲精品不卡| 香蕉av福利精品导航| 9人人澡人人爽人人精品| 日韩美女主播在线视频一区二区三区| |精品福利一区二区三区| 精品一区二区在线播放| 欧亚洲嫩模精品一区三区| 国产精品人成在线观看免费 | 日本一区二区在线不卡| 欧美aaa在线| 欧美又粗又大又爽| 国产精品美女一区二区三区| 极品少妇xxxx精品少妇偷拍| 欧美性生活久久| 亚洲免费观看高清完整版在线观看熊 | 久久久久久久国产精品影院| 午夜久久久影院| 91小宝寻花一区二区三区| 国产欧美日韩精品在线| 久久精品久久99精品久久| 4hu四虎永久在线影院成人| 樱桃国产成人精品视频| av亚洲精华国产精华精| 中文字幕一区二区三区不卡| 国产一区二区三区精品视频| 日韩免费电影网站| 六月丁香婷婷久久| 欧美成人女星排行榜| 日本免费在线视频不卡一不卡二| 欧美日韩国产在线播放网站| 一级中文字幕一区二区| 91久久精品网| 亚洲国产美女搞黄色| 欧美久久久一区| 五月婷婷综合在线| 91精品国产品国语在线不卡| 蜜桃精品在线观看| 欧美xxxx在线观看| 精品一区二区三区免费播放| 日韩欧美你懂的| 国产老女人精品毛片久久| 国产美女视频91| 国产午夜亚洲精品理论片色戒| 一本色道久久综合亚洲91| 亚洲影院久久精品| 久久久久久毛片| 欧日韩精品视频| 国产中文字幕一区| 一区二区视频在线| 久久精品视频免费观看| 欧美在线视频全部完| 国产一区日韩二区欧美三区| 夜夜嗨av一区二区三区| 国产日韩精品视频一区| 在线观看日韩毛片| 日韩女优制服丝袜电影| 午夜私人影院久久久久| 欧美videossexotv100| 亚洲精品国产一区二区精华液 | 欧美性感一区二区三区| 午夜精品久久久久久久99樱桃| 欧美人妖巨大在线| 九色综合国产一区二区三区| 国产亚洲一区二区三区四区| 国产不卡视频一区| 一区二区三区中文在线| 777奇米成人网| 高潮精品一区videoshd| 亚洲女同ⅹxx女同tv| 欧美群妇大交群中文字幕| 国精产品一区一区三区mba桃花 | 国产欧美日韩精品一区| 在线看不卡av| 久久成人久久爱| 综合久久久久久| 91精品国产综合久久国产大片| 国产精品1024| 亚洲国产综合在线| 久久久午夜精品理论片中文字幕| av不卡在线观看| 蜜桃精品视频在线| 亚洲女同一区二区| 久久综合久久久久88| 在线视频亚洲一区| 国产精品自在在线| 亚洲成av人影院| 国产精品丝袜黑色高跟| 欧美精品三级日韩久久| 成人av资源网站| 免费精品视频在线| 亚洲黄一区二区三区| 久久久一区二区三区捆绑**| 欧美三级一区二区| 北岛玲一区二区三区四区| 麻豆精品视频在线观看视频| 亚洲精品成a人| 欧美经典三级视频一区二区三区| 欧美日韩电影在线| 一本色道久久加勒比精品 | 亚洲精品成人少妇|