PuLP and OR-Tools Alternatives [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I currently have a MIP model formulated in Gurobi's python API, but recently I've been looking into tools such as PuLP and OR-Tools that allow me to build a model and feed it to multiple different optimizers. One feature of Gurobi used extensively in my model is the ability to have constraints that use functions such as and, or, min, max, and abs. However it seems as if PuLP and OR-Tools do not support these. Are there any alternatives that do support these? Or would I have to reformulate my model if I want to use something like this?

For or-tools, we only provide the minimal API for the linear solver.
If your problem is more structured (scheduling, routing, CP-like constraints), you can have a look at the CP-SAT interface:
https://developers.google.com/optimization/
https://github.com/google/or-tools/blob/master/ortools/sat/doc/index.md
Python examples are here:
https://github.com/google/or-tools/tree/master/examples/python

You might also want to have a look at Pyomo. It supports a variety of modeling tools and can call different solvers.

Related

Are there any predefined functions that implement the Gauss and the Jacobi algorithms in Python? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am looking for predefined functions that implement in Python the Gauss and the Jacobi methods for solving linear equations. Are there any or I must write them myself?
I don't think so. At least not in python cores predefined functions. There are some functions in NumPy to calculate the eigenvalue using LAPACK. But I doubt anyone uses Gaussian and Jacobian methods these days. They are not particularly general and there are some cases in which the algorithm breaks down.
On the other hand, there are various implementations on the internet that you can use if you want.
Here are some examples:
Link 1: Gausian Implementation
Link 2: Jacobian Implementation No.1
Link 3: Jacobian Implementation No.2

Clustering using SOM in python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am trying to perform test summarize using self organizing map (SOM) as the clustering model. Do we have any libraries for performing SOM in python.
There is one here, but in general SOM implementations are not part of the main machine learning libraries. There are two reasons
SOM's, although nice to look at, don't really perform well in real problems.
It is too easy to construct one by yourself.
I would suggest to make it yourself. It is very easy and a great way to introduce yourself to python. The main code of the SOM itself is about 3 lines (a loop and one update). The remaing of the code would be for loading the data and plotting them, but you won't avoid that part of the code by using an external library

A Python library for solving some integro-differential equations? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I have a huge set of coupled nonlinear integro-partial differential equations. After a long while trying to simplify the equations and solve them at least semi-analytically I have come to conclude there has been left no way for me but an efficient numerical method. Finite element seems most amenable as is based on Galerkin method which gives a weak form solution, so a great hope that it might finally solve the equations. But at the same time I am so new to this field to write the codes all from the scratch:
Is there any Python library already available that can efficiently do a Finite Element analysis?
Also I was interested if softwares like FEniCS/Dolphin might also solve integro-differential equations?

Calculate inverse of a function--Library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there any library available to have inverse of a function? To be more specific, given a function y=f(x) and domain, is there any library which can output x=f(y)? Sadly I cannot use matlab/mathematics in my application, looking for C/Python library..
I am a bit late, but for future readers of the post, I just published a python package that does this precisely. https://pypi.python.org/pypi/pynverse
There is a detailed description of how to use it and how it does it in the description!
As has already been mentioned, not all functions are invertible. In some cases imposing additional constraints helps: think about the inverse of sin(x).
Once you are sure your function has a unique inverse, solve the equation f(x) = y. The solution gives you the inverse, y(x).
In python, look for nonlinear solvers from scipy.optimize.

Api to analyse complex graph [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am looking for an API (preferably in python) that could be used to analyze complex networks. Basically I want to find things like:
Average shortest path,
Degree distribution
Giant Component
local clustering coefficient, global clustering coefficient etc..
Thanks
I would suggest Networkx and PyGraphViz. I've used them for a similar (but not as complex) graphing project in python and I love it.
The boost graph library has Python bindings.
I've used igraph on Linux. It started to grind on 64k nodes but that graph was becoming unwieldy any way.
Not sure about performance next to PyGraphViz but now you have a plenty of options.

Categories

Resources