Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: fmincon problem
Posted:
Jul 18, 2011 11:32 AM


Hello Matt,
Thanks for the reply. I corrected the ub and lb portion of my code.
I have not set the 'AlwaysHonorConstraints' option. It is probably set to the default value.
Some constraints of c(i) are off by as large AS 10 or 2000 ! So, it's not coming from the roundoff error, I guess.
Your help will be very appreciated.
Thank again,
Nazmul
"Matt J" wrote in message <j013ed$em9$1@newscl01ah.mathworks.com>... > "Nazmul Islam" wrote in message <j00ji7$65k$1@newscl01ah.mathworks.com>... > > > > > > After I run the code, one of the W value comes out to be negative !!! However, I explicitly set a bound for W (between 0 and 900). So, it should not happen ! > =================== > > You've set ub and lb to scalars, which means only W(1) will be bounded. > You need > > lb=[0,0,0]; > ub=[900,900,900]; > > Aside from that, have you set the 'AlwaysHonorConstraints' option? We can't tell from the code you've shown. > > > > Beside, one of the inequality constraint does not get satisfied, too ! I want all entries in the c vector to be negative. But some of them come out to be negative ! > ======================= > > Could the nonnegative c(i) simply be due to roundoff error or incomplete convergence. How large are those values?



