sqp optimization

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

sqp optimization

Matheus Moreira
Hi guys,

I am trying to run a code, but i don't know how to implement it. I have a
function, which I want to optimize. I need to use some nonlinear constaints,
but they are parts of the function that I am optimizing. So, I created a
function for each constraints:


x0 = [0.56;12;1.1;0.4;2.5;22;0.04]

lb = [0.1;10;1;0;1;15;0.03]

ub = [1.0;16;2;0.5;4;30;0.06]

function rest = h
  rest = [@anginjIImen; @anginjIImai]
endfunction

[x, obj, info, iter, nf, lambda] = sqp (x0, @rend,[],@h,lb,ub)


I got the following warning: "error: octave_base_value::resize (): wrong
type argument 'function handle'"

May someone help me?
Thanks!



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: sqp optimization

Przemek Klosowski-7
On 07/17/2018 02:28 PM, Matheus Moreira wrote:
> function rest = h
>    rest = [@anginjIImen; @anginjIImai]
> endfunction
>
> [x, obj, info, iter, nf, lambda] = sqp (x0, @rend,[],@h,lb,ub)
>
>
> I got the following warning: "error: octave_base_value::resize (): wrong
> type argument 'function handle'"
The hessian function you define returns an array with two function
pointers. It has to return an array instead.