Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/06/12 04:29:56 (12 years ago)
Author:
abeham
Message:

#1614: restructured architecture to allow for different evaluator with different penalty strategies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignmentArchive.cs

    r7935 r7970  
    131131
    132132    [Storable]
    133     private DoubleValue overbookedCapacityPenalty;
    134     public DoubleValue OverbookedCapacityPenalty {
    135       get { return overbookedCapacityPenalty; }
     133    private DoubleValue expectedRandomQuality;
     134    public DoubleValue ExpectedRandomQuality {
     135      get { return expectedRandomQuality; }
    136136      set {
    137         bool changed = (overbookedCapacityPenalty != value);
    138         overbookedCapacityPenalty = value;
    139         if (changed) OnPropertyChanged("OverbookedCapacityPenalty");
     137        bool changed = (expectedRandomQuality != value);
     138        expectedRandomQuality = value;
     139        if (changed) OnPropertyChanged("ExpectedRandomQuality");
     140      }
     141    }
     142
     143    [Storable]
     144    private IGQAPEvaluator evaluator;
     145    public IGQAPEvaluator Evaluator {
     146      get { return evaluator; }
     147      set {
     148        bool changed = (evaluator != value);
     149        evaluator = value;
     150        if (changed) OnPropertyChanged("Evaluator");
    140151      }
    141152    }
     
    154165      capacities = cloner.Clone(original.capacities);
    155166      transportationCosts = cloner.Clone(original.transportationCosts);
    156       overbookedCapacityPenalty = cloner.Clone(original.overbookedCapacityPenalty);
     167      expectedRandomQuality = cloner.Clone(original.expectedRandomQuality);
     168      evaluator = cloner.Clone(original.evaluator);
    157169    }
    158170    public GQAPAssignmentArchive()
     
    160172      this.solutions = new ItemList<GQAPSolution>();
    161173    }
    162     public GQAPAssignmentArchive(StringArray equipmentNames, StringArray locationNames, DoubleMatrix distances, DoubleMatrix weights, DoubleMatrix installationCosts, DoubleArray demands, DoubleArray capacities, DoubleValue transportationCosts, DoubleValue overbookedCapacityPenalty)
     174    public GQAPAssignmentArchive(StringArray equipmentNames, StringArray locationNames, DoubleMatrix distances, DoubleMatrix weights, DoubleMatrix installationCosts, DoubleArray demands, DoubleArray capacities, DoubleValue transportationCosts, DoubleValue expectedRandomQuality, IGQAPEvaluator evaluator)
    163175      : this() {
    164176      this.distances = distances;
     
    168180      this.capacities = capacities;
    169181      this.transportationCosts = transportationCosts;
    170       this.overbookedCapacityPenalty = overbookedCapacityPenalty;
     182      this.expectedRandomQuality = expectedRandomQuality;
     183      this.evaluator = evaluator;
    171184    }
    172185
Note: See TracChangeset for help on using the changeset viewer.