Re: Problems with NMaximize.

*To*: mathgroup at smc.vnet.net*Subject*: [mg69194] Re: [mg69168] Problems with NMaximize.*From*: "Chris Chiasson" <chris at chiasson.name>*Date*: Fri, 1 Sep 2006 06:41:36 -0400 (EDT)*References*: <200608310840.EAA19660@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

You may want to manipulate your constraint equations if you are going to use the default method, because it is a penalty based and while it can apply some automatic scaling for the penalties associated with your constraints, it can be easier if you make the constraint right hand sides all equal to, say, 1. Also, since this is a discrete problem, you may want to look at using the genetic method, differential evolution, along with perhaps increasing the number of starting points or the number of mates. I hope that helps. On 8/31/06, Nacho <ncc1701zzz at gmail.com> wrote: > Hello. > > I'm trying to solve a real-life problem using Mathematica and I am > having some problems with NMaximize. > > As background, the problem is related to VDSL2 technology. The physical > frame can be configured using different parameters (primary parameters) > and those parameters defines the secondary parameters. > > I want Mathematica to maximize the datarate in the line while > maintaining some performance on the secondary parameters. > > Now, the formulas. > > I want to maximize the datarate, definded as: > > l*(nfec-r-1)*4000/nfec > > the other constrains are: > > 4*d*r*i / (l*nfec) >= 4 > > nfec==q*i > > 0<= (i-1)*(d-1) / (l*500) <=0.016 > > And the parameters have the following restrictions: > > l, nfec, r, d, i, q are all Integers (but the calculations done with > them not neccessarily). > > 1000<=l<=23850 > > 1<=q<=8 > > 1<=d<=2048 > > 1<=nfec<=255 > > r can take even values between 0 and 16 (0,2,4,6,8,10,12,14,16) > > > > I think that this is all. > > I have been unable to Nmaximize the result, and as I tried different > approaches (leaving the variables as Reals and then making them > Integers little by little, eliminating some variables...) I get > different results. > > Sometimes the maximized value is really low, others it fails to > converge, others it finds a 1/0 indetermination... > > > The best approach I could find is this one, eliminating "i" from the > equation set: > > > NMaximize[{l*(nfec - > r - 1)*(4000/nfec), (4*d*r)/(l*q) >= 4, 0 <= ((-1 + d)*(-1 + > nfec/q))/(500*l) <= 0.016, l â?? Integers, > nfec â?? Integers, r â?? Integers, d â?? Integers, q â?? Integers, > > 1000 <= l <= 23850, 1 <= q <= 8, 1 <= d <= > 2048, 1 <= nfec <= 255, 0 <= r <= 16}, {l, nfec, r, d, q}] > > > > (I hope that the E indicating that a variable belongs to a domain are > displayed). But it complains about a lot of constraints, I don't know > why... > > > I don't know how to say Mathematica that a variable can take just some > values (as for r being even), but I just said it is between 0 and 16. > > > Any help is welcomed to solve the problem. > > Thanks in advance. > > Regards. > > -- http://chris.chiasson.name/