[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53483] sqp fails to find the minimum
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #53483] sqp fails to find the minimum |
Date: |
Mon, 26 Mar 2018 19:04:29 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0 |
URL:
<http://savannah.gnu.org/bugs/?53483>
Summary: sqp fails to find the minimum
Project: GNU Octave
Submitted by: None
Submitted on: Mon 26 Mar 2018 11:04:28 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Inaccurate Result
Status: None
Assigned to: None
Originator Name: Ben Schwab
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.2
Operating System: Microsoft Windows
_______________________________________________________
Details:
I am running 64 bit Octave version 4.2.2 for Windows 10 Home Version 1511 OS
Build 10586.589
I am attempting to use "sqp" to solve an optimization problem. "sqp" is
returning my guess even when there are other inputs of the function with lower
outputs. Full code used is bellow. I emphasize that
phi([70,40])=-2.9010e-035 but phi([77,47])=-1.1955e-034 which is smaller but
sqp returns [70;40] as the minimum when I use that as a guess.
>> ttt = @(x) x(1)^2+x(2)^2
ttt =
@(x) x (1) ^ 2 + x (2) ^ 2
>> sqp([70,40],ttt,[],[],[-500,-500],[500,500],1e100,1e-40)
ans =
0
0
>> phi=@(x)
-factorial(27)*prod(1/sqrt(2*pi*x(2)^2).*exp(-([1,2,3,7,20,26,35,52,58,60,64,69,72,77,84,90,90,101,104,111,121,121,132,139,141,155,159].-x(1)).^2./(2*x(2)^2)))
phi =
@(x) -factorial (27) * prod (1 / sqrt (2 * pi * x (2) ^ 2) .* exp (-([1, 2, 3,
7, 20, 26, 35, 52, 58, 60, 64, 69, 72, 77, 84, 90, 90, 101, 104, 111, 121,
121, 132, 139, 141, 155, 159] - x (1)) .^ 2 ./ (2 * x (2) ^ 2)))
>> phi([70,40])
ans = -2.9010e-035
>> phi([77,47])
ans = -1.1955e-034
>> phi([77.543,47.707])
ans = -1.2047e-034
>> sqp([70,40],phi,[],[],[-500,0],[500,500],1e100,1e-40)
ans =
70
40
>> sqp([70,40],phi,[],[],[-500,0],[500,500],1e100,1e-100)
ans =
70
40
>> sqp([70,40],phi,[],[],[0,0],[100,100],1e100,1e-100)
ans =
70
40
>> sqp([70,40],phi,[],[],[0,0],[100,100],1e100,1e-36)
ans =
70
40
>>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53483>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53483] sqp fails to find the minimum,
anonymous <=