find the best combination with algorithm

367 Views Asked by At

I have 49 points and I want to find the best combination for n selection from 49 points to maximize my objective function. my objective function is linear Zc =max(f1 - ωf2). for example I want to find best 10 points which The objective function is maximized with these 10 points. f1 is nash-sutcliffe model efficiency which is calculated by using the interpolated points for all_points and selected points that is candidate_1.ω is weighting coefficient that get value 0.3 and f2 is Ratio of selected points to total points(10/49) .so my objective function has range [-∞,1] and The closer the objective function is to 1 the more optimal the answer.so I assumed K be interpolated value for candidate_1 and j interpolated value for all_point and L is mean of j. I use this framework to calculated f1 and objective function.

all_points = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]
candidate_1 = [3,6,11,12,14,17,19,23,28,43]
#calculate f1 and f2

f1 equation

f2 = 10/49
#calculated objecive function
Zc = f1 - 0.3*f2
#print objective function value
Zc = 0.59

#next step is to create another candidate that improve Objective function

so as you can see for candidate_1 my objective function is 0.59 As you know, there are many options for choosing 10 out of 49. I must create another candidate and And I have to keep doing this until the target function reaches its maximum value and does not change much after that.I need a code structure to make smart candidates to improve my objective function

0

There are 0 best solutions below