Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2158


Ignore:
Timestamp:
07/12/09 22:22:29 (15 years ago)
Author:
dtraxing
Message:

FixedGAMainBase: fixed type in operator name; added virtual modifier to GetOperatorsFromScope Method
FixedOperatorBase: removed general exception catching
added fixed operator for evolution strategies
(ticket #580)

Location:
trunk/sources/HeuristicLab.FixedOperators/3.2
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.FixedOperators/3.2/FixedGAMainBase.cs

    r2150 r2158  
    8484      sb = new StochasticBranch();
    8585      sb.GetVariableInfo("Probability").ActualName = "MutationRate";
    86       Name = "FixeGAMain";
     86      Name = "FixedGAMain";
    8787    } // FixedGABase
    8888
     
    163163    /// </summary>
    164164    /// <param name="scope"></param>
    165     protected void GetOperatorsFromScope(IScope scope) {
     165    protected virtual void GetOperatorsFromScope(IScope scope) {
    166166      selector = (OperatorBase)GetVariableValue("Selector", scope, true);
    167167      crossover = (OperatorBase)GetVariableValue("Crossover", scope, true);
  • trunk/sources/HeuristicLab.FixedOperators/3.2/FixedOperatorBase.cs

    r2151 r2158  
    120120          AtomicOperation atomicOperation = (AtomicOperation)operation;
    121121          IOperation next = null;
    122           try {
     122          //try {
    123123            currentOperator = atomicOperation.Operator;
    124124            next = currentOperator.Execute(atomicOperation.Scope);
    125           }
    126           catch (Exception ex) {
    127             throw new InvalidOperationException("Invalid Operation occured in FixedBase.Execute " + ex.InnerException);
    128           }
     125          //}
     126          //catch (Exception ex) {
     127          //  throw new InvalidOperationException("Invalid Operation occured in FixedBase.Execute " + ex.InnerException);
     128          //}
    129129          if (next != null)
    130130            executionStack.Push(next);
  • trunk/sources/HeuristicLab.FixedOperators/3.2/FixedSAMain.cs

    r2151 r2158  
    195195            break;
    196196        } // for nrOfGenerations
    197      
     197
    198198      } // try
    199199      catch (CancelException) {
    200200        return new AtomicOperation(this, scope);
    201201      }
     202      catch (Exception ex) {
     203        System.Diagnostics.StackTrace trace = new System.Diagnostics.StackTrace(ex, false);
     204
     205        foreach (var sf in trace.GetFrames()) {
     206          Console.WriteLine(sf.GetMethod().Name);
     207          Console.WriteLine("Line: " + sf.GetFileLineNumber());
     208          Console.WriteLine("Column: " + sf.GetFileColumnNumber());
     209        }
     210      }
    202211      return null;
    203212    } // Apply
  • trunk/sources/HeuristicLab.FixedOperators/3.2/HeuristicLab.FixedOperators-3.2.csproj

    r2151 r2158  
    100100  </ItemGroup>
    101101  <ItemGroup>
     102    <Compile Include="FixedESMain.cs" />
    102103    <Compile Include="FixedGAMainBase.cs" />
    103104    <Compile Include="FixedOperatorBase.cs" />
     
    157158      <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project>
    158159      <Name>HeuristicLab.Data-3.2</Name>
     160    </ProjectReference>
     161    <ProjectReference Include="..\..\HeuristicLab.ES\3.2\HeuristicLab.ES-3.2.csproj">
     162      <Project>{2E6112A7-3A94-406D-A28C-38AC2D324DCA}</Project>
     163      <Name>HeuristicLab.ES-3.2</Name>
    159164    </ProjectReference>
    160165    <ProjectReference Include="..\..\HeuristicLab.Evolutionary\3.2\HeuristicLab.Evolutionary-3.2.csproj">
Note: See TracChangeset for help on using the changeset viewer.