Changeset 2207 for branches/HeuristicLab.Modeling Database Backend
- Timestamp:
- 07/29/09 14:44:07 (15 years ago)
- Location:
- branches/HeuristicLab.Modeling Database Backend/sources
- Files:
-
- 1 added
- 12 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Charting/3.3/BubbleChart.cs
r2160 r2207 326 326 ResultsEntry entry = GetResultsEntry(point); 327 327 if (entry != null) { 328 string serializedData = (string)entry.Get(Ontology.SerializedData.Uri.Replace(Ontology.CedmaNameSpace, "")); 329 var model = (IItem)PersistenceManager.RestoreFromGZip(Convert.FromBase64String(serializedData)); 328 var model = (IItem)PersistenceManager.RestoreFromGZip((byte[])entry.Get("PersistedData")); 330 329 PluginManager.ControlManager.ShowControl(model.CreateView()); 331 330 } -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Core/3.3/HeuristicLab.CEDMA.Core-3.3.csproj
r2194 r2207 108 108 </ItemGroup> 109 109 <ItemGroup> 110 <ProjectReference Include="..\..\HeuristicLab.CEDMA.DB.Interfaces\3.3\HeuristicLab.CEDMA.DB.Interfaces-3.3.csproj">111 <Project>{4F9BB789-D561-436B-B226-2BF44B7D0804}</Project>112 <Name>HeuristicLab.CEDMA.DB.Interfaces-3.3</Name>113 </ProjectReference>114 110 <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj"> 115 111 <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project> -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Core/3.3/Results.cs
r2194 r2207 58 58 } 59 59 60 private string[] multiDimensionalOrdinalVariables = new string[] { "VariableImpacts: EvaluationImpact", "VariableImpacts: QualityImpact" };60 private string[] multiDimensionalOrdinalVariables; 61 61 public string[] MultiDimensionalOrdinalVariables { 62 62 get { return multiDimensionalOrdinalVariables; } … … 74 74 public Results(IModelingDatabase database) { 75 75 this.database = database; 76 multiDimensionalOrdinalVariables = database.GetAllResultsForInputVariables().Select(x => "VariableImpacts: "+ x.Name).ToArray(); 76 77 } 77 78 … … 93 94 modelEntry.Set("PersistedData", model.Data); 94 95 modelEntry.Set("TargetVariable", model.TargetVariable.Name); 96 Dictionary<HeuristicLab.Modeling.Database.IVariable, ResultsEntry> inputVariableResultsEntries = 97 new Dictionary<HeuristicLab.Modeling.Database.IVariable, ResultsEntry>(); 98 99 foreach (IInputVariableResult inputVariableResult in database.GetInputVariableResults(model)) { 100 if (!inputVariableResultsEntries.ContainsKey(inputVariableResult.Variable)) { 101 inputVariableResultsEntries[inputVariableResult.Variable] = new ResultsEntry(); 102 inputVariableResultsEntries[inputVariableResult.Variable].Set("InputVariableName", inputVariableResult.Variable.Name); 103 } 104 inputVariableResultsEntries[inputVariableResult.Variable].Set(inputVariableResult.Result.Name, inputVariableResult.Value); 105 } 106 modelEntry.Set("VariableImpacts", inputVariableResultsEntries.Values); 95 107 entries.Add(modelEntry); 96 108 } … … 100 112 return entries; 101 113 } 102 103 //private IEnumerable<ResultsEntry> SelectVariableImpacts(string modelUri) {104 // var inputVariableNameBindings = store.Query(105 // "<" + modelUri + "> <" + Ontology.HasInputVariable + "> ?InputVariable ." +106 // "?InputVariable <" + Ontology.Name + "> ?InputName .",107 // 0, PAGE_SIZE);108 109 // var qualityImpactBindings = store.Query(110 // "<" + modelUri + "> <" + Ontology.HasInputVariable + "> ?InputVariable ." +111 // "?InputVariable <" + Ontology.QualityImpact + "> ?QualityImpact .",112 // 0, PAGE_SIZE);113 114 // var evaluationImpactBindings = store.Query(115 // "<" + modelUri + "> <" + Ontology.HasInputVariable + "> ?InputVariable ." +116 // "?InputVariable <" + Ontology.EvaluationImpact + "> ?EvaluationImpact .",117 // 0, PAGE_SIZE);118 // Dictionary<object, ResultsEntry> inputVariableAttributes = new Dictionary<object, ResultsEntry>();119 120 // foreach (var inputVariableNameBinding in inputVariableNameBindings) {121 // object inputVariable = inputVariableNameBinding.Get("InputVariable");122 // object name = ((Literal)inputVariableNameBinding.Get("InputName")).Value;123 // if (!inputVariableAttributes.ContainsKey(inputVariable)) {124 // inputVariableAttributes[inputVariable] = new ResultsEntry();125 // inputVariableAttributes[inputVariable].Set("InputVariableName", name);126 // }127 // }128 129 // foreach (var qualityImpactBinding in qualityImpactBindings) {130 // double qualityImpact = (double)((Literal)qualityImpactBinding.Get("QualityImpact")).Value;131 // object inputVariable = qualityImpactBinding.Get("InputVariable");132 // if (!IsAlmost(qualityImpact, 1.0)) {133 // if (inputVariableAttributes[inputVariable].Get("QualityImpact") == null)134 // inputVariableAttributes[inputVariable].Set("QualityImpact", qualityImpact);135 // } else inputVariableAttributes.Remove(inputVariable);136 // }137 138 // foreach (var evaluationImpactBinding in evaluationImpactBindings) {139 // double evaluationImpact = (double)((Literal)evaluationImpactBinding.Get("EvaluationImpact")).Value;140 // object inputVariable = evaluationImpactBinding.Get("InputVariable");141 // if (!IsAlmost(evaluationImpact, 0.0)) {142 // if (inputVariableAttributes.ContainsKey(inputVariable) && inputVariableAttributes[inputVariable].Get("EvaluationImpact") == null)143 // inputVariableAttributes[inputVariable].Set("EvaluationImpact", evaluationImpact);144 // } else inputVariableAttributes.Remove(inputVariable);145 // }146 147 // return inputVariableAttributes.Values;148 //}149 114 150 115 private bool IsAlmost(double x, double y) { -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Core/3.3/TableResultsView.cs
r2139 r2207 10 10 using HeuristicLab.CEDMA.Core; 11 11 using HeuristicLab.PluginInfrastructure; 12 using HeuristicLab.CEDMA.DB.Interfaces;13 12 14 13 namespace HeuristicLab.CEDMA.Core { … … 70 69 DataGridView.HitTestInfo hitInfo = dataGridView.HitTest(e.X, e.Y); 71 70 ResultsEntry entry = (ResultsEntry)dataGridView.Rows[hitInfo.RowIndex].Tag; 72 string serializedData = (string)entry.Get(Ontology.SerializedData.Uri.Replace(Ontology.CedmaNameSpace, "")); 73 var model = (IItem)PersistenceManager.RestoreFromGZip(Convert.FromBase64String(serializedData)); 71 var model = (IItem)PersistenceManager.RestoreFromGZip((byte[])entry.Get("PersistedData")); 74 72 PluginManager.ControlManager.ShowControl(model.CreateView()); 75 73 } -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs
r2204 r2207 18 18 UpdateControls(); 19 19 dispatcher.Changed += (sender, args) => UpdateControls(); 20 this.targetVariableList.CheckOnClick = true;21 20 this.inputVariableList.CheckOnClick = true; 22 21 } -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj
r2195 r2207 133 133 <Name>HeuristicLab.CEDMA.Core-3.3</Name> 134 134 </ProjectReference> 135 <ProjectReference Include="..\..\HeuristicLab.CEDMA.DB.Interfaces\3.3\HeuristicLab.CEDMA.DB.Interfaces-3.3.csproj">136 <Project>{4F9BB789-D561-436B-B226-2BF44B7D0804}</Project>137 <Name>HeuristicLab.CEDMA.DB.Interfaces-3.3</Name>138 </ProjectReference>139 <ProjectReference Include="..\..\HeuristicLab.CEDMA.DB\3.3\HeuristicLab.CEDMA.DB-3.3.csproj">140 <Project>{B3D6D8D9-2B1F-47EC-9C73-77FAECF87310}</Project>141 <Name>HeuristicLab.CEDMA.DB-3.3</Name>142 </ProjectReference>143 135 <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj"> 144 136 <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project> -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs
r2205 r2207 193 193 } 194 194 195 public IEnumerable<IResult> GetAllResultsForInputVariables() { 196 using(ModelingDataContext ctx = new ModelingDataContext(connection) ){ 197 return (from ir in ctx.InputVariableResults select ir.Result).Distinct().ToList().Cast<IResult>(); 198 } 199 } 200 195 201 #endregion 196 202 -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/HeuristicLab.Modeling.Database.SQLServerCompact-3.2.csproj
r2194 r2207 99 99 <Name>HeuristicLab.Data-3.2</Name> 100 100 </ProjectReference> 101 <ProjectReference Include="..\..\HeuristicLab.GP.StructureIdentification\3.3\HeuristicLab.GP.StructureIdentification-3.3.csproj">102 <Project>{74223A32-C726-4978-BE78-37113A18373C}</Project>103 <Name>HeuristicLab.GP.StructureIdentification-3.3</Name>104 </ProjectReference>105 101 <ProjectReference Include="..\..\HeuristicLab.Modeling.Database\3.2\HeuristicLab.Modeling.Database-3.2.csproj"> 106 102 <Project>{E84E5717-79F8-498F-A5E0-A055C4EC086B}</Project> … … 122 118 <Compile Include="DataObjects\InputVariableResult.cs" /> 123 119 <Compile Include="DataObjects\Model.cs" /> 120 <Compile Include="HeuristicLabModelingDatabaseSQLServerCompactPlugin.cs" /> 124 121 <Compile Include="ModelingDataContext.cs" /> 125 122 <Compile Include="DataObjects\ModelResult.cs" /> -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database/3.2/HeuristicLabModelingDatabasePlugin.cs
r2188 r2207 28 28 [ClassInfo(Name = "HeuristicLab.Modeling.Database-3.2")] 29 29 [PluginFile(Filename = "HeuristicLab.Modeling.Database-3.2.dll", Filetype = PluginFileType.Assembly)] 30 [Dependency(Dependency = "HeuristicLab.Modeling-3.2")] 30 31 public class HeuristicLabModelingDatabasePlugin : PluginBase { 31 32 } -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database/3.2/IModelingDatabase.cs
r2205 r2207 30 30 IEnumerable<IModel> GetAllModels(); 31 31 IEnumerable<IResult> GetAllResults(); 32 IEnumerable<IResult> GetAllResultsForInputVariables(); 32 33 IEnumerable<IModelResult> GetModelResults(IModel model); 33 IEnumerable<IInputVariableResult> GetInputVariableResults(IModel model); 34 IEnumerable<IInputVariableResult> GetInputVariableResults(IModel model); 34 35 } 35 36 } -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.SQLServerCompact/3.2/HeuristicLab.SQLServerCompact-3.2.csproj
r2182 r2207 82 82 <ItemGroup> 83 83 <Compile Include="Properties\AssemblyInfo.cs" /> 84 <Compile Include=" SQLServerCompactPlugin.cs" />84 <Compile Include="HeuristicLabSQLServerCompactPlugin.cs" /> 85 85 </ItemGroup> 86 86 <ItemGroup> -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.SQLServerCompact/3.2/HeuristicLabSQLServerCompactPlugin.cs
r2201 r2207 7 7 8 8 namespace HeuristicLab.SQLServerCompact { 9 [ClassInfo(Name = " SQLServerCompact")]10 [PluginFile(Filename = " SQLServerCompact.dll", Filetype = PluginFileType.Assembly)]9 [ClassInfo(Name = "HeuristicLab.SQLServerCompact-3.2")] 10 [PluginFile(Filename = "HeuristicLab.SQLServerCompact-3.2.dll", Filetype = PluginFileType.Assembly)] 11 11 [PluginFile(Filename = "sqlceca35.dll", Filetype = PluginFileType.Assembly)] 12 12 [PluginFile(Filename = "sqlcecompact35.dll", Filetype = PluginFileType.Assembly)] … … 17 17 [PluginFile(Filename = "sqlcese35.dll", Filetype = PluginFileType.Assembly)] 18 18 [PluginFile(Filename = "System.Data.SqlServerCe.Entity.dll", Filetype = PluginFileType.Assembly)] 19 public class SQLServerCompactPlugin : PluginBase {19 public class HeuristicLabSQLServerCompactPlugin : PluginBase { 20 20 } 21 21 } -
branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.sln
r2194 r2207 239 239 EndProject 240 240 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Modeling.Database.SQLServerCompact-3.2", "HeuristicLab.Modeling.Database.SQLServerCompact\3.2\HeuristicLab.Modeling.Database.SQLServerCompact-3.2.csproj", "{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}" 241 EndProject 242 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.SQLServerCompact-3.2", "HeuristicLab.SQLServerCompact\3.2\HeuristicLab.SQLServerCompact-3.2.csproj", "{31DD6385-7276-49ED-9533-823D4CDF3D2A}" 241 243 EndProject 242 244 Global … … 3835 3837 {EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Visualization Debug|x86.ActiveCfg = Debug|x86 3836 3838 {EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Visualization Debug|x86.Build.0 = Debug|x86 3839 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.CEDMA Debug|Any CPU.ActiveCfg = Debug|Any CPU 3840 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.CEDMA Debug|Any CPU.Build.0 = Debug|Any CPU 3841 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.CEDMA Debug|x64.ActiveCfg = Debug|x64 3842 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.CEDMA Debug|x64.Build.0 = Debug|x64 3843 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.CEDMA Debug|x86.ActiveCfg = Debug|x86 3844 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.CEDMA Debug|x86.Build.0 = Debug|x86 3845 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 3846 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Debug|Any CPU.Build.0 = Debug|Any CPU 3847 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Debug|x64.ActiveCfg = Debug|x64 3848 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Debug|x64.Build.0 = Debug|x64 3849 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Debug|x86.ActiveCfg = Debug|x86 3850 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Debug|x86.Build.0 = Debug|x86 3851 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Modeling Debug|Any CPU.ActiveCfg = Debug|Any CPU 3852 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Modeling Debug|Any CPU.Build.0 = Debug|Any CPU 3853 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Modeling Debug|x64.ActiveCfg = Debug|x64 3854 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Modeling Debug|x64.Build.0 = Debug|x64 3855 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Modeling Debug|x86.ActiveCfg = Debug|x86 3856 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Modeling Debug|x86.Build.0 = Debug|x86 3857 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Release|Any CPU.ActiveCfg = Release|Any CPU 3858 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Release|Any CPU.Build.0 = Release|Any CPU 3859 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Release|x64.ActiveCfg = Release|x64 3860 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Release|x64.Build.0 = Release|x64 3861 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Release|x86.ActiveCfg = Release|x86 3862 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Release|x86.Build.0 = Release|x86 3863 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.v3.2 Debug|Any CPU.ActiveCfg = Debug|Any CPU 3864 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.v3.2 Debug|Any CPU.Build.0 = Debug|Any CPU 3865 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.v3.2 Debug|x64.ActiveCfg = Debug|x64 3866 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.v3.2 Debug|x64.Build.0 = Debug|x64 3867 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.v3.2 Debug|x86.ActiveCfg = Debug|x86 3868 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.v3.2 Debug|x86.Build.0 = Debug|x86 3869 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Visualization Debug|Any CPU.ActiveCfg = Debug|Any CPU 3870 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Visualization Debug|Any CPU.Build.0 = Debug|Any CPU 3871 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Visualization Debug|x64.ActiveCfg = Debug|x64 3872 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Visualization Debug|x64.Build.0 = Debug|x64 3873 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Visualization Debug|x86.ActiveCfg = Debug|x86 3874 {31DD6385-7276-49ED-9533-823D4CDF3D2A}.Visualization Debug|x86.Build.0 = Debug|x86 3837 3875 EndGlobalSection 3838 3876 GlobalSection(SolutionProperties) = preSolution … … 3923 3961 {E84E5717-79F8-498F-A5E0-A055C4EC086B} = {410732DB-725A-4824-896B-C298978343C0} 3924 3962 {EC1AA756-D612-4FA6-AA52-25CF4F8E3836} = {410732DB-725A-4824-896B-C298978343C0} 3963 {31DD6385-7276-49ED-9533-823D4CDF3D2A} = {410732DB-725A-4824-896B-C298978343C0} 3925 3964 {A9E282EA-180F-4233-B809-AEDF0787545C} = {78982D7C-D63D-4A3D-AE1F-F58AC007603B} 3926 3965 {BF7D9494-A586-457B-8DF9-ED599F9E6A71} = {78982D7C-D63D-4A3D-AE1F-F58AC007603B}
Note: See TracChangeset
for help on using the changeset viewer.