Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problems with NMaximize.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69237] Re: Problems with NMaximize.
  • From: Peter Pein <petsie at dordos.net>
  • Date: Sun, 3 Sep 2006 01:39:39 -0400 (EDT)
  • References: <ed6935$jie$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Nacho schrieb:
> 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
> 
...

> 
> Any help is welcomed to solve the problem.
> 
> Thanks in advance.
> 
> Regards.
> 

Hello,

I've got the impression, Mathematica doesn't like rational constraints, 
when using integer variables; but this may be wrong. I used Jean-Marc's 
tip for specifying the range for r and got:

In[1]:=
datarate = l*(nfec - r - 1)*(4000/nfec);
constr = And @@ {d*r*i >= l*nfec, nfec == q*i, 0 <= (i - 1)*(d - 1) <= 
8*l, 1000 <= l <= 23850, 1 <= q <= 8, 1 <= d <= 2048, 1 <= nfec <= 255, 
0 <= r <= 8, {l, nfec, d, q, i, r} \[Element] Integers, Or @@ Thread[r 
== {0, 2, 4, 6, 8, 10, 12, 14, 16}]};
solution = NMaximize[{datarate, constr}, {r, l, nfec, d, q, i}]
Out[3]=
{1.24865*^7, {d -> 1924, i -> 16, l -> 3842, nfec -> 16, q -> 1, r -> 2}}
In[4]:=
constr /. Last[solution]
Out[4]=
True

While maximizing, Mathematica throws some warnings about the 
impossibilitiy to find startvalues according to the constraints.
If it tries r==0 first, the first constraint becomes 0>=l*nfec, which is 
of course impossible. I would ignore these warnings.

HTH
Peter


  • Prev by Date: Re: Re: ReplaceAll (/.)
  • Next by Date: Re: Re: variable "K"? (Really strange behavior . . . )
  • Previous by thread: Re: Problems with NMaximize.
  • Next by thread: Re: Problems with NMaximize.