Changeset 8093 for trunk/sources/HeuristicLab.Problems.LinearAssignment/3.3/LinearAssignmentProblem.cs
- Timestamp:
- 06/24/12 17:57:51 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.LinearAssignment/3.3/LinearAssignmentProblem.cs
r8022 r8093 38 38 public sealed class LinearAssignmentProblem : SingleObjectiveHeuristicOptimizationProblem<ILAPEvaluator, IPermutationCreator> { 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."; 40 42 41 43 public override Image ItemImage { … … 52 54 public IValueParameter<Permutation> BestKnownSolutionParameter { 53 55 get { return (IValueParameter<Permutation>)Parameters["BestKnownSolution"]; } 56 } 57 public IValueParameter<StringArray> RowNamesParameter { 58 get { return (IValueParameter<StringArray>)Parameters["RowNames"]; } 59 } 60 public IValueParameter<StringArray> ColumnNamesParameter { 61 get { return (IValueParameter<StringArray>)Parameters["ColumnNames"]; } 54 62 } 55 63 #endregion … … 59 67 get { return CostsParameter.Value; } 60 68 set { CostsParameter.Value = value; } 69 } 70 public StringArray RowNames { 71 get { return RowNamesParameter.Value; } 72 set { RowNamesParameter.Value = value; } 73 } 74 public StringArray ColumnNames { 75 get { return ColumnNamesParameter.Value; } 76 set { ColumnNamesParameter.Value = value; } 61 77 } 62 78 public ItemSet<Permutation> BestKnownSolutions { … … 85 101 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 102 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 103 Parameters.Add(new OptionalValueParameter<StringArray>("RowNames", RowNamesDescription)); 104 Parameters.Add(new OptionalValueParameter<StringArray>("ColumnNames", ColumnNamesDescription)); 105 88 106 ((ValueParameter<DoubleMatrix>)CostsParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false; 107 ((OptionalValueParameter<StringArray>)RowNamesParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false; 108 ((OptionalValueParameter<StringArray>)ColumnNamesParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false; 109 110 RowNames = new StringArray(new string[] { "Human", "Von Neumann machine", "Quantum computer" }); 111 ColumnNames = new StringArray(new string[] { "Find a person's e-mail address", "Compute first 1000 decimals of Pi", "Factorize large integers" }); 112 Costs[0, 0] = 1; Costs[0, 1] = 10; Costs[0, 2] = 100; 113 Costs[1, 0] = 10; Costs[1, 1] = 1; Costs[1, 2] = 100; 114 Costs[2, 0] = 100; Costs[2, 1] = 10; Costs[2, 1] = 1; 89 115 90 116 bestLAPSolutionAnalyzer = new BestLAPSolutionAnalyzer();
Note: See TracChangeset
for help on using the changeset viewer.