From: Adrian gavrila on
Hello,

I need help with something,
I want to impose a penalty to fminsearch, something like

If a resulting value is < then 10% of the another resulting value impose a penalty that should throw offcourse fminsearch.

As general ideea I want to impose Fminsearch to follow the condition
that a resulting value that i need optimized to be constrained by another resulting value.

(example I have the average torque in a electric machine, I want it to be maximized as in relationship with the torque ripple (another resulting value), in short, optimize the average torque but also keep in minim values the torque ripple, this is made by varing 2 variables in the machine geometry).

Maybe I wasn't so precise in my explanation.

Please ask me if something is not clear.

Thank you for the help.
From: Matt J on
"Adrian gavrila" <adig_coool(a)yahoo.com> wrote in message <hs9ak4$i77$1(a)fred.mathworks.com>...

> Maybe I wasn't so precise in my explanation.
>
> Please ask me if something is not clear.
=========

The thing that's unclear is what problem you're having with this. Is it coming up with an appropriate penalty, or figuring out how to pass this penalty to fminsearch (the latter should be easy)?
From: Adrian gavrila on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hs9bcf$88o$1(a)fred.mathworks.com>...
> "Adrian gavrila" <adig_coool(a)yahoo.com> wrote in message <hs9ak4$i77$1(a)fred.mathworks.com>...
>
> > Maybe I wasn't so precise in my explanation.
> >
> > Please ask me if something is not clear.
> =========
>
> The thing that's unclear is what problem you're having with this. Is it coming up with an appropriate penalty, or figuring out how to pass this penalty to fminsearch (the latter should be easy)?



How to pass this penalty to fminsearch. In my search I have found OPTIMIZE (fmincon with a fminsearchbnd heart) still a bit of dilemma how to apply to this these penalties.

Am I in the right direction?

Thanks
From: Matt J on
"Adrian gavrila" <adig_coool(a)yahoo.com> wrote in message <hs9d74$a3h$1(a)fred.mathworks.com>...
> "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hs9bcf$88o$1(a)fred.mathworks.com>...
> > "Adrian gavrila" <adig_coool(a)yahoo.com> wrote in message <hs9ak4$i77$1(a)fred.mathworks.com>...
> >
> > > Maybe I wasn't so precise in my explanation.
> > >
> > > Please ask me if something is not clear.
> > =========
> >
> > The thing that's unclear is what problem you're having with this. Is it coming up with an appropriate penalty, or figuring out how to pass this penalty to fminsearch (the latter should be easy)?
>
>
>
> How to pass this penalty to fminsearch. In my search I have found OPTIMIZE (fmincon with a fminsearchbnd heart) still a bit of dilemma how to apply to this these penalties.
=================

I don't see the dilemma. You simply define a new objective function as

NewObjective=OriginalObjective+PenaltyTerm

and pass that fminsearch as you would have passed the OriginalObjective.
From: Adrian gavrila on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hs9bcf$88o$1(a)fred.mathworks.com>...
> "Adrian gavrila" <adig_coool(a)yahoo.com> wrote in message <hs9ak4$i77$1(a)fred.mathworks.com>...
>
> > Maybe I wasn't so precise in my explanation.
> >
> > Please ask me if something is not clear.
> =========
>
> The thing that's unclear is what problem you're having with this. Is it coming up with an appropriate penalty, or figuring out how to pass this penalty to fminsearch (the latter should be easy)?



How to pass this penalty to fminsearch. In my search I have found OPTIMIZE (fmincon with a fminsearchbnd heart) still a bit of dilemma how to apply to this these penalties.

Am I in the right direction?

Thanks