MathGroup Archive 2008

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

Search the Archive

Finding the optimum by repeteadly zooming on the solution space (or something like that)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92555] Finding the optimum by repeteadly zooming on the solution space (or something like that)
  • From: "Mauricio Esteban Cuak" <cuak2000 at gmail.com>
  • Date: Sun, 5 Oct 2008 06:05:02 -0400 (EDT)

Hello everyone.I know somebody has probably writ mathematica code on this
problem.
A general answer would probably benefit more people, but I'll do the
specific example, 'cause I'm not sure how to explain it in another way.

I have these restrictions:

cpoAg1= ( -x + (70*a*(x^0.4 + y^0.4)^0.75)/x^0.6);


(*and*)


cpoAg2= ((70*(1 - a)*(x^0.4 + y^0.4)^0.75)/y^0.6 - 2*y);


(* And I need to find the "a" that will maximise this following function. I
don't need and exact solution, but something that is sufficiently near *)


obj =  -x^2/2 + 100*(x^0.4 + y^0.4)^1.75 - y^2;


(* "A" goes between 0 and 1 so I discretise to obtain the {x,y} that
maximise every "a"

the Table command gives me the list of rules which I can replace on "obj"
later to find the maximum. No problem here*)


rules = Table[
  FindRoot[{cpoAg1 == 0, cpoAg2 == 0}, {{x, 0.1}, {y, 0.1}}],
  {a, 0.1, 1, 0.1}
  ];


(*the maximum is found with this following function *)


Max[Thread[ReplaceAll[obj, rules]]];



So far so good...I could discretise "a" as thinly as I want, but I can't
afford the luxury of being that inneficient, 'cause I've got to do other
things later with this part of the program.

Want I want is to divide  "a" into 0.1, 0.2, 0.3,....1. Say that 0.2 is the
optimum between this ten...Then i'll use the interval 1.1 to 2.9 and divide
it into ten parts and so on. I suppose you get the idea. Well, I don't
except you to do the work for me, but I've been having trouble programing
this and because it's such a common problem someone here may have already
written a code to manage this .

Thanks for your time!


cd




-- 
Por favor eviten enviarme archivos adjuntos de Word o Powerpoint (
http://www.gnu.org/philosophy/no-word-attachments.es.html )


  • Prev by Date: Re: NDSolve and error
  • Next by Date: an interesting problem of supplying boundary condition for a PDE
  • Previous by thread: How do I recover GridLines when using Prolog?
  • Next by thread: Re: Finding the optimum by repeteadly zooming on the solution space (or something like that)