Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1993 > unrolled thread

Integer Linear Programming

Started byEirik Larsen Følstad <eirik.folstad@q2s.ntnu.no>
First post2011-04-29 11:34 +0000
Last post2011-04-29 11:34 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Integer Linear Programming Eirik Larsen Følstad <eirik.folstad@q2s.ntnu.no> - 2011-04-29 11:34 +0000

#1993 — Integer Linear Programming

FromEirik Larsen Følstad <eirik.folstad@q2s.ntnu.no>
Date2011-04-29 11:34 +0000
SubjectInteger Linear Programming
Message-ID<ipe7ou$r3m$1@smc.vnet.net>
Hi,

I'm currently using Mathematica 6.0 on a Mac.

When trying to solve the following, Mathematica gives the "LinearProgramming::lpsnf: No solution can be found that satisfies the constraints." as expected;

LinearProgramming[{0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
   0., 0.2,
  0.2}, {{0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0,
   0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0,
   0, -1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0,
   0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0}, {0, 0,
   0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0,
   0, 0, 0, 0, 0, -1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   0, -1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0}, {0,
    0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0,
   0, 0, 0, 1, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
    0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1,
   0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1}}, {{1.,
   0}, {0., 0}, {0., 0}, {-1., 0}, {1., 0}, {0., 0}, {0., 0}, {-1.,
   0}, {1., -1}, {1., -1}, {1., -1}, {1., -1}, {1., -1}, {1., -1}}, \
{{0., 1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0.,
   1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0.,
   1.}, {0., 1.}, {0., 1.}, {0., 1.}}, Reals]

While when solving the following, Mathematica gives no "fault message", but outputs "{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}". The only difference from the previous is Integers instead of Reals;


LinearProgramming[{0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
   0., 0.2,
  0.2}, {{0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0,
   0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0,
   0, -1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0,
   0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0}, {0, 0,
   0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0,
   0, 0, 0, 0, 0, -1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   0, -1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0}, {0,
    0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0,
   0, 0, 0, 1, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
    0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1,
   0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1}}, {{1.,
   0}, {0., 0}, {0., 0}, {-1., 0}, {1., 0}, {0., 0}, {0., 0}, {-1.,
   0}, {1., -1}, {1., -1}, {1., -1}, {1., -1}, {1., -1}, {1., -1}}, \
{{0., 1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0.,
   1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0., 1.}, {0.,
   1.}, {0., 1.}, {0., 1.}, {0., 1.}}, Integers]

The Integer solution clearly does not satisfy all the constraints given. What is wrong?


Vennlig hilsen / Best regards,
Eirik Larsen F=F8lstad
PhD Candidate
Phone +47 920 44 740
Q2S Centre of Excellence / Norwegian University of Science and Technology
O.S.Bragstads plass 2E /  N-7491 Trondheim / http://www.q2s.ntnu.no




[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web