Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/25/12 18:32:44 (12 years ago)
Author:
abeham
Message:

#1614: worked on GQAP and GRASP+PR

Location:
branches/GeneralizedQAP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP

    • Property svn:ignore
      •  

        old new  
        11*.suo
         2TestResults
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs

    r7407 r7412  
    5353      get { return (ValueParameter<DoubleMatrix>)Parameters["InstallationCosts"]; }
    5454    }
     55    public ValueParameter<DoubleArray> DemandsParameter {
     56      get { return (ValueParameter<DoubleArray>)Parameters["Demands"]; }
     57    }
     58    public ValueParameter<DoubleArray> CapacitiesParameter {
     59      get { return (ValueParameter<DoubleArray>)Parameters["Capacities"]; }
     60    }
    5561    public FixedValueParameter<DoubleValue> TransportationCostsParameter {
    5662      get { return (FixedValueParameter<DoubleValue>)Parameters["TransportationCosts"]; }
    5763    }
    58     public ValueParameter<DoubleArray> DemandsParameter {
    59       get { return (ValueParameter<DoubleArray>)Parameters["Demands"]; }
    60     }
    61     public ValueParameter<DoubleArray> CapacitiesParameter {
    62       get { return (ValueParameter<DoubleArray>)Parameters["Capacities"]; }
     64    public FixedValueParameter<DoubleValue> OverbookedCapacityPenaltyParameter {
     65      get { return (FixedValueParameter<DoubleValue>)Parameters["OverbookedCapacityPenalty"]; }
    6366    }
    6467    public OptionalValueParameter<IItem> BestKnownSolutionParameter {
     
    8083      set { InstallationCostsParameter.Value = value; }
    8184    }
     85    public DoubleArray Demands {
     86      get { return DemandsParameter.Value; }
     87      set { DemandsParameter.Value = value; }
     88    }
     89    public DoubleArray Capacities {
     90      get { return CapacitiesParameter.Value; }
     91      set { CapacitiesParameter.Value = value; }
     92    }
    8293    public double TransportationCosts {
    8394      get { return TransportationCostsParameter.Value.Value; }
    8495      set { TransportationCostsParameter.Value.Value = value; }
    8596    }
    86     public DoubleArray Demands {
    87       get { return DemandsParameter.Value; }
    88       set { DemandsParameter.Value = value; }
    89     }
    90     public DoubleArray Capacities {
    91       get { return CapacitiesParameter.Value; }
    92       set { CapacitiesParameter.Value = value; }
     97    public double OverbookedCapacityPenalty {
     98      get { return TransportationCostsParameter.Value.Value; }
     99      set { TransportationCostsParameter.Value.Value = value; }
    93100    }
    94101    #endregion
     
    114121      Parameters.Add(new ValueParameter<DoubleMatrix>("InstallationCosts", "The installation costs matrix describes the installation costs of installing equipment i at location j", new DoubleMatrix()));
    115122      Parameters.Add(new FixedValueParameter<DoubleValue>("TransportationCosts", "The transportation cost represents the flow-unit per distance-unit cost factor. This value can also be set to 1 if these costs are factored into the weights matrix already.", new DoubleValue(1)));
     123      Parameters.Add(new FixedValueParameter<DoubleValue>("OverbookedCapacityPenalty", "The multiplier for the constraint violation when added to the quality.", new DoubleValue(1000)));
    116124      Parameters.Add(new ValueParameter<DoubleArray>("Demands", "The demands vector describes the space requirements of the equipments.", new DoubleArray()));
    117125      Parameters.Add(new ValueParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations.", new DoubleArray()));
     
    183191    #region Helpers
    184192    [StorableHook(HookType.AfterDeserialization)]
    185     private void AfterDeserializationHook() {
     193    private void AfterDeserialization() {
    186194      AttachEventHandlers();
    187195    }
     
    220228      }
    221229      foreach (var op in Operators.OfType<IGQAPEvaluationOperator>()) {
     230        op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
     231        op.TransportationCostsParameter.ActualName = TransportationCostsParameter.Name;
     232        op.OverbookedCapacityPenaltyParameter.ActualName = OverbookedCapacityPenaltyParameter.Name;
    222233        op.WeightsParameter.ActualName = WeightsParameter.Name;
    223234        op.DistancesParameter.ActualName = DistancesParameter.Name;
    224235        op.InstallationCostsParameter.ActualName = InstallationCostsParameter.Name;
    225         op.TransportationCostsParameter.ActualName = TransportationCostsParameter.Name;
    226236        op.DemandsParameter.ActualName = DemandsParameter.Name;
    227237        op.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
    228         op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    229238      }
    230239      foreach (var op in Operators.OfType<IGQAPLocalImprovementOperator>()) {
     240        op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
     241        op.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
     242        op.FlowDistanceQualityParameter.ActualName = Evaluator.FlowDistanceQualityParameter.ActualName;
     243        op.InstallationQualityParameter.ActualName = Evaluator.InstallationQualityParameter.ActualName;
     244        op.OverbookedCapacityParameter.ActualName = Evaluator.OverbookedCapacityParameter.ActualName;
     245        op.TransportationCostsParameter.ActualName = TransportationCostsParameter.Name;
     246        op.OverbookedCapacityPenaltyParameter.ActualName = OverbookedCapacityPenaltyParameter.Name;
    231247        op.WeightsParameter.ActualName = WeightsParameter.Name;
    232248        op.DistancesParameter.ActualName = DistancesParameter.Name;
    233249        op.InstallationCostsParameter.ActualName = InstallationCostsParameter.Name;
    234         op.TransportationCostsParameter.ActualName = TransportationCostsParameter.Name;
    235250        op.DemandsParameter.ActualName = DemandsParameter.Name;
    236251        op.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
    237         op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    238         op.InfeasibilityParameter.ActualName = Evaluator.InfeasibilityParameter.ActualName;
    239252      }
    240253      foreach (var op in Operators.OfType<IGQAPManipulator>()) {
    241254        op.IntegerVectorParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
     255      }
     256      foreach (var op in Operators.OfType<IGQAPMerger>()) {
     257        op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
     258        op.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
     259        op.MaximizationParameter.ActualName = MaximizationParameter.Name;
    242260      }
    243261      foreach (var op in Operators.OfType<IGQAPMoveOperator>()) {
Note: See TracChangeset for help on using the changeset viewer.