i trying create algorithm believe similar knapsack-problem. problem find recipes/bill-of-materials intermediate products. there different alternatives of recipes intermediate products. example product x can either consist of 25 % raw material + 75 % raw material b, or 50 % of raw material + 50 % raw material b, etc. there between 1 100 different alternatives each recipe.
my question is, how best encode different recipe alternatives (and/or find similar problems on internet). think have use value encoding, ie assign value each alternative of recipe. have reasonable, different options?
thanks & kind regards
you can encode problem number chromosome. if product has n ingredients, number chromosome has length n: x={x1,x2,..,xn}. every number xi of chromosome represents parts of ingredient i. not required, numbers sum one. e.g. x={23,5,0} means, need 23 parts of ingredient 1, 5 parts of ingredient 2 , 0 parts of ingredient 3.
with encoding, crossover not invalidate chromosome.
Comments
Post a Comment