Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/06/11 14:57:26 (13 years ago)
Author:
svonolfe
Message:

Added adaptive constraint relaxation for all VRP variants (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPPDTW/CVRPPDTWProblemInstance.cs

    r6710 r6711  
    5050    }
    5151
     52    [Storable]
     53    private DoubleValue currentPickupViolationPenalty;
     54
    5255    public DoubleValue PickupViolationPenalty {
    53       get { return PickupViolationPenaltyParameter.Value; }
    54       set { PickupViolationPenaltyParameter.Value = value; }
     56      get {
     57        if (currentPickupViolationPenalty != null)
     58          return currentPickupViolationPenalty;
     59        else
     60          return PickupViolationPenaltyParameter.Value;
     61      }
     62      set { currentPickupViolationPenalty = value; }
    5563    }
    5664
     
    9098    protected CVRPPDTWProblemInstance(CVRPPDTWProblemInstance original, Cloner cloner)
    9199      : base(original, cloner) {
     100        currentPickupViolationPenalty = cloner.Clone(original.currentPickupViolationPenalty) as DoubleValue;
     101
    92102        AttachEventHandlers();
    93103    }
     
    100110    private void AttachEventHandlers() {
    101111      PickupDeliveryLocationParameter.ValueChanged += new EventHandler(PickupDeliveryLocationParameter_ValueChanged);
     112    }
     113
     114    public override void InitializeState() {
     115      base.InitializeState();
     116
     117      currentPickupViolationPenalty = null;
    102118    }
    103119
Note: See TracChangeset for help on using the changeset viewer.