Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OptimizationNetworks/HeuristicLab.Networks/3.3/KSPTSPControl.cs @ 12966

Last change on this file since 12966 was 12944, checked in by jkarder, 9 years ago

#2205: added code resources

File size: 2.7 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2014 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
22using System.Collections.Generic;
23using System.Drawing;
24using System.Threading;
25using HeuristicLab.Common;
26using HeuristicLab.Core;
27using HeuristicLab.Data;
28using HeuristicLab.Encodings.BinaryVectorEncoding;
29using HeuristicLab.Encodings.PermutationEncoding;
30using HeuristicLab.Networks.Programmable;
31using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
32
33namespace HeuristicLab.Networks {
34  [Item("KSPTSPControl", "A node of an optimization network which connects a KSP and a TSP.")]
35  [StorableClass]
36  public class KSPTSPControl : ProgrammableNode {
37    public static new Image StaticItemImage {
38      get { return HeuristicLab.Common.Resources.VSImageLibrary.RadialChart; }
39    }
40    public object Locker = new object();
41
42    [Storable]
43    public List<BinaryVector> SelectedCities = new List<BinaryVector>();
44    [Storable]
45    public List<Permutation> PredefinedTrip = new List<Permutation>();
46
47    public AutoResetEvent TspWait = new AutoResetEvent(false);
48    public AutoResetEvent KspWait = new AutoResetEvent(false);
49
50    [Storable]
51    public DoubleMatrix Coordinates, Distances;
52    [Storable]
53    public IntArray CityValues, CityWeights;
54    [Storable]
55    public DoubleValue TransportCostFactor;
56    [Storable]
57    public IntValue CityLimit;
58
59    protected override string CodeTemplate {
60      get { return CodeResources.KSPTSPControlCode; }
61    }
62
63    [StorableConstructor]
64    protected KSPTSPControl(bool deserializing) : base(deserializing) { }
65    protected KSPTSPControl(KSPTSPControl original, Cloner cloner) : base(original, cloner) { }
66    public KSPTSPControl() : base("KSPTSPControl") { }
67    public KSPTSPControl(string name) : base(name) { }
68    public KSPTSPControl(string name, string description) : base(name, description) { }
69
70    public override IDeepCloneable Clone(Cloner cloner) {
71      return new KSPTSPControl(this, cloner);
72    }
73  }
74}
Note: See TracBrowser for help on using the repository browser.