Git Product home page Git Product logo

Comments (8)

MuXingchui avatar MuXingchui commented on June 12, 2024 2

@MuXingchui can you please provide some more details about this? Can you provide a minimal reproducible example?

Thank you for your reply! Refer to #259 , I know why. Then I updated my OpEn to the latest version, my project works good.

from optimization-engine.

alphaville avatar alphaville commented on June 12, 2024 1

You can use the TCP interface. I mean, you can crate a solver in Python and use .with_tcp_interface_config() (see here).

The TCP server just expects to receive a JSON-formatted string with the parameter, p, and returns another JSON-formatted string with the solution and various statistics (solver time, infeasibilities, etc). The communication protocol is described here.

I can easily make a little MATLAB function or class that will allow you to call from MATLAB an optimiser that has been created in Python. Would that be of interest?

from optimization-engine.

MuXingchui avatar MuXingchui commented on June 12, 2024

Well, I know what's wrong: my file path is to long. See here for details.
But when I build the TCP interface, it has another error:

error[E0432]: unresolved import `clap::App`
  --> src\main.rs:16:17
   |
16 | use clap::{Arg, App};
   |                 ^^^ no `App` in the root

error: cannot find macro `value_t` in this scope
   --> src\main.rs:263:16
    |
263 |     let port = value_t!(matches, "port", u32).unwrap_or(BIND_PORT_DEFAULT);
    |   

Is there something I've overlooked?
Is there a way to get this working?
Thanks!

from optimization-engine.

alphaville avatar alphaville commented on June 12, 2024

@MuXingchui can you please provide some more details about this? Can you provide a minimal reproducible example?

from optimization-engine.

MuXingchui avatar MuXingchui commented on June 12, 2024

@MuXingchui can you please provide some more details about this? Can you provide a minimal reproducible example?

Hello @alphaville, I have another question. Does MATLAB interface has the option ".with_aug_lagrangian_constraints"?
Where can I find all MATLAB interfaces ?

from optimization-engine.

alphaville avatar alphaville commented on June 12, 2024

No, unfortunately it doesn't. I've put a warning about this here. It's not difficult to support this, but I currently don't have the time to work on this.

A workaround could be to design your optimiser in Python and then just use it from MATLAB.

from optimization-engine.

MuXingchui avatar MuXingchui commented on June 12, 2024

Understood. But how to call the already built solver by Python in MATLAB?

from optimization-engine.

MuXingchui avatar MuXingchui commented on June 12, 2024

You can use the TCP interface. I mean, you can crate a solver in Python and use .with_tcp_interface_config() (see here).

The TCP server just expects to receive a JSON-formatted string with the parameter, p, and returns another JSON-formatted string with the solution and various statistics (solver time, infeasibilities, etc). The communication protocol is described here.

I can easily make a little MATLAB function or class that will allow you to call from MATLAB an optimiser that has been created in Python. Would that be of interest?

It is clear! I will try it. Sincere thanks for your guidance! :)

from optimization-engine.

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.