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


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

Re: Compact formulation of array of constraints

Started byRay Koopman <koopman@sfu.ca>
First post2014-01-13 06:55 +0000
Last post2014-01-13 06:55 +0000
Articles 1 — 1 participant

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


Contents

  Re: Compact formulation of array of constraints Ray Koopman <koopman@sfu.ca> - 2014-01-13 06:55 +0000

#16414 — Re: Compact formulation of array of constraints

FromRay Koopman <koopman@sfu.ca>
Date2014-01-13 06:55 +0000
SubjectRe: Compact formulation of array of constraints
Message-ID<lb02ls$dn0$1@smc.vnet.net>
If all the constraints must be satisfied then you need to AND them:

And @@ Array[x@# >= 0 &, 6, 0]

x[0] >= 0 && x[1] >= 0 && x[2] >= 0 && x[3] >= 0 && x[4] >= 0 && x[5] >= 0

----- Paul Smith <phhs80@gmail.com> wrote:
> Dear All,
> 
> How can one formulate the set of constraints
> 
> x[1] >= 0, x[1] >= 0, x[2] >= 0, x[3] >= 0, x[4] >= 0, x[5] >= 0
> 
> by using a compact form?
> 
> Thanks in advance,
> 
> Paul

[toc] | [standalone]


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


csiph-web