Free cookie consent management tool by TermsFeed Policy Generator

source: branches/1894_RoutePlanning/HeuristicLab.Algorithms.GraphRouting/3.3/GraphRoutingAlgorithm.cs @ 16654

Last change on this file since 16654 was 8308, checked in by spimming, 12 years ago

#1894:

  • get neighbors for specific node
  • method to calculate weight between two nodes
  • interface for router
  • Dijkstra algorithm initial commit
  • Utils methods added
File size: 5.1 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Drawing;
4using HeuristicLab.Core;
5using HeuristicLab.Optimization;
6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
7using HeuristicLab.Problems.RoutePlanning;
8
9namespace HeuristicLab.Algorithms.GraphRouting {
10  [Item("Graph Routing Algorithm", "An algorithm to execute graph routing algorithms (Dijkstra, A*, etc.).")]
11  [Creatable("Algorithms")]
12  [StorableClass]
13  public class GraphRoutingAlgorithm : IAlgorithm {
14    #region Problem Properties
15    private IProblem problem;
16    public IProblem Problem {
17      get { return (RoutePlanningProblem)problem; }
18      set { problem = (RoutePlanningProblem)value; }
19    }
20
21    public Type ProblemType {
22      get { return typeof(RoutePlanningProblem); }
23    }
24
25    #endregion
26
27    #region IAlgorithm
28
29    public event EventHandler ProblemChanged;
30
31    public void CollectResultValues(IDictionary<string, Core.IItem> values) {
32      throw new NotImplementedException();
33    }
34
35    public ResultCollection Results {
36      get { throw new NotImplementedException(); }
37    }
38
39    public bool StoreAlgorithmInEachRun {
40      get {
41        throw new NotImplementedException();
42      }
43      set {
44        throw new NotImplementedException();
45      }
46    }
47
48    public event EventHandler StoreAlgorithmInEachRunChanged;
49
50    #endregion
51
52    #region INamedItem Members
53
54    public bool CanChangeDescription {
55      get { throw new NotImplementedException(); }
56    }
57
58    public bool CanChangeName {
59      get { throw new NotImplementedException(); }
60    }
61
62    public string Description {
63      get {
64        throw new NotImplementedException();
65      }
66      set {
67        throw new NotImplementedException();
68      }
69    }
70
71    public event EventHandler DescriptionChanged;
72
73    public string Name {
74      get {
75        throw new NotImplementedException();
76      }
77      set {
78        throw new NotImplementedException();
79      }
80    }
81
82    public event EventHandler NameChanged;
83
84    public event EventHandler<Common.CancelEventArgs<string>> NameChanging;
85
86    #endregion
87
88    #region IItem Members
89
90    public string ItemDescription {
91      get { throw new NotImplementedException(); }
92    }
93
94    public Image ItemImage {
95      get {
96        if (ExecutionState == ExecutionState.Prepared) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePrepared;
97        else if (ExecutionState == ExecutionState.Started) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStarted;
98        else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePaused;
99        else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped;
100        else return ItemAttribute.GetImage(this.GetType());
101      }
102    }
103
104    public event EventHandler ItemImageChanged;
105
106    public string ItemName {
107      get { return ItemAttribute.GetName(this.GetType()); }
108    }
109
110    public Version ItemVersion {
111      get { return ItemAttribute.GetVersion(this.GetType()); }
112    }
113
114    public event EventHandler ToStringChanged;
115
116    #endregion
117
118    #region IDeepCloneable Members
119
120    public Common.IDeepCloneable Clone(Common.Cloner cloner) {
121      throw new NotImplementedException();
122    }
123
124    #endregion
125
126    #region ICloneable Members
127
128    public object Clone() {
129      throw new NotImplementedException();
130    }
131
132    #endregion
133
134    #region IParameterizedItem Members
135
136    public void CollectParameterValues(IDictionary<string, Core.IItem> values) {
137      throw new NotImplementedException();
138    }
139
140    public Core.IKeyedItemCollection<string, Core.IParameter> Parameters {
141      get { throw new NotImplementedException(); }
142    }
143
144    #endregion
145
146    #region IOptimizer Members
147
148    public IEnumerable<IOptimizer> NestedOptimizers {
149      get { throw new NotImplementedException(); }
150    }
151
152    public void Prepare(bool clearRuns) {
153      throw new NotImplementedException();
154    }
155
156    public RunCollection Runs {
157      get { throw new NotImplementedException(); }
158    }
159
160    #endregion
161
162    #region IExecutable Members
163
164    public event EventHandler<Common.EventArgs<Exception>> ExceptionOccurred;
165
166    public Core.ExecutionState ExecutionState {
167      get { throw new NotImplementedException(); }
168    }
169
170    public event EventHandler ExecutionStateChanged;
171
172    public TimeSpan ExecutionTime {
173      get { throw new NotImplementedException(); }
174    }
175
176    public event EventHandler ExecutionTimeChanged;
177
178    public void Pause() {
179      throw new NotImplementedException();
180    }
181
182    public event EventHandler Paused;
183
184    public void Prepare() {
185      throw new NotImplementedException();
186    }
187
188    public event EventHandler Prepared;
189
190    public void Start() {
191      throw new NotImplementedException();
192    }
193
194    public event EventHandler Started;
195
196    public void Stop() {
197      throw new NotImplementedException();
198    }
199
200    public event EventHandler Stopped;
201
202    #endregion
203  }
204}
Note: See TracBrowser for help on using the repository browser.