Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/29/09 14:44:07 (15 years ago)
Author:
mkommend
Message:

first stable version of CEDMA with new database backend (ticket #712)

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  
    326326        ResultsEntry entry = GetResultsEntry(point);
    327327        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"));
    330329          PluginManager.ControlManager.ShowControl(model.CreateView());
    331330        }
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Core/3.3/HeuristicLab.CEDMA.Core-3.3.csproj

    r2194 r2207  
    108108  </ItemGroup>
    109109  <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>
    114110    <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
    115111      <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Core/3.3/Results.cs

    r2194 r2207  
    5858    }
    5959
    60     private string[] multiDimensionalOrdinalVariables = new string[] { "VariableImpacts: EvaluationImpact", "VariableImpacts: QualityImpact" };
     60    private string[] multiDimensionalOrdinalVariables;
    6161    public string[] MultiDimensionalOrdinalVariables {
    6262      get { return multiDimensionalOrdinalVariables; }
     
    7474    public Results(IModelingDatabase database) {
    7575      this.database = database;
     76      multiDimensionalOrdinalVariables = database.GetAllResultsForInputVariables().Select(x => "VariableImpacts: "+ x.Name).ToArray();
    7677    }
    7778
     
    9394        modelEntry.Set("PersistedData", model.Data);
    9495        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);
    95107        entries.Add(modelEntry);
    96108      }
     
    100112      return entries;
    101113    }
    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     //}
    149114
    150115    private bool IsAlmost(double x, double y) {
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Core/3.3/TableResultsView.cs

    r2139 r2207  
    1010using HeuristicLab.CEDMA.Core;
    1111using HeuristicLab.PluginInfrastructure;
    12 using HeuristicLab.CEDMA.DB.Interfaces;
    1312
    1413namespace HeuristicLab.CEDMA.Core {
     
    7069        DataGridView.HitTestInfo hitInfo = dataGridView.HitTest(e.X, e.Y);
    7170        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"));
    7472        PluginManager.ControlManager.ShowControl(model.CreateView());
    7573      }
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs

    r2204 r2207  
    1818      UpdateControls();
    1919      dispatcher.Changed += (sender, args) => UpdateControls();
    20       this.targetVariableList.CheckOnClick = true;
    2120      this.inputVariableList.CheckOnClick = true;
    2221    }
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj

    r2195 r2207  
    133133      <Name>HeuristicLab.CEDMA.Core-3.3</Name>
    134134    </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>
    143135    <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
    144136      <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs

    r2205 r2207  
    193193    }
    194194
     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
    195201    #endregion
    196202
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/HeuristicLab.Modeling.Database.SQLServerCompact-3.2.csproj

    r2194 r2207  
    9999      <Name>HeuristicLab.Data-3.2</Name>
    100100    </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>
    105101    <ProjectReference Include="..\..\HeuristicLab.Modeling.Database\3.2\HeuristicLab.Modeling.Database-3.2.csproj">
    106102      <Project>{E84E5717-79F8-498F-A5E0-A055C4EC086B}</Project>
     
    122118    <Compile Include="DataObjects\InputVariableResult.cs" />
    123119    <Compile Include="DataObjects\Model.cs" />
     120    <Compile Include="HeuristicLabModelingDatabaseSQLServerCompactPlugin.cs" />
    124121    <Compile Include="ModelingDataContext.cs" />
    125122    <Compile Include="DataObjects\ModelResult.cs" />
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database/3.2/HeuristicLabModelingDatabasePlugin.cs

    r2188 r2207  
    2828  [ClassInfo(Name = "HeuristicLab.Modeling.Database-3.2")]
    2929  [PluginFile(Filename = "HeuristicLab.Modeling.Database-3.2.dll", Filetype = PluginFileType.Assembly)]
     30  [Dependency(Dependency = "HeuristicLab.Modeling-3.2")]
    3031  public class HeuristicLabModelingDatabasePlugin : PluginBase {
    3132  }
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.Modeling.Database/3.2/IModelingDatabase.cs

    r2205 r2207  
    3030    IEnumerable<IModel> GetAllModels();
    3131    IEnumerable<IResult> GetAllResults();
     32    IEnumerable<IResult> GetAllResultsForInputVariables();
    3233    IEnumerable<IModelResult> GetModelResults(IModel model);
    33     IEnumerable<IInputVariableResult> GetInputVariableResults(IModel model);
     34    IEnumerable<IInputVariableResult> GetInputVariableResults(IModel model);   
    3435  }
    3536}
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.SQLServerCompact/3.2/HeuristicLab.SQLServerCompact-3.2.csproj

    r2182 r2207  
    8282  <ItemGroup>
    8383    <Compile Include="Properties\AssemblyInfo.cs" />
    84     <Compile Include="SQLServerCompactPlugin.cs" />
     84    <Compile Include="HeuristicLabSQLServerCompactPlugin.cs" />
    8585  </ItemGroup>
    8686  <ItemGroup>
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.SQLServerCompact/3.2/HeuristicLabSQLServerCompactPlugin.cs

    r2201 r2207  
    77
    88namespace 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)]
    1111  [PluginFile(Filename = "sqlceca35.dll", Filetype = PluginFileType.Assembly)]
    1212  [PluginFile(Filename = "sqlcecompact35.dll", Filetype = PluginFileType.Assembly)]
     
    1717  [PluginFile(Filename = "sqlcese35.dll", Filetype = PluginFileType.Assembly)]
    1818  [PluginFile(Filename = "System.Data.SqlServerCe.Entity.dll", Filetype = PluginFileType.Assembly)]
    19   public class SQLServerCompactPlugin : PluginBase {
     19  public class HeuristicLabSQLServerCompactPlugin : PluginBase {
    2020  }
    2121}
  • branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.sln

    r2194 r2207  
    239239EndProject
    240240Project("{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}"
     241EndProject
     242Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.SQLServerCompact-3.2", "HeuristicLab.SQLServerCompact\3.2\HeuristicLab.SQLServerCompact-3.2.csproj", "{31DD6385-7276-49ED-9533-823D4CDF3D2A}"
    241243EndProject
    242244Global
     
    38353837    {EC1AA756-D612-4FA6-AA52-25CF4F8E3836}.Visualization Debug|x86.ActiveCfg = Debug|x86
    38363838    {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
    38373875  EndGlobalSection
    38383876  GlobalSection(SolutionProperties) = preSolution
     
    39233961    {E84E5717-79F8-498F-A5E0-A055C4EC086B} = {410732DB-725A-4824-896B-C298978343C0}
    39243962    {EC1AA756-D612-4FA6-AA52-25CF4F8E3836} = {410732DB-725A-4824-896B-C298978343C0}
     3963    {31DD6385-7276-49ED-9533-823D4CDF3D2A} = {410732DB-725A-4824-896B-C298978343C0}
    39253964    {A9E282EA-180F-4233-B809-AEDF0787545C} = {78982D7C-D63D-4A3D-AE1F-F58AC007603B}
    39263965    {BF7D9494-A586-457B-8DF9-ED599F9E6A71} = {78982D7C-D63D-4A3D-AE1F-F58AC007603B}
Note: See TracChangeset for help on using the changeset viewer.