       Re: using indexed variables in MultiplierMethod[ ], etc.

• To: mathgroup at smc.vnet.net
• Subject: [mg7684] Re: [mg7662] using indexed variables in MultiplierMethod[ ], etc.
• From: Richard Finley <trfin at fiona.umsmed.edu>
• Date: Sun, 29 Jun 1997 22:17:19 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Hi

This is one way that should work:

u[i_]:=ToExpression["u"<>ToString[i]]

will convert your u[i] expressions to ui, that is u will be changed to u2.

Hope that helps.
RF

At 01:36 AM 6/26/97 -0400, you wrote:
>I'm not serious programmer in Mma, so please excuse me if this is question is
>not stated as clearly as it could be.
>
>My problem is that I wish to use a Mma package called MultiplierMethod.m which
>implements a version of Kuhn-Tucker constrained optimization. The package
>defines the function MultiplierMethod[] as follows:
>
>"MultiplierMethod[f,g,h,x,x0] finds a local solution to a minimization \
>problem where:  f is the criterion to be minimized, g is the list (possibly \
>empty) of equality constraints, h is the list (possibly empty) of inequality \
>constraints of the form  h(x) <= 0, x = {x1,x2,...} is a generic list of the \
>variables, x0 is an initial vector  for x. It returns a list {f*,{x1 -> x1*, \
>etc.}} like FindMinimum.  With the option DualParameter -> True it can also \
>provide information on  feasibility and Lagrange and/or Karush Kuhn & Tucker \
>multipliers."
>
>Here's my problem:  I'd like to use constraint lists such as
>{u-2*u+u,u-2*u+u,...} which are easily constructed using
>Table[], but the MultiplierMehtod package will not accept u, u, ,
etc.
>as variables.  It will except u0, u1, u2, etc. as variables, however.  Is
there
>a simple way to get indexed variables such as u[i] to be accepted by packages
>such as MultiplierMethod?
>
>I've already spent an afternoon working on this.  Many thanks to anyone who
can
>help.
>

```

• Prev by Date: Re: How to close down the front end from a 3.0 notebook ?
• Next by Date: Making command called HoldTemporary
• Previous by thread: Re: How to close down the front end from a 3.0 notebook ?
• Next by thread: Making command called HoldTemporary