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


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

Integer Linear Programming

From Eirik Larsen Følstad <eirik.folstad@q2s.ntnu.no>
Newsgroups comp.soft-sys.math.mathematica
Subject Integer Linear Programming
Date 2011-04-29 11:34 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ipe7ou$r3m$1@smc.vnet.net> (permalink)

Show all headers | View raw


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




Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web