Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1129


Ignore:
Timestamp:
01/14/09 17:29:48 (16 years ago)
Author:
gkronber
Message:

worked on RDF backend. Implemented query support to load datasets. Queries for dispatcher and results still missing. (#419)

Location:
branches/CEDMA-Refactoring-Ticket419
Files:
2 added
2 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/Console.cs

    r1106 r1129  
    7575    private void ResetConnection() {
    7676      NetTcpBinding binding = new NetTcpBinding();
    77       binding.MaxReceivedMessageSize = 100000000; // 100Mbytes
    78       binding.ReaderQuotas.MaxStringContentLength = 100000000; // also 100M chars
    79       binding.ReaderQuotas.MaxArrayLength = 100000000; // also 100M elements;
     77      binding.ReceiveTimeout = new TimeSpan(1, 0, 0);
     78      binding.MaxReceivedMessageSize = 1000000000; // 100Mbytes
     79      binding.ReaderQuotas.MaxStringContentLength = 1000000000; // also 100M chars
     80      binding.ReaderQuotas.MaxArrayLength = 1000000000; // also 100M elements;
    8081      binding.Security.Mode = SecurityMode.None;
    8182      factory = new ChannelFactory<IStore>(binding);
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/DataSet.cs

    r1116 r1129  
    4141    public string Name {
    4242      get { return name; }
     43      set { name = value; }
    4344    }
    4445
     
    4849        // lazy loading of problem from DB
    4950        if (problem == null) {
    50           var persistedData = Store.Select(new Statement(new Entity(Ontology.CedmaNameSpace + Guid), Ontology.PredicateSerializedData, Ontology.AnyEntity));
     51          var serializedDataVar = new HeuristicLab.CEDMA.DB.Interfaces.Variable("SerializedData");
     52          var persistedData = Store.Query(
     53            new Statement[] { new Statement(new Entity(Ontology.CedmaNameSpace + Guid), Ontology.PredicateSerializedData, serializedDataVar)});
    5154          if (persistedData.Count() == 1) {
    52             Literal persistedLiteral = (Literal)persistedData.First().Property;
     55            Literal persistedLiteral = (Literal)persistedData.First().Get("SerializedData");
    5356            this.problem = (Problem)PersistenceManager.RestoreFromGZip(Convert.FromBase64String((string)persistedLiteral.Value));
    5457          } else
     
    6972      Store = store;
    7073      guid = new Guid(dataSetEntity.Uri.Remove(0, Ontology.CedmaNameSpace.Length));
    71       var names = store.Select(new Statement(dataSetEntity, Ontology.PredicateName, Ontology.AnyEntity));
    72       if (names.Count() > 0) name = (string)((Literal)names.First().Property).Value;
    73       else name = guid.ToString();
     74      name = guid.ToString();
    7475    }
    7576
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/DataSetList.cs

    r1116 r1129  
    5858
    5959    private void ReloadList() {
    60       var statements = store.Select(new Statement(Ontology.AnyEntity, Ontology.PredicateInstanceOf, Ontology.TypeDataSet));
    61       foreach (Statement s in statements) {
    62         DataSet d = new DataSet(store, s.Subject);
     60      HeuristicLab.CEDMA.DB.Interfaces.Variable dataSetVar = new HeuristicLab.CEDMA.DB.Interfaces.Variable("DataSet");
     61      HeuristicLab.CEDMA.DB.Interfaces.Variable dataSetNameVar = new HeuristicLab.CEDMA.DB.Interfaces.Variable("Name");
     62      var bindings = store.Query(
     63        "?DataSet <"+Ontology.PredicateInstanceOf.Uri+"> <"+Ontology.TypeDataSet.Uri+"> ." + Environment.NewLine +
     64        "?DataSet <"+Ontology.PredicateName.Uri+"> ?Name .");
     65      //  new Statement[] {
     66      //    new Statement(dataSetVar, Ontology.PredicateInstanceOf, Ontology.TypeDataSet),
     67      //    new Statement(dataSetVar, Ontology.PredicateName, dataSetNameVar)
     68      //});
     69      foreach (var binding in bindings) {
     70        DataSet d = new DataSet(store, (Entity)binding.Get("DataSet"));
     71        d.Name = (string)((Literal)binding.Get("Name")).Value;
    6372        lock (dataSetList) {
    6473          dataSetList.Add(d);
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/Results.cs

    r1116 r1129  
    7474      if (store == null) yield break;
    7575
    76       var models = store.Select(new Statement(dataSetEntity, Ontology.PredicateHasModel, Ontology.AnyEntity));
     76      //var models = store.Select(new Statement(dataSetEntity, Ontology.PredicateHasModel, Ontology.AnyEntity));
    7777
    78       //var results = store.Select(new Statement(dataSetEntity, Ontology.PredicateHasModel, Ontology.AnyEntity))
    79       //   .SelectMany(x => store.Select(new SelectFilter(
    80       //     new Entity[] { (Entity)x.Property },
    81       //     new Entity[] { Ontology.PredicateModelAttribute },
    82       //     new Resource[] { Ontology.AnyEntity })))
    83       //   .SelectMany(x =>
    84       //     store.Select(
    85       //        new SelectFilter(
    86       //        new Entity[] { (Entity)x.Property },
    87       //        new Entity[] { Ontology.PredicateModelAttributeName },
    88       //        new Entity[] { Ontology.AnyEntity })).Select(y =>
    89       //          new {
    90       //            Model = x.Subject,
    91       //            Attribute = (Entity)x.Property,
    92       //            AttributeName = (Literal)y.Property
    93       //          }))
    94       //   .SelectMany(x =>
    95       //     store.Select(
    96       //       new Statement(x.Attribute, Ontology.PredicateModelAttributeValue, Ontology.AnyEntity))
    97       //       .Select(y =>
    98       //         new {
    99       //           Model = x.Model.Uri,
    100       //           AttributeName = x.AttributeName.Value,
    101       //           AttributeValue = ((Literal)y.Property).Value
    102       //         })).GroupBy(x => x.Model);
     78      ////var results = store.Select(new Statement(dataSetEntity, Ontology.PredicateHasModel, Ontology.AnyEntity))
     79      ////   .SelectMany(x => store.Select(new SelectFilter(
     80      ////     new Entity[] { (Entity)x.Property },
     81      ////     new Entity[] { Ontology.PredicateModelAttribute },
     82      ////     new Resource[] { Ontology.AnyEntity })))
     83      ////   .SelectMany(x =>
     84      ////     store.Select(
     85      ////        new SelectFilter(
     86      ////        new Entity[] { (Entity)x.Property },
     87      ////        new Entity[] { Ontology.PredicateModelAttributeName },
     88      ////        new Entity[] { Ontology.AnyEntity })).Select(y =>
     89      ////          new {
     90      ////            Model = x.Subject,
     91      ////            Attribute = (Entity)x.Property,
     92      ////            AttributeName = (Literal)y.Property
     93      ////          }))
     94      ////   .SelectMany(x =>
     95      ////     store.Select(
     96      ////       new Statement(x.Attribute, Ontology.PredicateModelAttributeValue, Ontology.AnyEntity))
     97      ////       .Select(y =>
     98      ////         new {
     99      ////           Model = x.Model.Uri,
     100      ////           AttributeName = x.AttributeName.Value,
     101      ////           AttributeValue = ((Literal)y.Property).Value
     102      ////         })).GroupBy(x => x.Model);
    103103
    104       entries = new List<ResultsEntry>();
    105       foreach (var model in models) {
    106         var attributes = store.Select(new Statement((Entity)model.Property, Ontology.PredicateModelAttribute, Ontology.AnyEntity));
     104      //entries = new List<ResultsEntry>();
     105      //foreach (var model in models) {
     106      //  var attributes = store.Select(new Statement((Entity)model.Property, Ontology.PredicateModelAttribute, Ontology.AnyEntity));
    107107
    108         foreach (var attr in attributes) {
    109           var namesAndValues = store
    110             .Select(new SelectFilter(new Entity[] { (Entity)attr.Property },
    111               new Entity[] { Ontology.PredicateModelAttributeName, Ontology.PredicateModelAttributeValue },
    112               new Entity[] { Ontology.AnyEntity }));
    113         }
    114       }
     108      //  foreach (var attr in attributes) {
     109      //    var namesAndValues = store
     110      //      .Select(new SelectFilter(new Entity[] { (Entity)attr.Property },
     111      //        new Entity[] { Ontology.PredicateModelAttributeName, Ontology.PredicateModelAttributeValue },
     112      //        new Entity[] { Ontology.AnyEntity }));
     113      //  }
     114      //}
    115115
    116       foreach (var row in results) {
    117         ResultsEntry entry = new ResultsEntry(row.First().Model);
    118         foreach (var attr in row) {
    119           entry.Set((string)attr.AttributeName, attr.AttributeValue);
    120         }
    121         entries.Add(entry);
    122         yield return entry;
    123       }
     116      //foreach (var row in results) {
     117      //  ResultsEntry entry = new ResultsEntry(row.First().Model);
     118      //  foreach (var attr in row) {
     119      //    entry.Set((string)attr.AttributeName, attr.AttributeValue);
     120      //  }
     121      //  entries.Add(entry);
     122      //  yield return entry;
     123      //}
    124124
    125       FireChanged();
    126       cached = true;
     125      //FireChanged();
     126      //cached = true;
    127127    }
    128128
     
    130130      if (store == null) yield break;
    131131
    132       var attributeNames =
    133         store.Select(new Statement(Ontology.AnyEntity, Ontology.PredicateModelAttributeName, Ontology.AnyEntity))
    134         .Select(s => (string)((Literal)s.Property).Value)       
    135         .Distinct();
    136       foreach (var name in attributeNames) {
    137         yield return name;
    138       }
     132      //var attributeNames =
     133      //  store.Select(new Statement(Ontology.AnyEntity, Ontology.PredicateModelAttributeName, Ontology.AnyEntity))
     134      //  .Select(s => (string)((Literal)s.Property).Value)       
     135      //  .Distinct();
     136      //foreach (var name in attributeNames) {
     137      //  yield return name;
     138      //}
    139139    }
    140140  }
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.DB.Interfaces/HeuristicLab.CEDMA.DB.Interfaces.csproj

    r1116 r1129  
    7070  </ItemGroup>
    7171  <ItemGroup>
    72     <Compile Include="IVariableBindings.cs" />
     72    <Compile Include="Variable.cs" />
    7373    <Compile Include="Ontology.cs" />
    7474    <Compile Include="SelectFilter.cs" />
     
    8282    <Compile Include="HeuristicLabCedmaDbInterfacesPlugin.cs" />
    8383    <Compile Include="Properties\AssemblyInfo.cs" />
     84    <Compile Include="VariableBindings.cs" />
    8485  </ItemGroup>
    8586  <ItemGroup>
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.DB.Interfaces/IStore.cs

    r1116 r1129  
    3535
    3636    [OperationContract]
    37     ICollection<IVariableBindings> Select(ICollection<Statement> query);
     37    ICollection<VariableBindings> Query(ICollection<Statement> query);
     38
     39    [OperationContract(Name="QueryN3")]
     40    ICollection<VariableBindings> Query(string query);
    3841  }
    3942}
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.DB.Interfaces/Statement.cs

    r544 r1129  
    3232  [KnownType(typeof(Entity))]
    3333  [KnownType(typeof(SerializedLiteral))]
     34  [KnownType(typeof(Variable))]
    3435  public class Statement {
    3536    [DataMember]
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.DB/HeuristicLab.CEDMA.DB.csproj

    r1116 r1129  
    7474  </ItemGroup>
    7575  <ItemGroup>
    76     <Compile Include="VariableBindings.cs" />
    7776    <Compile Include="Store.cs" />
    7877    <Compile Include="HeuristicLabCedmaDbPlugin.cs" />
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.DB/Store.cs

    r1116 r1129  
    5454    }
    5555
    56     public ICollection<IVariableBindings> Select(ICollection<Statement> query) {
    57       SemWeb.Query.QueryResultSink resultSink = new MyQueryResultSink();
     56
     57    public ICollection<VariableBindings> Query(string query) {
     58      MyQueryResultSink resultSink = new MyQueryResultSink();
     59      SemWeb.N3Reader n3Reader = new SemWeb.N3Reader(new StringReader(query));
     60      SemWeb.Query.GraphMatch matcher = new SemWeb.Query.GraphMatch(n3Reader);
     61      matcher.Run(store, resultSink);
     62      return resultSink.Bindings;
     63    }
     64
     65    public ICollection<VariableBindings> Query(ICollection<Statement> query) {
     66      MyQueryResultSink resultSink = new MyQueryResultSink();
    5867      Translate(query).Run(store, resultSink);
    5968      return resultSink.Bindings;
     
    6170
    6271    private SemWeb.Query.Query Translate(ICollection<Statement> query) {
    63       SemWeb.Query.GraphMatch graphMatch = new SemWeb.Query.GraphMatch();
    64       foreach(Statement statement in query) {
    65         graphMatch.AddGraphStatement(Translate(statement));
    66       }
    67       return graphMatch;
     72      Dictionary<object, object> translatedObjects = new Dictionary<object, object>();
     73      SemWeb.MemoryStore queryStore = new SemWeb.MemoryStore(query.Select(st => Translate(st, translatedObjects)).ToArray());
     74
     75      return new SemWeb.Query.GraphMatch(queryStore);
    6876    }
    6977
     
    8593    //}
    8694
    87     private SemWeb.SelectFilter Translate(SelectFilter filter) {
    88       SemWeb.SelectFilter f = new SemWeb.SelectFilter();
    89       f.Subjects = Array.ConvertAll(filter.Subjects, s => Translate(s));
    90       f.Predicates = Array.ConvertAll(filter.Predicates, p => Translate(p));
    91       f.Objects = Array.ConvertAll(filter.Properties, prop => Translate(prop));
    92       return f;
    93     }
    94 
    95     private SemWeb.Entity Translate(Entity e) {
     95    //private SemWeb.SelectFilter Translate(SelectFilter filter) {
     96    //  SemWeb.SelectFilter f = new SemWeb.SelectFilter();
     97    //  f.Subjects = Array.ConvertAll(filter.Subjects, s => Translate(s));
     98    //  f.Predicates = Array.ConvertAll(filter.Predicates, p => Translate(p));
     99    //  f.Objects = Array.ConvertAll(filter.Properties, prop => Translate(prop));
     100    //  return f;
     101    //}
     102
     103    private static SemWeb.Entity Translate(Entity e) {
    96104      return e.Uri == null ? null : new SemWeb.Entity(e.Uri);
    97105    }
    98106
    99     private SemWeb.Resource Translate(Resource prop) {
     107    private static SemWeb.Resource Translate(Resource prop) {
    100108      if (prop is Literal) {
    101109        return TranslateLiteral((Literal)prop);
     
    107115    }
    108116
    109     private Statement Translate(SemWeb.Statement statement) {
    110       if (statement.Object is SemWeb.Literal) {
    111         return new Statement(
    112           new Entity(statement.Subject.Uri),
    113           new Entity(statement.Predicate.Uri),
    114           TranslateLiteral((SemWeb.Literal)statement.Object));
    115       } else {
    116         return new Statement(
    117           new Entity(statement.Subject.Uri),
    118           new Entity(statement.Predicate.Uri),
    119           new Entity(((SemWeb.Entity)statement.Object).Uri));
    120       }
    121     }
    122 
    123     private SemWeb.Statement Translate(Statement statement) {
     117    private static Statement Translate(SemWeb.Statement statement) {
     118      return Translate(statement, new Dictionary<object, object>());
     119    }
     120
     121    private static Statement Translate(SemWeb.Statement statement, Dictionary<object, object> translatedObjects) {
     122      if (!translatedObjects.ContainsKey(statement.Subject)) {
     123        translatedObjects[statement.Subject] = new Entity(statement.Subject.Uri);
     124      }
     125      if (!translatedObjects.ContainsKey(statement.Predicate)) {
     126        translatedObjects[statement.Predicate] = new Entity(statement.Predicate.Uri);
     127      }
     128      if (!translatedObjects.ContainsKey(statement.Object)) {
     129        if (statement.Object is SemWeb.Literal) {
     130          translatedObjects[statement.Object] = TranslateLiteral((SemWeb.Literal)statement.Object);
     131        } else {
     132          translatedObjects[statement.Object] = new Entity(((SemWeb.Entity)statement.Object).Uri);
     133        }
     134      }
     135
     136      Entity subjectEntity = (Entity)translatedObjects[statement.Subject];
     137      Entity predicateEntity = (Entity)translatedObjects[statement.Predicate];
     138      Resource property = (Resource)translatedObjects[statement.Object];
     139
     140      return new Statement(
     141        subjectEntity,
     142        predicateEntity,
     143        property);
     144    }
     145
     146    private static SemWeb.Statement Translate(Statement statement) {
     147      return Translate(statement, new Dictionary<object, object>());
     148    }
     149
     150    private static SemWeb.Statement Translate(Statement statement, Dictionary<object, object> translatedObjects) {
     151      if (!translatedObjects.ContainsKey(statement.Subject)) {
     152        translatedObjects[statement.Subject] = Translate(statement.Subject);
     153      }
     154      if (!translatedObjects.ContainsKey(statement.Predicate)) {
     155        translatedObjects[statement.Predicate] = Translate(statement.Predicate);
     156      }
     157      if (!translatedObjects.ContainsKey(statement.Property)) {
     158        translatedObjects[statement.Property] = Translate(statement.Property);
     159      }
     160
     161      SemWeb.Entity subject = (SemWeb.Entity)translatedObjects[statement.Subject];
     162      SemWeb.Entity predicate = (SemWeb.Entity)translatedObjects[statement.Predicate];
     163      SemWeb.Resource property = (SemWeb.Resource)translatedObjects[statement.Property];
     164
    124165      return new SemWeb.Statement(
    125         Translate(statement.Subject),
    126         Translate(statement.Predicate),
    127         Translate(statement.Property));
    128     }
    129 
    130     private SemWeb.Literal TranslateLiteral(SerializedLiteral l) {
     166        subject,
     167        predicate,
     168        property);
     169    }
     170
     171    private static SemWeb.Literal TranslateLiteral(SerializedLiteral l) {
    131172      if (l.RawData == null) return null;
    132173      return new SemWeb.Literal(l.RawData, null, "serializedItem");
    133174    }
    134175
    135     private SemWeb.Literal TranslateLiteral(Literal l) {
     176    private static SemWeb.Literal TranslateLiteral(Literal l) {
    136177      if (l.Value == null) return null;
    137178      if (l.Value is double) return SemWeb.Literal.FromValue((double)l.Value);
     
    143184    }
    144185
    145     private Resource TranslateLiteral(SemWeb.Literal l) {
     186    private static Resource TranslateLiteral(SemWeb.Literal l) {
    146187      if (l.DataType == "serializedItem") {
    147188        return new SerializedLiteral(l.Value);
     
    152193      }
    153194    }
     195
     196    private class MyQueryResultSink : SemWeb.Query.QueryResultSink {
     197
     198      private List<VariableBindings> bindings = new List<VariableBindings>();
     199      public ICollection<VariableBindings> Bindings {
     200        get { return bindings.AsReadOnly(); }
     201      }
     202
     203      public override bool Add(SemWeb.Query.VariableBindings result) {
     204        VariableBindings varBindings = new VariableBindings();
     205        foreach (SemWeb.Variable var in result.Variables) {
     206          if (var.LocalName != null && result[var] != null) {
     207            if (result[var] is SemWeb.Literal) {
     208              varBindings.Add(var.LocalName, TranslateLiteral((SemWeb.Literal)result[var]));
     209            } else {
     210              varBindings.Add(var.LocalName, new Entity(((SemWeb.Entity)result[var]).Uri));
     211            }
     212          }
     213          bindings.Add(varBindings);
     214        }
     215        return true;
     216      }
     217    }
    154218  }
    155219}
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Server/Dispatcher.cs

    r1116 r1129  
    5151
    5252    private void FillDispatchQueue() {
    53       Dictionary<Entity, Dictionary<int, int>> numberOfModelsOfTargetVariableOfDataSet = new Dictionary<Entity, Dictionary<int, int>>();
    54       var datasetStatements = store.Select(new Statement(Ontology.AnyEntity, Ontology.PredicateInstanceOf, Ontology.TypeDataSet));
    55       foreach (Statement datasetStatement in datasetStatements) {
    56         numberOfModelsOfTargetVariableOfDataSet.Add(datasetStatement.Subject, new Dictionary<int, int>());
    57         var modelStatements = store.Select(new Statement(datasetStatement.Subject, Ontology.PredicateHasModel, Ontology.AnyEntity));
    58         foreach (Statement modelStatement in modelStatements) {
    59           var modelAttributeStatements = store.Select(new Statement((Entity)modelStatement.Property, Ontology.PredicateModelAttribute, Ontology.AnyEntity));
    60           foreach (Statement modelAttrStatement in modelAttributeStatements) {
    61             var targetVariableStatements = store.Select(new Statement((Entity)modelAttrStatement.Property, Ontology.PredicateModelAttributeName, Ontology.AnyEntity))
    62                .Where(t => (string)((Literal)t.Property).Value == "TargetVariable")
    63                .SelectMany(t => store.Select(new Statement((Entity)modelAttrStatement.Property, Ontology.PredicateModelAttributeValue, Ontology.AnyEntity)))
    64                .GroupBy(t => (int)((Literal)t.Property).Value);
    65             foreach (var targetVariable in targetVariableStatements) {
    66               if (numberOfModelsOfTargetVariableOfDataSet[datasetStatement.Subject].ContainsKey(targetVariable.Key)) {
    67                 numberOfModelsOfTargetVariableOfDataSet[datasetStatement.Subject][targetVariable.Key] = targetVariable.Count();
    68               } else {
    69                 numberOfModelsOfTargetVariableOfDataSet[datasetStatement.Subject].Add(targetVariable.Key, targetVariable.Count());
    70               }
    71             }
    72           }
    73         }
    74       }
    75       foreach (KeyValuePair<Entity, Dictionary<int, int>> dataSetEntry in numberOfModelsOfTargetVariableOfDataSet) {
    76         DataSet dataSet = new DataSet(store, dataSetEntry.Key);
    77         foreach (int targetVariable in dataSet.Problem.AllowedTargetVariables)
    78           if (!dataSetEntry.Value.ContainsKey(targetVariable) || dataSetEntry.Value[targetVariable] < 10) {
    79             IEngine engine = CreateEngine(dataSet.Problem, targetVariable);
    80             if (engine != null) {
    81               QueueJob(new Execution(dataSetEntry.Key, engine, targetVariable));
    82             }
    83           }
    84       }
     53      //Dictionary<Entity, Dictionary<int, int>> numberOfModelsOfTargetVariableOfDataSet = new Dictionary<Entity, Dictionary<int, int>>();
     54      //var datasetStatements = store.Select(new Statement(Ontology.AnyEntity, Ontology.PredicateInstanceOf, Ontology.TypeDataSet));
     55      //foreach (Statement datasetStatement in datasetStatements) {
     56      //  numberOfModelsOfTargetVariableOfDataSet.Add(datasetStatement.Subject, new Dictionary<int, int>());
     57      //  var modelStatements = store.Select(new Statement(datasetStatement.Subject, Ontology.PredicateHasModel, Ontology.AnyEntity));
     58      //  foreach (Statement modelStatement in modelStatements) {
     59      //    var modelAttributeStatements = store.Select(new Statement((Entity)modelStatement.Property, Ontology.PredicateModelAttribute, Ontology.AnyEntity));
     60      //    foreach (Statement modelAttrStatement in modelAttributeStatements) {
     61      //      var targetVariableStatements = store.Select(new Statement((Entity)modelAttrStatement.Property, Ontology.PredicateModelAttributeName, Ontology.AnyEntity))
     62      //         .Where(t => (string)((Literal)t.Property).Value == "TargetVariable")
     63      //         .SelectMany(t => store.Select(new Statement((Entity)modelAttrStatement.Property, Ontology.PredicateModelAttributeValue, Ontology.AnyEntity)))
     64      //         .GroupBy(t => (int)((Literal)t.Property).Value);
     65      //      foreach (var targetVariable in targetVariableStatements) {
     66      //        if (numberOfModelsOfTargetVariableOfDataSet[datasetStatement.Subject].ContainsKey(targetVariable.Key)) {
     67      //          numberOfModelsOfTargetVariableOfDataSet[datasetStatement.Subject][targetVariable.Key] = targetVariable.Count();
     68      //        } else {
     69      //          numberOfModelsOfTargetVariableOfDataSet[datasetStatement.Subject].Add(targetVariable.Key, targetVariable.Count());
     70      //        }
     71      //      }
     72      //    }
     73      //  }
     74      //}
     75      //foreach (KeyValuePair<Entity, Dictionary<int, int>> dataSetEntry in numberOfModelsOfTargetVariableOfDataSet) {
     76      //  DataSet dataSet = new DataSet(store, dataSetEntry.Key);
     77      //  foreach (int targetVariable in dataSet.Problem.AllowedTargetVariables)
     78      //    if (!dataSetEntry.Value.ContainsKey(targetVariable) || dataSetEntry.Value[targetVariable] < 10) {
     79      //      IEngine engine = CreateEngine(dataSet.Problem, targetVariable);
     80      //      if (engine != null) {
     81      //        QueueJob(new Execution(dataSetEntry.Key, engine, targetVariable));
     82      //      }
     83      //    }
     84      //}
    8585    }
    8686
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Server/Server.cs

    r1060 r1129  
    7171      try {
    7272        NetTcpBinding binding = new NetTcpBinding();
    73         binding.MaxReceivedMessageSize = 100000000; // 100Mbytes
    74         binding.ReaderQuotas.MaxStringContentLength = 100000000; // also 100M chars
    75         binding.ReaderQuotas.MaxArrayLength = 100000000; // also 100M elements;
     73        binding.SendTimeout = new TimeSpan(1, 0, 0);
     74        binding.MaxReceivedMessageSize = 1000000000; // 100Mbytes
     75        binding.ReaderQuotas.MaxStringContentLength = 1000000000; // also 100M chars
     76        binding.ReaderQuotas.MaxArrayLength = 1000000000; // also 100M elements;
    7677        binding.Security.Mode = SecurityMode.None;
    7778
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab/app.config

    r854 r1129  
    11<?xml version="1.0" encoding="utf-8" ?>
    22<configuration>
    3     <configSections>
    4         <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
    5             <section name="HeuristicLab.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    6         </sectionGroup>
    7     </configSections>
     3  <configSections>
     4    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
     5      <section name="HeuristicLab.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
     6    </sectionGroup>
     7  </configSections>
    88  <system.data>
    99    <DbProviderFactories>
     
    2323    </HeuristicLab.Properties.Settings>
    2424  </applicationSettings>
     25  <system.diagnostics>
     26    <sources>
     27      <source name="System.ServiceModel"
     28              switchValue="Information, ActivityTracing"
     29              propagateActivity="true">
     30        <listeners>
     31          <add name="traceListener"
     32              type="System.Diagnostics.XmlWriterTraceListener"
     33              initializeData= "c:\log\Traces.svclog" />
     34        </listeners>
     35
     36      </source>
     37      <source name="System.Runtime.Serialization">
     38        <listeners>
     39          <add name="traceListener"
     40              type="System.Diagnostics.XmlWriterTraceListener"
     41              initializeData= "c:\log\Traces1.svclog" />
     42        </listeners>
     43      </source>
     44    </sources>
     45
     46  </system.diagnostics>
    2547</configuration>
Note: See TracChangeset for help on using the changeset viewer.