Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/19/12 13:17:29 (12 years ago)
Author:
ascheibe
Message:

#1722 fixed more licensing information and source formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Prins/Manipulators/PrinsStochasticLSManipulator.cs

    r4752 r8053  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using System.Collections.Generic;
     23using HeuristicLab.Common;
    2224using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
     25using HeuristicLab.Data;
    2426using HeuristicLab.Parameters;
    2527using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Data;
    27 using System.Collections.Generic;
    28 using HeuristicLab.Common;
    2928
    3029namespace HeuristicLab.Problems.VehicleRouting.Encodings.Prins {
     
    3534      get { return (IValueParameter<IntValue>)Parameters["SampleSize"]; }
    3635    }
    37    
     36
    3837    [StorableConstructor]
    3938    private PrinsStochasticLSManipulator(bool deserializing) : base(deserializing) { }
     
    4140    public PrinsStochasticLSManipulator()
    4241      : base() {
    43         Parameters.Add(new ValueParameter<IntValue>("SampleSize", "The sample size.", new IntValue(200)));
     42      Parameters.Add(new ValueParameter<IntValue>("SampleSize", "The sample size.", new IntValue(200)));
    4443    }
    4544
     
    6564        while (!improvement &&
    6665          samples < SampleSize.Value.Value) {
    67             int u = random.Next(ProblemInstance.Cities.Value);
    68             int v = random.Next(ProblemInstance.Cities.Value);
     66          int u = random.Next(ProblemInstance.Cities.Value);
     67          int v = random.Next(ProblemInstance.Cities.Value);
    6968
    70             child = Manipulate(individual,
    71                   originalQuality, u, v);
     69          child = Manipulate(individual,
     70                originalQuality, u, v);
    7271
    73             improvement = child != null;
     72          improvement = child != null;
    7473
    75             samples++;
     74          samples++;
    7675        }
    7776
     
    8382
    8483        iterations++;
    85       } while (improvement && 
     84      } while (improvement &&
    8685        iterations < Iterations.Value.Value);
    8786    }
Note: See TracChangeset for help on using the changeset viewer.