Git Product home page Git Product logo

Comments (4)

adomahidi avatar adomahidi commented on June 29, 2024

best_x is only an internal variable holding the "best iterate" encountered so far, and is used to backtrack in case the search direction computation has numerical issues, and no further progress can be made. You should NOT use this variable - use x instead (I think the documentation does not mention x_best at all because it's an internal variable) as defined by the interface in ecos.h.

best_x is only updated if certain criteria are met, and AFTER checking that the exit conditions for the current iterate are not met. With which exitflag does your instance terminate?

from ecos.

alexvoronov avatar alexvoronov commented on June 29, 2024

Thanks for the clarifications! Yes, I get exitflag 0, so it is optimal. Do you have a complete example of how to use ECOS from C, that shows the necessary steps to get the answer and do error and optimality checking? In the examples/ directory I found only two Python examples.

from ecos.

adomahidi avatar adomahidi commented on June 29, 2024

The best example is probably runecos.c in the src directory, or the mex interface ecosmex.c in the matlab directory, as well as all tests in the test directory. You need your matrix data in column compressed storage format. The rest is pretty straightforward - See also the interface ecos.h. There's also a section in on C in the readme.

On Jul 8, 2014, at 0:57, alexvoronov [email protected] wrote:

Thanks for the clarifications! Yes, I get exitflag 0, so it is optimal. Do you have a complete example of how to use ECOS from C, that shows the necessary steps to get the answer and do error and optimality checking? In the examples/ directory I found only two Python examples.


Reply to this email directly or view it on GitHub.

from ecos.

alexvoronov avatar alexvoronov commented on June 29, 2024

Thanks!
It was actually ecos.h file that tricked me into using best_x :)
I read through ecos_mex.c and see that exitflags are just forwarded back to matlab. File runecos.c also do mostly timing and does do much about the answer. But I think I figured out by now enough to run ECOS. I also use it with QCML, so I rely on QCML for column compressed storage.

from ecos.

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.