public void RunSiemens4Test() { FAPModelFactory factory = new FAPModelFactory(); Console.Write("Creating model siemens4 problem"); FAPModel model = factory.CreateSiemens4Model(); Console.WriteLine(" ... Done"); Console.Write("Loading assignment for siemens4"); model.LoadTestData(@"..\..\FAP\Problems\siemens4.ass"); Console.WriteLine(" ... Done"); FAPCostFunction costFunction = new FAPCostFunction(model); Console.Write("Calculating total amount of interference"); double interference = costFunction.Evaluate(model.Cells); Console.WriteLine(" ... Done"); Console.WriteLine("Total Interference: {0}", interference); Console.WriteLine("Projected Interference from assignment file: {0}", 2.200); }
public BenchRunner() { Populations = new List<int>(); Models = new List<ModelCreators>(); PSOCreate = new List<pso>(); FAPModelFactory modelFactory = new FAPModelFactory(); Models.Add(modelFactory.CreateSiemens1Model); Models.Add(modelFactory.CreateSiemens2Model); Models.Add(modelFactory.CreateSiemens3Model); Models.Add(modelFactory.CreateSiemens4Model); Populations.Add(20); Populations.Add(50); Populations.Add(100); FAPPSOFactory factory = new FAPPSOFactory(); PSOCreate.Add(factory.CreateFrequencyIndexBased); PSOCreate.Add(factory.CreateIndexBasedFAPPSOWithGlobalBestCellBuilder); PSOCreate.Add(factory.CreateIndexBasedFAPPSOWithGlobalBestTRXBuilder); PSOCreate.Add(factory.CreateIndexMovementBased); PSOCreate.Add(factory.CreateIndexMovementBasedWithGlobalBestCellBuilder); PSOCreate.Add(factory.CreateIndexMovementBasedWithGlobalBestTRXBuilder); }
public void RunTest(String problemPath, String assignmentPath) { FAPModelFactory factory = new FAPModelFactory(); Console.Write("Creating model from problem file given at : {0}", problemPath); FAPModel model = factory.CreateModel(problemPath); Console.WriteLine(" ... Done"); Console.Write("Loading assignment file given at: {0}", assignmentPath); model.LoadTestData(assignmentPath); Console.WriteLine(" ... Done"); FAPCostFunction costFunction = new FAPCostFunction(model); Console.Write("Calculating total amount of interference"); double interference = costFunction.Evaluate(model.Cells); Console.WriteLine(" ... Done"); Console.WriteLine("Total Interference: {0}", interference); }