Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Pantelis Sopasakis
@alphaville
I created this new chat room. We can use it to discuss anything related to optimization engine (OpEn).
Pantelispanka
@Pantelispanka
Nice
Pantelis Sopasakis
@alphaville
Thank you!
Mikael Zayenz Lagerkvist
@zayenz
Hi. I saw the announcement from the Rust Lang retweet, and while the website is very nice with lots of information, I feel there is one crucial thing that is missed: what kind of optimization does the system actually do?
  • Integer or continous?
  • Single or multi-objective?
  • Linear, quadratic, semi-definite, derivative free, or general combinatorial constraints?
  • Optimal or heuristic solutions?
Pantelis Sopasakis
@alphaville
@zayenz Hi Mikael. You're right, this is a point that needs to be clarified. The problems that OpEn can solve are stated here. The solver can only determine a local optimum that satisfies an optimality condition - details are given in this paper. The decision variables are treated as continuous, but the set of constraints can be a nonconvex set, e.g., {0,1}. A wide range of nonconvex problems can be cast in this format, including nonlinear model predictive control problems (see, for example, this application).
Mikael Zayenz Lagerkvist
@zayenz
Thanks for the answer. I think something like that would be beneficial to have on the fornt page as a short blurb.
Optimization is a very general term that is used in very many different fields with different connotations.
Alejandro ASTUDILLO VIGOYA
@alejandroastudillo
Dear Pantelis @alphaville ,
I am implementing an NMPC for a robot manipulator using OpEn in Python, and I need to use ALM to set multiple shooting constraints.
I was wondering if the new release regarding the Augmented Lagrangian Method will be available (for the Python interface) through pip soon. If not, is it possible to build it from source (using the "dev/alm/main" branch) somehow?
Thanks
Pantelis Sopasakis
@alphaville
Hi Alejandro @alejandroastudillo. I just released a new version of both the Python interface and the core solver. I have updated the documentation on the website (at https://alphaville.github.io/optimization-engine/). The augmented Lagrangian and penalty methods are both supported and tested in Python. You need to install opengen version 0.2.0 (the latest version). This is available as a python package (see https://pypi.org/project/opengen/).

To install it just run

pip install opengen

If you have already installed a previous version, then run

pip install --upgrade opengen
You don't have to install the Rust solver manually. This is done automatically if you are using opengen. You just need to have installed (i) Python 3.5 or newer, (ii) the Rust compiler, (iii) clang - see the installation instructions for details
Alejandro ASTUDILLO VIGOYA
@alejandroastudillo
@alphaville Thank you very much. I had already installed v0.1.0. Just needed to upgrade it. It is now working.
Alejandro ASTUDILLO VIGOYA
@alejandroastudillo
Dear @alphaville, I was wondering: is it possible to set custom flags in the compilation of C/C++ bindings (when setting a "release" build)? for instance gcc -O3 -ffast-math -march=native -funroll-loops ...
On the other hand, can you please tell me which flags are used by default when building the static and dynamical library files in "release" mode?
Thanks
Pantelis Sopasakis
@alphaville
Hi @alejandroastudillo. I'll check about the flags for the compilation of the C/C++ bindings. However, these are not too important, because there's no functionality there - just an interface. Unlike C and C++, Rust has only two modes of optimization: debug and release, the latter being similar to O3 in C/C++.
Pantelis Sopasakis
@alphaville
By the way, Rust compiles using LLVM - the same compiler as clang.
Pantelis Sopasakis
@alphaville
@alejandroastudillo I double-checked (credit goes to @korken89) and I can confirm that it suffices to build the optimizer with with_build_mode("debug") - this will co-compile the Rust and C/C++ code with appropriate compiler optimization flags. In Rust, compiling with --release is considered adequate.
Alejandro ASTUDILLO VIGOYA
@alejandroastudillo
thank you very much @alphaville and @korken89
Alexander Winkler
@AlexEKWinkler_twitter
Hi guys, I need to setup an NMPC on a dSPACE Scalexio realtime system. They use a Matlab/Simulink environment to build the code. Will I be able to use the rust code this way? You said it works on embedded systems, which run on C? How is Rust working on C?
Thanks for your help, appreciate your work, Alex
KarnMatas
@KarnMatas
Hi , from example in document I use OpEnOptimizerBuilder and build() and I get a file main.rs how to generate rust file to c/c++ with matlab ?
I have tried matlab code generator but get warning "fullfile is not supported for code generation".
Pantelis Sopasakis
@alphaville
Hi @KarnMatas. I'm afraid this is not support in our MATLAB implementation yet. I would recommend that you use the Python interface which is more mature.
KarnMatas
@KarnMatas
Thankyou very much @alphaville then I use the python interface and get C code and Can I move the folder that make c/c++ binding for use code in mbed os folder or platform.io in vscode ? . I have tried to do that but I failed when compiled. I don't know which files I should to move for use as library.
Pantelis Sopasakis
@alphaville
@KarnMatas, in Rust it is common to cross-compile for a certain target platform. For that purpose, you need to download and install a certain compiler that will generate appropriate binaries. For example, if you want to use OpEn to compile for an ARM6-based Raspberry Pi, you need to use the target arm-unknown-linux-gnueabihf. You may find some more detailed instructions and documentation at https://alphaville.github.io/optimization-engine/docs/python-advanced#build-options.
KarnMatas
@KarnMatas
@alphaville thank you very much
KarnMatas
@KarnMatas
image.png
excuse me , Could you help me fix this error . now I build c/c++ binding and use cmake .
Pantelis Sopasakis
@alphaville
Hi @KarnMatas. Perhaps it would be good to submit an issue at https://github.com/alphaville/optimization-engine/issues and provide some details (your operating system, rust and python versions, the code you are trying to run etc). It is hard to tell what might be wrong from the screenshot.