Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Query about the Integers constraints in FindMax...' topicStudent Support Forum > General > Archives > "Query about the Integers constraints in FindMax..."

Next Comment >Help | Reply To Topic
Author Comment/Response
David
03/14/13 4:30pm

Hi everyone,
when I use the FindMaximum with constraints that all variables are integers, I get the following result:
FindMaximum[{3 b + c + 3 d,
2 b + 2 c + d <= 30 && b + 2 c + 3 d <= 25 && 2 b + c + d <= 20 &&
b \[Element] Integers && c \[Element] Integers &&
d \[Element] Integers}, {b, c, d}]

{36., {b -> 7, c -> 0, d -> 5}}

But the correct result should be {39., {b -> 7, c -> 0, d -> 6}}.

After I remove the integer constraint on one of the variables, I get the correct results.
{3 b + c + 3 d,
2 b + 2 c + d <= 30 && b + 2 c + 3 d <= 25 && 2 b + c + d <= 20 &&
b \[Element] Integers && c \[Element] Integers}, {b, c, d}]

{39., {b -> 7, c -> 0, d -> 6.}}

Could any one tell me why?

URL: ,

Subject (listing for 'Query about the Integers constraints in FindMax...')
Author Date Posted
Query about the Integers constraints in FindMax... David 03/14/13 4:30pm
Re: Query about the Integers constraints in Fin... Forum Modera... 03/15/13 09:19am
Re: Re: Query about the Integers constraints in... David 03/15/13 09:51am
Next Comment >Help | Reply To Topic