Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/10/12 12:02:42 (12 years ago)
Author:
svonolfe
Message:

Added priority dispatching metaoptimization (#1955)

Location:
branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/HeuristicLab.PDPSimulation-3.3.csproj

    r8761 r8777  
    189189    <Compile Include="Operators\DynPushForwardInsertionCreator.cs" />
    190190    <Compile Include="Operators\DynPDPProblemInstance.cs" />
     191    <Compile Include="Operators\PriorityDispatchingMetaOptEvaluator.cs" />
    191192    <Compile Include="Optimizers\DynamicPDProblemInstance.cs" />
    192193    <Compile Include="Optimizers\DynamicPDPOptimization.cs" />
  • branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/Optimizers/LocalUpdate/PriorityDispatching.cs

    r8760 r8777  
    7676          waitingOrders.Remove(order);
    7777
    78           Debug.Assert(!GetOrders().Where(o => o.AssignedVehicle == bestVehicle.Id && o.OrderState == OrderState.Waiting).Any(), "An order has already been assigned to the vehicle");
     78          foreach (var assignedOrder in GetOrders().Where(o => o.AssignedVehicle == bestVehicle.Id && o.OrderState == OrderState.Waiting))
     79            assignedOrder.AssignedVehicle = Guid.Empty;
    7980
    8081          order.AssignedVehicle = bestVehicle.Id;
     
    8586
    8687    private void GetHighestPriorityOrder(DynPDPProblemInstance instance, Vehicle vehicle, IEnumerable<Order> orders, out Order order, out double priority) {
    87       var weights = WeightsParameter.ActualValue;
     88      var weights = WeightsParameter.Value;
    8889      Order best = null;
    8990      double bestPriority = double.MinValue;
  • branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/PickupDeliveryAnalyzer.cs

    r8714 r8777  
    209209        row.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Histogram;
    210210        data.Rows.Add(row);
     211
     212        results.Add(new Result("LeadTime", new DoubleValue()));
    211213      }
    212214
     
    235237
    236238      //lead time
     239      double leadTime = 0;
     240
    237241      values = timeHistogram.Rows["LeadTime"].Values;
    238242      values.Clear();
    239243      foreach (Order order in simulation.Orders.Where(o => o.OrderState == OrderState.Delivered)) {
    240         values.Add(order.DeliveryTime + order.DeliveryServiceTime - order.PickupReadyTime);
    241       }
     244        double orderLeadTime = order.DeliveryTime + order.DeliveryServiceTime - order.PickupReadyTime;
     245        values.Add(orderLeadTime);
     246        leadTime += orderLeadTime;
     247      }
     248
     249      (results["LeadTime"].Value as DoubleValue).Value = leadTime;
    242250
    243251      results["TimeHistogram"].Value = timeHistogram;
Note: See TracChangeset for help on using the changeset viewer.