Free cookie consent management tool by TermsFeed Policy Generator

Opened 9 years ago

Closed 9 years ago

#2400 closed enhancement (done)

Setting new penalty values in VRP instances are not respected

Reported by: pfleck Owned by: abeham
Priority: medium Milestone: HeuristicLab 3.3.12
Component: Problems.VehicleRouting Version: 3.3.11
Keywords: Cc:

Description (last modified by pfleck)

When setting a parameter, which is subject to constraint relaxation (e.g. panalties), setting a new DoubleValue behaves differently than setting the value of the current DoubleValue.

This is the case because setting a new DoubleValue is used for constraint relaxation and the current value is reset when the problem instance is initialized.

Using the setter of the penalty-property, the new value is set on a different parameter (eg. CurrentOverloadPenaltyParameter) instead of the actual parameter (OverloadPenaltyParameter).

Therefore, setting a new DoubleValue to a penalty property has no effect since the CurrentOverloadPenaltyParameter it is reset when preparing the algorithm.

public DoubleValue OverloadPenalty {
  get {
    DoubleValue currentOverloadPenalty = CurrentOverloadPenaltyParameter.Value;
    if (currentOverloadPenalty != null)
      return currentOverloadPenalty;
    else
      return OverloadPenaltyParameter.Value;
  }
  set { CurrentOverloadPenaltyParameter.Value = value; }
}

This behavior is unintuitive and confusing and should be changed, without breaking the constraint relaxation.

See also https://groups.google.com/forum/#!topic/heuristiclab/KCC0sWYJEcQ

Change History (6)

comment:1 Changed 9 years ago by pfleck

  • Description modified (diff)

comment:2 Changed 9 years ago by pfleck

r12488

  • Interfaces for Capaciated-, PickupAndDelivery- and TimeWindowed-ProblemInstances now specify an additional penalty parameter to set the current penalty factor for the constraint relaxation.
  • The setter of the penalty-property in the ProblemInstances is removed.
  • A CurrentPenalty property is added for setting the adapted penalty value from the relaxation analyzers. These properties are explicitly implemented to "hide" the setter from the API, so that it wont be used unaware of the relaxation mechanics.
  • Hide the CurrentPenaltyParameters for same reasons to avoid setting it unwarily.
  • Added additional infos in the error message off the VRPInstances unit-test.

comment:3 Changed 9 years ago by pfleck

  • Status changed from new to accepted

comment:4 Changed 9 years ago by pfleck

  • Owner changed from pfleck to abeham
  • Status changed from accepted to reviewing

comment:5 Changed 9 years ago by abeham

  • Status changed from reviewing to readytorelease

changes look okay, thanks for fixing this

comment:6 Changed 9 years ago by abeham

  • Resolution set to done
  • Status changed from readytorelease to closed

r12738: merged 12488 to stable

Note: See TracTickets for help on using tickets.