Changeset 2864 for trunk/sources
- Timestamp:
- 02/25/10 02:49:16 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 8 edited
- 10 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.Designer.cs
r2851 r2864 49 49 this.engineTextBox = new System.Windows.Forms.TextBox(); 50 50 this.setEngineButton = new System.Windows.Forms.Button(); 51 this.createUserDefinedAlgorithmButton = new System.Windows.Forms.Button(); 51 52 this.tabControl.SuspendLayout(); 52 53 this.parametersTabPage.SuspendLayout(); … … 58 59 // 59 60 this.tabControl.Location = new System.Drawing.Point(0, 149); 60 this.tabControl.Size = new System.Drawing.Size( 490, 174);61 this.tabControl.Size = new System.Drawing.Size(656, 278); 61 62 this.tabControl.TabIndex = 7; 62 63 // 63 64 // parametersTabPage 64 65 // 65 this.parametersTabPage.Size = new System.Drawing.Size( 482, 148);66 this.parametersTabPage.Size = new System.Drawing.Size(648, 252); 66 67 // 67 68 // problemTabPage … … 71 72 // parameterCollectionView 72 73 // 73 this.parameterCollectionView.Size = new System.Drawing.Size( 470, 136);74 this.parameterCollectionView.Size = new System.Drawing.Size(636, 240); 74 75 // 75 76 // problemViewHost … … 79 80 // startButton 80 81 // 82 this.startButton.Location = new System.Drawing.Point(0, 433); 81 83 this.startButton.TabIndex = 8; 82 84 // 83 85 // stopButton 84 86 // 87 this.stopButton.Location = new System.Drawing.Point(30, 433); 85 88 this.stopButton.TabIndex = 9; 86 89 // 87 90 // resetButton 88 91 // 92 this.resetButton.Location = new System.Drawing.Point(60, 433); 89 93 this.resetButton.TabIndex = 10; 90 94 // 91 95 // executionTimeLabel 92 96 // 97 this.executionTimeLabel.Location = new System.Drawing.Point(430, 440); 93 98 this.executionTimeLabel.TabIndex = 11; 94 99 // 95 100 // executionTimeTextBox 96 101 // 102 this.executionTimeTextBox.Location = new System.Drawing.Point(519, 437); 97 103 this.executionTimeTextBox.TabIndex = 12; 98 104 // … … 101 107 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 102 108 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 109 this.nameTextBox.Size = new System.Drawing.Size(584, 20); 110 // 111 // descriptionTextBox 112 // 113 this.descriptionTextBox.Size = new System.Drawing.Size(584, 87); 103 114 // 104 115 // engineLabel … … 118 129 this.engineTextBox.Name = "engineTextBox"; 119 130 this.engineTextBox.ReadOnly = true; 120 this.engineTextBox.Size = new System.Drawing.Size( 388, 20);131 this.engineTextBox.Size = new System.Drawing.Size(554, 20); 121 132 this.engineTextBox.TabIndex = 6; 122 133 this.engineTextBox.DoubleClick += new System.EventHandler(this.engineTextBox_DoubleClick); … … 126 137 this.setEngineButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 127 138 this.setEngineButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add; 128 this.setEngineButton.Location = new System.Drawing.Point( 466, 119);139 this.setEngineButton.Location = new System.Drawing.Point(632, 119); 129 140 this.setEngineButton.Name = "setEngineButton"; 130 141 this.setEngineButton.Size = new System.Drawing.Size(24, 24); 131 142 this.setEngineButton.TabIndex = 5; 143 this.toolTip.SetToolTip(this.setEngineButton, "Set Engine"); 132 144 this.setEngineButton.UseVisualStyleBackColor = true; 133 145 this.setEngineButton.Click += new System.EventHandler(this.setEngineButton_Click); 146 // 147 // createUserDefinedAlgorithmButton 148 // 149 this.createUserDefinedAlgorithmButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 150 this.createUserDefinedAlgorithmButton.Location = new System.Drawing.Point(90, 433); 151 this.createUserDefinedAlgorithmButton.Name = "createUserDefinedAlgorithmButton"; 152 this.createUserDefinedAlgorithmButton.Size = new System.Drawing.Size(161, 24); 153 this.createUserDefinedAlgorithmButton.TabIndex = 13; 154 this.createUserDefinedAlgorithmButton.Text = "&Create User Defined Algorithm"; 155 this.toolTip.SetToolTip(this.createUserDefinedAlgorithmButton, "Create User Defined Algorithm from this Algorithm"); 156 this.createUserDefinedAlgorithmButton.UseVisualStyleBackColor = true; 157 this.createUserDefinedAlgorithmButton.Click += new System.EventHandler(this.createUserDefinedAlgorithmButton_Click); 134 158 // 135 159 // EngineAlgorithmView … … 140 164 this.Controls.Add(this.engineTextBox); 141 165 this.Controls.Add(this.engineLabel); 166 this.Controls.Add(this.createUserDefinedAlgorithmButton); 142 167 this.Name = "EngineAlgorithmView"; 168 this.Size = new System.Drawing.Size(656, 457); 169 this.Controls.SetChildIndex(this.createUserDefinedAlgorithmButton, 0); 143 170 this.Controls.SetChildIndex(this.engineLabel, 0); 144 171 this.Controls.SetChildIndex(this.engineTextBox, 0); … … 168 195 protected System.Windows.Forms.TextBox engineTextBox; 169 196 protected System.Windows.Forms.Button setEngineButton; 197 protected System.Windows.Forms.Button createUserDefinedAlgorithmButton; 170 198 171 199 -
trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.cs
r2852 r2864 98 98 MainFormManager.CreateDefaultView(Content.Engine).Show(); 99 99 } 100 101 protected void createUserDefinedAlgorithmButton_Click(object sender, EventArgs e) { 102 MainFormManager.CreateDefaultView(Content.CreateUserDefinedAlgorithm()).Show(); 103 } 100 104 } 101 105 } -
trunk/sources/HeuristicLab.Optimization/3.3/Algorithm.cs
r2852 r2864 51 51 if (problem != null) RegisterProblemEvents(); 52 52 OnProblemChanged(); 53 Prepare(); 53 54 } 54 55 } -
trunk/sources/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs
r2851 r2864 116 116 } 117 117 118 public UserDefinedAlgorithm CreateUserDefinedAlgorithm() { 119 UserDefinedAlgorithm algorithm = new UserDefinedAlgorithm(Name, Description); 120 Cloner cloner = new Cloner(); 121 foreach (IParameter param in Parameters) 122 algorithm.Parameters.Add((IParameter)cloner.Clone(param)); 123 algorithm.Problem = (IProblem)cloner.Clone(Problem); 124 algorithm.Engine = (IEngine)cloner.Clone(engine); 125 algorithm.OperatorGraph = (OperatorGraph)cloner.Clone(operatorGraph); 126 return algorithm; 127 } 128 118 129 protected override void OnCanceledChanged() { 119 130 if (Canceled && (engine != null)) -
trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
r2857 r2864 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" /> 58 <Compile Include="ISolutionCreator.cs" /> 54 <Compile Include="Interfaces\IAlgorithm.cs" /> 55 <Compile Include="Interfaces\ICrossoverOperator.cs" /> 56 <Compile Include="Interfaces\IEvaluator.cs" /> 57 <Compile Include="Interfaces\IManipulationOperator.cs" /> 58 <Compile Include="Interfaces\IProblem.cs" /> 59 <Compile Include="Interfaces\ISingleObjectiveEvaluator.cs" /> 60 <Compile Include="Interfaces\ISingleObjectiveProblem.cs" /> 61 <Compile Include="Interfaces\ISolutionCreator.cs" /> 62 <Compile Include="Interfaces\IStochasticOperator.cs" /> 59 63 <Compile Include="SingleObjectiveProblem.cs" /> 60 <Compile Include="ISingleObjectiveProblem.cs" />61 <Compile Include="IEvaluator.cs" />62 <Compile Include="ISingleObjectiveEvaluator.cs" />63 64 <Compile Include="SingleObjectiveEvaluator.cs" /> 64 65 <Compile Include="UserDefinedAlgorithm.cs" /> 65 66 <Compile Include="EngineAlgorithm.cs" /> 66 <Compile Include="IAlgorithm.cs" />67 67 <Compile Include="HeuristicLabOptimizationPlugin.cs" /> 68 <Compile Include="IProblem.cs" />69 68 <Compile Include="Problem.cs" /> 70 69 <Compile Include="Properties\AssemblyInfo.cs" /> -
trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ICrossoverOperator.cs
r2862 r2864 27 27 /// An interface which represents an operator for crossing solutions. 28 28 /// </summary> 29 public interface ICrossoverOperator : I StochasticOperator { }29 public interface ICrossoverOperator : IOperator { } 30 30 } -
trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IManipulationOperator.cs
r2862 r2864 27 27 /// An interface which represents an operator for manipulating solutions. 28 28 /// </summary> 29 public interface IManipulationOperator : I StochasticOperator { }29 public interface IManipulationOperator : IOperator { } 30 30 } -
trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IProblem.cs
r2862 r2864 29 29 /// </summary> 30 30 public interface IProblem : IParameterizedNamedItem { 31 ISolutionCreator SolutionCreator { get; set; } 32 IEvaluator Evaluator { get; set; } 31 ISolutionCreator SolutionCreator { get; } 32 IEvaluator Evaluator { get; } 33 OperatorSet Operators { get; } 33 34 34 35 event EventHandler SolutionCreatorChanged; 35 36 event EventHandler EvaluatorChanged; 36 event EventHandler<EventArgs<Type>> OperatorsChanged;37 37 } 38 38 } -
trunk/sources/HeuristicLab.Optimization/3.3/Problem.cs
r2857 r2864 51 51 get { return EvaluatorParameter.Value; } 52 52 set { EvaluatorParameter.Value = value; } 53 } 54 private OperatorSet operators; 55 public OperatorSet Operators { 56 get { return operators; } 53 57 } 54 58 -
trunk/sources/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs
r2851 r2864 50 50 51 51 public UserDefinedAlgorithm() : base() { } 52 public UserDefinedAlgorithm(string name) : base(name) { } 53 public UserDefinedAlgorithm(string name, string description) : base(name, description) { } 52 54 53 55 public event EventHandler OperatorGraphChanged; -
trunk/sources/HeuristicLab.SGA/3.3/SGA.cs
r2857 r2864 47 47 get { return (ISingleObjectiveProblem)base.Problem; } 48 48 set { base.Problem = value; } 49 }50 51 public new IScope GlobalScope {52 get { return base.GlobalScope; }53 49 } 54 50 … … 106 102 107 103 protected override void OnProblemChanged() { 108 if (Problem.SolutionCreator is IStochastic SolutionCreator) ((IStochasticSolutionCreator)Problem.SolutionCreator).RandomParameter.ActualName = "Random";104 if (Problem.SolutionCreator is IStochasticOperator) ((IStochasticOperator)Problem.SolutionCreator).RandomParameter.ActualName = "Random"; 109 105 populationCreator.SolutionCreatorParameter.Value = Problem.SolutionCreator; 110 106 populationCreator.SolutionEvaluatorParameter.Value = Problem.Evaluator; … … 115 111 } 116 112 protected override void Problem_SolutionCreatorChanged(object sender, EventArgs e) { 117 if (Problem.SolutionCreator is IStochastic SolutionCreator) ((IStochasticSolutionCreator)Problem.SolutionCreator).RandomParameter.ActualName = "Random";113 if (Problem.SolutionCreator is IStochasticOperator) ((IStochasticOperator)Problem.SolutionCreator).RandomParameter.ActualName = "Random"; 118 114 populationCreator.SolutionCreatorParameter.Value = Problem.SolutionCreator; 119 115 base.Problem_SolutionCreatorChanged(sender, e);
Note: See TracChangeset
for help on using the changeset viewer.