bit string ga tool

1 次查看(过去 30 天)
mohammed sportman
mohammed sportman 2012-12-29
I want way to represent the value of variable (X) from (1 to 16) or (1 to 32) by using Bit string type gatool (matlab optimization tool)with out repeating any value of X ?
I used this way x=x(1)+x(2)*2+x(3)*4+x(4)*8+x(5)*16 but the matlab remained running with repeating the value of x for example x=4,x=7,x=1,x=1,x=5,x=7,x=13,....etc. with out stopping
  3 个评论
mohammed sportman
mohammed sportman 2012-12-29
in this way i detected the bit string type
Walter Roberson
Walter Roberson 2012-12-30
I still do not understand how it is different. It looks to me to be just the same as the part at the end of your previous question where you remarked about it running endlessly.

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2012-12-30
If you want each value to be used exactly once, you should be using a "for" loop or a vectorized computation, not ga(). ga() does adaptive fitting on the value of each variable. If the random computations are leading towards the tendency that x(3) is (say) 0, then x(3) = 0 will be favored in the computations over x(3) = 1. ga() will not systematically try all the possibilities.
Is there a reason why you are not using IntCon and bounds of [1 16] or [1 32] ?
  25 个评论
Walter Roberson
Walter Roberson 2013-1-4
Then you report back to your supervisor that Yes, you can use ga, but that it is very very time consuming and that the results it produces are not better and cannot be better than a very short "for" loop, and then ask how they want you to proceed. If they tell you to go ahead with it anyhow, then you deliver the code that takes 40+ hours for something that should be a fraction of a second.
Now I notice that your Routing3a routine has an "ITER" parameter. What is the purpose of that? Is there some randomization going on in Routing3a? If Routing3a is doing some kind of searching, then it is that searching that you should be automating through ga.
mohammed sportman
编辑:mohammed sportman 2013-1-5
Thank you Walter Roberson for your valuable with me constantly.Draft works at the expense of the number of requests accepted and rejected for optical networks.The possibility of increasing the number of services using optical fiber.Where lambda is the channel inside the optical fiber and increase the number of it means to increase the number of requests accepted. I have a major program calls paths function to find all shortest paths.We have completed the programming using MATLAB directives. Supervisors asked me to improve it using genetic function because the main business of GA in any function is optimization . And my time to complete the project narrow somewhat (few) so I tried to use tools function genetic to improvement project as a whole and by comparing running and find lamda appropriate to create a state saturation 100% where all requests are accepted (no rejection) in terms of time, but I was surprised where that time the situation normal less much of the use of genetic function. There is a part of my project is to find all paths if there was a ready function used in the genetic algorithm please help me out. And if you can help me in any part of the project, please tell me so and I will send detail required.... with my respect and appreciation
Routing3a it the main function in project.
ITER number of iteration .The more increase the accuracy of the results, but does not have many teams for my project

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by