Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6651


Ignore:
Timestamp:
08/11/11 06:41:19 (13 years ago)
Author:
abeham
Message:

#1614

  • syncing
Location:
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3
Files:
2 edited

Legend:

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

    r6650 r6651  
    9494      DoubleArray demands = DemandsParameter.ActualValue;
    9595      DoubleArray capacities = (DoubleArray)CapacitiesParameter.ActualValue.Clone();
     96      double penalty = PenaltyParameter.ActualValue.Value;
    9697      double quality = 0;
    9798      double infeasibility = 0;
     
    109110
    110111      InfeasibilityParameter.ActualValue = new DoubleValue(infeasibility);
    111       QualityParameter.ActualValue = new DoubleValue(quality);
     112      QualityParameter.ActualValue = new DoubleValue(quality + penalty * infeasibility);
    112113      return base.Apply();
    113114    }
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs

    r6650 r6651  
    3030
    3131namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
    32   [Item("Generalized Quadratic Assignment Problem", "")]
     32  [Item("Generalized Quadratic Assignment Problem", "The Generalized Quadratic Assignment Problem (GQAP) is a generalization of the QAP in that it allows to assign multiple facilities (here called equipment) to a single location. The problem is described in Lee, C.G., and Ma, Z. 2003. The Generalized Quadratic Assignment Problem. Technical Report M5S 3G8, University of Toronto, Canada.")]
    3333  [Creatable("Problems")]
    3434  [StorableClass]
     
    7676      set { InstallationCostsParameter.Value = value; }
    7777    }
     78    public DoubleValue TransportationCosts {
     79      get { return TransportationCostsParameter.Value; }
     80      set { TransportationCostsParameter.Value = value; }
     81    }
    7882    public DoubleArray Demands {
    7983      get { return DemandsParameter.Value; }
     
    9195    private GeneralizedQuadraticAssignmentProblem(GeneralizedQuadraticAssignmentProblem original, Cloner cloner)
    9296      : base(original, cloner) {
    93       // TODO: Clone your private fields here
    9497      AttachEventHandlers();
    9598    }
    9699    public GeneralizedQuadraticAssignmentProblem()
    97100      : base(new GQAPEvaluator(), new UniformRandomIntegerVectorCreator()) {
    98       // TODO: Create a new instance of evaluator and solution creator
    99 
    100101      Parameters.Add(new ValueParameter<DoubleMatrix>("Weights", "The weights matrix describes the flows between the equipments.", new DoubleMatrix()));
    101102      Parameters.Add(new ValueParameter<DoubleMatrix>("Distances", "The distances matrix describes the distances between the locations at which the equipment can be installed.", new DoubleMatrix()));
     
    106107      Parameters.Add(new OptionalValueParameter<IItem>("BestKnownSolution", "The best known solution (if available)", null));
    107108
     109      Wei
    108110
    109111      ParameterizeSolutionCreator();
Note: See TracChangeset for help on using the changeset viewer.