MathGroup Archive 2010

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

Search the Archive

Re: Non-linear Programming - Plot3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110121] Re: Non-linear Programming - Plot3D
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 2 Jun 2010 02:07:19 -0400 (EDT)

Minimize[{x^2 - y^2,
  x + y <= 12 , -5 <= x <= 10, -5 <= y <= 10},
 {x, y}]

{-100,{x->0,y->10}}

Maximize[{x^2 - y^2,
  x + y <= 12 , -5 <= x <= 10, -5 <= y <= 10},
 {x, y}]

{100,{x->10,y->0}}

Plot3D[x^2 - y^2,
 {x, -5, 12}, {y, -5, 12},
 RegionFunction ->
  Function[{x, y, z},
   x + y <= 12 && x <= 10 && y <= 10]]


Bob Hanlon

---- Trevor Rabey <trevorATperfectproject.com.au at giganews.com> wrote: 

=============
I can use Plot3D to plot a surface z as a function of x and y, say z = x^2-y^2, abd the NLP problem is to max or min z on some region defined by a function or functions such as:
x + y <= 12, x<=10, y <=10
I cannot seem to find a good way to plot the constraints, ie the extrusion of the region from the xy plane.
Help, anyone? TIA.
--
Trevor Rabey




  • Prev by Date: Re: tabulating expression with arbitrary precision
  • Next by Date: How do make the output of Graphics[ ] print out in "Inch" units ?
  • Previous by thread: Re: Non-linear Programming - Plot3D
  • Next by thread: Re: Non-linear Programming - Plot3D