#region License Information /* HeuristicLab * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) * * This file is part of HeuristicLab. * * HeuristicLab is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * HeuristicLab is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HeuristicLab. If not, see . */ #endregion using System.Collections.Generic; using System.Drawing; using System.Threading; using HeuristicLab.Common; using HeuristicLab.Core; using HeuristicLab.Data; using HeuristicLab.Encodings.BinaryVectorEncoding; using HeuristicLab.Encodings.PermutationEncoding; using HeuristicLab.Networks.Programmable; using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; namespace HeuristicLab.Networks { [Item("KSPTSPControl", "A node of an optimization network which connects a KSP and a TSP.")] [StorableClass] public class KSPTSPControl : ProgrammableNode { public static new Image StaticItemImage { get { return HeuristicLab.Common.Resources.VSImageLibrary.RadialChart; } } public object Locker = new object(); [Storable] public List SelectedCities = new List(); [Storable] public List PredefinedTrip = new List(); public AutoResetEvent TspWait = new AutoResetEvent(false); public AutoResetEvent KspWait = new AutoResetEvent(false); [Storable] public DoubleMatrix Coordinates, Distances; [Storable] public IntArray CityValues, CityWeights; [Storable] public DoubleValue TransportCostFactor; [Storable] public IntValue CityLimit; protected override string CodeTemplate { get { return CodeResources.KSPTSPControlCode; } } [StorableConstructor] protected KSPTSPControl(bool deserializing) : base(deserializing) { } protected KSPTSPControl(KSPTSPControl original, Cloner cloner) : base(original, cloner) { } public KSPTSPControl() : base("KSPTSPControl") { } public KSPTSPControl(string name) : base(name) { } public KSPTSPControl(string name, string description) : base(name, description) { } public override IDeepCloneable Clone(Cloner cloner) { return new KSPTSPControl(this, cloner); } } }