Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15092


Ignore:
Timestamp:
06/29/17 15:39:12 (7 years ago)
Author:
abeham
Message:

#2797: fixed unit test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/Samples/PsoSchwefelSampleTest.cs

    r15076 r15092  
    5151      pso.SetSeedRandomly.Value = false;
    5252      SamplesUtils.RunAlgorithm(pso);
    53       if (!Environment.Is64BitProcess) {
    54         Assert.AreEqual(118.43840301792932, SamplesUtils.GetDoubleResult(pso, "BestQuality"));
    55         Assert.AreEqual(118.86062846097485, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"));
    56         Assert.AreEqual(120.41419835105029, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"));
     53      if (Environment.Is64BitProcess) {
     54        Assert.AreEqual(118.43833503632464, SamplesUtils.GetDoubleResult(pso, "BestQuality"));
     55        Assert.AreEqual(118.43935663125784, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"));
     56        Assert.AreEqual(118.44721627137812, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"));
    5757        Assert.AreEqual(1000, SamplesUtils.GetIntResult(pso, "Iterations"));
    5858      } else {
    59         Assert.AreEqual(118.43840301792932, SamplesUtils.GetDoubleResult(pso, "BestQuality"));
    60         Assert.AreEqual(118.86062846097485, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"));
    61         Assert.AreEqual(120.41419835105029, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"));
     59        Assert.AreEqual(118.4383350363247, SamplesUtils.GetDoubleResult(pso, "BestQuality"));
     60        Assert.AreEqual(118.43935663125787, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"));
     61        Assert.AreEqual(118.44721627137824, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"));
    6262        Assert.AreEqual(1000, SamplesUtils.GetIntResult(pso, "Iterations"));
    6363      }
     
    9090        .Single();
    9191      inertiaUpdater.StartValueParameter.Value = new DoubleValue(10);
    92       inertiaUpdater.EndValueParameter.Value = new DoubleValue(1);
     92      inertiaUpdater.EndValueParameter.Value = new DoubleValue(0.8);
    9393      pso.InertiaUpdater = inertiaUpdater;
    9494
     
    9999        .OfType<RealVectorSwarmUpdater>()
    100100        .Single();
    101       swarmUpdater.VelocityBoundsIndexParameter.ActualName = "Iterations";
    102       swarmUpdater.VelocityBoundsParameter.Value = new DoubleMatrix(new double[,] { { -10, 10 } });
    103       swarmUpdater.VelocityBoundsStartValueParameter.Value = new DoubleValue(10.0);
    104       swarmUpdater.VelocityBoundsEndValueParameter.Value = new DoubleValue(1.0);
    105       swarmUpdater.VelocityBoundsScalingOperatorParameter.Value = swarmUpdater.VelocityBoundsScalingOperatorParameter.ValidValues
     101      swarmUpdater.MaxVelocityParameter.Value = new DoubleValue(20.0);
     102      swarmUpdater.FinalMaxVelocityParameter.Value = new DoubleValue(1.0);
     103      swarmUpdater.MaxVelocityScalingOperatorParameter.Value = swarmUpdater.MaxVelocityScalingOperatorParameter.ValidValues
    106104        .OfType<ExponentialDiscreteDoubleValueModifier>()
    107105        .Single();
Note: See TracChangeset for help on using the changeset viewer.