Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/25/15 18:21:19 (10 years ago)
Author:
dglaser
Message:

#2388: Merged trunk into HiveStatistics branch

Location:
branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting

  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/ConstraintRelaxation/Capacitated/CapacityRelaxationVRPAnalyzer.cs

    r12012 r12515  
    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
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/ConstraintRelaxation/PickupAndDelivery/PickupViolationsRelaxationVRPAnalyzer.cs

    r12012 r12515  
    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
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/ConstraintRelaxation/TimeWindowed/TimeWindowRelaxationVRPAnalyzer.cs

    r12012 r12515  
    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
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPProblemInstance.cs

    r12012 r12515  
    6161          return OverloadPenaltyParameter.Value;
    6262      }
     63    }
     64    DoubleValue ICapacitatedProblemInstance.CurrentOverloadPenalty {
     65      get { return CurrentOverloadPenaltyParameter.Value; }
    6366      set { CurrentOverloadPenaltyParameter.Value = value; }
    6467    }
     
    8790      Parameters.Add(new ValueParameter<DoubleArray>("Capacity", "The capacity of each vehicle.", new DoubleArray()));
    8891      Parameters.Add(new ValueParameter<DoubleValue>("EvalOverloadPenalty", "The overload penalty considered in the evaluation.", new DoubleValue(100)));
    89       Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentOverloadPenalty", "The current overload penalty considered in the evaluation."));
     92      Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentOverloadPenalty", "The current overload penalty considered in the evaluation.") { Hidden = true });
    9093
    9194      AttachEventHandlers();
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPPDTW/MDCVRPPDTWProblemInstance.cs

    r12012 r12515  
    6161          return PickupViolationPenaltyParameter.Value;
    6262      }
     63    }
     64    DoubleValue IPickupAndDeliveryProblemInstance.CurrentPickupViolationPenalty {
     65      get { return CurrentPickupViolationPenaltyParameter.Value; }
    6366      set { CurrentPickupViolationPenaltyParameter.Value = value; }
    6467    }
     
    9497
    9598      Parameters.Add(new ValueParameter<DoubleValue>("EvalPickupViolationPenalty", "The pickup violation penalty considered in the evaluation.", new DoubleValue(100)));
    96       Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentPickupViolationPenalty", "The current pickup violation penalty considered in the evaluation."));
     99      Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentPickupViolationPenalty", "The current pickup violation penalty considered in the evaluation.") { Hidden = true });
    97100
    98101      AttachEventHandlers();
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPTWProblemInstance.cs

    r12012 r12515  
    8383          return TardinessPenaltyParameter.Value;
    8484      }
     85    }
     86    DoubleValue ITimeWindowedProblemInstance.CurrentTardinessPenalty {
     87      get { return CurrentTardinessPenaltyParameter.Value; }
    8588      set { CurrentTardinessPenaltyParameter.Value = value; }
    8689    }
     
    113116      Parameters.Add(new ValueParameter<DoubleValue>("EvalTimeFactor", "The time factor considered in the evaluation.", new DoubleValue(0)));
    114117      Parameters.Add(new ValueParameter<DoubleValue>("EvalTardinessPenalty", "The tardiness penalty considered in the evaluation.", new DoubleValue(100)));
    115       Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentTardinessPenalty", "The current tardiness penalty considered in the evaluation."));
     118      Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentTardinessPenalty", "The current tardiness penalty considered in the evaluation.") { Hidden = true });
    116119
    117120      AttachEventHandlers();
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPProblemInstance.cs

    r12012 r12515  
    6161          return OverloadPenaltyParameter.Value;
    6262      }
     63    }
     64    DoubleValue ICapacitatedProblemInstance.CurrentOverloadPenalty {
     65      get { return CurrentOverloadPenaltyParameter.Value; }
    6366      set { CurrentOverloadPenaltyParameter.Value = value; }
    6467    }
     
    8790      Parameters.Add(new ValueParameter<DoubleValue>("Capacity", "The capacity of each vehicle.", new DoubleValue(0)));
    8891      Parameters.Add(new ValueParameter<DoubleValue>("EvalOverloadPenalty", "The overload penalty considered in the evaluation.", new DoubleValue(100)));
    89       Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentOverloadPenalty", "The current overload penalty considered in the evaluation."));
     92      Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentOverloadPenalty", "The current overload penalty considered in the evaluation.") { Hidden = true });
    9093
    9194      AttachEventHandlers();
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPPDTW/CVRPPDTWProblemInstance.cs

    r12012 r12515  
    6161          return PickupViolationPenaltyParameter.Value;
    6262      }
     63    }
     64    DoubleValue IPickupAndDeliveryProblemInstance.CurrentPickupViolationPenalty {
     65      get { return CurrentOverloadPenaltyParameter.Value; }
    6366      set { CurrentPickupViolationPenaltyParameter.Value = value; }
    6467    }
     
    9497
    9598      Parameters.Add(new ValueParameter<DoubleValue>("EvalPickupViolationPenalty", "The pickup violation penalty considered in the evaluation.", new DoubleValue(100)));
    96       Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentPickupViolationPenalty", "The current pickup violation penalty considered in the evaluation."));
     99      Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentPickupViolationPenalty", "The current pickup violation penalty considered in the evaluation.") { Hidden = true });
    97100
    98101      AttachEventHandlers();
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWProblemInstance.cs

    r12012 r12515  
    8383          return TardinessPenaltyParameter.Value;
    8484      }
     85    }
     86    DoubleValue ITimeWindowedProblemInstance.CurrentTardinessPenalty {
     87      get { return CurrentTardinessPenaltyParameter.Value; }
    8588      set { CurrentTardinessPenaltyParameter.Value = value; }
    8689    }
     
    113116      Parameters.Add(new ValueParameter<DoubleValue>("EvalTimeFactor", "The time factor considered in the evaluation.", new DoubleValue(0)));
    114117      Parameters.Add(new ValueParameter<DoubleValue>("EvalTardinessPenalty", "The tardiness penalty considered in the evaluation.", new DoubleValue(100)));
    115       Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentTardinessPenalty", "The current tardiness penalty considered in the evaluation."));
     118      Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentTardinessPenalty", "The current tardiness penalty considered in the evaluation.") { Hidden = true });
    116119
    117120      AttachEventHandlers();
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/Variants/Capacitated/ICapacitatedProblemInstance.cs

    r12012 r12515  
    2525namespace HeuristicLab.Problems.VehicleRouting.Variants {
    2626  public interface ICapacitatedProblemInstance : IVRPProblemInstance {
    27     DoubleValue OverloadPenalty { get; set; }
     27    DoubleValue OverloadPenalty { get; }
     28    DoubleValue CurrentOverloadPenalty { get; set; }
    2829  }
    2930}
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/Variants/PickupAndDelivery/IPickupAndDeliveryProblemInstance.cs

    r12012 r12515  
    2626  public interface IPickupAndDeliveryProblemInstance : IVRPProblemInstance {
    2727    IntArray PickupDeliveryLocation { get; }
    28     DoubleValue PickupViolationPenalty { get; set; }
     28    DoubleValue PickupViolationPenalty { get; }
     29    DoubleValue CurrentPickupViolationPenalty { get; set; }
    2930
    3031    int GetPickupDeliveryLocation(int city);
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/Variants/TimeWindowed/ITimeWindowedProblemInstance.cs

    r12012 r12515  
    2929    DoubleArray ServiceTime { get; }
    3030    DoubleValue TimeFactor { get; }
    31     DoubleValue TardinessPenalty { get; set; }
     31    DoubleValue TardinessPenalty { get; }
     32    DoubleValue CurrentTardinessPenalty { get; set; }
    3233  }
    3334}
  • branches/HiveStatistics/sources/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs

    r12102 r12515  
    4242namespace HeuristicLab.Problems.VehicleRouting {
    4343  [Item("Vehicle Routing Problem", "Represents a Vehicle Routing Problem.")]
    44   [Creatable("Problems")]
     44  [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 110)]
    4545  [StorableClass]
    4646  public sealed class VehicleRoutingProblem : Problem, ISingleObjectiveHeuristicOptimizationProblem, IStorableContent, IProblemInstanceConsumer<IVRPData> {
Note: See TracChangeset for help on using the changeset viewer.