Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/11/15 19:39:47 (9 years ago)
Author:
abeham
Message:

#2400: merged 12488 to stable

Location:
stable
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.VehicleRouting

  • stable/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/ConstraintRelaxation/Capacitated/CapacityRelaxationVRPAnalyzer.cs

    r12009 r12738  
    136136      double max = cvrp.OverloadPenalty.Value * (1 + phi);
    137137
    138       cvrp.OverloadPenalty = new DoubleValue(min + (max - min) * factor);
    139       if (cvrp.OverloadPenalty.Value < minPenalty)
    140         cvrp.OverloadPenalty.Value = minPenalty;
    141       if (cvrp.OverloadPenalty.Value > maxPenalty)
    142         cvrp.OverloadPenalty.Value = maxPenalty;
     138      cvrp.CurrentOverloadPenalty = new DoubleValue(min + (max - min) * factor);
     139      if (cvrp.CurrentOverloadPenalty.Value < minPenalty)
     140        cvrp.CurrentOverloadPenalty.Value = minPenalty;
     141      if (cvrp.CurrentOverloadPenalty.Value > maxPenalty)
     142        cvrp.CurrentOverloadPenalty.Value = maxPenalty;
    143143
    144144      for (int j = 0; j < qualities.Length; j++) {
    145         qualities[j].Value += overloads[j].Value * cvrp.OverloadPenalty.Value;
     145        qualities[j].Value += overloads[j].Value * cvrp.CurrentOverloadPenalty.Value;
    146146      }
    147147
    148148      if (!results.ContainsKey("Current Overload Penalty")) {
    149         results.Add(new Result("Current Overload Penalty", new DoubleValue(cvrp.OverloadPenalty.Value)));
     149        results.Add(new Result("Current Overload Penalty", new DoubleValue(cvrp.CurrentOverloadPenalty.Value)));
    150150      } else {
    151         (results["Current Overload Penalty"].Value as DoubleValue).Value = cvrp.OverloadPenalty.Value;
     151        (results["Current Overload Penalty"].Value as DoubleValue).Value = cvrp.CurrentOverloadPenalty.Value;
    152152      }
    153153
  • stable/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/ConstraintRelaxation/PickupAndDelivery/PickupViolationsRelaxationVRPAnalyzer.cs

    r12009 r12738  
    136136      double max = pdp.PickupViolationPenalty.Value * (1 + phi);
    137137
    138       pdp.PickupViolationPenalty = new DoubleValue(min + (max - min) * factor);
    139       if (pdp.PickupViolationPenalty.Value < minPenalty)
    140         pdp.PickupViolationPenalty.Value = minPenalty;
    141       if (pdp.PickupViolationPenalty.Value > maxPenalty)
    142         pdp.PickupViolationPenalty.Value = maxPenalty;
     138      pdp.CurrentPickupViolationPenalty = new DoubleValue(min + (max - min) * factor);
     139      if (pdp.CurrentPickupViolationPenalty.Value < minPenalty)
     140        pdp.CurrentPickupViolationPenalty.Value = minPenalty;
     141      if (pdp.CurrentPickupViolationPenalty.Value > maxPenalty)
     142        pdp.CurrentPickupViolationPenalty.Value = maxPenalty;
    143143
    144144      for (int j = 0; j < qualities.Length; j++) {
    145         qualities[j].Value += pickupViolations[j].Value * pdp.PickupViolationPenalty.Value;
     145        qualities[j].Value += pickupViolations[j].Value * pdp.CurrentPickupViolationPenalty.Value;
    146146      }
    147147
    148148      if (!results.ContainsKey("Current Pickup Violation Penalty")) {
    149         results.Add(new Result("Current Pickup Violation Penalty", new DoubleValue(pdp.PickupViolationPenalty.Value)));
     149        results.Add(new Result("Current Pickup Violation Penalty", new DoubleValue(pdp.CurrentPickupViolationPenalty.Value)));
    150150      } else {
    151         (results["Current Pickup Violation Penalty"].Value as DoubleValue).Value = pdp.PickupViolationPenalty.Value;
     151        (results["Current Pickup Violation Penalty"].Value as DoubleValue).Value = pdp.CurrentPickupViolationPenalty.Value;
    152152      }
    153153
  • stable/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/ConstraintRelaxation/TimeWindowed/TimeWindowRelaxationVRPAnalyzer.cs

    r12009 r12738  
    136136      double max = vrptw.TardinessPenalty.Value * (1 + phi);
    137137
    138       vrptw.TardinessPenalty = new DoubleValue(min + (max - min) * factor);
    139       if (vrptw.TardinessPenalty.Value < minPenalty)
    140         vrptw.TardinessPenalty.Value = minPenalty;
    141       if (vrptw.TardinessPenalty.Value > maxPenalty)
    142         vrptw.TardinessPenalty.Value = maxPenalty;
     138      vrptw.CurrentTardinessPenalty = new DoubleValue(min + (max - min) * factor);
     139      if (vrptw.CurrentTardinessPenalty.Value < minPenalty)
     140        vrptw.CurrentTardinessPenalty.Value = minPenalty;
     141      if (vrptw.CurrentTardinessPenalty.Value > maxPenalty)
     142        vrptw.CurrentTardinessPenalty.Value = maxPenalty;
    143143
    144144      for (int j = 0; j < qualities.Length; j++) {
    145         qualities[j].Value += tardiness[j].Value * vrptw.TardinessPenalty.Value;
     145        qualities[j].Value += tardiness[j].Value * vrptw.CurrentTardinessPenalty.Value;
    146146      }
    147147
    148148      if (!results.ContainsKey("Current Tardiness Penalty")) {
    149         results.Add(new Result("Current Tardiness Penalty", new DoubleValue(vrptw.TardinessPenalty.Value)));
     149        results.Add(new Result("Current Tardiness Penalty", new DoubleValue(vrptw.CurrentTardinessPenalty.Value)));
    150150      } else {
    151         (results["Current Tardiness Penalty"].Value as DoubleValue).Value = vrptw.TardinessPenalty.Value;
     151        (results["Current Tardiness Penalty"].Value as DoubleValue).Value = vrptw.CurrentTardinessPenalty.Value;
    152152      }
    153153
Note: See TracChangeset for help on using the changeset viewer.