Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Re: Linear Programming

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51014] Re: Linear Programming
  • From: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>
  • Date: Fri, 1 Oct 2004 04:49:33 -0400 (EDT)
  • References: <cjgifa$q53$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I don't think ConstrainedMin will do what you want. When you use it in 
Mathematica version 5 you get a message telling you it has been superseded 
by Minimize. Checking the documentation for ConstrainedMin 
(http://documents.wolfram.com/v4/RefGuide/ConstrainedMin.html) and for Minimize 
(http://documents.wolfram.com/v5/Built-inFunctions/AlgebraicComputation/Calculus/Minimize.html) 
reveals that Minimize does the sort of thing you want.

Minimize[x + y, {x > 5, y > 5, 3*x > 5*y, x \[Element] Integers, y 
\[Element] Integers}, {x, y}]

which gives

{17, {x -> 11, y -> 6}}

It appears that in the current implementation of Minimize you have to 
constrain y to be integer as well.

Steve Luttrell

"Rodrigo Malacarne" <malacarne at gmail.com> wrote in message 
news:cjgifa$q53$1 at smc.vnet.net...
> Hi everybody,
>
> How can I insert a constraint in the following expression
>
> ConstrainedMin[x+y,{x>5,y>5,3x>5y},{x,y}]
>
> to find only integer results? Using the expression above I get
>
> {13.3333,{x->8.3333,y->5.}}
>
> but I want x to be an integer number.
>
> Cordially yours,
> Rodrigo
> 



  • Prev by Date: Re: Colors in ScatterPlot3D?
  • Next by Date: Re: MultipleListPlot
  • Previous by thread: Re: Linear Programming
  • Next by thread: Re: Linear Programming