Message Boards Message Boards

0
|
7572 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Mixed Integer Optimization

Posted 10 years ago

Hello,

I have a simple symbolic optimization model includes integer and real numbers

Minimize[{-ax - bz - ct - f + n, 
  n <= (ax + bz + ct + f) && n >= (ax + bz + ct + f)  && 
   1 <= x <= 105 && 1 <= z <= 30 && 1 <= t <= 22  && 7500 <
    a && a <= b <= c && c <= 2*a && x + z + t <= 22 && 
   x + z + t >= 22 && (ax + bz + ct) h <= f  }, { a, b, c, h, x, t, 
  z , n}]

the answer is

{0, {a -> 7500, b -> 9000, c -> 12000, x -> 3/2, t -> 3/4, z -> 3/4,  n -> f + tc + xa + zb}}

I need to know to define x,z,t as integers, any help is highly appreciated. Given that I am using latest Mathematica version where mixed integer supposed to be supported. wherever I define these variables as integers it will show an error. any idea?

I am not expert, this is my first try with Mathematica.

POSTED BY: N Y
3 Replies
x?Integers can be used to specify that a variable can take on only integer values.

(from the documentation)

POSTED BY: Frank Kampas

NMinimize can make some variables integers and some real, but Minimize cannot.

POSTED BY: Frank Kampas
Posted 10 years ago

Thank you. Can you please let me know how to define variables within NMinimize

POSTED BY: N Y
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract