Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterOptimizationProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterOptimizationProblem.cs	(revision 11075)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterOptimizationProblem.cs	(revision 11076)
@@ -75,5 +75,5 @@
       Parameters.Add(new FixedValueParameter<StringValue>(QualityVariableParameterName, "The name of the quality variable of the Scilab script.", new StringValue("quality")));
       Parameters.Add(new FixedValueParameter<TextFileValue>(ScilabEvaluationScriptParameterName, "The path to the Scilab evaluation script.", new TextFileValue()));
-      Parameters.Add(new FixedValueParameter<TextFileValue>(ScilabInitializationScriptParameterName, "The path to a Scilab script the should be execute before the evaluation starts.", new TextFileValue()));
+      Parameters.Add(new FixedValueParameter<TextFileValue>(ScilabInitializationScriptParameterName, "The path to a Scilab script that should be executed once when the algorithm starts.", new TextFileValue()));
 
       ScilabEvaluationScript.FileDialogFilter = @"Scilab Scripts|*.sce|All files|*.*";
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterVectorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterVectorEvaluator.cs	(revision 11075)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterVectorEvaluator.cs	(revision 11076)
@@ -35,4 +35,5 @@
   [StorableClass]
   public sealed class ScilabParameterVectorEvaluator : ParameterVectorEvaluator {
+    private const string MaximizationParameterName = "Maximization";
     private const string QualityVariableParameterName = "QualityVariableName";
     private const string ScilabEvaluationScriptParameterName = "ScilabEvaluationScript";
@@ -40,4 +41,7 @@
 
     #region parameters
+    public ILookupParameter<BoolValue> MaximizationParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters[MaximizationParameterName]; }
+    }
     public ILookupParameter<StringValue> QualityVariableParameter {
       get { return (ILookupParameter<StringValue>)Parameters[QualityVariableParameterName]; }
@@ -62,10 +66,11 @@
     public ScilabParameterVectorEvaluator()
       : base() {
+      Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "The flag which determines if this is a maximization problem."));
       Parameters.Add(new LookupParameter<StringValue>(QualityVariableParameterName, "The name of the quality variable of the Scilab script."));
       Parameters.Add(new LookupParameter<TextFileValue>(ScilabEvaluationScriptParameterName, "The path to the Scilab evaluation script."));
-      Parameters.Add(new LookupParameter<TextFileValue>(ScilabInitializationScriptParameterName, "The path to a Scilab script the should be execute before the evaluation starts."));
+      Parameters.Add(new LookupParameter<TextFileValue>(ScilabInitializationScriptParameterName, "The path to a Scilab script that should be executed once when the algorithm starts."));
     }
 
-    private readonly object locker = new object();
+    private static readonly object locker = new object();
     private static ScilabConnector scilab = null;
     private bool startedScilab = false;
@@ -80,5 +85,6 @@
 
       int result;
-      //Scilab is used via a c++ wrapper that calls static methods. Hence it is not possible to parallelize the evaluation.
+      // Scilab is used via a c++ wrapper that calls static methods. Hence it is not possible to parallelize the evaluation.
+      // It is also not possible to run multiple algorithms solving separate Scilab optimization problems at the same time.
       lock (locker) {
         //initialize scilab and execute initialization script
@@ -86,8 +92,6 @@
           startedScilab = true;
           scilab = new ScilabConnector(false);
-          if (!string.IsNullOrEmpty(initializationScript.Value)) {
-            result = scilab.execScilabScript(initializationScript.Value);
-            if (result != 0) ThrowSciLabException(initializationScript.Value, result);
-          }
+          result = scilab.execScilabScript(initializationScript.Value);
+          if (result != 0) ThrowSciLabException(initializationScript.Value, result);
         } else if (!startedScilab) {
           throw new InvalidOperationException("Could not run multiple optimization algorithms in parallel.");
@@ -96,5 +100,7 @@
         var parameterVector = ParameterVectorParameter.ActualValue;
         var parameterNames = ParameterNamesParameter.ActualValue;
-        if (parameterNames.Any(string.IsNullOrEmpty)) throw new ArgumentException("Not all parameter names are provided.");
+        if (parameterNames.Any(string.IsNullOrEmpty)) throw new ArgumentException("Not all parameter names are provided. Change the 'ParameterNames' parameter in the 'Problem' tab.");
+        if (ProblemSizeParameter.ActualValue.Value != parameterVector.Length || ProblemSizeParameter.ActualValue.Value != parameterNames.Length)
+          throw new ArgumentException("The size of the parameter vector or the parameter names vector does not match the problem size.");
 
         for (int i = 0; i < ProblemSizeParameter.ActualValue.Value; i++) {
@@ -112,6 +118,7 @@
         double quality = values[0];
 
-        if (double.IsNaN(quality)) quality = double.MaxValue;
-        if (double.IsInfinity(quality)) quality = double.MaxValue;
+        var worstQualityValue = MaximizationParameter.ActualValue.Value ? double.MinValue : double.MaxValue;
+        if (double.IsNaN(quality)) quality = worstQualityValue;
+        if (double.IsInfinity(quality)) quality = worstQualityValue;
 
         QualityParameter.ActualValue = new DoubleValue(quality);
