Gabriel Gouvine
  • Member for 2 years, 3 months
  • Last seen this week
An approximate answer to the right question or an exact answer to the wrong question
Accepted answer
18 votes

Yes. I believe the same analysis can be made for OR. In the industry, it is far more important to solve the actual problem as well as you can than to obtain the perfect result on a different problem....

View answer
What are some "clustering" algorithms? (but not the type of clustering you're thinking about)
Accepted answer
14 votes

You are trying to list all cliques of a graph. You said that $x \in \mathbb{R}^2$, which greatly simplifies the problem: the graph is a unit disk graph, for which the maximum clique problem is ...

View answer
Is there a Linear Programming Library that natively supports fractions instead of floating point arithmetic?
10 votes

I suggest GLPK, which has the advantage of being fully open source and easily available everywhere (as a package on most Linux distribution). Run it from the command line with the --exact option. It ...

View answer
LP sum of variables that are above a threshold
10 votes

The constraint is not convex, and cannot be formulated as a pure LP. You will have to resort to a MIP model. Why it is not convex As an example, consider the case where : $K = 2$, $k_1 = 1$, $k_2 = ...

View answer
Efficient way to solve "easy" quadratic optimization problem
Accepted answer
8 votes

Fast resolution Let's start with speeding up the solution process. For the optimal solutions, all variables will be either inactive ($x_i = 0$) or, due to $\sum x_i = 1$, contribute equally to the ...

View answer
Are there explainability approaches in optimization?
Accepted answer
8 votes

Solving: why is this solution optimal? As Richard explained, the objective in OR is not "fuzzy" like in ML: we assume an objective that can be evaluated by the computer. Once the problem is ...

View answer
How can I optimize this integer programming constraint problem without running out of memory?
8 votes

Be sure that your code reaches the getSolutions line. As of now, you are not sure that it does. Your Python code is creating more than 3000000 functions! There is a good chance that is what is causing ...

View answer
Product of weighted binary variables equivalent to sum of weighted binary variables?
Accepted answer
6 votes

It is not true in general, but you can make it work with $$\max\sum_{i=1}^{n}\log(1-a_{i})x_{i}$$ Since $\log$ is monotonic, your objective is equivalent to $$\max\log\left(\prod_{i=1}^{n}(1-a_{i}x_{i}...

View answer
Optimizing black-box finite element model
Accepted answer
6 votes

Surrogate modeling is one of many options. Indeed, it usually does not scale to thousands of variables, unless you can incorporate some domain knowledge in a custom surrogate model. However, you have ...

View answer
PAVA-like solution to simple QP
Accepted answer
5 votes

I found the problem interesting, so I designed an algorithm to solve it (not PAVA-style). You can find a Python implementation here. A geometric formulation The optimality conditions are, for $1 \lt i ...

View answer
Can we get closed form solution for such a problem?
5 votes

If some $A_i$ is negative the problem is unbounded: we can make the objective arbitrarily small by making $x_i$ arbitrarily close to 0. Assuming $A_i \geq 0$, the optimality is obtained when all $\...

View answer
MAX-CUT: are there any algorithms or codes for classical computers, that cater to this specific case?
4 votes

Have a look at MQLib, which contains efficient implementations of many published algorithms. Their paper is awesome too. You can find a lot of code for QUBO online, one of the most publicized being ...

View answer
Convert summation of min functions into linear constraints for optimization
Accepted answer
4 votes

This becomes easier if you reformulate your expression as $$\sum_{0\leq j\leq J} \min({\bf A}_j,{\bf B}_j) \text{ if } j \geq j^{*} \text{ else } 0$$ Then you can linearize each operation separately ...

View answer
Integer Program for Multiplication of Large Numbers
Accepted answer
3 votes

If the numbers are small enough, you can model the multiplication $z=xy$ in a quadratic program, and add the equality $x = \sum2^i b_i$ to relate each number $x$ to its binary representation. If the ...

View answer
Can I use xboost as objective function in an optimization problem?
2 votes

As the boosted trees are too complex to be modeled as an explicit mathematical function - unless maybe one is prepared to spend a tremendous amount of effort - such an objective would be considered a ...

View answer
Is this stochastic gradient descent in disguise?
Accepted answer
2 votes

The proposed method is standard gradient descent with a reordering of the computation. I doesn't change anything for memory use, since there is no need to keep every element of the sum in memory ...

View answer
General Optimization and Unsolvability
2 votes

I had a look at your paper. Here are two errors that I think are worth reflecting about: You are assuming computations in finite precision, and consider solving a continous optimization problem. We ...

View answer
Calculated CPU time of C++ is different from actual time to solve MILP model via Gurobi
1 votes

This is more of a C++ question, so you should rather look for similar questions on stackoverflow. A common issue is that clock() is not accurate for short durations, so you may want one of the high ...

View answer
SLSQP Optimisation loop takes several iterations to compute error function despite jacobian
1 votes

Scipy's minimize allows you to pass the Jacobian of the constraints to the minimize function (the documentation says it's used only by SLSQP). Then Scipy won't have to evaluate it by calling the ...

View answer
Find Euclidean sub-distances for a given distance matrix
1 votes

Your constraint defines a second order cone, which means it is convex. You can solve it with a specialized solver (for example one listed on the Wikipedia page), although any convex solver might work ...

View answer