static private IEnumerable <Bitmap> DrawSolution(ISolution solution, IOptimizationAlgorithm optimizer)
        {
            yield return((solution as VehicleRoutingSolution)?.Draw());

            yield return((solution as TspSolution)?.Draw());

            yield return((solution as FloorplanSolution)?.Draw());

            yield return(DrawCostDiagram.Draw(optimizer, new BitmapStyle()));
        }
示例#2
0
 private void DrawVehicleRoutingCostAsync()
 {
     if (vehicleRoutingOptimizer?.CurrentSolution?.IsFinal ?? false)
     {
         vehicleRoutingCostDrawTask.Wait();
     }
     if (vehicleRoutingCostDrawTask?.IsCompleted ?? true)
     {
         vehicleRoutingCostDrawTask = Task.Factory.StartNew(() =>
         {
             rightCostImage = DrawCostDiagram.Draw(vehicleRoutingOptimizer, costStyle, 30000);
             Invalidate();
         });
     }
 }
示例#3
0
 private void DrawTspCostAsync()
 {
     if (tspOptimizer?.CurrentSolution?.IsFinal ?? false)
     {
         tspCostDrawTask.Wait();
     }
     if (tspCostDrawTask?.IsCompleted ?? true)
     {
         tspCostDrawTask = Task.Factory.StartNew(() =>
         {
             leftCostImage = DrawCostDiagram.Draw(tspOptimizer, costStyle, 30000);
             Invalidate();
         });
     }
 }