Code covered by the BSD License  

Highlights from
Speeding Up Optimization Problems with Parallel Computing

image thumbnail

Speeding Up Optimization Problems with Parallel Computing

by

Stuart Kozola (view profile)

 

Files from the webinar: Speeding up optimization problems with parallel computing

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

nonlinConstraint(u,Gx,Tinv)
function [c,ceq] = nonlinConstraint(u,Gx,Tinv)
%% Nonlinear Constratint Function for FORM
% inputs:
%   u  - vector of inputs in normal space
%   Gx - Limit State Function in standard space
%   Tinv - Inverse tranfrom (U --> X)

% Copyright 2010 The MathWorks, Inc.
c = []; % no nonlinear inequality constraints

% input to Tinv must a row vector to eval appropriately
if ~isvector(u)
    error('Input must be a vector')
end
[row,col] = size(u);
if row>col
    u = u';
end
x = Tinv(u);
x(:,1) = x(:,1).*10;    % Mach Scaling
x(:,2) = x(:,2)./10000; % Altitude Scaling
ceq = Gx(x);

Contact us