- Timestamp:
- 11/24/14 03:12:49 (10 years ago)
- Location:
- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IUserDefinedNetwork.cs
r11564 r11565 24 24 new PortCollection Ports { get; } 25 25 new NodeCollection Nodes { get; } 26 27 void Initialize(); 26 28 } 27 29 } -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IUserDefinedNode.cs
r11564 r11565 23 23 public interface IUserDefinedNode : IProgrammableNode { 24 24 new PortCollection Ports { get; } 25 26 void Initialize(); 25 27 } 26 28 } -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/ProgrammableNetwork.cs
r11564 r11565 103 103 } 104 104 105 public override void Initialize() { 106 base.Initialize(); 107 Nodes.Clear(); 108 } 109 105 110 #region Events 106 111 public override void RegisterEvents() { -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/ProgrammableNetworkItem.cs
r11564 r11565 100 100 get { return ReadCodeTemplate("HeuristicLab.Optimization.Networks.Core.Networks.ProgrammableNetworkItemTemplate.cs"); } 101 101 } 102 103 102 [Storable] 104 103 private string code; … … 106 105 get { return code; } 107 106 set { 107 if (!CanChangeCode) throw new NotSupportedException("Code cannot be changed."); 108 108 if (value != code) { 109 109 code = value; … … 112 112 } 113 113 } 114 115 114 private CompilerErrorCollection compileErrors; 116 115 public CompilerErrorCollection CompileErrors { … … 120 119 OnCompileErrorsChanged(); 121 120 } 121 } 122 public virtual bool CanChangeCode { 123 get { return false; } 122 124 } 123 125 -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/ProgrammableNode.cs
r11564 r11565 119 119 } 120 120 121 public override void Initialize() { 122 base.Initialize(); 123 Ports.Clear(); 124 } 125 121 126 protected virtual void MessagePort_MessageReceived(object sender, EventArgs<IMessage, CancellationToken> e) { } 122 127 -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/UserDefinedNetwork.cs
r11564 r11565 34 34 get { return base.Nodes; } 35 35 } 36 public override bool CanChangeCode { 37 get { return true; } 38 } 36 39 37 40 [StorableConstructor] … … 45 48 return new UserDefinedNetwork(this, cloner); 46 49 } 50 51 public void Initialize() { 52 CompiledNetworkItem.DeregisterEvents(); 53 CompiledNetworkItem.Initialize(); 54 CompiledNetworkItem.RegisterEvents(); 55 } 47 56 } 48 57 } -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/UserDefinedNode.cs
r11564 r11565 30 30 get { return base.Ports; } 31 31 } 32 public override bool CanChangeCode { 33 get { return true; } 34 } 32 35 33 36 [StorableConstructor] … … 41 44 return new UserDefinedNode(this, cloner); 42 45 } 46 47 public void Initialize() { 48 CompiledNetworkItem.DeregisterEvents(); 49 CompiledNetworkItem.Initialize(); 50 CompiledNetworkItem.RegisterEvents(); 51 } 43 52 } 44 53 } -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core/IProgrammableItem.cs
r11564 r11565 29 29 string Code { get; set; } 30 30 CompilerErrorCollection CompileErrors { get; } 31 bool CanChangeCode { get; } 31 32 32 33 void Compile(); -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/HeuristicLab.Optimization.Networks-3.3.csproj
r11564 r11565 153 153 </ItemGroup> 154 154 <ItemGroup> 155 <ProjectReference Include="..\..\HeuristicLab.Algorithms.GeneticAlgorithm\3.3\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.csproj">156 <Project>{a51da44f-cb35-4f6f-99f5-2a2e904ab93b}</Project>157 <Name>HeuristicLab.Algorithms.GeneticAlgorithm-3.3</Name>158 <Private>False</Private>159 </ProjectReference>160 155 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj"> 161 156 <Project>{958b43bc-cc5c-4fa2-8628-2b3b01d890b6}</Project> … … 183 178 <Private>False</Private> 184 179 </ProjectReference> 185 <ProjectReference Include="..\..\HeuristicLab.Encodings.BinaryVectorEncoding\3.3\HeuristicLab.Encodings.BinaryVectorEncoding-3.3.csproj">186 <Project>{66d249c3-a01d-42a8-82a2-919bc8ec3d83}</Project>187 <Name>HeuristicLab.Encodings.BinaryVectorEncoding-3.3</Name>188 <Private>False</Private>189 </ProjectReference>190 <ProjectReference Include="..\..\HeuristicLab.Encodings.PermutationEncoding\3.3\HeuristicLab.Encodings.PermutationEncoding-3.3.csproj">191 <Project>{dbecb8b0-b166-4133-baf1-ed67c3fd7fca}</Project>192 <Name>HeuristicLab.Encodings.PermutationEncoding-3.3</Name>193 <Private>False</Private>194 </ProjectReference>195 180 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj"> 196 181 <Project>{23da7ff4-d5b8-41b6-aa96-f0561d24f3ee}</Project> … … 216 201 <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project> 217 202 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 218 <Private>False</Private>219 </ProjectReference>220 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">221 <Project>{3540e29e-4793-49e7-8ee2-fea7f61c3994}</Project>222 <Name>HeuristicLab.Problems.Instances-3.3</Name>223 <Private>False</Private>224 </ProjectReference>225 <ProjectReference Include="..\..\HeuristicLab.Problems.Knapsack\3.3\HeuristicLab.Problems.Knapsack-3.3.csproj">226 <Project>{e10f395f-c8a6-48ad-b470-9aa7a1f43809}</Project>227 <Name>HeuristicLab.Problems.Knapsack-3.3</Name>228 <Private>False</Private>229 </ProjectReference>230 <ProjectReference Include="..\..\HeuristicLab.Problems.TravelingSalesman\3.3\HeuristicLab.Problems.TravelingSalesman-3.3.csproj">231 <Project>{d767c38d-8014-46b0-9a32-03a3aecce34a}</Project>232 <Name>HeuristicLab.Problems.TravelingSalesman-3.3</Name>233 203 <Private>False</Private> 234 204 </ProjectReference> -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks.KSPTSP/KSPTSPConnectorCode.cs
r11564 r11565 28 28 using System.Drawing; 29 29 using System.Linq; 30 using System.Threading; 30 31 31 32 namespace HeuristicLab.Optimization.Networks.KSPTSP { … … 48 49 49 50 public override void Initialize() { 51 base.Initialize(); 50 52 var parameters = new MessagePort("Parameters"); 51 53 Ports.Add(parameters); … … 78 80 } 79 81 80 private void Knapsack_MessageReceived(object sender, EventArgs<IMessage, System.Threading.CancellationToken> e) {82 private void Knapsack_MessageReceived(object sender, EventArgs<IMessage, CancellationToken> e) { 81 83 // get parameters 82 84 var parametersPort = (IMessagePort)Ports["Parameters"]; -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Optimization.Networks.KSPTSP/KSPTSPNetworkCode.cs
r11564 r11565 53 53 54 54 public override void Initialize() { 55 base.Initialize(); 56 55 57 #region ParametersNode 56 58 var paramsNode = new UserDefinedNode("ParametersNode"); -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Plugin.cs.frame
r11520 r11565 28 28 [Plugin("HeuristicLab.Optimization.Networks", "3.3.11.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Optimization.Networks-3.3.dll", PluginFileType.Assembly)] 30 [PluginDependency("HeuristicLab.Algorithms.GeneticAlgorithm", "3.3")]31 30 [PluginDependency("HeuristicLab.Collections", "3.3")] 32 31 [PluginDependency("HeuristicLab.Common", "3.3")] … … 34 33 [PluginDependency("HeuristicLab.Core", "3.3")] 35 34 [PluginDependency("HeuristicLab.Data", "3.3")] 36 [PluginDependency("HeuristicLab.Encodings.BinaryVectorEncoding", "3.3")]37 [PluginDependency("HeuristicLab.Encodings.PermutationEncoding", "3.3")]38 35 [PluginDependency("HeuristicLab.Operators", "3.3")] 39 36 [PluginDependency("HeuristicLab.Optimization", "3.3")] 40 37 [PluginDependency("HeuristicLab.Parameters", "3.3")] 41 38 [PluginDependency("HeuristicLab.Persistence", "3.3")] 42 [PluginDependency("HeuristicLab.Problems.Knapsack", "3.3")]43 [PluginDependency("HeuristicLab.Problems.TravelingSalesman", "3.3")]44 39 public class HeuristicLabOptimizationNetworksPlugin : PluginBase { 45 40 }
Note: See TracChangeset
for help on using the changeset viewer.