示例#1
0
 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
 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());
 }