How to solve multi-objective optimization problem of a single variable that can take only integer values?
Show older comments
Hi,
I am trying to solve a multi-objective optimization problem where I only have a single variable that can take integer values. I tried the code provided by the Mathworks support team for imposing integer constraints which is written for two variables. I was able to use the functions provided in exampleIntGAMULTIOBJ.zip: @int_pop, @int_mutation, @int_crossoverarithmetic for solving problem with two variables. However, it doesn't work for the case of a single variable. What changes should I make to the functions provided to be able to make it work for single variable? Below is the link for the functions
https://www.mathworks.com/matlabcentral/answers/103369-is-it-possible-to-solve-a-mixed-integer-multi-objective-optimization-problem-using-global-optimizati
Thanks.
13 Comments
Jeff Miller
on 3 Sep 2018
If there is only one integer variable to be adjusted, why not just try different values (e.g., with a for-loop across the acceptable range) and see which one works best?
Vamshi Krishna Gudipati
on 4 Sep 2018
Jeff Miller
on 7 Sep 2018
Do you have any idea of the shape of the function that you are trying to optimize? E.g. what are its values for example integer parameter values, e.g., i=10,20,50,100,500,1000,10000,100000 (I'm just guessing about the range)? If the function is monotonic on both sides of the optimal point, then you should be able to narrow in on that point with something like a bisection method.
Sachin Meena
on 10 Sep 2018
Did Jeff's suggestion work for you? If not, could you explain why not?
Vamshi Krishna Gudipati
on 10 Sep 2018
Vamshi Krishna Gudipati
on 10 Sep 2018
Sachin Meena
on 11 Sep 2018
Can you share your fitness function with sufficient comments?
Cesar Antonio Lopez Segura
on 11 Sep 2018
Hi Vamshi,
Can you share the code of your objective function? I can test it with Matlab opens source ga code.
Vamshi Krishna Gudipati
on 11 Sep 2018
Cesar Antonio Lopez Segura
on 12 Sep 2018
Hi Vamshi,
To improve the efficiency of your code the first step could be separate the data processing (importdata, variable creation,... ) outside of function. And create a structure with all your data ( see the example below ):
Mydata.PGA = PGA';
Mydata. Are = Are;
Mydata.r = 0.05;
Mydata.N = 50;
Then, you can attach the structure variable "Mydata" and create a simplify function.
To use Mydata structure in your function it is possible to create a new input or declare Mydata as global.
1.-
function y = HB_RegionalLoss_InitialCost(x, Mydata)
2.-
function y = HB_RegionalLoss_InitialCost(x)
global Mydata
Finally, you can share (attach) your function and Mydata structure with MATLAB community.
Note: it is necessary that objective function has a single output. The code example has two outputs:
% HB_Rest_Time = RT*PPGA;
y(1) = HB_Initial_Cost;
y(2) = HB_Exp_DD_Cost;
If you need to minimize two objectives the function output could be:
y = WeightOne* HB_Initial_Cost + WeightTwo*HB_Exp_DD_Cost
The value of WeightOne and WeightTwo could depend of your priorities.
Vamshi Krishna Gudipati
on 12 Sep 2018
Cesar Antonio Lopez Segura
on 12 Sep 2018
Hi Vamshi,
Do you have the global minimum of your function ?
Vamshi Krishna Gudipati
on 17 Sep 2018
Answers (0)
Categories
Find more on Subspace Methods in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!