62 votes
Accepted

What are the advantages of commercial solvers like Gurobi or Xpress over open source solvers like COIN-OR or CVXPY?

Disclaimer: I am currently working for a commercial solver company (Gurobi) and have worked before on another commercial solver (IBM CPLEX). Hence, my opinion may be biased, but still I am trying to ...
Tobias Achterberg's user avatar
23 votes

What are the advantages of commercial solvers like Gurobi or Xpress over open source solvers like COIN-OR or CVXPY?

No, the situation isn´t the same for OR libraries. There are several reasons for this, among them being Performance: The difference is relevant, with an emphasis on Mixed Integer Programming (linear ...
dhasson's user avatar
  • 1,667
22 votes

What are the advantages of commercial solvers like Gurobi or Xpress over open source solvers like COIN-OR or CVXPY?

I think the short answer is: speed. Most optimization problems solved in the OR world are computationally intractable, they cannot be solved in reasonable time as the size of the data increases. A ...
Kuifje's user avatar
  • 12.9k
11 votes
Accepted

Constrained optimization of a sum

You also need to account for Lagrange multipliers for the bound constraints $-1\le x_i \le 1$. Given all $a_i>0$, the (linear programming) problem is to maximize $\sum_i a_i x_i$ subject to \begin{...
RobPratt's user avatar
  • 30.3k
10 votes

What are the advantages of commercial solvers like Gurobi or Xpress over open source solvers like COIN-OR or CVXPY?

(Full disclosure: I run a solver company) The state of the art Unlike ML, in the optimisation space commercial software is unfortunately on average superior to open-source alternatives. This does not ...
Nikos Kazazakis's user avatar
9 votes
Accepted

How do we formulate a problem where the decision variable has an index that is also a decision variable?

Let binary decision variable $y_{ij}$ indicate whether $x_i = a_j$, and impose linear constraints \begin{align} \sum_j y_{ij} &= 1 &&\text{for all $i$} \tag1\label1 \\ -(1 - y_{ij}) \le ...
RobPratt's user avatar
  • 30.3k
6 votes

Genetic Algorithm

Not exactly what you are needing, but DEAP allows to pass constraints as a decorator: https://deap.readthedocs.io/en/master/tutorials/advanced/constraints.html .
Enrique Gabriel Baquela's user avatar
6 votes
Accepted

Genetic Algorithm

PyGAD seems to be a decent library, although I have never tested it myself. The documentation looks very complete, with good examples.
Kuifje's user avatar
  • 12.9k
5 votes

Genetic Algorithm

Try optapy. No genetic algorithms, but several other, more advanced metaheuristics. See https://www.optapy.org for more info.
Geoffrey De Smet's user avatar
5 votes
Accepted

Augmented Lagrangian Function for Semidefinite Programming Problems

My way of reading it is $\langle X, \mathcal{A}^*(y)+S-C\rangle = \langle X, \mathcal{A}^*(y)-C\rangle + \langle X,S \rangle$. The first term is your standard inner product between dual variable and ...
Johan Löfberg's user avatar
5 votes

MINLP involving integrals, sparse matrices and CDF of random variables. Best environment?

I suggest you have a look at LocalSolver to solve your problem. It is free for basic research and teaching. Contrarily to its name suggests, LocalSolver is a global optimization solver. It handles ...
LocalSolver's user avatar
  • 2,925
4 votes
Accepted

Formulating a continuous NLP problem with a class variable

Given, $a_j\in\{0,1,2\}$, $d_j$, and $\beta$, your problem is to find $x_0,x_1,x_2\in [0,1]$ to minimize $\sum_{j=1}^N f(x_{a_j})$ subject to $$\frac{\sum_{j=1}^N d_j x_{a_j}}{\sum_{j=1}^N d_j} = \...
RobPratt's user avatar
  • 30.3k
4 votes

Augmented Lagrangian Function for Semidefinite Programming Problems

There's a good discussion of this in Convex Optimization by Stephen Boyd and Lieven Vandenberghe. See section 5.9. With an ordinary scalar inequality constraint: $f_{i}(x) \leq 0$, you'll have a term ...
Brian Borchers's user avatar
4 votes

Solve nonlinear programming problems practically

A common and free NLP solver is IPOPT. IPOPT implements an interior-point line-search filter method, a variation of the interior-point method, these interior point method uses the barrier functions ...
worldsmithhelper's user avatar
4 votes

MINLP involving integrals, sparse matrices and CDF of random variables. Best environment?

So it seems your strategy (enumerative search on the integer variables) works well, and the issue is solving pure NLP problems. The choice of programming/modeling language you use is dependent on what ...
rasul's user avatar
  • 2,140
3 votes

Solve nonlinear programming problems practically

A commonly used alternative to Interior Point methods is Sequential Quadratic Programming (SQP) https://www.math.uh.edu/~rohop/fall_06/Chapter4.pdf. SQP essentially amounts to iteratively numerically ...
Mark L. Stone's user avatar
3 votes

Is there a name for this type of integer programming?

Technically, the first problem you described is an integer linear program. The phrase integer program can be used for any constrained optimization problem involving integer variables (and mixed ...
prubin's user avatar
  • 37.8k
3 votes

Constrained Optimization Closed Form Solution Using KKT Gives Wrong Values

For convenience, let $x_j = \gamma_j / n$, $c_j = \gamma_j^\mathrm{priority} / m$, then the problem is $$ \begin{align*} \min_{x_j} \quad&\sum_{j=0}^m(x_j - c_j)^2\\ \mathrm{s.t.} \quad&0\leq\...
xd y's user avatar
  • 1,036
2 votes
Accepted

Is there a name for this type of integer programming?

You have is a linear integer programming problem with a generalized objective function of the form: $$g(x) = f\big( \sum_i C_i x_i \big).$$ If $f(X) = {\rm tr}(X)$, then $g(x)$ is an ordinary linear ...
Henrik Alsing Friberg's user avatar
2 votes

Convex optimization with linear constraints. Can I solve it analytically?

You are going to be dealing with various cases depending on the values of $c,d,ab$ and $m.$ I think I can get you part way, but I have not dealt with all the cases. Given that the objective function ...
prubin's user avatar
  • 37.8k
2 votes

Constrained optimization of a sum

The problem $$ \begin{array}{rcl} \min & \sum_{j=1}^n c_j x_j & \\ \mbox{st} & \sum_{j=1}^n x_j & = & b, \\ & l \leq x \leq u. & & \\ \end{array} $$ can ...
ErlingMOSEK's user avatar
  • 3,046
1 vote

Finding the minima of a multivariable function with constraints

I'm not sure there is a way to guarantee a global optimum. If you are willing to settle for a local optimum, you could try a penalty method. For instance, you could square the difference between left ...
prubin's user avatar
  • 37.8k
1 vote

How do we formulate a problem where the decision variable has an index that is also a decision variable?

Assuming set $a=\{a_1,a_2,a_3\}$ is filled with variable $a_k$ and also where $a_j$ can take any value from set $a$, lets try: $ \sum_{j=1}^3 a_j\cdot z_{j,i} = a_i \ \ \forall i$ $ \sum_j z_{j,i} = ...
Sutanu Majumdar's user avatar
1 vote

Constrained optimization of a sum

Primal Problem $$\begin{align} \text{maximize} \quad & \sum_{i=1}^n c_i x_i \\\ \text{subject to} \quad & \sum_{i=1}^n x_i = 0 \\ & x_i \ge -1 \quad \forall i=1,\ldots,n \\ & x_i \le ...
marco tognoli's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible