Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

ConstrainedMin and vector-notation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21870] ConstrainedMin and vector-notation
  • From: nielses at my-deja.com
  • Date: Wed, 2 Feb 2000 22:54:26 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I have the following problem: (used to calculate the Farell efficiency
measure, for those interested)

min l

s.t.

t(X) z <= l y
zi >= 0
z1 + ... + zn = 1

X: matrix, z, y: vectors, l: scalar
(t(X) is the matrix X transposed)

I want to solve this with ConstrainedMin. (I realize it can be rewritten on
matrixform and fed to LinearProgramming.)

The following works fine, but I wonder, if it's not possible to write it in an
easier way:

X = {{1, 3}, {7, 1}}
y = {8, 4}

n = Length[X];
zz = Table[z[i], {i, n}];
ConstrainedMin[l,
  Join[MapThread[LessEqual, {zz.X, l y}],
    Table[z[i] >= 0, {i, n}], {Plus @@ zz == 1}], Append[zz, l]]

The point is of course, that is has to work with

X = {{3, 6}, {4, 4}, {8, 2}}

too, and an y-vector of a higher dimension for that matter.

Can anyone help me write this more elegantly??

I often encounter situation where I have to define a vector like zz to obtain
a vector-solution (e.g. when using Solve). There has to be a simpler way.

Regards,

Niels Elken Sønderby
nielsx at bigfoot.com


Sent via Deja.com http://www.deja.com/
Before you buy.


  • Prev by Date: Re: Re: Could this be improved?---Continued
  • Next by Date: Re: Fitting a function to a list (newbie)
  • Previous by thread: Re: Re: Could this be improved?---Continued
  • Next by thread: Cellular Automaton in Mathematica and OOP