private static ISolver LocalSearchNewStopConditions() { GreedyFastHeuristic randomSolver = new GreedyFastHeuristic() { MaxOverfillUnits = 0, }; CompoundSolver compundSolver = new CompoundSolver() { MaxLoops = 7, DiagnosticMessages = true, }; LocalSearch solver = new LocalSearch() { ScoringFunction = new Scorer(), DiagnosticMessages = true, PropagateRandomSeed = true, NumberOfNoGoodActionsToStop = 10, TimeLimit = new TimeSpan(0, 1, 0), BestFactoryAdjustmentParam = 0.2, NeighberhoodAdjustmentParam = 0.2, ImprovementOverNarrowNeighb = 2, Description = "local_search_new_stop_condition_1", }; solver.InitialSolvers.Add(randomSolver); solver.InitialSolvers.Add(compundSolver); return(solver); }
private static ISolver SimulatedAnnealingGenerator() { GreedyFastHeuristic randomSolver = new GreedyFastHeuristic() { MaxOverfillUnits = 0, DiagnosticMessages = true, }; CompoundSolver compundSolver = new CompoundSolver() { MaxLoops = 7, DiagnosticMessages = true, }; SimulatedAnnealing simulatedAnnealing = new SimulatedAnnealing() { DiagnosticMessages = true, ScoringFunction = new Scorer(), StepsAnalyzedWithoutImprovementToStop = 200, NumberOfLoopsWithoutActionsToStop = 1, PropagateRandomSeed = true, Seed = 100, Description = "SimulatedAnnealing", IntegrityLossMultiplier = 1000.0, }; simulatedAnnealing.InitialSolvers.Add(randomSolver); simulatedAnnealing.InitialSolvers.Add(compundSolver); return(simulatedAnnealing); }
private static ISolver LocalSearchEvolutionaryInitial() { GreedyFastHeuristic randomSolver = new GreedyFastHeuristic() { MaxOverfillUnits = 0, }; CompoundSolver compundSolver = new CompoundSolver() { MaxLoops = 3, }; LocalSearch solver = new LocalSearch() { PropagateRandomSeed = true, NumberOfNoGoodActionsToStop = 7, BestFactoryAdjustmentParam = 0.1, NeighberhoodAdjustmentParam = 0.1, ImprovementOverNarrowNeighb = 1.5, TimeLimit = new TimeSpan(0, 5, 0), DiagnosticMessages = true, ReportTimeouts = true, }; solver.MoveFactories = new List <ITransformationFactory> { new InsertFactory() { MildlyRandomOrder = true, PositionsCountLimit = 3, MaxTasksChecked = 1, MaxBreaksChecked = 1, IgnoreBreaksWhenUnitOverfillAbove = 60, IgnoreCompletedTasks = true, IgnoreTasksWithCompletedViews = false, AlwaysReturnStartsAndEnds = true, }, new RandomDeleteFactory() { MovesReturned = 20, RampUpSpeed = 3.0, }, new RandomInsertFactory() { MovesReturned = 20, RampUpSpeed = 3.0, }, new RandomSwapFactory() { MovesReturned = 40, RampUpSpeed = 4.0, }, }; solver.InitialSolvers.Add(randomSolver); solver.InitialSolvers.Add(compundSolver); return(solver); }
private static ISolver LocalSearchNewStopConditions2() { GreedyFastHeuristic randomSolver = new GreedyFastHeuristic() { MaxOverfillUnits = 0, DiagnosticMessages = true, }; CompoundSolver compundSolver = new CompoundSolver() { MaxLoops = 7, DiagnosticMessages = true, }; LocalSearch solver = new LocalSearch() { ScoringFunction = new Scorer(), DiagnosticMessages = true, PropagateRandomSeed = true, NumberOfNoGoodActionsToStop = 15, BestFactoryAdjustmentParam = 0.2, NeighberhoodAdjustmentParam = 0.2, ImprovementOverNarrowNeighb = 2, TimeLimit = new TimeSpan(0, 5, 0), Description = "local_search_new_stop_condition_15rs4", }; solver.MoveFactories = new List <ITransformationFactory> { new InsertFactory() { MildlyRandomOrder = true, PositionsCountLimit = 4, MaxTasksChecked = 3, MaxBreaksChecked = 3, IgnoreBreaksWhenUnitOverfillAbove = 60, IgnoreCompletedTasks = true, IgnoreTasksWithCompletedViews = false, AlwaysReturnStartsAndEnds = true, }, new RandomDeleteFactory() { MovesReturned = 20, }, new RandomInsertFactory() { MovesReturned = 30, }, new RandomSwapFactory() { MovesReturned = 30, }, }; solver.InitialSolvers.Add(randomSolver); solver.InitialSolvers.Add(compundSolver); return(solver); }
private ISolver LocalSearchFinal2() { RandomFastSolver randomSolver = new RandomFastSolver() { }; CompoundSolver compundSolver = new CompoundSolver() { MaxLoops = 5, TimeLimit = new TimeSpan(0, 3, 0), }; LocalSearch solver = new LocalSearch() { ScoringFunction = new Scorer(), DiagnosticMessages = true, PropagateRandomSeed = true, NumberOfNoGoodActionsToStop = 20, BestFactoryAdjustmentParam = 0.2, NeighberhoodAdjustmentParam = 0.2, ImprovementOverNarrowNeighb = 2, TimeLimit = new TimeSpan(0, 6, 0), Description = "base_popualtion_ls_random_oneforall", }; solver.MoveFactories = new List <ITransformationFactory> { new InsertFactory() { MildlyRandomOrder = true, PositionsCountLimit = 4, MaxTasksChecked = 3, MaxBreaksChecked = 3, IgnoreBreaksWhenUnitOverfillAbove = 60, IgnoreCompletedTasks = true, IgnoreTasksWithCompletedViews = false, AlwaysReturnStartsAndEnds = true, }, new RandomDeleteFactory() { MovesReturned = 20, }, new RandomInsertFactory() { MovesReturned = 30, }, new RandomSwapFactory() { MovesReturned = 30, }, }; solver.InitialSolvers.Add(randomSolver); solver.InitialSolvers.Add(compundSolver); return(solver); }
private static ISolver LocalSearchForEvolutionaryImprovement() { CompoundSolver compundSolver = new CompoundSolver() { MaxLoops = 1, TimeLimit = new TimeSpan(0, 0, 15), }; LocalSearch localSearch = new LocalSearch() { NumberOfNoGoodActionsToStop = 15, BestFactoryAdjustmentParam = 0.2, NeighberhoodAdjustmentParam = 0.2, ImprovementOverNarrowNeighb = 1.5, TimeLimit = new TimeSpan(0, 0, 15), }; localSearch.MoveFactories = new List <ITransformationFactory> { new InsertFactory() { MildlyRandomOrder = true, PositionsCountLimit = 3, MaxTasksChecked = 1, MaxBreaksChecked = 1, IgnoreBreaksWhenUnitOverfillAbove = 60, IgnoreCompletedTasks = true, IgnoreTasksWithCompletedViews = false, AlwaysReturnStartsAndEnds = true, }, new RandomDeleteFactory() { MovesReturned = 20, RampUpSpeed = 3.0, }, new RandomInsertFactory() { MovesReturned = 20, RampUpSpeed = 3.0, }, new RandomSwapFactory() { MovesReturned = 50, RampUpSpeed = 4.0, }, }; localSearch.InitialSolvers.Add(compundSolver); return(localSearch); }
private ISolver CompundNoIncom() { GreedyFastHeuristic randomSolver = new GreedyFastHeuristic() { }; CompoundSolver compundSolver = new CompoundSolver() { ScoringFunction = new Scorer(), MaxLoops = 10, PropagateRandomSeed = true, TimeLimit = new TimeSpan(0, 15, 0), Description = "compund_no_incom", }; compundSolver.InitialSolvers.Add(randomSolver); return(compundSolver); }
private ISolver CompoundRand() { RandomFastSolver randomSolver = new RandomFastSolver() { }; CompoundSolver compundSolver = new CompoundSolver() { ScoringFunction = new Scorer(), MaxLoops = 10, PropagateRandomSeed = true, TimeLimit = new TimeSpan(0, 15, 0), Description = "compund_rand", }; compundSolver.InitialSolvers.Add(randomSolver); return(compundSolver); }
private ISolver InitialGood() { GreedyFastHeuristic randomSolver = new GreedyFastHeuristic() { MaxOverfillUnits = 0, }; CompoundSolver compundSolver = new CompoundSolver() { Description = "experiment_initial_new", DiagnosticMessages = true, ScoringFunction = new Scorer(), TimeLimit = new TimeSpan(0, 5, 0), }; compundSolver.InitialSolvers.Add(randomSolver); return(compundSolver); }