MathGroup Archive 2010

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

Search the Archive

Re: FindMinimum numerical constraint functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110861] Re: FindMinimum numerical constraint functions
  • From: "Stuart Nettleton" <Stuart.Nettleton at uts.edu.au>
  • Date: Thu, 8 Jul 2010 20:34:21 -0400 (EDT)

Hi Daniel,
Looking deeper, I was perhaps too happy to see a solution. You have the  
condition "/;VectorQ[vals, NumberQ]" in the constraint function using  
"vals" instead of "vars". Is this still symbolic execution? If I add "&&  
VectorQ[vars, NumberQ]" there is an execution error.
Stuart


On Fri, 09 Jul 2010 08:30:15 +1000, Stuart Nettleton  
<Stuart.Nettleton at uts.edu.au> wrote:

> Hi Daniel,
> I am pleased that FindMinimum is happy with constraint return values  
> like {True, False, False} etc.
> This gives me a whole new perspective.
> Thanks once again for a magnificent insight!
> Best regards,
> Stuart
>
>> obj[vars_] := Sin[vars[[1]]]*Sin[2*vars[[2]]] /; VectorQ[vars, NumberQ]
>>
>> con[vars_List, vals_] :=
>>    Thread[{vars[[1]]^2 + vars[[2]]^2, -vars[[1]], -vars[[2]]} <= vals]  
>> /;
>> 	VectorQ[vals, NumberQ] && Length[vals]===3
>>
>> FindMinimum[{obj[vars], Thread[con[vars,{3,0,0}]]}, vars]


-- 
Dr Stuart Nettleton
PhD, FCPA, MBA, MEngSci, BEng(Hons), GradDipAICD
Senior Lecturer
School of Management & Systems
Faculty of Engineering & IT
Energy Policy Research Centre

This e-mail may be confidential and /or legally privileged.  It is  
intended solely for the addressee.  Access to this e-mail by anyone else  
is unauthorised. If you are not the intended recipient, any disclosure,  
copying, distribution or any action taken or omitted to be taken in  
reliance on it, is prohibited and may be unlawful.

Virus Information: It is the recipient/client's duty to virus scan and
otherwise test the information provided before loading onto any computer  
system. No warranty is made that this material is free from computer virus  
or any other defect or error. Any loss/damage incurred by using this  
material is not the sender's responsibility.

--
UTS CRICOS Provider Code:  00099F
DISCLAIMER: This email message and any accompanying attachments may contain
confidential information.  If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments.  If
you have received this message in error, please notify the sender
immediately and delete this message. Any views expressed in this message
are those of the individual sender, except where the sender expressly, and
with authority, states them to be the views the University of Technology,
Sydney. Before opening any attachments, please check them for viruses and
defects.


  • Prev by Date: Re: FittedModel object type
  • Next by Date: Re: Displaying cylinders
  • Previous by thread: Re: FindMinimum numerical constraint functions
  • Next by thread: image is not graphics