Changeset 2049
- Timestamp:
- 06/16/09 09:51:33 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
r2047 r2049 98 98 99 99 private void PopulateFinishedRuns() { 100 var dataset Entity= store100 var datasetBindings = store 101 101 .Query( 102 102 "?Dataset <" + Ontology.InstanceOf + "> <" + Ontology.TypeDataSet + "> .", 0, 1) 103 .Select(x => (Entity)x.Get("Dataset")).ElementAt(0); 104 DataSet ds = new DataSet(store, datasetEntity); 103 .Select(x => (Entity)x.Get("Dataset")); 105 104 106 var result = store 107 .Query( 108 "?Model <" + Ontology.TargetVariable + "> ?TargetVariable ." + Environment.NewLine + 109 "?Model <" + Ontology.Name + "> ?AlgoName .", 110 0, 1000) 111 .Select(x => new Resource[] { (Literal)x.Get("TargetVariable"), (Literal)x.Get("AlgoName") }); 105 if (datasetBindings.Count() > 0) { 106 var datasetEntity = datasetBindings.ElementAt(0); 112 107 113 foreach (Resource[] row in result) { 114 string targetVariable = (string)((Literal)row[0]).Value; 115 string algoName = (string)((Literal)row[1]).Value; 108 DataSet ds = new DataSet(store, datasetEntity); 109 var result = store 110 .Query( 111 "?Model <" + Ontology.TargetVariable + "> ?TargetVariable ." + Environment.NewLine + 112 "?Model <" + Ontology.Name + "> ?AlgoName .", 113 0, 1000) 114 .Select(x => new Resource[] { (Literal)x.Get("TargetVariable"), (Literal)x.Get("AlgoName") }); 116 115 117 int targetVariableIndex = ds.Problem.Dataset.GetVariableIndex(targetVariable); 118 if (!AlgorithmFinishedOrDispatched(targetVariableIndex, algoName)) 119 AddDispatchedRun(targetVariableIndex, algoName); 116 foreach (Resource[] row in result) { 117 string targetVariable = (string)((Literal)row[0]).Value; 118 string algoName = (string)((Literal)row[1]).Value; 119 120 int targetVariableIndex = ds.Problem.Dataset.GetVariableIndex(targetVariable); 121 if (!AlgorithmFinishedOrDispatched(targetVariableIndex, algoName)) 122 AddDispatchedRun(targetVariableIndex, algoName); 123 } 120 124 } 121 125 }
Note: See TracChangeset
for help on using the changeset viewer.