Changeset 8206 for branches/GP-MoveOperators/HeuristicLab.Problems.LinearAssignment/3.3/LinearAssignmentProblem.cs
- Timestamp:
- 07/03/12 16:46:35 (12 years ago)
- Location:
- branches/GP-MoveOperators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP-MoveOperators
- Property svn:mergeinfo changed
/trunk/sources merged: 8084,8088-8090,8092-8100,8102-8113,8115,8117-8132,8134-8146,8148-8156,8158-8160,8163-8170,8173-8176,8178-8190,8192-8205
- Property svn:mergeinfo changed
-
branches/GP-MoveOperators/HeuristicLab.Problems.LinearAssignment/3.3/LinearAssignmentProblem.cs
r8022 r8206 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.