Index: /stable/HeuristicLab.Optimization.Operators/3.3/ExpressionCalculator.cs
===================================================================
--- /stable/HeuristicLab.Optimization.Operators/3.3/ExpressionCalculator.cs	(revision 12718)
+++ /stable/HeuristicLab.Optimization.Operators/3.3/ExpressionCalculator.cs	(revision 12719)
@@ -74,8 +74,12 @@
 variables (run parameters or results):
   unquoted or in double quotes if they contain special characters or whitespace
-mathematical functions:
+mathematical functions (resulting in double values):
   +, -, *, /, ^ (power), log
 predicates:
   ==, <, >, isnull, not
+conversions:
+  toint, todouble
+array indexing:
+  []
 stack manipulation:
   drop swap dup
Index: /stable/HeuristicLab.Optimization/3.3/RunCollectionModification/Calculator.cs
===================================================================
--- /stable/HeuristicLab.Optimization/3.3/RunCollectionModification/Calculator.cs	(revision 12718)
+++ /stable/HeuristicLab.Optimization/3.3/RunCollectionModification/Calculator.cs	(revision 12719)
@@ -90,6 +90,5 @@
           }
         }
-      }
-      catch (Exception x) {
+      } catch (Exception x) {
         throw new Exception(string.Format(
           "Calculation of '{1}'{0}failed at token #{2}: {3} {0}current stack is: {0}{4}", Environment.NewLine,
@@ -104,4 +103,5 @@
       var result = stack.Pop();
       if (result is string) return new StringValue((string)result);
+      if (result is int) return new IntValue((int)result);
       if (result is double) return new DoubleValue((double)result);
       if (result is bool) return new BoolValue((bool)result);
@@ -139,20 +139,25 @@
           break;
 
-        case "log": Apply(stack, x => Math.Log((double)x)); break;
-        case "+": Apply(stack, (x, y) => (double)x + (double)y); break;
-        case "-": Apply(stack, (x, y) => (double)x - (double)y); break;
-        case "*": Apply(stack, (x, y) => (double)x * (double)y); break;
-        case "/": Apply(stack, (x, y) => (double)x / (double)y); break;
-        case "^": Apply(stack, (x, y) => Math.Pow((double)x, (double)y)); break;
-        case "<": Apply(stack, (x, y) => (double)x < (double)y); break;
-        case ">": Apply(stack, (x, y) => (double)x > (double)y); break;
+        case "log": Apply(stack, x => Math.Log(Convert.ToDouble(x))); break;
+        case "+": Apply(stack, (x, y) => Convert.ToDouble(x) + Convert.ToDouble(y)); break;
+        case "-": Apply(stack, (x, y) => Convert.ToDouble(x) - Convert.ToDouble(y)); break;
+        case "*": Apply(stack, (x, y) => Convert.ToDouble(x) * Convert.ToDouble(y)); break;
+        case "/": Apply(stack, (x, y) => Convert.ToDouble(x) / Convert.ToDouble(y)); break;
+        case "^": Apply(stack, (x, y) => Math.Pow(Convert.ToDouble(x), Convert.ToDouble(y))); break;
+        case "<": Apply(stack, (x, y) => Convert.ToDouble(x) < Convert.ToDouble(y)); break;
+        case ">": Apply(stack, (x, y) => Convert.ToDouble(x) > Convert.ToDouble(y)); break;
+
+        case "toint": Apply(stack, x => Convert.ToInt32(x)); break;
+        case "todouble": Apply(stack, x => Convert.ToDouble(x)); break;
+
+        case "[]": Apply(stack, (a, i) => GetArrayValueAtIndex(a, Convert.ToInt32(i))); break;
 
         case "==": Apply(stack, (x, y) => Equal(x, y)); break;
-        case "not": Apply(stack, x => !(bool)x); break;
+        case "not": Apply(stack, x => !Convert.ToBoolean(x)); break;
         case "isnull": Apply(stack, x => x == null); break;
-        case "if": Apply(stack, (then, else_, cond) => (bool)cond ? then : else_); break;
-
-        case "ismatch": Apply(stack, (s, p) => new Regex((string)p).IsMatch((string)s)); break;
-        case "rename": Apply(stack, (s, p, r) => new Regex((string)p).Replace((string)s, (string)r)); break;
+        case "if": Apply(stack, (then, else_, cond) => Convert.ToBoolean(cond) ? then : else_); break;
+
+        case "ismatch": Apply(stack, (s, p) => new Regex(Convert.ToString(p)).IsMatch(Convert.ToString(s))); break;
+        case "rename": Apply(stack, (s, p, r) => new Regex(Convert.ToString(p)).Replace(Convert.ToString(s), Convert.ToString(r))); break;
 
         default: stack.Push(GetVariableValue(variables, token)); break;
@@ -178,4 +183,10 @@
       var v = value as BoolValue;
       if (v != null) return v.Value;
+      return null;
+    }
+
+    private static object GetArrayValue(IItem value) {
+      if (value is IntArray || value is DoubleArray || value is BoolArray || value is StringArray)
+        return value;
       return null;
     }
@@ -188,13 +199,27 @@
           GetDoubleValue(item) ??
           GetBoolValue(item) ??
+          GetArrayValue(item) ??
           item.ToString();
       }
       return null;
     }
