Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/05/12 16:04:40 (12 years ago)
Author:
abeham
Message:

#1955:

  • Added priority dispatching (random strategy)
  • Fixed vehicle's current order
Location:
branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3
Files:
1 added
2 edited

Legend:

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

    r8714 r8747  
    188188    <Compile Include="Optimizers\DynamicPDPOptimization.cs" />
    189189    <Compile Include="Optimizers\LocalUpdate\BestInsertion.cs" />
     190    <Compile Include="Optimizers\LocalUpdate\PriorityDispatching.cs" />
    190191    <Compile Include="Optimizers\Reoptimization\PFIHReoptimization.cs" />
    191192    <Compile Include="Parsers\DefaultDynPDPParser.cs" />
  • branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/SimulationModel/MoveVehicleAction.cs

    r8670 r8747  
    11using System;
    22using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
     3using HeuristicLab.Common;
     4using HeuristicLab.PDPSimulation.DistanceMeasures;
     5using HeuristicLab.PDPSimulation.DomainModel;
    56using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    6 using HeuristicLab.Common;
    7 using HeuristicLab.PDPSimulation.DomainModel;
    8 using HeuristicLab.PDPSimulation.DistanceMeasures;
    97
    108namespace HeuristicLab.PDPSimulation {
    11   public enum VehicleAction { Wait, Pickup, Deliver, Park, Invalid } 
    12  
     9  public enum VehicleAction { Wait, Pickup, Deliver, Park, Invalid }
     10
    1311  [StorableClass]
    14   public class MoveVehicleAction: PDAction {   
     12  public class MoveVehicleAction : PDAction {
    1513    [Storable]
    1614    double sourceX;
     
    2624      get { return sourceY; }
    2725    }
    28    
     26
    2927    [Storable]
    3028    double targetX;
     
    6361
    6462    public MoveVehicleAction(
    65       Guid vehicleId, 
     63      Guid vehicleId,
    6664      double targetX, double targetY, VehicleAction action, Order order, bool diversionAllowed, DistanceMeasure distMeasure)
    6765      : base(vehicleId) {
    68         this.targetX = targetX;
    69         this.targetY = targetY;
    70         this.action = action;
    71         this.order = order;
    72         this.serviceTime = 0;
    73         this.completed = false;
    74         this.diversionAllowed = diversionAllowed;
    75         this.interruptable = diversionAllowed;
    76         this.distMeasure = distMeasure;
    77 
    78         this.sourceX = -1;
    79         this.sourceY = -1;
     66      this.targetX = targetX;
     67      this.targetY = targetY;
     68      this.action = action;
     69      this.order = order;
     70      this.serviceTime = 0;
     71      this.completed = false;
     72      this.diversionAllowed = diversionAllowed;
     73      this.interruptable = diversionAllowed;
     74      this.distMeasure = distMeasure;
     75
     76      this.sourceX = -1;
     77      this.sourceY = -1;
    8078    }
    8179    [StorableConstructor]
    82     protected MoveVehicleAction(bool deserializing) : base(deserializing) {
     80    protected MoveVehicleAction(bool deserializing)
     81      : base(deserializing) {
    8382    }
    8483    protected MoveVehicleAction(MoveVehicleAction original, Cloner cloner)
     
    266265                else
    267266                  order.OrderState = OrderState.PickedUp;
     267                vehicle.CurrentOrder = Guid.Empty;
    268268                changes.Add(new PDChange() { ChangeType = SimulationStateChange.OrderState, BaseObject = order });
    269269
     
    332332                changes.Add(new PDChange() { ChangeType = SimulationStateChange.OrderState, BaseObject = order });
    333333
     334                vehicle.CurrentOrder = Guid.Empty;
     335
    334336                vehicle.VehicleState = VehicleState.Waiting;
    335337                changes.Add(new PDChange() { ChangeType = SimulationStateChange.VehicleState, BaseObject = baseObject });
Note: See TracChangeset for help on using the changeset viewer.