How can I solve optimization problem:
subject to:
(I am looking for a library that its objective function can accept logarithms.)
I found glpk and gurobipy but they don't seem to be able to do it.
Based on your comments under the question, I am just going to refer you to one of the more standard libraries to solve this problem. Note the your objective concave and its a maximization problem. So, it is straightforward to rewrite it as a convex minimization problem and your constraints are linear. For such problems, you can use CVXOPT(https://cvxopt.org/index.html). In particular, look at some of the examples for how to use the library: https://cvxopt.org/examples/index.html#book-examples
Related
I have modeled a mathematical optimization problem into pyomo Python as bellow.
I do not understand why just my "constraint2" is labeled as "indexed" in pyomo?
Is that affect the problem solving? Cause I use "ipopt" as solver but my results seems much different when I use "Gekko" library and the same "ipopt" solver.
Thanks in advance.
So I want to try to solve my optimization problem using particle swarm optimiztion algorithm. As I comoratable with python I was looking into PySwarms toolkit. The issue is I am not really experienced in this field and don't really know how to account for integrality constraints of my problem. I was looking for advice on what are some approches to dealing with integral variables in PSO. And maybe some examples with PySwarms or any good alternative packages?
You can try pymoo module, which is an excellent multi-objective optimization tool. It can also solve mixed variable problems. Despite pymoo is first of all designed to solve such problems using genetic algorithms, there is an implementation of PSO (single-objective with continuous variables). Maybe you'll find it useful to try to solve your mixed variable problem using genetic algorithm or one of its modifications (e.g. NSGAII).
I'm currently working on an LP optimization problem with and looked into PuLP.
I know that PuLPs default solver is: PULP-CBC-CMD. I solved a test problem with this and I'm wondering what kind of algorithm this solver actually uses... it doesnt seem to be a simplex as my problem got interpreted completely differently than a simplex interpretion would look like?
Also: Every other solver for PuLP has to be added to PuLP manually right?
Also: what solvers are you guys working with in python?
Thanks in advance!
CBC is based on simplex, yes. But, like most solvers, it combines simplex with many other algorithms such as branch-and-bound and cut-generation.
In particular, to solve linear programs it uses Clp: https://github.com/coin-or/Clp
More information on the CBC solver in their site: https://github.com/coin-or/Cbc
I would like to know if is possible to use the linear assignment solver to solve a generalized assignment problem. If it's possible, there is a parameter that I have to configure in the solver?
I took a look in the Google OR-Tools documentation, but I didn't found nothing mentioning that.
No. You need to use the linear wrapper or the CP-SAT solver for this.
I am curious about the algorithm in the PuLP
Is this LPsolver is using the simplex method?
PuLP provides a convenient frontend for a number of solvers. Some of these solvers may use simplex, others may not. You can specify the solver in order to better control this, but you'd need to look at the details for the individual solvers to figure out if any meet your criteria.