| MATLAB Central > MATLAB Newsreader > Problems using fmincon |
|
|
|
I want to perform parametrized function optimization with constraints using fmincon. I wrote appropriate nested function, that is being optimized, defined constraints and so on. However I run into a problem: optimization stops in the second iteration (Optimization terminated: first-order optimality measure less than options.TolFun and maximum constraint violation is less than options.TolCon.) and no further optimization is performed. I managed to find the reason of this problem, but I don't know how to solve it. |
|
Hi Jan, |
|
"Jan " <fremenzone@poczta.onet.pl> wrote in message <ho25kj$66m$1@fred.mathworks.com>... |
|
Which minimizer would be the best for such task? |
|
"Jan " <fremenzone@poczta.onet.pl> wrote in message <ho2brc$510$1@fred.mathworks.com>... |
|
You always can scale your problem. For example, your currentl problem requires the solution x to be discrete between 1 to 1000, then you can scale it as y = x / 1000 so that the solution range for y is between 0 - 1. When you calculate cost or constraints, you can convert y back to x as x = round(1000 * y). Following the same principle, you can even scale your problem to a range 0 - a << 1 so that you can get more resolution from fmincon. Although fmincon is for continous variables, but it should still be feasible to solve discrete problem. All you have to do is integer relaxiation. Unfortunately, as I know, matlab optimization toolbox does not have any solver for integer problems. |
|
"Jan " <fremenzone@poczta.onet.pl> wrote in message <ho25kj$66m$1@fred.mathworks.com>... |
|
The issue with using fmincon here is the rounding aspect of the |
|
fminsearch applies only to unconstrained problems; Jan mentioned that |
|
James Allison <james.allison@mathworks.com> wrote in message <ho8533$p5k$2@fred.mathworks.com>... |
|
Subject: please help i need my submit my optimization tomorrow From: Joe Ajay Date: 5 Dec, 2010 05:10:08 Message: 11 of 13 |
|
Hi,I have my objective function based on the examples given and then gave to the fmincon solver using toolbox.. |
|
Subject: please help i need my submit my optimization tomorrow From: ImageAnalyst Date: 5 Dec, 2010 05:21:48 Message: 12 of 13 |
|
Joe Ajay |
|
Subject: please help i need my submit my optimization tomorrow From: Walter Roberson Date: 5 Dec, 2010 07:38:12 Message: 13 of 13 |
|
On 04/12/10 11:10 PM, Joe Ajay wrote: |
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
| Tag Activity for This Thread | ||
|---|---|---|
| Tag | Applied By | Date/Time |
| please i need h... | Joe Ajay | 5 Dec, 2010 00:14:40 |
| optimization | Jan Stolarek | 20 Mar, 2010 05:49:10 |
| fmincon | Jan Stolarek | 20 Mar, 2010 05:49:10 |
Contact us at files@mathworks.com
