Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Maximization problems

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96686] Maximization problems
  • From: replicatorzed at gmail.com
  • Date: Fri, 20 Feb 2009 05:48:46 -0500 (EST)

Dear Group,

consider a toy function 'func' of 6 parameters, and a set of
constraints 'cons' for this function:

In[45]:= func[b_, m_, s_, a_, n_, r_] := Total[{b, m, s, a, n, r}];
cons[b_, m_, s_, a_, n_, r_] :=
  And[3 <= a <= 10, 1 <= n <= 10, 1 <= r <= n, 3 <= b <= 10,
   1 <= m <= b, 1 <= s <= m, Binomial[b, m] <= a^n];

In[47]:= NMaximize[{func[b, m, s, a, n, r],
  And[cons[b, m, s, a, n, r]]
  }, {b, m, s, a, n, r}]

Out[47]= {60., {b -> 10., m -> 10., s -> 10., a -> 10., n -> 10.,
  r -> 10.}}

In[48]:= Maximize[{func[b, m, s, a, n, r],
  And[cons[b, m, s, a, n, r]]
  }, {b, m, s, a, n, r}]

Out[48]= Maximize[{a + b + m + n + r + s,
  3 <= a <= 10 && 1 <= n <= 10 && 1 <= r <= n && 3 <= b <= 10 &&
   1 <= m <= b && 1 <= s <= m && Binomial[b, m] <= a^n}, {b, m, s, a,
  n, r}]

While NMaximize gives the correct answer, Maximize is returned
unevaluated. If I remove the last constraint from cons, then Maximize
succeeds as well. Now why is it, that the symbolic method can't
maximize the function? Any idea?

Istvan Zachar



  • Prev by Date: Latin Hypercube and other sampling algorithm
  • Next by Date: Re: Exporting a bitmap in native resolution
  • Previous by thread: Latin Hypercube and other sampling algorithm
  • Next by thread: Re: Maximization problems