|
From: | Ether Jones |
Subject: | Re: Constrained Nonlinear Optimization problem |
Date: | Fri, 2 May 2014 21:28:21 -0400 |
On May 2, 2014, at 7:40 PM, Ether Jones wrote:
Could someone please show me how to set up this problem in Octave?But I'm having trouble setting it up in Octav
Maximize (x + y)
Subject to constraints:
0 <= x <= 75
0 <= y <= 75
29.5 - sqrt(0.184*(x+y)^2 + x^2) = 0.0
45.5 - sqrt(0.184*(x+y)^2 + y^2) = 0.0
I have solved it with Maxima, Python, AMPL, and Excel and get the following answer:
x = 17.2
y = 38.7
e
Thank you.I should have made a few points clearer in my original post:
I've read the documentation for sqp() in the Octave manual. I find it puzzling.
I'm aware that maximization can be accomplished by making the objective function negative (that's what I did for Python and Maxima, using Powell's COBYLA).
I'm an Octave newbie.This is not a homework problem (I'm in my 60's). It's a scaled-down example of a more complex engineering problem I am trying to solve.
If someone would be willing to show how to transform/convert this example into the parameters that the Octave sqp() function requires it would be greatly appreciated.
[Prev in Thread] | Current Thread | [Next in Thread] |