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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.