Changeset 2857
- Timestamp:
- 02/24/10 11:44:05 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 6 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
r2852 r2857 52 52 <None Include="HeuristicLabOptimizationPlugin.cs.frame" /> 53 53 <Compile Include="Algorithm.cs" /> 54 <Compile Include="IManipulationOperator.cs" /> 55 <Compile Include="ICrossoverOperator.cs" /> 56 <Compile Include="IStochasticSolutionCreator.cs" /> 57 <Compile Include="IStochasticOperator.cs" /> 54 58 <Compile Include="ISolutionCreator.cs" /> 55 59 <Compile Include="SingleObjectiveProblem.cs" /> -
trunk/sources/HeuristicLab.Optimization/3.3/IProblem.cs
r2852 r2857 22 22 using HeuristicLab.Core; 23 23 using System; 24 using HeuristicLab.Common; 24 25 25 26 namespace HeuristicLab.Optimization { … … 33 34 event EventHandler SolutionCreatorChanged; 34 35 event EventHandler EvaluatorChanged; 36 event EventHandler<EventArgs<Type>> OperatorsChanged; 35 37 } 36 38 } -
trunk/sources/HeuristicLab.Optimization/3.3/ISolutionCreator.cs
r2852 r2857 27 27 /// An interface which represents an operator for creating new solutions. 28 28 /// </summary> 29 public interface ISolutionCreator : IOperator { 30 ILookupParameter<IRandom> RandomParameter { get; } 31 } 29 public interface ISolutionCreator : IOperator { } 32 30 } -
trunk/sources/HeuristicLab.Optimization/3.3/Problem.cs
r2852 r2857 25 25 using HeuristicLab.Parameters; 26 26 using System; 27 using HeuristicLab.Common; 27 28 28 29 namespace HeuristicLab.Optimization { … … 100 101 EvaluatorChanged(this, EventArgs.Empty); 101 102 } 103 public event EventHandler<EventArgs<Type>> OperatorsChanged; 104 protected virtual void OnOperatorsChanged(Type operatorType) { 105 if (OperatorsChanged != null) 106 OperatorsChanged(this, new EventArgs<Type>(operatorType)); 107 } 102 108 } 103 109 } -
trunk/sources/HeuristicLab.Permutation/3.3/HeuristicLab.Permutation-3.3.csproj
r2854 r2857 90 90 <SubType>Code</SubType> 91 91 </Compile> 92 <Compile Include="IPermutationCrossoverOperator.cs" /> 93 <Compile Include="IPermutationManipulationOperator.cs" /> 92 94 <Compile Include="MaximalPreservativeCrossover.cs" /> 93 95 <Compile Include="OrderBasedCrossover.cs" /> -
trunk/sources/HeuristicLab.Permutation/3.3/PermutationCrossover.cs
r2834 r2857 22 22 using HeuristicLab.Core; 23 23 using HeuristicLab.Operators; 24 using HeuristicLab.Optimization; 24 25 using HeuristicLab.Parameters; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 31 32 [Item("PermutationCrossover", "A base class for permutation crossover operators.")] 32 33 [EmptyStorableClass] 33 public abstract class PermutationCrossover : SingleSuccessorOperator {34 public LookupParameter<IRandom> RandomParameter {34 public abstract class PermutationCrossover : SingleSuccessorOperator, IPermutationCrossoverOperator { 35 public ILookupParameter<IRandom> RandomParameter { 35 36 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 36 37 } -
trunk/sources/HeuristicLab.Permutation/3.3/PermutationManipulator.cs
r2834 r2857 22 22 using HeuristicLab.Core; 23 23 using HeuristicLab.Operators; 24 using HeuristicLab.Optimization; 24 25 using HeuristicLab.Parameters; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 31 32 [Item("PermutationManipulator", "A base class for permutation manipulation operators.")] 32 33 [EmptyStorableClass] 33 public abstract class PermutationManipulator : SingleSuccessorOperator {34 public LookupParameter<IRandom> RandomParameter {34 public abstract class PermutationManipulator : SingleSuccessorOperator, IPermutationManipulationOperator { 35 public ILookupParameter<IRandom> RandomParameter { 35 36 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 36 37 } -
trunk/sources/HeuristicLab.Permutation/3.3/Tests/HeuristicLab.Permutation-3.3.Tests.csproj
r2854 r2857 86 86 <Name>HeuristicLab.Operators-3.3</Name> 87 87 </ProjectReference> 88 <ProjectReference Include="..\..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj"> 89 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project> 90 <Name>HeuristicLab.Optimization-3.3</Name> 91 </ProjectReference> 88 92 <ProjectReference Include="..\..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj"> 89 93 <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project> -
trunk/sources/HeuristicLab.Routing.TSP/3.3/TSP.cs
r2852 r2857 26 26 using HeuristicLab.Permutation; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using System; 28 29 29 30 namespace HeuristicLab.Routing.TSP { -
trunk/sources/HeuristicLab.SGA/3.3/SGA.cs
r2852 r2857 106 106 107 107 protected override void OnProblemChanged() { 108 Problem.SolutionCreator.RandomParameter.ActualName = "Random";108 if (Problem.SolutionCreator is IStochasticSolutionCreator) ((IStochasticSolutionCreator)Problem.SolutionCreator).RandomParameter.ActualName = "Random"; 109 109 populationCreator.SolutionCreatorParameter.Value = Problem.SolutionCreator; 110 110 populationCreator.SolutionEvaluatorParameter.Value = Problem.Evaluator; … … 115 115 } 116 116 protected override void Problem_SolutionCreatorChanged(object sender, EventArgs e) { 117 Problem.SolutionCreator.RandomParameter.ActualName = "Random";117 if (Problem.SolutionCreator is IStochasticSolutionCreator) ((IStochasticSolutionCreator)Problem.SolutionCreator).RandomParameter.ActualName = "Random"; 118 118 populationCreator.SolutionCreatorParameter.Value = Problem.SolutionCreator; 119 119 base.Problem_SolutionCreatorChanged(sender, e);
Note: See TracChangeset
for help on using the changeset viewer.