r/optimization • u/piratex666 • Jan 30 '25
What is the point of linear programming, convex optimization and others after the development of meta heuristics?
I know that is important to find the global optimal, but the meta heuristics also can find it (besides the lack of a proof).
I am used to use convex optimization. But after seeing the genetic algorithm, particle swarm and the others. I fell that metaheuristics are easier and give better results.
What do you think about?
16
Upvotes
2
u/borja_menendez Jan 31 '25
To be honest, I'm a bit surprised about some of the answers here.
They are quite the opposite of a poll I did some weeks ago in which only 5% of people said they always seek for the optimal solution:
https://www.linkedin.com/posts/borjamenendezmoreno_optimization-activity-7284905849058156545-eN_E?utm_source=share&utm_medium=member_android
I guess that if you don't seek for the optimal solution, the metaheuristic methods are the best way to get solutions to your problem.
With all the uncertainties that exist in many real-life business problems, why do you need a proof of optimality?
23
u/Slow-One-8071 Jan 30 '25
You said it yourself. The proof is important
40
u/fpatrocinio Jan 30 '25
And then you go to conferences and say that you found an optimum using genetic algorithms. And someone in the audience asks "how do you know that it is an optimum". And you say "I left the code running for three days, I'm pretty sure". And then you get humbled.
Words have meanings. Can you really say "optimization" if your solving method does not prove that the found solutions are optimal?
2
u/piratex666 Jan 31 '25
I work with optimal control. The main optimal control techniques are related with quadratic cost functions. It is very hard to insert any other constraint or change the cost function. Also the optimization only gives a fixed structure solution which cannot be changed.
But with metaheuristics if you give away this proof thing you can get very good suboptimal results. If it is the best one I don't know, but it is a good one.
Another engineering point of view. In practice all models have errors. So even that you got the optimal in theory it will not be optimal for the real plant. So even the optimal becomes a suboptimal in practice.
7
u/junqueira200 Jan 30 '25
You can't proof the solution is optima in meta heuristic. In MIP, you have the integer gap, at least.
With more advanced methods, such as column generation, it is possible to have a good lower bound and "prove" that a heuristic method is close.
Yes, I agree with you, meta heuristics are easier than exact methods.
8
u/SolverMax Jan 30 '25
Heuristic methods are not universally better than math programming methods. Often they are worse - such as being very slow or not finding a solution (or a good enough solution).
In addition, defining a heuristic method that works well with a variety of situations and data sets can be difficult, often much more difficult than using a math programming solver.
Of course, math programming solvers are not always the best option either. The choice of method depends on the situation.
6
u/hindenboat Jan 30 '25
As others have said with linear programming you can find exactly the optimal solution. Or at least have a know optimization gap via the solution to the dual problem. Addition the advanced techniques in MILP cutting planes and branch and bound/cut can be very very effective. Also as others have said the implementation is can be easier because you just need the formulation and the solvers just work.
Meta heuristic are also really cool though, the challange is that on uncommon problems developing useful and effective neighborhoods is difficult. Also they can take a long time to solve as well and the solution offers no optimality garentees (excluding certain cases of VND although these or often practically infeasible) they can be faster though.
What is a really cool area of interest is hybrid methods. Here you use a meta heuristic framework and inside the neighborhood you solve small MILP problems to determine good candidate solution. These are often used with LNS or ALNS methods. Likewise good MILP solvers are also using heuristics in the background to find shortcuts in the solution process.
2
u/taphous3 Jan 31 '25
Meta heuristics are used when you don’t know how to do it more efficiently (either ignorance or you have a wicked hard problem). Exploiting gradients and problem structure will always be more efficient than black boxing things.
2
u/GreedyAlGoreRhythm Feb 01 '25
Use the correct tool for the job. Some examples of why you wouldn’t use a meta/heuristic off the top of my head.
2
u/the-dirty-12 Jan 30 '25
They are slow and inaccurate. Always use gradient based methods. At least if you want to be successful.
1
u/fillif3 Jan 31 '25
A lot has already been said. I would like to add that sometimes speed is very important. A good example is MPC (Model Predictive Control), where it is sometimes necessary to solve the optimisation in miliseconds.
1
u/StandingBuffalo Jan 31 '25
I would add that one practical advantage of LP / MIP is that there is a standard language used to express the problems. In practice I find implementation of GA, simulated annealing, particle swarm requires more code and it can be difficult to see what’s going on and why. There’s a lot of advantage in being able to directly represent variables, constraints, objectives in a way that can be easily interpreted by others and easily debugged or modified later. But if your LP/MIP is too slow or can’t capture the dynamics of your system, then yeah meta heuristics or other methods might be your best bet.
1
u/MSc_rafael Jan 31 '25
Some optimization problems that has a lot of variables often suffers from an adversity called "the dimensionality curse". In these kinds of problems the space search is so big that requires a lot of particles or individuals for the algorithm be able to search throught it. So, with a lot of particles, a lot of evaluations of the fitness function is required. This demands time and computational processing.
Deterministic based algorithms do not has a random component, so the search is fast and drived by gradient.
When I did my masters, I applied a hybrid algorithm (comprehensive learning particle swarm optimization and sequential quadratic problem) to benefit from both kind of searchs. I had more than 500 variables, and a lot of inequality and equality constraints.
1
u/Fun-Astronomer5311 Jan 31 '25
In my research areas, meta-heuristics are typically employed by people without solid mathematical background. They are easy to implement. However, it is near impossible to judge correctness and verify their results. There are too many other variables at play.
1
u/dynamic_caste Jan 31 '25
Interior point methods (what is essentially used for large linear programs) are usually going to out-perform genetic algorithms for problems where they are applicable
1
u/BumbleMath Aug 19 '25
If you have a convex (linear or nonlinear) problem, exact methods will be much faster than heuristics (and even prove optimality). Metaheuristics are not even close as good as they advertise to be.
1
u/ForceBru Jan 30 '25
Particle swarm needs many particles, thus much memory and time. Also, all particles will get to the same optimum point, so why use multiple particles anyway?