コード例 #1
0
ファイル: FAPPSOFactory.cs プロジェクト: Burmudar/FAPPSO
 public PSOAlgorithm<ICell[]> CreateIndexBasedFAPPSOWithGlobalBestTRXBuilder(int Population, FAPModel Model, double localCoefficient, double globalCoefficient)
 {
     PositionGenCellArray generator = new FrequencyIndexPositionGenerator(Model);
     FitnessFuncCellArray evalFunction = new FAPIndexCostFunction(Model);
     ParticleMoveFunction moveFunction = new ParticlePerTrxFunction(Model, 0, Model.Channels.Length - 1, localCoefficient, globalCoefficient, CreateCollisionResolver(Model));
     ICellIntegrityChecker checker = new GBCIndexBasedViolationChecker(Model);
     String benchName = Model.GeneralInformation.ScenarioID;
     return new FAPPSOAlgorithm(benchName, Population, evalFunction, moveFunction, generator, checker, GBestFactory.GetGlobalBestTRXBuilderSelector());
 }
コード例 #2
0
ファイル: FAPPSOFactory.cs プロジェクト: Burmudar/FAPPSO
 public PSOAlgorithm<ICell[]> CreateFrequencyValueBased(int Population,FAPModel Model,double localCoefficient, double globalCoefficient)
 {
     PositionGenCellArray generator = new FrequencyPositionGenerator(Model);
     FitnessFuncCellArray evalFunction = new FAPCostFunction(Model);
     ParticleMoveFunction moveFunction = new ParticlePerTrxFunction(Model, Model.GeneralInformation.Spectrum[0], Model.GeneralInformation.Spectrum[1],
          localCoefficient, globalCoefficient, CreateCollisionResolver(Model));
     ICellIntegrityChecker checker = new GBCViolationChecker(Model.GeneralInformation.GloballyBlockedChannels);
     String benchName = Model.GeneralInformation.ScenarioID;
     return new FAPPSOAlgorithm(benchName,Population, evalFunction, moveFunction, generator, checker,GBestFactory.GetStandardSelector());
 }