Code Monkey home page Code Monkey logo

Comments (22)

johanlofberg avatar johanlofberg commented on August 24, 2024

So does SeDuMI really work on your machine, i.e. what happens if you run

>> sedumi(1,1,1)

from sedumi.

Yuqi-Wang avatar Yuqi-Wang commented on August 24, 2024

SeDuMi 1.3.4 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
eqs m = 1, order n = 2, dim = 2, blocks = 1
nnz(A) = 1 + 0, nnz(ADA) = 1, nnz(L) = 1
it : by gap delta rate t/tP t/tD* feas cg cg prec
0 : 8.00E+00 0.000
1 : 7.87E-01 5.00E-01 0.000 0.0625 0.9900 0.9900 1.40 1 1 2.9E-01
2 : 1.00E+00 1.65E-04 0.000 0.0003 0.9999 0.9999 1.09 1 1
iter seconds digits cx by
2 0.2 Inf 1.0000000000e+00 1.0000000000e+00
|Ax-b| = 0.0e+00, [Ay-c]_+ = 0.0E+00, |x|= 1.0e+00, |y|= 1.0e+00

Detailed timing (sec)
Pre IPM Post
4.500E-02 1.050E-01 6.991E-03
Max-norms: ||b||=1, ||c|| = 1,
Cholesky |add|=0, |skip| = 0, ||L.L|| = 1.

ans =

 1

from sedumi.

Yuqi-Wang avatar Yuqi-Wang commented on August 24, 2024

This is the result, and I think it works well.

from sedumi.

johanlofberg avatar johanlofberg commented on August 24, 2024

Then you have to turn on debug in YALMIP in sdpsettings when making the call to see the crash in sedumi

from sedumi.

Yuqi-Wang avatar Yuqi-Wang commented on August 24, 2024

I broke into the sedumi. It seems that the function sedumi does not return the result 'y_s'. Then as putting the value of y_s to Primal, the error occurs, just like what the error message shows. But I didn't find what's wrong in the function sedumi. Maybe it is due to the size of the problem overweighs the ability of sedumi. Actuallay, under the same settings, the sedumi and yalmip work well now with a smaller prolem.

from sedumi.

johanlofberg avatar johanlofberg commented on August 24, 2024

The only reasons I ever see for crashes are

  1. Wrong binary (which simple means it doesn't run)
  2. Too trivial problem
  3. Out of memory (is typically printed)

Trying another solver to see if there is something generically wrong with the model is always recommended

from sedumi.

Yuqi-Wang avatar Yuqi-Wang commented on August 24, 2024

In fact, I also tried gurobi and cplex with yalmip in matlab to solve the same problem. There is no error generated but a NaN result is ouput.

from sedumi.

johanlofberg avatar johanlofberg commented on August 24, 2024

NaN means the problem wasn't solved, so you probably had a diagnostic flag telling you some problem (unbounded or infeasible), so there is something weird/trivially wrong with your model that you have to sort out

from sedumi.

Yuqi-Wang avatar Yuqi-Wang commented on August 24, 2024

Exactly! The guroti said it can not solve a problem with semidefine constraint. But, I used sedumi solving a similiar problem with the same formulation successfully before. The only the difference between the old and present problem is the size. It's unbelivable. Anyway, I will try to check the code carefully again.

from sedumi.

johanlofberg avatar johanlofberg commented on August 24, 2024

Gurobi cannot solve SDPs. You've got something messed up in your YALMIP model, and would probably be better off posting a reproducible example on the YALMIP Google groups support forum. My uess you are running out of memory, if it really is really large. You still haven't showed us what the SeDuMi log is when you run with debug set to 1 in sdpsettings though

from sedumi.

Yuqi-Wang avatar Yuqi-Wang commented on August 24, 2024

I have set the 'debug' to 1 in sdpsettings, but getting the same error message as shown in my first comment. I can't understand it.

from sedumi.

johanlofberg avatar johanlofberg commented on August 24, 2024

Do something like this then

`optimize(x-y>=0,x+y,sdpsettings('solver','sedumi','savedebug',1));

load sedumidebug

sedumi(F_struc(:,2:end),F_struc(:,1),c,K)
`

from sedumi.

Yuqi-Wang avatar Yuqi-Wang commented on August 24, 2024

It shows:
The problem is primal infeasible, there is no x such that Ax=b.
misuse function pretransfo

from sedumi.

johanlofberg avatar johanlofberg commented on August 24, 2024

On my model or your model? I just gave you an example of something that crashed (a trivially unbounded (primal infeasible) model. If you get the same on your model, well then you have the answer.

from sedumi.

Yuqi-Wang avatar Yuqi-Wang commented on August 24, 2024

It is pn your model.

from sedumi.

Yuqi-Wang avatar Yuqi-Wang commented on August 24, 2024

But the error message is not the same as mine.

from sedumi.

Yuqi-Wang avatar Yuqi-Wang commented on August 24, 2024

Sorry, I tried the 'savedebug' option in my model and got the same error message as yours.

from sedumi.

Yuqi-Wang avatar Yuqi-Wang commented on August 24, 2024

I think we find the error now.

from sedumi.

johanlofberg avatar johanlofberg commented on August 24, 2024

You are of course supposed to change the code to use your model, and then load the debug model and call sedumi manually and then show what is displayed

from sedumi.

Yuqi-Wang avatar Yuqi-Wang commented on August 24, 2024

Hello, johan. I have solved the problem. It is due to a parameter which is set to inf by mistake. After changing it to zero, the model works. Thanks for your help. You are so kind a man.

from sedumi.

ArjunM21 avatar ArjunM21 commented on August 24, 2024

@Yuqi-Wang Can you explain what it is that was set to infinity? I am facing the same problem right now but can't figure out what's wrong.

from sedumi.

johanlofberg avatar johanlofberg commented on August 24, 2024

@ArjunM21, on the YALMIP discussion you are not in any sense talking about a problem related to this. You have shown that SeDuMi simply crashes immediately due to an incorrect call to symbchol, and inconsistency in the number of arguments, indicating you have multiple versions installed, or some weird edited version.

from sedumi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.