示例#1
0
        public override byte[] Solve(byte[] partialData, TimeSpan timeout)
        {
            State = TaskSolverState.Solving;
            var tspSolver      = new RecurentTspSolver();
            var partialProblem = DvrpProblemData.Deserialize(partialData);

            Route route = tspSolver.SolveRecurent(partialProblem);

            State = TaskSolverState.Idle;
            OnProblemSolvingFinished(this);
            return((new DvrpSolutionData()
            {
                Routes = new List <Route>()
                {
                    route
                },
                Distance = route.Distance
            }).Serialize());
        }
示例#2
0
 DvrpSolutionData solution;//to be removed
 public DvrpTaskSolver(byte[] problemData)
     : base(problemData)
 {
     this.problem = DvrpProblemData.Deserialize(problemData);
 }