Changeset 14601 for branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.TravelingThief/3.3/TtpOrchestratorNode1.cs
- Timestamp:
- 01/24/17 09:31:29 (7 years ago)
- Location:
- branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.TravelingThief
- Files:
-
- 2 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.TravelingThief/3.3/TtpOrchestratorNode1.cs
r14600 r14601 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.Linq; … … 17 38 using HeuristicLab.Problems.TravelingSalesman; 18 39 19 namespace HeuristicLab.Networks.IntegratedOptimization {20 [Item("TtpOrchestratorNode 5", "An abstract base class for an orchestrator node for the TTP.")]40 namespace HeuristicLab.Networks.IntegratedOptimization.TravelingThief { 41 [Item("TtpOrchestratorNode1", "Orchestrator for TTP optimization network version 1.")] 21 42 [StorableClass] 22 public sealed class TtpOrchestratorNode 5: OrchestratorNode {43 public sealed class TtpOrchestratorNode1 : OrchestratorNode { 23 44 #region Constants 24 45 private const string TspParameterName = "TSP"; … … 34 55 #endregion 35 56 36 [Storable]37 57 private ResultCollection tspResults, kspResults; 38 58 … … 96 116 97 117 [StorableConstructor] 98 private TtpOrchestratorNode 5(bool deserializing) : base(deserializing) { }99 private TtpOrchestratorNode 5(TtpOrchestratorNode5original, Cloner cloner) : base(original, cloner) {118 private TtpOrchestratorNode1(bool deserializing) : base(deserializing) { } 119 private TtpOrchestratorNode1(TtpOrchestratorNode1 original, Cloner cloner) : base(original, cloner) { 100 120 RegisterEvents(); 101 121 } 102 public TtpOrchestratorNode 5() : this("TtpOrchestratorNode5") { }103 public TtpOrchestratorNode 5(string name) : base(name) {122 public TtpOrchestratorNode1() : this("TtpOrchestratorNode1") { } 123 public TtpOrchestratorNode1(string name) : base(name) { 104 124 #region Configure Parameters 105 125 Parameters.Add(new ValueParameter<IntValue>(IterationsParameterName, new IntValue(20))); … … 125 145 126 146 public override IDeepCloneable Clone(Cloner cloner) { 127 return new TtpOrchestratorNode 5(this, cloner);147 return new TtpOrchestratorNode1(this, cloner); 128 148 } 129 149 … … 230 250 var bestKspQuality = KnapsackEvaluator.Apply(bestKspSolution, kspCapacity, kspPenalty, kspWeights, kspValues).Quality; 231 251 var loot = new KnapsackSolution(bestKspSolution, bestKspQuality, kspCapacity, kspWeights, kspValues); 232 kspResults.Add(new Result("Best KSP Solution", loot));233 252 234 253 var tspMsg = TspSolverOrchestrationPort.PrepareMessage();
Note: See TracChangeset
for help on using the changeset viewer.