コード例 #1
0
ファイル: FAPPSOFactory.cs プロジェクト: Burmudar/FAPPSO
 public PSOAlgorithm<ICell[]> CreateIndexMovementBased(int Population, FAPModel Model, double localCoefficient, double globalCoefficient)
 {
     PositionGenCellArray generator = new FrequencyIndexPositionGenerator(Model);
     FitnessFuncCellArray evalFunction = new FAPIndexCostFunction(Model);
     ParticleMoveFunction moveFunction = new PerTRXChannelIndexFunction(Model, localCoefficient, globalCoefficient, CreateCollisionResolver(Model));
     ICellIntegrityChecker checker = new GBCIndexBasedViolationChecker(Model);
     String benchName = Model.GeneralInformation.ScenarioID;
     return new FAPPSOAlgorithm(benchName, Population, evalFunction, moveFunction, generator, checker, GBestFactory.GetStandardSelector());
 }
コード例 #2
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(), new IndexStatisticalAnalyser(Model));
        }