Changeset 14616 for branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.TravelingThief/3.3/TtpOrchestratorNode2.cs
- Timestamp:
- 01/30/17 10:28:58 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Networks.IntegratedOptimization.TravelingThief/3.3/TtpOrchestratorNode2.cs
r14610 r14616 41 41 private TtpOrchestratorNode2(TtpOrchestratorNode2 original, Cloner cloner) : base(original, cloner) { } 42 42 public TtpOrchestratorNode2() : this("TtpOrchestratorNode2") { } 43 public TtpOrchestratorNode2(string name) : base(name) { } 43 public TtpOrchestratorNode2(string name) : base(name) { 44 MetaSolverOrchestrationPort = CreateOrchestrationPort<VariegationProblem>(MetaSolverName); 45 MetaSolverEvaluationPort = CreateEvaluationPort<RealVector>(MetaSolverName, "RealVector", "Quality"); 46 TspSolverOrchestrationPort = CreateOrchestrationPort<TravelingSalesmanProblem>(TspSolverName); 47 KspSolverOrchestrationPort = CreateOrchestrationPort<LootProfitProblem>(KspSolverName); 48 } 44 49 45 50 public override IDeepCloneable Clone(Cloner cloner) { 46 51 return new TtpOrchestratorNode2(this, cloner); 52 } 53 54 public override void Prepare(bool clearRuns = false) { 55 base.Prepare(clearRuns); 56 57 var metaMsg = MetaSolverOrchestrationPort.PrepareMessage(); 58 var msgFlags = OrchestrationMessage.Prepare | OrchestrationMessage.SetEvalHook; 59 if (clearRuns) msgFlags |= OrchestrationMessage.ClearRuns; 60 metaMsg["OrchestrationMessage"] = new EnumValue<OrchestrationMessage>(msgFlags); 61 var problem = new VariegationProblem(); 62 problem.Encoding.Length = TspParameter.Value.Coordinates.Rows * 2; 63 problem.Encoding.Bounds = new DoubleMatrix(new[,] { { -1.0, 1.0 } }); 64 metaMsg["Problem"] = problem; 65 MetaSolverOrchestrationPort.SendMessage(metaMsg); 47 66 } 48 67
Note: See TracChangeset
for help on using the changeset viewer.