Changeset 6651 for branches/GeneralizedQAP
- Timestamp:
- 08/11/11 06:41:19 (13 years ago)
- 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 94 94 DoubleArray demands = DemandsParameter.ActualValue; 95 95 DoubleArray capacities = (DoubleArray)CapacitiesParameter.ActualValue.Clone(); 96 double penalty = PenaltyParameter.ActualValue.Value; 96 97 double quality = 0; 97 98 double infeasibility = 0; … … 109 110 110 111 InfeasibilityParameter.ActualValue = new DoubleValue(infeasibility); 111 QualityParameter.ActualValue = new DoubleValue(quality );112 QualityParameter.ActualValue = new DoubleValue(quality + penalty * infeasibility); 112 113 return base.Apply(); 113 114 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs
r6650 r6651 30 30 31 31 namespace 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.")] 33 33 [Creatable("Problems")] 34 34 [StorableClass] … … 76 76 set { InstallationCostsParameter.Value = value; } 77 77 } 78 public DoubleValue TransportationCosts { 79 get { return TransportationCostsParameter.Value; } 80 set { TransportationCostsParameter.Value = value; } 81 } 78 82 public DoubleArray Demands { 79 83 get { return DemandsParameter.Value; } … … 91 95 private GeneralizedQuadraticAssignmentProblem(GeneralizedQuadraticAssignmentProblem original, Cloner cloner) 92 96 : base(original, cloner) { 93 // TODO: Clone your private fields here94 97 AttachEventHandlers(); 95 98 } 96 99 public GeneralizedQuadraticAssignmentProblem() 97 100 : base(new GQAPEvaluator(), new UniformRandomIntegerVectorCreator()) { 98 // TODO: Create a new instance of evaluator and solution creator99 100 101 Parameters.Add(new ValueParameter<DoubleMatrix>("Weights", "The weights matrix describes the flows between the equipments.", new DoubleMatrix())); 101 102 Parameters.Add(new ValueParameter<DoubleMatrix>("Distances", "The distances matrix describes the distances between the locations at which the equipment can be installed.", new DoubleMatrix())); … … 106 107 Parameters.Add(new OptionalValueParameter<IItem>("BestKnownSolution", "The best known solution (if available)", null)); 107 108 109 Wei 108 110 109 111 ParameterizeSolutionCreator();
Note: See TracChangeset
for help on using the changeset viewer.