Changeset 4981
- Timestamp:
- 11/28/10 21:42:49 (14 years ago)
- Location:
- branches/HeuristicLab.MetaOptimization
- Files:
-
- 9 added
- 11 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.MetaOptimization.sln
r4839 r4981 2 2 Microsoft Visual Studio Solution File, Format Version 11.00 3 3 # Visual Studio 2010 4 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9E843318-7235-4B2B-81A7-160FDDADD9E1}"5 EndProject6 4 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.MetaOptimization-3.3", "HeuristicLab.Problems.MetaOptimization\3.3\HeuristicLab.Problems.MetaOptimization-3.3.csproj", "{ABBC1DF6-FCC6-4F86-AB75-B6B3A72E7D17}" 7 5 EndProject -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/HeuristicLab.Problems.MetaOptimization.Views-3.3.csproj
r4839 r4981 85 85 </ItemGroup> 86 86 <ItemGroup> 87 <Compile Include="OptimizableView.cs"> 88 <SubType>UserControl</SubType> 89 </Compile> 90 <Compile Include="OptimizableView.Designer.cs"> 91 <DependentUpon>OptimizableView.cs</DependentUpon> 92 </Compile> 87 93 <Compile Include="ValueConfigurationViews\ValueConfigurationCheckedItemList.cs"> 88 94 <SubType>UserControl</SubType> … … 103 109 <DependentUpon>ObjectSelectorDialog.cs</DependentUpon> 104 110 </Compile> 105 <Compile Include="ParameterConfigurationViews\ParameterConfigurationListView.cs">106 <SubType>UserControl</SubType>107 </Compile>108 <Compile Include="ParameterConfigurationViews\ParameterConfigurationListView.Designer.cs">109 <DependentUpon>ParameterConfigurationListView.cs</DependentUpon>110 </Compile>111 111 <Compile Include="HeuristicLabProblemsMetaOptimizationViewsPlugin.cs" /> 112 <Compile Include="ParameterConfigurationViews\ParameterConfigurationView.cs">113 <SubType>UserControl</SubType>114 </Compile>115 <Compile Include="ParameterConfigurationViews\ParameterConfigurationView.Designer.cs">116 <DependentUpon>ParameterConfigurationView.cs</DependentUpon>117 </Compile>118 112 <Compile Include="Properties\AssemblyInfo.cs" /> 119 <Compile Include="ValueConfigurationViews\ValueConfigurationView.cs">120 <SubType>UserControl</SubType>121 </Compile>122 <Compile Include="ValueConfigurationViews\ValueConfigurationView.Designer.cs">123 <DependentUpon>ValueConfigurationView.cs</DependentUpon>124 </Compile>125 113 <Compile Include="ValueConfigurationViews\ValueView.cs"> 126 114 <SubType>UserControl</SubType> … … 135 123 </ItemGroup> 136 124 <ItemGroup> 137 <ProjectReference Include="..\..\HeuristicLab.Problems.MetaOptimization\3.3\HeuristicLab.Problems.MetaOptimization-3.3.csproj"> 138 <Project>{ABBC1DF6-FCC6-4F86-AB75-B6B3A72E7D17}</Project> 139 <Name>HeuristicLab.Problems.MetaOptimization-3.3</Name> 140 </ProjectReference> 141 </ItemGroup> 142 <ItemGroup> 125 <EmbeddedResource Include="OptimizableView.resx"> 126 <DependentUpon>OptimizableView.cs</DependentUpon> 127 </EmbeddedResource> 143 128 <EmbeddedResource Include="ValueConfigurationViews\NumericRangeView.resx"> 144 129 <DependentUpon>NumericRangeView.cs</DependentUpon> … … 147 132 <DependentUpon>ObjectSelectorDialog.cs</DependentUpon> 148 133 </EmbeddedResource> 149 <EmbeddedResource Include="ParameterConfigurationViews\ParameterConfigurationListView.resx">150 <DependentUpon>ParameterConfigurationListView.cs</DependentUpon>151 </EmbeddedResource>152 <EmbeddedResource Include="ParameterConfigurationViews\ParameterConfigurationView.resx">153 <DependentUpon>ParameterConfigurationView.cs</DependentUpon>154 </EmbeddedResource>155 <EmbeddedResource Include="ValueConfigurationViews\ValueConfigurationView.resx">156 <DependentUpon>ValueConfigurationView.cs</DependentUpon>157 </EmbeddedResource>158 134 <EmbeddedResource Include="ValueConfigurationViews\ValueView.resx"> 159 135 <DependentUpon>ValueView.cs</DependentUpon> 160 136 </EmbeddedResource> 137 </ItemGroup> 138 <ItemGroup> 139 <Folder Include="ParameterConfigurationViews\" /> 140 </ItemGroup> 141 <ItemGroup> 142 <ProjectReference Include="..\..\HeuristicLab.Problems.MetaOptimization\3.3\HeuristicLab.Problems.MetaOptimization-3.3.csproj"> 143 <Project>{ABBC1DF6-FCC6-4F86-AB75-B6B3A72E7D17}</Project> 144 <Name>HeuristicLab.Problems.MetaOptimization-3.3</Name> 145 </ProjectReference> 161 146 </ItemGroup> 162 147 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/ValueConfigurationViews/NumericRangeView.cs
r4839 r4981 16 16 /// The visual representation of a <see cref="IIntegerRange"/>. 17 17 /// </summary> 18 [View(" NumericRange View")]19 [Content(typeof(IRange<IntValue>), true)]18 [View("IntValueRange View")] 19 [Content(typeof(IRange<IntValue>), false)] 20 20 public partial class IntValueRangeView : ItemView { 21 21 /// <summary> -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/ValueConfigurationViews/ValueConfigurationCheckedItemList.Designer.cs
r4839 r4981 1 1 namespace HeuristicLab.Problems.MetaOptimization.Views { 2 partial class ValueConfigurationCheckedItem List{2 partial class ValueConfigurationCheckedItemCollectionView { 3 3 /// <summary> 4 4 /// Required designer variable. -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/ValueConfigurationViews/ValueConfigurationCheckedItemList.cs
r4839 r4981 9 9 using HeuristicLab.MainForm; 10 10 using HeuristicLab.Core; 11 using System.Windows.Forms; 12 using HeuristicLab.PluginInfrastructure; 11 13 12 14 namespace HeuristicLab.Problems.MetaOptimization.Views { 13 15 [View("ValueConfigurationList View")] 14 [Content(typeof(CheckedItemList<IValueConfiguration>), true)] 15 [Content(typeof(ICheckedItemList<IValueConfiguration>), true)] 16 public partial class ValueConfigurationCheckedItemList : CheckedItemListView<IValueConfiguration> { 17 public ValueConfigurationCheckedItemList() { 16 [Content(typeof(ICheckedValueConfigurationCollection), IsDefaultView = true)] 17 public sealed partial class ValueConfigurationCheckedItemCollectionView : CheckedItemCollectionView<IValueConfiguration> { 18 public new ICheckedValueConfigurationCollection Content { 19 get { return (ICheckedValueConfigurationCollection)base.Content; } 20 set { base.Content = value; } 21 } 22 23 public ValueConfigurationCheckedItemCollectionView() { 18 24 InitializeComponent(); 25 } 26 27 protected override void DeregisterContentEvents() { 28 // TODO: Deregister your event handlers here 29 base.DeregisterContentEvents(); 30 } 31 32 protected override void RegisterContentEvents() { 33 base.RegisterContentEvents(); 34 // TODO: Register your event handlers here 35 } 36 37 #region Event Handlers (Content) 38 // TODO: Put event handlers of the content here 39 #endregion 40 41 protected override void OnContentChanged() { 42 base.OnContentChanged(); 43 if (Content == null) { 44 // TODO: Add code when content has been changed and is null 45 } else { 46 // TODO: Add code when content has been changed and is not null 47 } 48 } 49 50 51 protected override void SetEnabledStateOfControls() { 52 base.SetEnabledStateOfControls(); 53 // TODO: Enable or disable controls based on whether the content is null or the view is set readonly 54 } 55 56 #region Event Handlers (child controls) 57 // TODO: Put event handlers of child controls here. 58 #endregion 59 60 protected override IValueConfiguration CreateItem() { 61 if (typeSelectorDialog == null) { 62 typeSelectorDialog = new TypeSelectorDialog(); 63 typeSelectorDialog.Caption = "Select Item"; 64 typeSelectorDialog.TypeSelector.Caption = "Available Items"; 65 typeSelectorDialog.TypeSelector.Configure(Content.ValueDataType, false, true); 66 } 67 68 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) { 69 try { 70 IItem value = (IItem)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 71 return new ValueConfiguration(value, value.GetType()); 72 } 73 catch (Exception ex) { 74 ErrorHandling.ShowErrorDialog(this, ex); 75 } 76 } 77 return null; 19 78 } 20 79 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/ValueConfigurationViews/ValueView.cs
r4839 r4981 15 15 namespace HeuristicLab.Problems.MetaOptimization.Views { 16 16 [View("Value View")] 17 [Content(typeof( IValueConfiguration), false)]17 [Content(typeof(ConstrainedValue), true)] 18 18 public partial class ValueView : ItemView { 19 19 20 public new IValueConfigurationContent {21 get { return ( IValueConfiguration)base.Content; }20 public new ConstrainedValue Content { 21 get { return (ConstrainedValue)base.Content; } 22 22 set { base.Content = value; } 23 23 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ParameterConfigurations/ParameterConfiguration.cs
r4839 r4981 14 14 15 15 [Storable] 16 protected bool optimiz ationEnabled;17 public bool Optimiz ationEnabled{18 get { return optimiz ationEnabled; }16 protected bool optimize; 17 public bool Optimize { 18 get { return optimize; } 19 19 set { 20 if (optimiz ationEnabled!= value) {21 optimiz ationEnabled= value;22 if (optimiz ationEnabled) {20 if (optimize != value) { 21 optimize = value; 22 if (optimize) { 23 23 PopulateValueConfigurations(); 24 24 } else { 25 25 this.ValueConfigurations.Clear(); 26 26 } 27 OnOptimiz ationEnabledChanged();27 OnOptimizeChanged(); 28 28 } 29 29 } … … 62 62 } 63 63 64 protected IChecked ItemList<IValueConfiguration>valueConfigurations;65 public IChecked ItemList<IValueConfiguration>ValueConfigurations {64 protected ICheckedValueConfigurationCollection valueConfigurations; 65 public ICheckedValueConfigurationCollection ValueConfigurations { 66 66 get { return this.valueConfigurations; } 67 67 protected set { this.valueConfigurations = value; } … … 75 75 } 76 76 77 public ConstrainedValue ConstrainedValue { 78 get { return actualValueConfiguration.ConstrainedValue; } 79 set { actualValueConfiguration.ConstrainedValue = value; } 80 } 81 77 82 // store parameter reference only for name/description/image/... 78 83 private IValueParameter parameter; 79 84 85 #region Constructors and Cloning 80 86 public ParameterConfiguration(string parameterName, IValueParameter valueParameter) { 81 87 this.ParameterName = parameterName; … … 84 90 this.valueDataType = valueParameter.DataType; 85 91 this.validValues = GetValidValues(); 86 this.ValueConfigurations = new Checked ItemList<IValueConfiguration>();92 this.ValueConfigurations = new CheckedValueConfigurationCollection(this.valueDataType); 87 93 this.ActualValueConfiguration = new ValueConfiguration(valueParameter.Value, valueParameter.DataType); 88 if (Optimiz ationEnabled) {94 if (Optimize) { 89 95 PopulateValueConfigurations(); 90 96 } … … 94 100 [StorableConstructor] 95 101 protected ParameterConfiguration(bool deserializing) { } 96 protected ParameterConfiguration(ParameterConfiguration original, Cloner cloner) : base(original, cloner) { 102 protected ParameterConfiguration(ParameterConfiguration original, Cloner cloner) 103 : base(original, cloner) { 97 104 this.ParameterName = original.ParameterName; 98 105 this.parameterDataType = original.parameterDataType; … … 102 109 this.ValueConfigurations = cloner.Clone(original.ValueConfigurations); 103 110 this.ActualValueConfiguration = cloner.Clone(original.ActualValueConfiguration); 104 this.Optimiz ationEnabled = original.optimizationEnabled;111 this.Optimize = original.optimize; 105 112 } 106 113 public override IDeepCloneable Clone(Cloner cloner) { 107 114 return new ParameterConfiguration(this, cloner); 108 115 } 116 #endregion 109 117 110 118 private void PopulateValueConfigurations() { … … 118 126 } 119 127 120 void ValidValues_CheckedItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<IItem>> e) {121 var oldItems = e.OldItems.Select(x => x.Value);122 var newItems = e.Items.Select(x => x.Value);123 var intersection = oldItems.Intersect(newItems);124 var removedItems = oldItems.Where(x => !intersection.Contains(x));125 var addedItems = newItems.Where(x => !intersection.Contains(x));126 127 foreach (var item in removedItems) {128 RemoveValueConfiguration(item);129 }130 foreach (var item in addedItems) {131 this.ValueConfigurations.Add(new ValueConfiguration(item, item.GetType()));132 }133 }134 135 private void RemoveValueConfiguration(IItem item) {136 IValueConfiguration vc = this.ValueConfigurations.Single(x => x.ValueDataType == item.GetType());137 this.ValueConfigurations.Remove(vc);138 }128 //void ValidValues_CheckedItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<IItem>> e) { 129 // var oldItems = e.OldItems.Select(x => x.Value); 130 // var newItems = e.Items.Select(x => x.Value); 131 // var intersection = oldItems.Intersect(newItems); 132 // var removedItems = oldItems.Where(x => !intersection.Contains(x)); 133 // var addedItems = newItems.Where(x => !intersection.Contains(x)); 134 135 // foreach (var item in removedItems) { 136 // RemoveValueConfiguration(item); 137 // } 138 // foreach (var item in addedItems) { 139 // this.ValueConfigurations.Add(new ValueConfiguration(item, item.GetType())); 140 // } 141 //} 142 143 //private void RemoveValueConfiguration(IItem item) { 144 // IValueConfiguration vc = this.ValueConfigurations.Single(x => x.ValueDataType == item.GetType()); 145 // this.ValueConfigurations.Remove(vc); 146 //} 139 147 140 148 #region INamedItem Properties … … 198 206 } 199 207 200 public virtual event EventHandler Optimiz ationEnabledChanged;201 protected virtual void OnOptimiz ationEnabledChanged() {202 var handler = Optimiz ationEnabledChanged;208 public virtual event EventHandler OptimizeChanged; 209 protected virtual void OnOptimizeChanged() { 210 var handler = OptimizeChanged; 203 211 if (handler != null) handler(this, EventArgs.Empty); 204 212 } … … 206 214 207 215 public override string ToString() { 208 return string.Format("{0} ", ParameterName);216 return string.Format("{0}: {1}", ParameterName, ConstrainedValue.Value); 209 217 } 210 218 … … 217 225 return null; 218 226 } 219 220 227 } 221 228 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ValueConfigurations/ValueConfiguration.cs
r4839 r4981 1 1 using System; 2 using System.Linq; 2 3 using HeuristicLab.Common; 3 4 using HeuristicLab.Core; 4 5 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 6 using HeuristicLab.Data; 7 using System.Drawing; 5 8 6 9 namespace HeuristicLab.Problems.MetaOptimization { 7 [StorableClass] 8 public class ValueConfiguration : DeepCloneable, IValueConfiguration { 9 [Storable] 10 protected IItemList<IParameterConfiguration> parameterConfigurations = new ItemList<IParameterConfiguration>(); 11 public IItemList<IParameterConfiguration> ParameterConfigurations { 10 // TODO: ItemName/Descr, storability 11 public class ValueConfiguration : Item, IValueConfiguration { 12 protected bool optimize; 13 public bool Optimize { 14 get { return optimize; } 15 set { 16 if (optimize != value) { 17 optimize = value; 18 if (optimize) { 19 ClearParameterConfigurations(); 20 PopulateParameterConfigurations(); 21 } else { 22 ClearParameterConfigurations(); 23 } 24 OnOptimizeChanged(); 25 OnToStringChanged(); 26 } 27 } 28 } 29 30 protected IItemCollection<IParameterConfiguration> parameterConfigurations = new ItemCollection<IParameterConfiguration>(); 31 public IItemCollection<IParameterConfiguration> ParameterConfigurations { 12 32 get { return this.parameterConfigurations; } 13 33 protected set { this.parameterConfigurations = value; } 14 34 } 15 35 16 protected IItem value;17 public IItemValue {18 get { return value; }36 protected ConstrainedValue constrainedValue; 37 public ConstrainedValue ConstrainedValue { 38 get { return constrainedValue; } 19 39 set { 20 if (this. value != value) {21 Clear ChildParameterConfigurations();22 this. value = value;23 if (this.value is IParameterizedNamedItem) AddChildParameterConfigurations(this.value as IParameterizedNamedItem);40 if (this.constrainedValue != value) { 41 ClearParameterConfigurations(); 42 this.constrainedValue = value; 43 PopulateParameterConfigurations(); 24 44 OnValueChanged(); 45 OnToStringChanged(); 25 46 } 26 47 } 27 48 } 28 49 29 protected Type valueDataType; 30 public Type ValueDataType { 31 get { return this.valueDataType; } 32 protected set { this.valueDataType = value; } 50 protected IRange rangeConstraint; 51 public IRange RangeConstraint { 52 get { return rangeConstraint; } 33 53 } 34 54 55 #region Constructors and Cloning 35 56 public ValueConfiguration(IItem value, Type valueDataType) { 36 this.Value = value; 37 this.ValueDataType = valueDataType; 57 this.parameterConfigurations = new ItemList<IParameterConfiguration>(); 58 this.ConstrainedValue = new ConstrainedValue(value, valueDataType); 59 if (constrainedValue.ValueDataType == typeof(IntValue)) { 60 rangeConstraint = new Range<IntValue>(new IntValue(0), (IntValue)value, new IntValue(1)); 61 } else if (constrainedValue.ValueDataType == typeof(DoubleValue)) { 62 rangeConstraint = new Range<DoubleValue>(new DoubleValue(0), (DoubleValue)value, new DoubleValue(0.1)); 63 } else { 64 rangeConstraint = null; 65 } 66 RegisterEvents(); 38 67 } 39 68 … … 43 72 protected ValueConfiguration(ValueConfiguration original, Cloner cloner) : base(original, cloner) { 44 73 this.ParameterConfigurations = cloner.Clone(original.ParameterConfigurations); 45 this. Value = cloner.Clone(original.Value);46 this. ValueDataType = original.ValueDataType;47 74 this.ConstrainedValue = cloner.Clone(original.ConstrainedValue); 75 this.rangeConstraint = cloner.Clone(original.RangeConstraint); 76 RegisterEvents(); 48 77 } 49 78 public override IDeepCloneable Clone(Cloner cloner) { 50 79 return new ValueConfiguration(this, cloner); 51 80 } 81 #endregion 52 82 53 protected virtual void AddChildParameterConfigurations(IParameterizedNamedItem parameterizedItem) { 54 foreach (var childParameter in parameterizedItem.Parameters) { 55 var pc = ParameterConfiguration.Create(parameterizedItem, childParameter); 56 if (pc != null) this.ParameterConfigurations.Add(pc); 83 protected virtual void PopulateParameterConfigurations() { 84 if (this.constrainedValue.Value is IParameterizedNamedItem) { 85 var parameterizedItem = this.constrainedValue.Value as IParameterizedNamedItem; 86 foreach (var childParameter in parameterizedItem.Parameters) { 87 var pc = ParameterConfiguration.Create(parameterizedItem, childParameter); 88 if (pc != null) this.ParameterConfigurations.Add(pc); 89 } 57 90 } 58 91 } 59 protected virtual void Clear ChildParameterConfigurations() {92 protected virtual void ClearParameterConfigurations() { 60 93 ParameterConfigurations.Clear(); 61 94 } 62 63 #region IItem Members 64 public string ItemDescription { 65 get { return value.ItemDescription; } 95 96 private void RegisterEvents() { 97 if (this.RangeConstraint != null) this.RangeConstraint.ToStringChanged += new EventHandler(RangeConstraint_ToStringChanged); 98 if (this.ConstrainedValue != null) this.ConstrainedValue.ToStringChanged += new EventHandler(ConstrainedValue_ToStringChanged); 99 } 100 private void DeregisterEvents() { 101 if (this.RangeConstraint != null) this.RangeConstraint.ToStringChanged += new EventHandler(RangeConstraint_ToStringChanged); 102 if (this.ConstrainedValue != null) this.ConstrainedValue.ToStringChanged += new EventHandler(ConstrainedValue_ToStringChanged); 66 103 } 67 104 68 public System.Drawing.Image ItemImage { 69 get { return value.ItemImage; } 105 void ConstrainedValue_ToStringChanged(object sender, EventArgs e) { 106 OnToStringChanged(); 107 } 108 void RangeConstraint_ToStringChanged(object sender, EventArgs e) { 109 OnToStringChanged(); 70 110 } 71 111 72 public string ItemName { 73 get { return value.ItemDescription; } 112 #region IItem Members 113 public override string ItemDescription { 114 get { return (constrainedValue != null && constrainedValue.Value != null) ? constrainedValue.Value.ItemDescription : base.ItemDescription; } 74 115 } 75 116 76 public Version ItemVersion { 77 get { return value.ItemVersion; } 117 public override Image ItemImage { 118 get { return (constrainedValue != null && constrainedValue.Value != null) ? constrainedValue.Value.ItemImage : base.ItemImage; } 119 } 120 121 public override string ItemName { 122 get { return (constrainedValue != null && constrainedValue.Value != null) ? constrainedValue.Value.ItemDescription : base.ItemName; } 78 123 } 79 124 #endregion 80 125 81 #region Events 82 public virtual event EventHandler ItemImageChanged; 83 protected virtual void OnItemImageChanged(object sender, EventArgs e) { 84 var handler = ItemImageChanged; 85 if (handler != null) handler(sender, e); 86 } 87 88 public virtual event EventHandler ToStringChanged; 89 protected virtual void OnStringChanged(object sender, EventArgs e) { 90 var handler = ToStringChanged; 91 if (handler != null) handler(this, e); // important to set 'this' as sender 92 } 93 126 #region Event Handlers 94 127 public virtual event EventHandler ValueChanged; 95 128 protected virtual void OnValueChanged() { … … 97 130 if (handler != null) handler(this, EventArgs.Empty); 98 131 } 132 133 public virtual event EventHandler OptimizeChanged; 134 protected virtual void OnOptimizeChanged() { 135 var handler = OptimizeChanged; 136 if (handler != null) handler(this, EventArgs.Empty); 137 } 99 138 #endregion 100 139 101 140 public override string ToString() { 102 return value.ItemName; 141 if (ConstrainedValue != null && ConstrainedValue.Value != null) { 142 if(Optimize) { 143 return string.Format("{0}: {1}", ConstrainedValue.Value.ItemName, RangeConstraint); 144 } else { 145 return string.Format("{0}: {1}", ConstrainedValue.Value.ItemName, ConstrainedValue.Value); 146 } 147 } else { 148 return base.ToString(); 149 } 150 103 151 } 104 152 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/HeuristicLab.Problems.MetaOptimization-3.3.csproj
r4839 r4981 88 88 <ItemGroup> 89 89 <Compile Include="Analyzers\BestParameterConfigurationAnalyzer.cs" /> 90 <Compile Include="Encodings\RangeConstraints\ConstrainedValue.cs"> 91 <SubType>Code</SubType> 92 </Compile> 90 93 <Compile Include="Encodings\ValueConfigurations\ValueConfiguration.cs" /> 94 <Compile Include="Encodings\ValueConfigurations\CheckedValueConfigurationCollection.cs" /> 95 <Compile Include="Interfaces\ICheckedValueConfigurationCollection.cs" /> 96 <Compile Include="Interfaces\IOptimizable.cs" /> 91 97 <Compile Include="Interfaces\IParameterConfigurationCreator.cs" /> 92 98 <Compile Include="Creators\RandomParameterConfigurationCreator.cs" /> … … 99 105 <Compile Include="Encodings\ParameterConfigurations\ParameterConfiguration.cs" /> 100 106 <Compile Include="Interfaces\IValueConfiguration.cs" /> 101 <Compile Include=" Range.cs" />107 <Compile Include="Encodings\RangeConstraints\Range.cs" /> 102 108 <Compile Include="Properties\AssemblyInfo.cs" /> 103 109 <Compile Include="MetaOptimizationProblem.cs" /> -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IParameterConfiguration.cs
r4839 r4981 2 2 using HeuristicLab.Core; 3 3 using System.Collections.Generic; 4 using HeuristicLab.Data; 5 using HeuristicLab.Common; 4 6 5 7 namespace HeuristicLab.Problems.MetaOptimization { 6 public interface IParameterConfiguration : INamedItem { 7 bool OptimizationEnabled { get; set; } 8 public interface IParameterConfiguration : IOptimizable, INamedItem { 8 9 string ParameterName { get; set; } 9 10 Type ParameterDataType { get; } 10 IChecked ItemList<IValueConfiguration>ValueConfigurations { get; }11 ICheckedValueConfigurationCollection ValueConfigurations { get; } 11 12 IValueConfiguration ActualValueConfiguration { get; set; } 12 Type ValueDataType { get; }13 13 IEnumerable<IItem> ValidValues { get; } 14 15 event EventHandler OptimizationEnabledChanged;16 14 } 17 15 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IRange.cs
r4839 r4981 5 5 6 6 namespace HeuristicLab.Problems.MetaOptimization { 7 public interface IRange <T> : IItem where T : class, IItem, IStringConvertibleValue, IDeepCloneable {8 TLowerBound { get; set; }9 TUpperBound { get; set; }10 TStepSize { get; set; }7 public interface IRange : IItem, IStringConvertibleValue { 8 object LowerBound { get; set; } 9 object UpperBound { get; set; } 10 object StepSize { get; set; } 11 11 12 12 event EventHandler LowerBoundChanged; … … 14 14 event EventHandler StepSizeChanged; 15 15 } 16 17 public interface IRange<T> : IRange, IItem where T : class { 18 new T LowerBound { get; set; } 19 new T UpperBound { get; set; } 20 new T StepSize { get; set; } 21 } 16 22 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IValueConfiguration.cs
r4839 r4981 1 1 using System; 2 2 using HeuristicLab.Core; 3 using HeuristicLab.Data; 3 4 4 5 namespace HeuristicLab.Problems.MetaOptimization { 5 public interface IValueConfiguration : IItem { 6 IItem Value { get; set; } 7 Type ValueDataType { get; } 8 IItemList<IParameterConfiguration> ParameterConfigurations { get; } 9 6 public interface IValueConfiguration : IOptimizable, IItem { 7 IItemCollection<IParameterConfiguration> ParameterConfigurations { get; } 8 IRange RangeConstraint { get; } 10 9 event EventHandler ValueChanged; 11 10 }
Note: See TracChangeset
for help on using the changeset viewer.