Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/10/12 15:31:22 (13 years ago)
Author:
svonolfe
Message:

Improved PDP moves (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveTabuMaker.cs

    r6773 r7791  
    5555      get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; }
    5656    }
     57    public ILookupParameter<IntValue> PickupViolationsParameter {
     58      get { return (ILookupParameter<IntValue>)Parameters["PickupViolations"]; }
     59    }
    5760
    5861    [StorableConstructor]
     
    6871        Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload of the individual"));
    6972        Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness of the individual"));
     73        Parameters.Add(new LookupParameter<IntValue>("PickupViolations", "The number of pickup violations."));
    7074    }
    7175
     
    9195        tardiness = TardinessParameter.ActualValue.Value;
    9296
    93       return new PotvinPDRelocateMoveAttribute(baseQuality, move.Tour, move.City, distance, overload, tardiness);
     97      int pickupViolations = 0;
     98      if (PickupViolationsParameter.ActualValue != null)
     99        pickupViolations = PickupViolationsParameter.ActualValue.Value;
     100
     101      return new PotvinPDRelocateMoveAttribute(baseQuality, move.Tour, move.City, distance, overload, tardiness, pickupViolations);
    94102    }
    95103  }
Note: See TracChangeset for help on using the changeset viewer.