⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newrepair.m

📁 UMDA. a kind of estimation of distribution algorithm , which is the improvement of genetic algorithm
💻 M
字号:
function[solutionFound,s,Pos] =   NewRepair(sizeChain,Pos,pos,moves,s,vector)% NewRepair is an auxiliary function that modifies a sequence configuration to avoid self-intersections% It is called recursively% INPUTS% sizeChain: Size of the subchain inspected% Pos: Configuration of the sequence being repaired% pos: position in the sequence being inspected% moves: set of allowed moves in random order%  s:  Sequence of residues repaire%  vector: original sequence% OUTPUTS% solutionFound: whether the solution was repaired%  s:  Sequence of residues repaired (without self-intersections) % Pos: Final configuration of the sequence global InitConf; if (NewFeasible(s,pos-1,Pos)==1 )      if (size(s,2) == sizeChain)     solutionFound = 1;    else     solutionFound = 0;     i = 1;     while (solutionFound==0  & i<=4)      if(i==1 || moves(pos,i) ~= vector(pos))             new_s = [s,moves(pos,i)];       [Pos] = PutMoveAtPos(Pos,pos,moves(pos,i));       [solutionFound,new_s,Pos] = NewRepair(sizeChain,Pos,pos+1,moves,new_s,vector);      end      i = i + 1;      if (solutionFound==1)         s = new_s;      end     end   end  else     solutionFound = 0;  end% Last version 10/09/2005. Roberto Santana (rsantana@si.ehu.es) 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -