Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #3165 > unrolled thread
| Started by | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| First post | 2011-06-17 09:52 +0000 |
| Last post | 2011-06-17 09:52 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: A problem with Maximize/Minimize DrMajorBob <btreat1@austin.rr.com> - 2011-06-17 09:52 +0000
| From | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| Date | 2011-06-17 09:52 +0000 |
| Subject | Re: A problem with Maximize/Minimize |
| Message-ID | <itf85j$23j$1@smc.vnet.net> |
Yeah, that's definitely a bug. The Integer program gets a correct {x, y,
z} but the wrong objective value:
problem =
max[{30 x + 20 y + 15 z, x >= 0, y >= 0, z >= 0,
7 x + 7 y + 3 z <= 100, 3 x + y + 2 z <= 50}, {x, y, z}];
problem /. Last[problem /. max -> Maximize]
max[{450, True, True, True, True, True}, {10, 0, 10}]
problem =
max[{30 x + 20 y + 15 z, x >= 0, y >= 0, z >= 0,
7 x + 7 y + 3 z <= 100, 3 x + y + 2 z <= 50}, {x, y, z}, Integers];
problem /. Last[problem /. max -> Maximize]
max[{450, True, True, True, True, True}, {10, 0, 10}, Integers]
Bobby
On Thu, 16 Jun 2011 23:09:34 -0500, Gary Wardall <gwardall@gmail.com>
wrote:
> A problem with Maximize/Minimize:
>
> Clear[x, y, z]
>
> Maximize[{30 x + 20 y + 15 z, x >= 0, y >= 0, z >= 0,
> 7 x + 7 y + 3 z <= 100, 3 x + y + 2 z <= 50}, {x, y, z}]
>
> {450, {x -> 10, y -> 0, z -> 10}}
>
> Maximize[{30 x + 20 y + 15 z, x >= 0, y >= 0, z >= 0,
> 7 x + 7 y + 3 z <= 100, 3 x + y + 2 z <= 50}, {x, y, z}, Integers]
>
> {490, {x -> 10, y -> 0, z -> 10}}
>
> I think the problem is obvious or am I confused? I'm using Mathematica
> 8 on an Apple Power Book 10.5.6
>
> A similar problem exist with Minimize.
>
> Minimize[{-30 x - 20 y - 15 z, x >= 0, y >= 0, z >= 0,
> 7 x + 7 y + 3 z <= 100, 3 x + y + 2 z <= 50}, {x, y, z}]
>
> {-450, {x -> 10, y -> 0, z -> 10}}
>
> Minimize[{-30 x - 20 y - 15 z, x >= 0, y >= 0, z >= 0,
> 7 x + 7 y + 3 z <= 100, 3 x + y + 2 z <= 50}, {x, y, z}, Integers]
>
> {-490, {x -> 10, y -> 0, z -> 10}}
>
>
> Gary Wardall
>
--
DrMajorBob@yahoo.com
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web