MathGroup Archive 2005

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

Search the Archive

Re: Manipulating the results of Maximize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60032] Re: Manipulating the results of Maximize
  • From: Selina <yedekaccount at hotmail.com>
  • Date: Sun, 28 Aug 2005 23:14:46 -0400 (EDT)
  • References: <dep83a$f2u$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

> I read your post, but I am confused. Could you
> provide some example
> input and output (pseudo code with "insert magic
> function" would be
> ok)?


Hi, thanks a lot for your reply. Let me try to clarify things a little:

1. There are two separate constrained optimization problems, with different objective functions and constraints. The two maximization problems share the same parameters, and the choice variables are the same. 
MAXIMIZATION PROBLEM 1: 

Objective function 1: f(x,y; a,k). X and Y are the choice variables and a and k the parameters. 

Constraint 1: A function of the variables X, Y and the parameters a,k. 
Constraint 2: Another function of the variables X,Y and the parameters a,k. 

MAXIMIZATION PROBLEM 2:

Objective function 2: g(X, Y; a, k). 
Constraint 3, Constraint 4 (again functions of X, Y, a and k).

What I am interested in is how the maximum values attained by the two objective functions change as the parameters a and k change. I am currently using the Table command to calculate the optimum for different parameters, but don't know how to extract the maximum values and calculate the difference, along with the corresponding parameters. Let me try to give a simple example with one constraint for each problem and some functions I made up. Below, a and b are parameters and X and Y are the choice variables. The objective functions are abXY and a^2bXY, respectively. 

Table[{a, b,
   Maximize[{a b X Y, a X^2 + b Y^2 == 1}, {X, Y}], Maximize[{a^2 b X Y, a X^2 + b Y^2 == 0.5}, {X, Y}] }, {a, 0, 1, 0.2}, {b, 0.2, 1, 0.2}] 

The output of this looks something like this:

{0.2, 0.6, {0.173205, {X -> 1.58114, Y -> 0.912871}},
 {0.0173205, {X -> 1.11803, Y -> 0.645497}}}, {0.2, 0.8, {0.2, {X -> 1.58114,Y -> 0.790569}}, {0.02, {X->1.11803, Y-> 0.559017}}} etc., for different parameter values. So, it gives the maximum values attained by each function, the optimal X and Y, and the corresponding parameters. Now, I need to extract the maximum values from this table for each parameter combination, and make a list of the difference in maximum values, and plot it to see in which parameter ranges one function attains a higher max. value than the other. 

Secondly, there is a separate function, call Z, that involves X and Y, as well as a and b. I would like to evaluate this function Z at the optimum values of X and Y and the corresponding parameters. So, I need to tell Mathematica to evaluate Z using the values of a and b, and the corresponding optimal X and Y...

I hope this makes it a little more clear. Please let me know if it is not.

Thanks a lot!


  • Prev by Date: Re: List Replace Problems
  • Next by Date: Re: RasterGraphics[]
  • Previous by thread: Re: Manipulating the results of Maximize
  • Next by thread: Re: Re: Manipulating the results of Maximize