RoopB
Aerospace
- May 24, 2010
- 6
Continuing on with my quest in optimization, I am looking to find a particular solution using a multi-objective optimization function. My design variables would be BDLT, BALPHA, BALPHY, and BPHIP. Fx, Fy, Fz, Mx, My, Mz would be the objective. The function takes the following form:
[Fx, Fy, Fz, Mx, My, Mz] = aFunc(BDLT, BALPHA, BALPY, BPHIP)
%(where BDLT is a 1x4 Matrix)
After reading up on the optimization functions in Matlab, it looks as though the function fgoalattain would be best for a nonlinear, multiobjective function. I set up my solver as such:
XO = [0 0 0 0 0 0 0] % Set initial values to 0; steady state
goal = [0 1 0 0 1 0]; % This is the value that I want to set for [Fx, Fy, Fz, Mx, My, Mz]
weight = abs(goal); % Equal weight to all goal values
options = optimset(‘Display’, ‘iter’); % Set display parameter
[X, fval, attainfactor] = fgoalattain(‘aFunc’, XO, goal, weight, [], [], [], [], [], [], [], options);
I put seven []’s, which should be the seven outputs I want: [BDLT(4), BALPHA, BALPHY, BPHIP]. By my understanding, X should output a vector with the seven values I want, given the defined goal. I receive the following error:
??? Input Argument “BALPHA” is undefined.
Error in ++> fgoalattain at 371
user_f = feval(funfcn(3), x, varargin
));
When BALPHA is one of the variables I am trying to solve for! I’m sure that I’m just not understanding my input and output vectors correctly, but I can’t see where I’m going wrong. Do I need to change some of my variables to constraints? Thanks in advance for your thoughts.
[Fx, Fy, Fz, Mx, My, Mz] = aFunc(BDLT, BALPHA, BALPY, BPHIP)
%(where BDLT is a 1x4 Matrix)
After reading up on the optimization functions in Matlab, it looks as though the function fgoalattain would be best for a nonlinear, multiobjective function. I set up my solver as such:
XO = [0 0 0 0 0 0 0] % Set initial values to 0; steady state
goal = [0 1 0 0 1 0]; % This is the value that I want to set for [Fx, Fy, Fz, Mx, My, Mz]
weight = abs(goal); % Equal weight to all goal values
options = optimset(‘Display’, ‘iter’); % Set display parameter
[X, fval, attainfactor] = fgoalattain(‘aFunc’, XO, goal, weight, [], [], [], [], [], [], [], options);
I put seven []’s, which should be the seven outputs I want: [BDLT(4), BALPHA, BALPHY, BPHIP]. By my understanding, X should output a vector with the seven values I want, given the defined goal. I receive the following error:
??? Input Argument “BALPHA” is undefined.
Error in ++> fgoalattain at 371
user_f = feval(funfcn(3), x, varargin
When BALPHA is one of the variables I am trying to solve for! I’m sure that I’m just not understanding my input and output vectors correctly, but I can’t see where I’m going wrong. Do I need to change some of my variables to constraints? Thanks in advance for your thoughts.