MATLAB Answers

How to formulate GA with plenty variables (e.g >24000 variables)

2 views (last 30 days)
Charles Uko
Charles Uko on 30 Mar 2020
Answered: Alan Weiss on 26 May 2020
Hi everyone.
Please what is the best way to formulate a GA using the GA toolbox in MATLAB. Most of the examples I have seen are limited to at most 10 variables that are collected in an array X.
In my problem, variables e.g ON status of a unit changes with respect to the time or period of 24 hours. Which means for every UNIT, it has 24 variables just indicating the ON status of the unit throughout the 24 hour period.
I have multiple units in my problem which means variables for ON status alone is already 24 * Number of Units (1000).
Please what is the best way to formulate this problem for solving using GA toolbox?

Answers (1)

Alan Weiss
Alan Weiss on 26 May 2020
It seems that you have thousands of binary variables. If so, then indeed ga is not an effective solver for your problem.
You would likely do better using intlinprog as a solver. You need to formulate your problem as mixed-integer linear programming, but, if you look at the examples, you will see that a wide variety of problems can be formulated that way.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

  0 Comments

Sign in to comment.


Translated by