Does MATLAB have a mixed-integer optimization feature that uses metaheuristic algorithms?

I am interested in optimization and know that MATLAB has a built-in metaheuristic algorithm that can be utilized. I have worked with some of these algorithms, such as Genetic Algorithms (GA) and Particle Swarm Optimization (PSO). However, I believe they are typically designed to solve problems with a single type of decision variable.
I am currently working on a problem that involves multiple types of decision variables, including binary, integer, and continuous variables. Can this kind of problem be effectively solved using a heuristic approach?

14 件のコメント

Torsten
Torsten 2025 年 2 月 3 日
I don't know if you would call it efficient, but "ga" can if you have no nonlinear equality constraints that you want to define in "nonlcon".
ga() and gamultiobj() and intlinprog() are designed for mixed-integer programming.
binary decision variables are integer decision variables over [0 1]
M.Sattar
M.Sattar 2025 年 2 月 6 日
I will check this , thank you @Torsten and @Walter Roberson.
Mike Croucher
Mike Croucher 2025 年 2 月 6 日
To add to these, binary problems can be solved with QUBO, part of the quantum computing support package. The algorithm employed is called Tabu Search which is meta heuristic.
M.Sattar
M.Sattar 2025 年 2 月 7 日
編集済み: M.Sattar 2025 年 2 月 8 日
Thank you Mike Croucher, can it solve the case in which the descion varaible has multi-type ?
No, QUBO is purely for binary decision variables.
Sam Chak
Sam Chak 2025 年 2 月 8 日
I am curious about the NP-hardness of the problem, as it involves mixed binary, integer, and real variables. Does your problem have a single objective function or multiple objective functions?
Note that QUBO involves a matrix representation of the objective, not a function-handle representation.
Sam Chak
Sam Chak 2025 年 2 月 8 日
編集済み: Sam Chak 2025 年 2 月 8 日
I wonder if the binary variables can be treated as specially constrained integer variables. If so, then the problem is essentially of mixed-integer programming type. The second part of this example shows how to solve a surrogate optimization problem that involves mixed integer and real variables.
It should certainly be possible to treat binary variables as integer variables constrained to [0 1]
Torsten
Torsten 2025 年 2 月 8 日
What is a "decision variable of multiple type" ? If you mean that the variable can take more integer values than just 0 and 1, you can define its lower and upper bounds in the arrays lb and ub. It then can take integer values in between lb and ub.
M.Sattar
M.Sattar 2025 年 2 月 8 日
編集済み: M.Sattar 2025 年 2 月 8 日
Thanks @Walter Roberson, i took a look at the QUBO and indeed it's for binary optimization,
@Sam Chak Yes, in my problem case, it involves multiple objectives and multiple types of decision variables. During my investigation, I found the Gurobi solver, which involves mathematical optimization and supports mixed-integer decision variables, and it has a variety of features, unfortunatly it's paid, i wonde rif MATLAB optimization toolbox offers the same features and perfermance.
M.Sattar
M.Sattar 2025 年 2 月 8 日
For example i have a vector decision variable X =[x1, x2, x3, x4, x5, x6];
x1 and x2 are binary variables that can be either 1 or 0,
x3 and x4 are discrete integer variables that can be 0,1, 2, 3, 4, 5 ...
x5, x6 are continous varaible 0, 0.5 1.2, 4.54 8.5 .. etc
Torsten
Torsten 2025 年 2 月 8 日
編集済み: Torsten 2025 年 2 月 8 日
As said, you can handle these variables by setting bounds in MATLAB's "ga":
x1 and x2: Set intcon and lb = 0, ub = 1
x3 and x4: Set intcon and lb = 0
x5 and x6: Set intcon and lb = 1, ub = number of values x5 and x6 can take and identify 0 with 1, 0.5 with 2, 1.2 with 3 etc. in the objective function.
Here is a helpful page with the available software for certain problem classes and benchmark tests of commercial and non-commercial solvers:

サインインしてコメントする。

 採用された回答

M.Sattar
M.Sattar 2025 年 4 月 13 日
Hi, I found the way to solve this, Just wanted to say a huge thanks for all the help with my mixed-integer optimization questions. Your advice has been super helpful! Big shoutout to @Torsten, @Walter Roberson , @Sam Chak , and @Mike Croucher for your awesome insights.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLinear Programming and Mixed-Integer Linear Programming についてさらに検索

製品

リリース

R2024b

質問済み:

2025 年 2 月 3 日

回答済み:

2025 年 4 月 13 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by