How to model two dependent variables effecting objective function indirectly in Genetic algorithm (MATLAB toolbox)?

Hello,
I am using GA toolbox in MATLAB. And I am facing this problem,
If I have 8 numbers e.g. [1 2 3 4 5 6 7 8], and i have option to choose any even number of sets that includes all these eight numbers only once in any sequence. I can choose 2 sets or 4 sets with different arrangements. for example;
[1 2 3 4], [5 6 7 8] or [2 1 4 3] [6 5 8 7] or [3 1 4 2] [8 6 7 5] or any other possible arrangement in two sets
[1 2] [3 4] [5 6] [7 8] or [2 1] [3 4] [6 5] [7 8] or any other possible arrangement using 4 sets.
Now, if my ONE variable is "number of sets" and my second variable is "sequence of numbers" in each set. How can i model these two variables in MATLAB? Both variables effect my objective function indirectly. The equation of my objective function does not includes any of the two variables, but changing any of the two variables will change the results. How to get an optimal number of tubes and sequence of tubes that maximizes my objective function?
Thanks in advance.

12 comentarios

Hi @Shehryar Ishaque, Can you use some math notations to descibe the mathematical problem?
Do you really have only 8 numbers in your application and the choice of 2 sets with each set containing 4 numbers and 4 sets with each set containing 2 numbers ? Or do you have to consider an arbitrary number of numbers ?
And does the order of the elements in the sets count (since you differ between [1 2] [3 4] [5 6] [7 8] and [2 1] [3 4] [6 5] [7 8]) ?
To create mathematical notations to the above problem is actually the problem. e.g.
I have two variables that need to be optimized.
(1) ONE variable is number of sets, can be denoted by x1 with Upper and lower bounds = [2 8], constraint = should be even numbers.
(2) sequence of numbers in each set, Now this is a problem that how to define sequence of numbers as variable.
Note: My Objective function = Maximize [Q], which is effected by the number of sets and the sequence of each set.
Hi Torsten, This 8 numbers is just an example, I can have more than 100 numbers in total, which can be divide in any even number of sets with different sequences, and i have to choose the best number of sets with best sequence that gives me optimal solution. Hence, there are two variables, as i mentioned above.
I doubt that this can be formulated as a usual optimization problem.
My idea was to optimize each case separately and at last take the best case.
For n=8, this would be doable, but for n=100, it's unrealistic.
@Shehryar Ishaque, How does your Objective Function Q look like?
Sam Chak Q is a heat exchanger capacity (kilo Watt or Watt) and its value will be a real number e.g. 12.4, 8, 3.5 etc.
Equation: Q = mCp(Tout - Tin);
Thanks for replying. So I guess that the Number of sets () and the Sequence of numbers () indirectly affect the parameters of the heat energy (Q), such the mass of substance (m), the specific heat capacity (), and the temperature change ():
It sounds like a Combinatorial Optimization Problem that maybe related to the Integer Programming.
Are you able to generate all possible combinations for and ?
Are you able to generate all possible combinations for N_S and S_N ?
Sam Chak Not yet, but I am trying..
You shouldn't continue trying. Your RAM won't suffice.
@Shehryar Ishaque, Before generating the combinations, you need to identify the number of elements in the and .
If there are three elements in each input, then there should be 9 combinations, or 9 ways of arranging the Number of sets and the Sequence of numbers.
I'm unfamiliar with your Heat Exchanger. But I think is related to the fundamental Physics: Thermodynamics. Now, the question is: According to your intuition/assumption, will one of these combinations in and (regardless of how you arrange from a pool of 8 or 100+ numbers) uniquely produce the maximum Heat energy Q?
This should help you to imagine the likelihood of accomplishing the task under such constraints.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Thermal Analysis en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 26 de Oct. de 2022

Comentada:

el 28 de Oct. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by