help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Re: Newbie question - sqp solver equality constraints function

 From: Juan Pablo Carbajal Subject: Re: Newbie question - sqp solver equality constraints function Date: Thu, 29 Jun 2017 12:04:26 +0200

```> # Equality constraint function
> g = @( x ) [ sum( x( x <= 0.0 ) ); sum( x( x >= 0.0 ) ) ] - [ Lb; Ub ];
> # Solver
> [ x, obj, info, iter, nf, l ] = sqp( R, phi, g, h, Lb, Ub );
>
> But if I set lower bound to zero ( *Lb = 0.0* ) I have the following error:
>
> *error: qp: equality constraint matrix must be full row rank*
>
> What am I doing wrong? I am stuck ...

My guess is that, one of the components of your Equality constraint is
empty and hence its derivative is zero, giving zero eigenvalue in the
matrix assembled for QP.
Nevertheless the function g is not meaningful when Lb or Ub are 0. You
are saying that the sum of non-positive (non-negative) components
should be zero, if the components are not zero, this cannot be
fulfilled (sum of nonzero numbers of equal sign cannot be zero), hence
the only solution is all components to be zero. Do you set the initial
guess with this property?

What are you trying to achieve?

```

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]