       Maximize with Integer constraints

• To: mathgroup at smc.vnet.net
• Subject: [mg78227] Maximize with Integer constraints
• From: "sdw" <warwick at jps.net>
• Date: Tue, 26 Jun 2007 04:33:18 -0400 (EDT)

```given entry #1:

Maximize[
{x1 + x2 + x3 + x4,
Element[x1 | x2 | x3 | x4 , Integers] &&
0 <= x1 <= 5.6 &&
0 <= x2 <= 8.6 &&
0 <= x3 <= 9.7 &&
4.0 <= x4 <= 22.4 }, {x1, x2, x3, x4}]

{4., {x1 -> 0, x2 -> 0, x3 -> 0, x4 -> 4}}

note -  zeros for answers
entry #2:
Maximize[
{x1 + x2 + x3 + x4,
Element[x1 | x2 | x3 | x4 , Integers] &&
0 <= x1 <= 5.6 &&
0 <= x2 <= 8.6 &&
0 <= x3 <= 9.7 &&
4.1 <= x4 <= 22.4 }, {x1, x2, x3, x4}]

{44., {x1 -> 5, x2 -> 8, x3 -> 9, x4 -> 22}}

only difference is 4.1 vs. 4 in constraints
any ideas what is going on?

thanks,

sdw

```

• Prev by Date: Re: PlotLegend and ListPlot
• Next by Date: Data Export to Excel, Reals or now Strings?
• Previous by thread: Re: extracting fractional powers of series expansion?
• Next by thread: Re: Maximize with Integer constraints