embotech / ecos

A lightweight conic solver for second-order cone programming.
GNU General Public License v3.0
471 stars 123 forks source link

Simple CVX problem causes error #36

Open echu opened 10 years ago

echu commented 10 years ago

Here's a simple CVX script that throws an error:

cvx_begin
    variable x 
    cvx_solver ecos
    minimize x
    x >= 1
cvx_end

Here's the output:

Calling ECOS unknown: 1 variables, 1 equality constraints
------------------------------------------------------------
------------------------------------------------------------
Status: Error
Optimal value (cvx_optval): NaN

??? Error using ==> ecos
G and h do not match in dimension

I think I know what's going on, but if anyone else has some spare time and wants to look into this, they should feel to.

mcg1969 commented 10 years ago

I am guessing it's an issue with zero-dimension matrices. Sometimes [] has size (0,0) when it needs to be (0,1) or (1,0).

On Feb 17, 2014, at 5:33 PM, "Eric Chu" notifications@github.com<mailto:notifications@github.com> wrote:

Here's a simple CVX script that throws an error:

cvx_begin variable x cvx_solver ecos minimize x x >= 1 cvx_end

Here's the output:

Calling ECOS unknown: 1 variables, 1 equality constraints


Status: Error Optimal value (cvx_optval): NaN

??? Error using ==> ecos G and h do not match in dimension

I think I know what's going on, but if anyone else has some spare time and wants to look into this, they should feel to.

— Reply to this email directly or view it on GitHubhttps://github.com/ifa-ethz/ecos/issues/36.

echu commented 9 years ago

I no longer have access to Matlab. :)

@adomahidi, can you verify that we've fixed this issue already?

adomahidi commented 9 years ago

This is what I get:

Calling ECOS 2.0.0: 1 variables, 1 equality constraints
------------------------------------------------------------
------------------------------------------------------------
Status: Error
Optimal value (cvx_optval): NaN

Error using ecos
ECOS does not support equality constrained problems without inequalities yet.

I can't determine why ECOS is being called with an equality constrained problem (apart from the fact that it is obvious that the constraint must hold with equality) - @mcg1969, any ideas? Do you have a pre-solver in CVX to eliminate such "obvious" things?