Changeset 8331 for branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.LinearAssignment/3.3/LinearAssignmentProblem.cs
- Timestamp:
- 07/26/12 09:51:13 (12 years ago)
- Location:
- branches/ScatterSearch (trunk integration)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.LinearAssignment/3.3/LinearAssignmentProblem.cs
r8086 r8331 36 36 [Creatable("Problems")] 37 37 [StorableClass] 38 public sealed class LinearAssignmentProblem : SingleObjectiveHeuristicOptimizationProblem<ILAPEvaluator, IPermutationCreator> {38 public sealed class LinearAssignmentProblem : SingleObjectiveHeuristicOptimizationProblem<ILAPEvaluator, IPermutationCreator>, IStorableContent { 39 39 public static readonly string CostsDescription = "The cost matrix that describes the assignment of rows to columns."; 40 public static readonly string RowNamesDescription = "The elements represented by the rows of the costs matrix."; 41 public static readonly string ColumnNamesDescription = "The elements represented by the columns of the costs matrix."; 42 43 public string Filename { get; set; } 40 44 41 45 public override Image ItemImage { … … 52 56 public IValueParameter<Permutation> BestKnownSolutionParameter { 53 57 get { return (IValueParameter<Permutation>)Parameters["BestKnownSolution"]; } 58 } 59 public IValueParameter<StringArray> RowNamesParameter { 60 get { return (IValueParameter<StringArray>)Parameters["RowNames"]; } 61 } 62 public IValueParameter<StringArray> ColumnNamesParameter { 63 get { return (IValueParameter<StringArray>)Parameters["ColumnNames"]; } 54 64 } 55 65 #endregion … … 59 69 get { return CostsParameter.Value; } 60 70 set { CostsParameter.Value = value; } 71 } 72 public StringArray RowNames { 73 get { return RowNamesParameter.Value; } 74 set { RowNamesParameter.Value = value; } 75 } 76 public StringArray ColumnNames { 77 get { return ColumnNamesParameter.Value; } 78 set { ColumnNamesParameter.Value = value; } 61 79 } 62 80 public ItemSet<Permutation> BestKnownSolutions { … … 85 103 Parameters.Add(new OptionalValueParameter<ItemSet<Permutation>>("BestKnownSolutions", "The list of best known solutions which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", null)); 86 104 Parameters.Add(new OptionalValueParameter<Permutation>("BestKnownSolution", "The best known solution which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", null)); 87 105 Parameters.Add(new OptionalValueParameter<StringArray>("RowNames", RowNamesDescription)); 106 Parameters.Add(new OptionalValueParameter<StringArray>("ColumnNames", ColumnNamesDescription)); 107 88 108 ((ValueParameter<DoubleMatrix>)CostsParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false; 109 ((OptionalValueParameter<StringArray>)RowNamesParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false; 110 ((OptionalValueParameter<StringArray>)ColumnNamesParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false; 111 112 RowNames = new StringArray(new string[] { "Eric", "Robert", "Allison" }); 113 ColumnNames = new StringArray(new string[] { "MRI", "Blood test", "Angiogram" }); 114 Costs[0, 0] = 4; Costs[0, 1] = 5; Costs[0, 2] = 3; 115 Costs[1, 0] = 6; Costs[1, 1] = 6; Costs[1, 2] = 4; 116 Costs[2, 0] = 5; Costs[2, 1] = 5; Costs[2, 2] = 1; 89 117 90 118 bestLAPSolutionAnalyzer = new BestLAPSolutionAnalyzer();
Note: See TracChangeset
for help on using the changeset viewer.