Changeset 7412 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs
- Timestamp:
- 01/25/12 18:32:44 (13 years ago)
- Location:
- branches/GeneralizedQAP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP
- Property svn:ignore
-
old new 1 1 *.suo 2 TestResults
-
- Property svn:ignore
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs
r7407 r7412 53 53 get { return (ValueParameter<DoubleMatrix>)Parameters["InstallationCosts"]; } 54 54 } 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 } 55 61 public FixedValueParameter<DoubleValue> TransportationCostsParameter { 56 62 get { return (FixedValueParameter<DoubleValue>)Parameters["TransportationCosts"]; } 57 63 } 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"]; } 63 66 } 64 67 public OptionalValueParameter<IItem> BestKnownSolutionParameter { … … 80 83 set { InstallationCostsParameter.Value = value; } 81 84 } 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 } 82 93 public double TransportationCosts { 83 94 get { return TransportationCostsParameter.Value.Value; } 84 95 set { TransportationCostsParameter.Value.Value = value; } 85 96 } 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; } 93 100 } 94 101 #endregion … … 114 121 Parameters.Add(new ValueParameter<DoubleMatrix>("InstallationCosts", "The installation costs matrix describes the installation costs of installing equipment i at location j", new DoubleMatrix())); 115 122 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))); 116 124 Parameters.Add(new ValueParameter<DoubleArray>("Demands", "The demands vector describes the space requirements of the equipments.", new DoubleArray())); 117 125 Parameters.Add(new ValueParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations.", new DoubleArray())); … … 183 191 #region Helpers 184 192 [StorableHook(HookType.AfterDeserialization)] 185 private void AfterDeserialization Hook() {193 private void AfterDeserialization() { 186 194 AttachEventHandlers(); 187 195 } … … 220 228 } 221 229 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; 222 233 op.WeightsParameter.ActualName = WeightsParameter.Name; 223 234 op.DistancesParameter.ActualName = DistancesParameter.Name; 224 235 op.InstallationCostsParameter.ActualName = InstallationCostsParameter.Name; 225 op.TransportationCostsParameter.ActualName = TransportationCostsParameter.Name;226 236 op.DemandsParameter.ActualName = DemandsParameter.Name; 227 237 op.CapacitiesParameter.ActualName = CapacitiesParameter.Name; 228 op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;229 238 } 230 239 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; 231 247 op.WeightsParameter.ActualName = WeightsParameter.Name; 232 248 op.DistancesParameter.ActualName = DistancesParameter.Name; 233 249 op.InstallationCostsParameter.ActualName = InstallationCostsParameter.Name; 234 op.TransportationCostsParameter.ActualName = TransportationCostsParameter.Name;235 250 op.DemandsParameter.ActualName = DemandsParameter.Name; 236 251 op.CapacitiesParameter.ActualName = CapacitiesParameter.Name; 237 op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;238 op.InfeasibilityParameter.ActualName = Evaluator.InfeasibilityParameter.ActualName;239 252 } 240 253 foreach (var op in Operators.OfType<IGQAPManipulator>()) { 241 254 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; 242 260 } 243 261 foreach (var op in Operators.OfType<IGQAPMoveOperator>()) {
Note: See TracChangeset
for help on using the changeset viewer.