Changeset 7415 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignment.cs
- Timestamp:
- 01/26/12 14:50:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignment.cs
r7319 r7415 33 33 34 34 [Storable] 35 private IntegerVector assignment; 36 public IntegerVector Assignment { 37 get { return assignment; } 38 set { 39 bool changed = (assignment != value); 40 assignment = value; 41 if (changed) OnPropertyChanged("Assignment"); 42 } 43 } 44 45 [Storable] 46 private DoubleValue quality; 47 public DoubleValue Quality { 48 get { return quality; } 49 set { 50 bool changed = (quality != value); 51 quality = value; 52 if (changed) OnPropertyChanged("Quality"); 53 } 54 } 55 56 [Storable] 57 private StringArray equipmentNames; 58 public StringArray EquipmentNames { 59 get { return equipmentNames; } 60 set { 61 bool changed = (equipmentNames != value); 62 equipmentNames = value; 63 if (changed) OnPropertyChanged("EquipmentNames"); 64 } 65 } 66 67 [Storable] 68 private StringArray locationNames; 69 public StringArray LocationNames { 70 get { return locationNames; } 71 set { 72 bool changed = (locationNames != value); 73 locationNames = value; 74 if (changed) OnPropertyChanged("LocationNames"); 75 } 76 } 77 78 [Storable] 35 79 private DoubleMatrix distances; 36 80 public DoubleMatrix Distances { … … 55 99 56 100 [Storable] 57 private IntegerVector assignment; 58 public IntegerVector Assignment { 59 get { return assignment; } 60 set { 61 bool changed = (assignment != value); 62 assignment = value; 63 if (changed) OnPropertyChanged("Assignment"); 64 } 65 } 66 67 [Storable] 68 private DoubleValue quality; 69 public DoubleValue Quality { 70 get { return quality; } 71 set { 72 bool changed = (quality != value); 73 quality = value; 74 if (changed) OnPropertyChanged("Quality"); 75 } 76 } 77 78 [Storable] 79 private StringArray equipmentNames; 80 public StringArray EquipmentNames { 81 get { return equipmentNames; } 82 set { 83 bool changed = (equipmentNames != value); 84 equipmentNames = value; 85 if (changed) OnPropertyChanged("EquipmentNames"); 86 } 87 } 88 89 [Storable] 90 private StringArray locationNames; 91 public StringArray LocationNames { 92 get { return locationNames; } 93 set { 94 bool changed = (locationNames != value); 95 locationNames = value; 96 if (changed) OnPropertyChanged("LocationNames"); 101 private DoubleMatrix installationCosts; 102 public DoubleMatrix InstallationCosts { 103 get { return installationCosts; } 104 set { 105 bool changed = (installationCosts != value); 106 installationCosts = value; 107 if (changed) OnPropertyChanged("InstallationCosts"); 108 } 109 } 110 111 [Storable] 112 private DoubleArray demands; 113 public DoubleArray Demands { 114 get { return demands; } 115 set { 116 bool changed = (demands != value); 117 demands = value; 118 if (changed) OnPropertyChanged("Demands"); 119 } 120 } 121 122 [Storable] 123 private DoubleArray capacities; 124 public DoubleArray Capacities { 125 get { return capacities; } 126 set { 127 bool changed = (capacities != value); 128 capacities = value; 129 if (changed) OnPropertyChanged("Capacities"); 130 } 131 } 132 133 [Storable] 134 private DoubleValue transportationCosts; 135 public DoubleValue TransportationCosts { 136 get { return transportationCosts; } 137 set { 138 bool changed = (transportationCosts != value); 139 transportationCosts = value; 140 if (changed) OnPropertyChanged("TransportationCosts"); 141 } 142 } 143 144 [Storable] 145 private DoubleValue overbookedCapacityPenalty; 146 public DoubleValue OverbookedCapacityPenalty { 147 get { return overbookedCapacityPenalty; } 148 set { 149 bool changed = (overbookedCapacityPenalty != value); 150 overbookedCapacityPenalty = value; 151 if (changed) OnPropertyChanged("OverbookedCapacityPenalty"); 152 } 153 } 154 155 [Storable] 156 private DoubleValue flowDistanceQuality; 157 public DoubleValue FlowDistanceQuality { 158 get { return flowDistanceQuality; } 159 set { 160 bool changed = (flowDistanceQuality != value); 161 flowDistanceQuality = value; 162 if (changed) OnPropertyChanged("FlowDistanceQuality"); 163 } 164 } 165 166 [Storable] 167 private DoubleValue installationQuality; 168 public DoubleValue InstallationQuality { 169 get { return installationQuality; } 170 set { 171 bool changed = (installationQuality != value); 172 installationQuality = value; 173 if (changed) OnPropertyChanged("InstallationQuality"); 174 } 175 } 176 177 [Storable] 178 private DoubleValue overbookedCapacity; 179 public DoubleValue OverbookedCapacity { 180 get { return overbookedCapacity; } 181 set { 182 bool changed = (overbookedCapacity != value); 183 overbookedCapacity = value; 184 if (changed) OnPropertyChanged("OverbookedCapacity"); 97 185 } 98 186 } … … 102 190 private GQAPAssignment(GQAPAssignment original, Cloner cloner) 103 191 : base(original, cloner) { 104 distances = cloner.Clone(original.distances);105 weights = cloner.Clone(original.weights);106 192 assignment = cloner.Clone(original.assignment); 107 193 quality = cloner.Clone(original.quality); 108 194 equipmentNames = cloner.Clone(original.equipmentNames); 109 195 locationNames = cloner.Clone(original.locationNames); 110 } 111 public GQAPAssignment(DoubleMatrix weights, IntegerVector assignment) { 112 this.weights = weights; 196 distances = cloner.Clone(original.distances); 197 weights = cloner.Clone(original.weights); 198 installationCosts = cloner.Clone(original.installationCosts); 199 demands = cloner.Clone(original.demands); 200 capacities = cloner.Clone(original.capacities); 201 transportationCosts = cloner.Clone(original.transportationCosts); 202 overbookedCapacityPenalty = cloner.Clone(original.overbookedCapacityPenalty); 203 flowDistanceQuality = cloner.Clone(original.flowDistanceQuality); 204 installationQuality = cloner.Clone(original.installationQuality); 205 overbookedCapacity = cloner.Clone(original.overbookedCapacity); 206 } 207 public GQAPAssignment(IntegerVector assignment, DoubleValue quality) 208 : base() { 113 209 this.assignment = assignment; 114 }115 public GQAPAssignment(DoubleMatrix weights, IntegerVector assignment, DoubleValue quality)116 : this(weights, assignment) {117 210 this.quality = quality; 118 211 } 119 public GQAPAssignment( DoubleMatrix weights,IntegerVector assignment, DoubleValue quality, StringArray equipmentNames, StringArray locationNames)120 : this( weights,assignment, quality) {212 public GQAPAssignment(IntegerVector assignment, DoubleValue quality, StringArray equipmentNames, StringArray locationNames) 213 : this(assignment, quality) { 121 214 this.equipmentNames = equipmentNames; 122 215 this.locationNames = locationNames; 216 } 217 public GQAPAssignment(IntegerVector assignment, DoubleValue quality, StringArray equipmentNames, StringArray locationNames, 218 DoubleMatrix distances, DoubleMatrix weights, DoubleMatrix installationCosts, DoubleArray demands, DoubleArray capacities, 219 DoubleValue transportationCosts, DoubleValue overbookedCapacityPenalty, DoubleValue flowDistanceQuality, 220 DoubleValue installationQuality, DoubleValue overbookedCapacity) 221 : this(assignment, quality, equipmentNames, locationNames) { 222 this.distances = distances; 223 this.weights = weights; 224 this.installationCosts = installationCosts; 225 this.demands = demands; 226 this.capacities = capacities; 227 this.transportationCosts = transportationCosts; 228 this.overbookedCapacityPenalty = overbookedCapacityPenalty; 229 this.flowDistanceQuality = flowDistanceQuality; 230 this.installationQuality = installationQuality; 231 this.overbookedCapacity = overbookedCapacity; 123 232 } 124 233
Note: See TracChangeset
for help on using the changeset viewer.