/// <summary>
        /// Initializes a new instance of the <see cref="DrayageOptimizer"/> class.
        /// </summary>
        /// <param name="probabilityMatrix">The probability matrix.</param>
        /// <param name="routeService">The route service.</param>
        /// <param name="routeExitFunction">The route exit function.</param>
        /// <param name="logger">The logger.</param>
        /// <param name="pheromoneMatrix">The pheromone matrix.</param>
        /// <param name="nodeService">The node service.</param>
        /// <param name="randomNumberGenerator">The random number generator.</param>
        /// <param name="nodeFactory">The node factory.</param>
        /// <param name="jobNodeService">The job Node Service.</param>
        /// <param name="routeStopService">The route stop service.</param>
        public DrayageOptimizer(IProbabilityMatrix probabilityMatrix,
                                IRouteService routeService,
                                IRouteExitFunction routeExitFunction,
                                ILogger logger,
                                IPheromoneMatrix pheromoneMatrix,
                                IRandomNumberGenerator randomNumberGenerator,
                                IRouteStatisticsService routeStatisticsService,
                                IJobNodeService jobNodeService,
                                IRouteStopService routeStopService)
        {
            _probabilityMatrix      = probabilityMatrix;
            _routeExitFunction      = routeExitFunction;
            _logger                 = logger;
            _pheromoneMatrix        = pheromoneMatrix;
            _randomNumberGenerator  = randomNumberGenerator;
            _routeStatisticsService = routeStatisticsService;
            _jobNodeService         = jobNodeService;
            _routeStopService       = routeStopService;
            _routeService           = routeService;

            // default values
            EnableParallelism           = true;
            PheromoneUpdateFrequency    = 5;
            MaxIterations               = 20000;
            MaxIterationSinceBestResult = 1500;
            MaxExecutionTime            = 100;
        }
Exemple #2
0
        public DrayageOptimizer(IProbabilityMatrix probabilityMatrix,
                                IRouteService routeService, INodeService nodeService, IRouteStopService routeStopService,
                                IRouteExitFunction routeExitFunction, ILogger logger, IPheromoneMatrix pheromoneMatrix, IRandomNumberGenerator randomNumberGenerator, INodeFactory nodeFactory)
        {
            _probabilityMatrix     = probabilityMatrix;
            _routeStopService      = routeStopService;
            _routeExitFunction     = routeExitFunction;
            _logger                = logger;
            _pheromoneMatrix       = pheromoneMatrix;
            _randomNumberGenerator = randomNumberGenerator;
            this._nodeFactory      = nodeFactory;
            _nodeService           = nodeService;
            _routeService          = routeService;

            // default values
            EnableParallelism           = false;
            PheromoneUpdateFrequency    = 10;
            MaxIterations               = 10000;
            MaxIterationSinceBestResult = 1000;
            MaxExecutionTime            = 10000;
        }