- Timestamp:
- 12/05/12 19:00:39 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisExpressionTreeInterpreter.cs
r8798 r9004 82 82 83 83 string targetVariable = TargetVariable; 84 EvaluatedSolutions.Value++; // increment the evaluated solutions counter 85 var state = PrepareInterpreterState(tree, dataset, targetVariableCache); 84 lock (EvaluatedSolutions) { 85 EvaluatedSolutions.Value++; // increment the evaluated solutions counter 86 } 87 var state = PrepareInterpreterState(tree, dataset, targetVariableCache, TargetVariable); 86 88 var rowsEnumerator = rows.GetEnumerator(); 87 89 var horizonsEnumerator = horizons.GetEnumerator(); … … 114 116 } 115 117 116 private InterpreterState PrepareInterpreterState(ISymbolicExpressionTree tree, Dataset dataset, double[] targetVariableCache) {118 private static InterpreterState PrepareInterpreterState(ISymbolicExpressionTree tree, Dataset dataset, double[] targetVariableCache, string targetVariable) { 117 119 Instruction[] code = SymbolicExpressionTreeCompiler.Compile(tree, OpCodes.MapSymbolToOpCode); 118 120 int necessaryArgStackSize = 0; … … 120 122 if (instr.opCode == OpCodes.Variable) { 121 123 var variableTreeNode = (VariableTreeNode)instr.dynamicNode; 122 if (variableTreeNode.VariableName == TargetVariable)124 if (variableTreeNode.VariableName == targetVariable) 123 125 instr.iArg0 = targetVariableCache; 124 126 else … … 126 128 } else if (instr.opCode == OpCodes.LagVariable) { 127 129 var variableTreeNode = (LaggedVariableTreeNode)instr.dynamicNode; 128 if (variableTreeNode.VariableName == TargetVariable)130 if (variableTreeNode.VariableName == targetVariable) 129 131 instr.iArg0 = targetVariableCache; 130 132 else … … 132 134 } else if (instr.opCode == OpCodes.VariableCondition) { 133 135 var variableTreeNode = (VariableConditionTreeNode)instr.dynamicNode; 134 if (variableTreeNode.VariableName == TargetVariable)136 if (variableTreeNode.VariableName == targetVariable) 135 137 instr.iArg0 = targetVariableCache; 136 138 else
Note: See TracChangeset
for help on using the changeset viewer.