Re: Upper and Lower Boundaries in fmincon
- From: John D'Errico <woodchips@xxxxxxxxxxxxxxxx>
- Date: Mon, 06 Mar 2006 12:29:58 GMT
In article <ef2b127.-1@xxxxxxxxxxxxxxxx>, "Hesam Mortazavi" <hesam_mortazavi@xxxxxxxxxxx> wrote:
Hi,
I am tryin to optimize an input signal to a certain Model
(Powerplant). I'd like to put limits (upper and lower) on the
parameters which I want to optimize. I hence use the to vectors that
fmincon accepts for this. the problem is the following:
I have put the lower limit on the parameters to 0.2 and upper to 1.0
(otherwise my plant cannot operate, and behaves inaccurate) despite
this fmincon "guesses" on negative values on the parameters. I find
it strange because it is not following the lower limits obviously. Is
this common or am I totally lost ?
The code for further clarification :
%%%%%%%%%%%%%%%%%%%MAIN %%%%%%%%%%%%%%%%%%%%%%%%%
clear all
global GT_var HP_stress DR_HPp extThermStress q
%REINIT TEMPERATURES T[1]-T[10]
Tmin = 520;
Tmax = 570;
NoPoints = 10;
ThermoMechStressHPT = linspace(Tmin,Tmax,NoPoints);
q=0;
% Initial value guesses for GTLoad Levels
theta0(1)= 0.44;
theta0(2)= 0.6;
theta0(3) = 0.8;
theta0(4) = 2000;
theta0(5) = 2000;
theta0(6) = 1000;
theta0(7) = 500;
GTlevels_max = 1;
dt = 50; % minimum relative time between intervals
thetamin=[0.2 0.2 0.2 dt dt dt dt];
thetamax=[GTlevels_max GTlevels_max GTlevels_max 1e6 1e6 1e6 1e6 ];
%options = optimset('TypicalX', [1 1 1 1000 1000 1000 1000],
I'll guess this is a scale problem. You have three parameters
that are on the order of 1, whereas the others are as large
as 1e6. TolCon is set at 1e-6. Since its a vector constraint,
it can slop over on those small parameters. Fix this by
taking the log of those last 4 parameters, then restore by
exponentiating inside your objective function.
Now all parameters are the same order of magnitude. This will
make your entire problem behave better anyway.
HTH,
John D'Errico
--
The best material model of a cat is another, or preferably the same, cat.
A. Rosenblueth, Philosophy of Science, 1945
Those who can't laugh at themselves leave the job to others.
Anonymous
.
- References:
- Upper and Lower Boundaries in fmincon
- From: Hesam Mortazavi
- Upper and Lower Boundaries in fmincon
- Prev by Date: Re: MATLAB code for serial 9 pin to USB
- Next by Date: Re: serial communication with robot
- Previous by thread: Re: Upper and Lower Boundaries in fmincon
- Next by thread: Re: Web Designing
- Index(es):
Relevant Pages
|
Loading