MathGroup Archive 2004

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

Search the Archive

Re: Problem with Maximize and conditions.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51100] Re: Problem with Maximize and conditions.
  • From: ncc1701zzz at hotmail.com (Nacho)
  • Date: Mon, 4 Oct 2004 06:18:29 -0400 (EDT)
  • References: <200410020719.DAA26384@smc.vnet.net> <4D224676-146C-11D9-BCA4-000A95B4967A@mimuw.edu.pl> <cjoi8t$ak0$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hello Andrzej.

I suppose that Minimize and NMinimize, as they are new functions,
still have to be debugged and documented, but I expect to see
improvements in future functions.

In any case, it is a good example of a funcion "dangerous" to use if
you don't know a priori an approximate solution, the result may be
wrong.

Regards.


Andrzej Kozlowski <akoz at mimuw.edu.pl> wrote in message news:<cjoi8t$ak0$1 at smc.vnet.net>...
> I have finally  managed to get NMinimize return the right answer:
> 
> 
> NMinimize[{x + y + z, (1/20)*x + y + 5*z == 100, (x | y | z) $B":(B 
> Integers, 0 < x < 99, 0 < y < 99,
>     0 < z < 99}, {x, y, z}, Method -> {"SimulatedAnnealing", 
> "PenaltyFunction" ->
>       (100*(#1 - Floor[#1]) & ), SearchPoints -> 250}, MaxIterations -> 
> 500]
> 
> 
> {43., {x -> 20, y -> 4, z -> 19}}
> 
> I am not sure if all the options, particularly MaxIterations, are 
> needed. This would need more testing. According to the help 
> "DifferentialEvolution" ought to be best for problems involving 
> integers, but not matter what I do to it I can't force it to return the 
> right answer.
> 
> Andrzej
> 
>


  • Prev by Date: Re: How to explain functions' linearity to Mathematica 5 ?
  • Next by Date: Re: Derivatives of user-defined control-flow functions
  • Previous by thread: Re: Re: Problem with Maximize and conditions.
  • Next by thread: Re: Problem with Maximize and conditions.