Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apparent difficulty with gramMatrices, gramMonomials #20

Open
AndreasMegatranus opened this issue Jan 4, 2018 · 1 comment
Open

Apparent difficulty with gramMatrices, gramMonomials #20

AndreasMegatranus opened this issue Jan 4, 2018 · 1 comment

Comments

@AndreasMegatranus
Copy link

I tried a simple program based on the first example in manual.pdf. Here is the Matlab code

% Simple conic optimization (first example in manual).

m = 3; % n = 2
A = [1, 2, 3; 4, 5, 6];
b = [7; 8];

prog = spotprog;
[prog, x] = prog.newFree(m);
prog = prog.withEqs(A*x - b);

[prog, a] = prog.newPos(m);
prog = prog.withPos(a - x);
prog = prog.withPos(a - (-x));

obj = sum(a);

sol = prog.minimize(obj);

sol.SolutionQuality

This resulted in an error in the call to prog.minimize(obj). The problem was in spotprog.m, line 750, where it calls spotprogsol.

sol = spotprogsol(pr,pobj,xsol,y,zsol,info);

In line 51 of spotprogsol.m, it tries

sol.gramMatrices = prog.gramMatrices;
sol.gramMonomials = prog.gramMonomials;

It fails because prog does not have the .gramMatrices or .gramMonomials elements. I looked around further and found that these are initialized for SoS programs (in spotsosprog), but not for conic programs (spotprog). Is this a bug, or am I doing something wrong. Is the workaround to initialize these elements to NULL when formulating a conic program?

@xbrutgers
Copy link

I have the same issue when running the example "linf_fitting.m". It says "Unrecognized method, property, or field 'gramMatrices' for class 'spotprog'." Did you find a way around? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants