Changeset 2656 for trunk/sources/HeuristicLab.SequentialEngine
- Timestamp:
- 01/20/10 05:10:22 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.SequentialEngine/3.3
- Files:
-
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.SequentialEngine/3.3/HeuristicLab.SequentialEngine-3.3.csproj
r2546 r2656 78 78 </Reference> 79 79 <Reference Include="System.Data" /> 80 <Reference Include="System.Drawing" />81 <Reference Include="System.Windows.Forms" />82 80 <Reference Include="System.Xml" /> 83 81 </ItemGroup> … … 86 84 <Compile Include="Properties\AssemblyInfo.cs" /> 87 85 <Compile Include="SequentialEngine.cs" /> 88 <Compile Include="SequentialEngineView.cs">89 <SubType>UserControl</SubType>90 </Compile>91 <Compile Include="SequentialEngineView.Designer.cs">92 <DependentUpon>SequentialEngineView.cs</DependentUpon>93 </Compile>94 86 </ItemGroup> 95 87 <ItemGroup> … … 98 90 </ItemGroup> 99 91 <ItemGroup> 100 <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">101 <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project>102 <Name>HeuristicLab.Core.Views-3.3</Name>103 </ProjectReference>104 92 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj"> 105 93 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project> 106 94 <Name>HeuristicLab.Core-3.3</Name> 107 </ProjectReference>108 <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.2\HeuristicLab.MainForm.WindowsForms-3.2.csproj">109 <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>110 <Name>HeuristicLab.MainForm.WindowsForms-3.2</Name>111 </ProjectReference>112 <ProjectReference Include="..\..\HeuristicLab.MainForm\3.2\HeuristicLab.MainForm-3.2.csproj">113 <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>114 <Name>HeuristicLab.MainForm-3.2</Name>115 95 </ProjectReference> 116 96 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj"> -
trunk/sources/HeuristicLab.SequentialEngine/3.3/HeuristicLabSequentialEnginePlugin.cs
r2520 r2656 29 29 /// Plugin class for HeuristicLab.SequentialEngine plugin. 30 30 /// </summary> 31 [ClassInfo(Name = "HeuristicLab.SequentialEngine-3.3")] 32 [PluginFile(Filename = "HeuristicLab.SequentialEngine-3.3.dll", Filetype = PluginFileType.Assembly)] 33 [Dependency(Dependency = "HeuristicLab.Core-3.3")] 34 [Dependency(Dependency = "HeuristicLab.Core.Views-3.3")] 35 [Dependency(Dependency = "HeuristicLab.MainForm-3.2")] 36 [Dependency(Dependency = "HeuristicLab.MainForm.WindowsForms-3.2")] 31 [Plugin("HeuristicLab.SequentialEngine-3.3")] 32 [PluginFile("HeuristicLab.SequentialEngine-3.3.dll", PluginFileType.Assembly)] 33 [PluginDependency("HeuristicLab.Persistence-3.3")] 34 [PluginDependency("HeuristicLab.Core-3.3")] 37 35 public class HeuristicLabSequentialEnginePlugin : PluginBase { 38 36 } -
trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngine.cs
r2546 r2656 24 24 using System.Text; 25 25 using HeuristicLab.Core; 26 using System.Threading;27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 27 … … 43 42 /// <remarks>Calls <see cref="EngineBase.Abort"/> of base class <see cref="EngineBase"/> and 44 43 /// <see cref="IOperator.Abort"/> of the current <see cref="IOperator"/>.</remarks> 45 public override void Abort() {46 base. Abort();44 public override void Stop() { 45 base.Stop(); 47 46 if (currentOperator != null) 48 47 currentOperator.Abort(); … … 56 55 /// is pushed on the stack again.<br/> 57 56 /// If the execution was successful <see cref="EngineBase.OnOperationExecuted"/> is called.</remarks> 58 protected override void ProcessNextOperation() { 59 IOperation operation = myExecutionStack.Pop(); 60 if (operation is AtomicOperation) { 61 AtomicOperation atomicOperation = (AtomicOperation)operation; 62 IOperation next = null; 63 try { 64 currentOperator = atomicOperation.Operator; 65 next = atomicOperation.Operator.Execute(atomicOperation.Scope); 66 } 67 catch (Exception ex) { 68 // push operation on stack again 69 myExecutionStack.Push(atomicOperation); 70 Abort(); 71 ThreadPool.QueueUserWorkItem(delegate(object state) { OnExceptionOccurred(ex);}); 72 } 73 if (next != null) 74 myExecutionStack.Push(next); 75 OnOperationExecuted(atomicOperation); 76 if (atomicOperation.Operator.Breakpoint) Abort(); 77 } else if (operation is CompositeOperation) { 78 CompositeOperation compositeOperation = (CompositeOperation)operation; 79 for (int i = compositeOperation.Operations.Count - 1; i >= 0; i--) 80 myExecutionStack.Push(compositeOperation.Operations[i]); 57 protected override void ProcessNextOperator() { 58 currentOperator = null; 59 ExecutionContext context = ExecutionStack.Pop(); 60 ExecutionContextCollection next = null; 61 try { 62 currentOperator = context.Operator; 63 next = context.Operator.Execute(context); 64 currentOperator = null; 81 65 } 66 catch (Exception ex) { 67 ExecutionStack.Push(context); 68 Stop(); 69 OnExceptionOccurred(ex); 70 } 71 if (next != null) { 72 for (int i = next.Count - 1; i >= 0; i--) 73 ExecutionStack.Push(next[i]); 74 } 75 if (context.Operator.Breakpoint) 76 Stop(); 82 77 } 83 78 }
Note: See TracChangeset
for help on using the changeset viewer.