bit string ga tool

2 ビュー (過去 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 日
編集済み: 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 Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by