+
+    private static object GetArrayValueAtIndex(object array, int index) {
+      if (array is IntArray)
+        return ((IntArray)array)[index];
+      if (array is DoubleArray)
+        return ((DoubleArray)array)[index];
+      if (array is BoolArray)
+        return ((BoolArray)array)[index];
+      if (array is StringArray)
+        return ((StringArray)array)[index];
+      throw new NotSupportedException(string.Format("Type {0} is not a supported array type", array.GetType().Name));
+    }
     #endregion
 
     #region variadic equality
-    private static bool Equal(object a, object b) { return EqualNumber(a, b) || EqualBool(a, b) || EqualString(a, b) || a == b; }
-    private static bool EqualNumber(object a, object b) { return a is double && b is double && (double)a == (double)b; }
+    private static bool Equal(object a, object b) { return EqualIntegerNumber(a, b) || EqualFloatingNumber(a, b) || EqualBool(a, b) || EqualString(a, b) || a == b; }
+    private static bool EqualIntegerNumber(object a, object b) { return a is int && b is int && (int)a == (int)b; }
+    private static bool EqualFloatingNumber(object a, object b) { return a is double && b is double && (double)a == (double)b; }
     private static bool EqualBool(object a, object b) { return a is bool && b is bool && (bool)a == (bool)b; }
     private static bool EqualString(object a, object b) { return a is string && b is string && ((string)a).Equals((string)b); }
@@ -208,6 +233,5 @@
       try {
         stack.Push(func(a));
-      }
-      catch (Exception) {
+      } catch (Exception) {
         stack.Push(a);
         throw;
@@ -222,6 +246,5 @@
       try {
         stack.Push(func(a, b));
-      }
-      catch (Exception) {
+      } catch (Exception) {
         stack.Push(b);
         stack.Push(a);
@@ -238,6 +261,5 @@
       try {
         stack.Push(func(a, b, c));
-      }
-      catch (Exception) {
+      } catch (Exception) {
         stack.Push(a);
         stack.Push(b);
Index: /stable/HeuristicLab.Optimization/3.3/RunCollectionModification/RunCollectionFormulaModifer.cs
===================================================================
--- /stable/HeuristicLab.Optimization/3.3/RunCollectionModification/RunCollectionFormulaModifer.cs	(revision 12718)
+++ /stable/HeuristicLab.Optimization/3.3/RunCollectionModification/RunCollectionFormulaModifer.cs	(revision 12719)
@@ -68,8 +68,12 @@
 variables (run parameters or results):
   unquoted or in double quotes if they contain special characters or whitespace
-mathematical functions:
-  +, -, /, ^ (power), log
+mathematical functions (resulting in double values):
+  +, -, *, /, ^ (power), log
 predicates:
   ==, <, >, isnull, not
+conversions:
+  toint, todouble
+array indexing:
+  []
 stack manipulation:
   drop swap dup
