- Timestamp:
- 11/25/14 03:26:00 (10 years ago)
- Location:
- branches/OptimizationNetworks
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks ¶
- Property svn:mergeinfo changed
-
TabularUnified branches/OptimizationNetworks/HeuristicLab.Problems.LinearAssignment/3.3/Analyzers/BestLAPSolutionAnalyzer.cs ¶
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
TabularUnified branches/OptimizationNetworks/HeuristicLab.Problems.LinearAssignment/3.3/HungarianAlgorithm.cs ¶
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
TabularUnified branches/OptimizationNetworks/HeuristicLab.Problems.LinearAssignment/3.3/Interfaces/ILAPEvaluator.cs ¶
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
TabularUnified branches/OptimizationNetworks/HeuristicLab.Problems.LinearAssignment/3.3/LAPAssignment.cs ¶
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
TabularUnified branches/OptimizationNetworks/HeuristicLab.Problems.LinearAssignment/3.3/LAPEvaluator.cs ¶
r10291 r11576 2 2 #region License Information 3 3 /* HeuristicLab 4 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)4 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 5 * 6 6 * This file is part of HeuristicLab. -
TabularUnified branches/OptimizationNetworks/HeuristicLab.Problems.LinearAssignment/3.3/LinearAssignmentProblem.cs ¶
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 33 33 34 34 namespace HeuristicLab.Problems.LinearAssignment { 35 [Item("Linear AssignmentProblem", "In the linear assignment problem (LAP) an assignment of workers to jobs has to be found such that each worker is assigned to exactly one job, each job is assigned to exactly one worker and the sum of the resulting costs needs to be minimal.")]35 [Item("Linear Assignment Problem", "In the linear assignment problem (LAP) an assignment of workers to jobs has to be found such that each worker is assigned to exactly one job, each job is assigned to exactly one worker and the sum of the resulting costs is minimal (or maximal).")] 36 36 [Creatable("Problems")] 37 37 [StorableClass] … … 153 153 } 154 154 } 155 private void Costs_Reset(object sender, EventArgs e) { 156 Parameterize(); 157 } 155 158 private void SolutionCreator_PermutationParameter_ActualNameChanged(object sender, EventArgs e) { 156 159 Parameterize(); … … 167 170 Costs.RowsChanged += new EventHandler(Costs_RowsChanged); 168 171 Costs.ColumnsChanged += new EventHandler(Costs_ColumnsChanged); 172 Costs.Reset += new EventHandler(Costs_Reset); 169 173 SolutionCreator.PermutationParameter.ActualNameChanged += new EventHandler(SolutionCreator_PermutationParameter_ActualNameChanged); 170 174 } … … 178 182 private void Parameterize() { 179 183 SolutionCreator.LengthParameter.Value = new IntValue(Costs.Rows); 180 SolutionCreator.LengthParameter.Hidden = false; 184 SolutionCreator.LengthParameter.Hidden = true; 185 SolutionCreator.PermutationTypeParameter.Value = new PermutationType(PermutationTypes.Absolute); 186 SolutionCreator.PermutationTypeParameter.Hidden = true; 181 187 Evaluator.CostsParameter.ActualName = CostsParameter.Name; 182 188 Evaluator.CostsParameter.Hidden = true; -
TabularUnified branches/OptimizationNetworks/HeuristicLab.Problems.LinearAssignment/3.3/LinearAssignmentProblemSolver.cs ¶
r9456 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 34 34 private const int UNASSIGNED = -1; 35 35 36 public IValueLookupParameter<BoolValue> MaximizationParameter { 37 get { return (IValueLookupParameter<BoolValue>)Parameters["Maximization"]; } 38 } 36 39 public ILookupParameter<DoubleMatrix> CostsParameter { 37 40 get { return (ILookupParameter<DoubleMatrix>)Parameters["Costs"]; } … … 49 52 public LinearAssignmentProblemSolver() 50 53 : base() { 54 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "Whether the costs should be maximized or minimized.")); 51 55 Parameters.Add(new LookupParameter<DoubleMatrix>("Costs", LinearAssignmentProblem.CostsDescription)); 52 56 Parameters.Add(new LookupParameter<Permutation>("Assignment", "The assignment solution to create.")); … … 58 62 } 59 63 64 [StorableHook(HookType.AfterDeserialization)] 65 private void AfterDeserialization() { 66 // BackwardsCompatibility3.3 67 #region Backwards compatible code, remove with 3.4 68 if (!Parameters.ContainsKey("Maximization")) 69 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "Whether the costs should be maximized or minimized.")); 70 #endregion 71 } 72 60 73 public override IOperation Apply() { 61 74 var costs = CostsParameter.ActualValue; 75 var maximization = MaximizationParameter.ActualValue.Value; 76 if (maximization) { 77 costs = (DoubleMatrix)costs.Clone(); 78 for (int i = 0; i < costs.Rows; i++) 79 for (int j = 0; j < costs.Rows; j++) 80 costs[i, j] = -costs[i, j]; 81 } 62 82 double quality; 63 83 var solution = Solve(costs, out quality); 64 84 65 85 AssignmentParameter.ActualValue = new Permutation(PermutationTypes.Absolute, solution); 86 if (maximization) quality = -quality; 66 87 QualityParameter.ActualValue = new DoubleValue(quality); 67 88 -
TabularUnified branches/OptimizationNetworks/HeuristicLab.Problems.LinearAssignment/3.3/Plugin.cs.frame ¶
r10037 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 24 24 namespace HeuristicLab.Problems.LinearAssignment { 25 [Plugin("HeuristicLab.Problems.LinearAssignment", "3.3. 9.$WCREV$")]25 [Plugin("HeuristicLab.Problems.LinearAssignment", "3.3.10.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Problems.LinearAssignment-3.3.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Analysis", "3.3")] -
TabularUnified branches/OptimizationNetworks/HeuristicLab.Problems.LinearAssignment/3.3/Properties/AssemblyInfo.cs.frame ¶
r10037 r11576 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("HEAL")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 3HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2014 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] … … 55 55 // [assembly: AssemblyVersion("1.0.*")] 56 56 [assembly: AssemblyVersion("3.3.0.0")] 57 [assembly: AssemblyFileVersion("3.3. 9.$WCREV$")]57 [assembly: AssemblyFileVersion("3.3.10.$WCREV$")]
Note: See TracChangeset
for help on using the changeset viewer.