Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10094


Ignore:
Timestamp:
10/29/13 14:23:04 (11 years ago)
Author:
mkommend
Message:

#2082: Improved error handling in Scilab evaluator and prepared the project files for MONO compilation.

Location:
branches/HeuristicLab.ExternalEvaluation Scientific
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.ExternalEvaluation Scientific/HeuristicLab.ExternalEvaluation.sln

    r9690 r10094  
    55  ProjectSection(SolutionItems) = preProject
    66    PreBuildEvent.cmd = PreBuildEvent.cmd
     7    PreBuildEvent.sh = PreBuildEvent.sh
    78  EndProjectSection
    89EndProject
  • branches/HeuristicLab.ExternalEvaluation Scientific/HeuristicLab.Problems.ExternalEvaluation.Matlab/3.3/HeuristicLab.Problems.ExternalEvaluation.Matlab-3.3.csproj

    r9698 r10094  
    169169  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    170170  <PropertyGroup>
    171     <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    172 set ProjectDir=$(ProjectDir)
    173 set SolutionDir=$(SolutionDir)
    174 set Outdir=$(Outdir)
     171    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
     172      set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     173      set ProjectDir=$(ProjectDir)
     174      set SolutionDir=$(SolutionDir)
     175      set Outdir=$(Outdir)
    175176
    176 call PreBuildEvent.cmd
    177 </PreBuildEvent>
     177      call PreBuildEvent.cmd
     178    </PreBuildEvent>
     179    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     180      export ProjectDir=$(ProjectDir)
     181      export SolutionDir=$(SolutionDir)
     182
     183      $SolutionDir/PreBuildEvent.sh
     184    </PreBuildEvent>
    178185  </PropertyGroup>
    179186  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/HeuristicLab.ExternalEvaluation Scientific/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/HeuristicLab.Problems.ExternalEvaluation.Scilab-3.3.csproj

    r9690 r10094  
    169169  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    170170  <PropertyGroup>
    171     <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    172 set ProjectDir=$(ProjectDir)
    173 set SolutionDir=$(SolutionDir)
    174 set Outdir=$(Outdir)
     171    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
     172      set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     173      set ProjectDir=$(ProjectDir)
     174      set SolutionDir=$(SolutionDir)
     175      set Outdir=$(Outdir)
    175176
    176 call PreBuildEvent.cmd
    177 </PreBuildEvent>
     177      call PreBuildEvent.cmd
     178    </PreBuildEvent>
     179    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     180      export ProjectDir=$(ProjectDir)
     181      export SolutionDir=$(SolutionDir)
     182
     183      $SolutionDir/PreBuildEvent.sh
     184    </PreBuildEvent>
    178185  </PropertyGroup>
    179186  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/HeuristicLab.ExternalEvaluation Scientific/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterVectorEvaluator.cs

    r9715 r10094  
    6868      Parameters.Add(new LookupParameter<TextFileValue>(ScilabEvaluationScriptParameterName, "The path to the Scilab evaluation script."));
    6969      Parameters.Add(new FixedValueParameter<TextFileValue>(InitializationScriptParameterName, "The path to a Scilab script the should be execute before the evaluation starts.", new TextFileValue()));
     70
     71      InitializationScript.FileDialogFilter = @"Scilab Scripts|*.sce|All files|*.*";
    7072    }
    7173
    72     [StorableHook(HookType.AfterDeserialization)]
    73     private void AfterDeserialization() {
    74       InitializeState();
    75     }
     74    //[StorableHook(HookType.AfterDeserialization)]
     75    //private void AfterDeserialization() {
     76    //  InitializeState();
     77    //}
    7678
    7779    public override void InitializeState() {
     
    100102        for (int i = 0; i < ProblemSizeParameter.ActualValue.Value; i++) {
    101103          result = scilab.createNamedMatrixOfDouble(parameterNames[i], 1, 1, new double[] { parameterVector[i] });
    102           if (result != 0) throw new InvalidOperationException("Error while setting the parameter " + parameterNames[i] + " to " + parameterVector[i] + "  (ErrorCode: " + result + ").");
     104          //if (result != 0) throw new InvalidOperationException("Error while setting the parameter " + parameterNames[i] + " to " + parameterVector[i] + "  (ErrorCode: " + result + ").");
     105          if (result != 0) ThrowSciLabException("setting parameter " + parameterNames[i], result);
    103106        }
    104107
  • branches/HeuristicLab.ExternalEvaluation Scientific/HeuristicLab.Problems.ParameterOptimization/3.3/HeuristicLab.Problems.ParameterOptimization.csproj

    r9691 r10094  
    101101  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    102102  <PropertyGroup>
    103     <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    104 set ProjectDir=$(ProjectDir)
    105 set SolutionDir=$(SolutionDir)
    106 set Outdir=$(Outdir)
     103    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
     104      set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     105      set ProjectDir=$(ProjectDir)
     106      set SolutionDir=$(SolutionDir)
     107      set Outdir=$(Outdir)
    107108
    108 call PreBuildEvent.cmd
    109 </PreBuildEvent>
     109      call PreBuildEvent.cmd
     110    </PreBuildEvent>
     111    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     112      export ProjectDir=$(ProjectDir)
     113      export SolutionDir=$(SolutionDir)
     114
     115      $SolutionDir/PreBuildEvent.sh
     116    </PreBuildEvent>
    110117  </PropertyGroup>
    111118  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset for help on using the changeset viewer.