Quadratic programming in Pyodide - python

I would like to know if there is any library, which I can use in Pyodide and which has a function, similar to "quadprog" in Matlab or multiple external libraries in Python (McGibbon's quadprog, CVXOPT etc.) doing quadratic optimization over convex polytopes. I found some optimization packages among the packages directory of Pyodide, however they do not implement quadratic programming specifically.
Also there is a javascript qp library, but I am not sure that it will be possible to make it work with Pyodide.
I would appreciate any help on this matter.

Related

Optaplanner and Pyomo

I'm currently using pyomo environment to solve optimization problems. I have used different solvers (Ipopt, glpk, cbc, couenne) in order to solve my problems.
Actually I need to solve a non-linear problem with a global solver. I've already tried couenne but it doesn't give me the right answer. Looking on the web, I have seen the Optaplanner as a metaheurist solver but I only found example written in Java.
Is it possible to use this solver with pyomo on windows?
If yes then how to configure it?
You can't use OptaPlanner in pyomo, but you can use OptaPlanner on Windows. Just download (or git clone) the quickstarts here. If you don't like Java, take a look at the Kotlin quickstart.
Update: You can now also try OptaPy in Python.

Python library or package for bifurcation analysis in ordinary differential equations

What are libraries packages available in Python for the simulation and bifurcation study of dynamical systems?
I want to study the bifurcation phenomenon in ordinary differential equations. I know that there is AUTO in Fortran. I also found PyDSTool in Pyhton. The issue with PyDSTool is that it has some incompatibilities with 64-bit systems and Python 3 (and also numpy, etc.). I was wondering if there is any state-of-the-art library in Python for this purpose.
Thanks.
I don't think there is anything available in Python (except for PyDSTools and its interface with AUTO). You might check out the bifurcation suite in JULIA (which is also well suited to simulate and model dynamical systems): [http://diffeq.sciml.ai/latest/analysis/bifurcation.html][1]
[1]: http://diffeq.sciml.ai/latest/analysis/bifurcation.html
It is also built around PyDstools though but you might be able to circumvent your incompatibility problems.

advantages of cplex in pyomo versus cplex in python

I've been using GAMS for a long time, but I cannot use all the functionality of CPLEX under GAMS. Can you do that using Pyomo? or using CPLEX directly in Python? Thanks!
The advantage of using Pyomo is that it is a modeling language that is independent of the underlying solver that is used to solve the problem. For example, you can write your model and then solve it with glpk. By changing a command line option, you can solve the same model with CPLEX, Gurobi, etc. It provides many capabilities such as supporting distributed optimization and allows you to use your own custom solver if you wish (see the documentation).
The CPLEX Python API is on the other end of the spectrum. It is not a modeling language. It's a relatively lightweight layer that wraps around the underlying CPLEX Callable Library (C API). Variables, constraints, etc., are referred to by index or name. It allows you to do almost anything that can be done in the Callable Library. In this sense, it give you the most access to CPLEX functionality (even advanced capabilities like callbacks).
An option that lies somewhere in the middle is DOCplex. DOCplex is an open source modeling language provided by IBM and it allows you to solve on the cloud or locally. It supports CPLEX for mathematical programming, but also CP Optimizer for constraint programming.

Integer linear programming + python + ubuntu

I would like to solve an integer linear programming problem in python for the first time. After searching online I was pointed to lp_solve but I can't see how to get the python bindings installed in ubuntu. I have also had gurobi and cplex recommended but they are no open source. Is there a nice and simple way to set up an integer linear programming problem and have it solved in python using only free software?
I'm attending course on linear programming at the moment, recommended module for programming assignments was cvxopt.
I've actually found that I like PuLP module much more.
It's really nice module, give it a try.
I'd recommend looking at SCIP, see http://scip.zib.de/ and the Python interface
http://code.google.com/p/python-zibopt/, just look at the ZIB licence first.
If Academic licence is an option, you can get Cplex, Gurobi, Xpress and some others as well. I think GLPK may be an option if really free is the only option.
IMO, SCIP is fantastic for advanced prototyping, but obviosly works fine for simpler things like just setting up the ILP and solving it. Observe that SCIP can be wired with the most popular commercial alternatives as well for better performance.

Porting MATLAB functions to Scilab. How do I use symbolic?

I'm porting some MATLAB functions to Scilab. The cool thing is that there is a conversion toolbox that make things very easy.
The problem is I did not find the counterpart to the syms function, and the symbolic toolbox in general. (I'd like a port of the Control System Toolbox too, amd I'm still searching for some functions I'd may need).
The only thing about symbolic toolbox I've found is this, but it was a little trcky and not so easy (actually I was not able to set up it correctly in 30 minutes, and I gave up for now. I'm going to try later), and it needs Maxima to be installed. Does anyone know anything about that?
Scilab is not exactly a must. The project aims to give a more free and open source alternative to MATLAB. I saw there is SymPy for Python, and I just could use it with SciPy, but I'd lost the conversion toolbox thing :\
That said, what should be better? Get SciLab and Maxima work together or move to Python & co.? This is the start of the project, so the earlier I choose this, the better.
See Bye MATLAB, hello Python, thanks Sage for a first-hand experience of migrating from MATLAB to Python.
Not to discourage your project, but if you just want a free and open source alternative to MATLAB, have you looked at the Octave project? Contributing there might be more productive than building your own MATLAB alternative.
If your project requires the functionality of MATLAB's Symbolic then take a look at
http://wiki.octave.org/wiki.pl?CategorySymbolic
From my quick Google search I didn't find anything comparable to MATLAB's Simulink.
Also, Python and SciPy do have most of the functionality of MATLAB, and I guess Scilab's conversion utility would be useful in porting your own M-Files into Scilab code.
Your question seems to imply you want to port over MATLAB Toolboxes
The only thing about symbolic toolbox I've found is this...
I hope I am just misinterpreting you. If you are then there might be licensing issues if you were to distribute your system because the MATLAB Toolbox. Just a thought. But perhaps you wish to port your MATLAB code to, so that it doesn't not have the MATLAB dependency.
Update
For Control System functionality Octave, I just found that Octave does have a toolbox, see:
Octave Control Systems Toolbox
Which has some of the functionality of Simulink, but it doesn't seem to have the graphical interface for building block diagrams.

Categories

Resources