Ignore:
Timestamp:
02/28/19 14:23:36 (2 years ago)
Author:
bburlacu
Message:

#2987: Migrate to new persistence. Add support for objective scaling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2987_MOEAD_Algorithm/HeuristicLab.Algorithms.MOEAD/3.4/MOEADAlgorithm.cs

    r16583 r16630  
    1 using HeuristicLab.Common;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HEAL.Attic;
     23using HeuristicLab.Common;
    224using HeuristicLab.Core;
    325using HeuristicLab.Data;
    4 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    526using HeuristicLab.Random;
    627using System.Linq;
     
    930namespace HeuristicLab.Algorithms.MOEAD {
    1031  [Item("Multi-objective Evolutionary Algorithm based on Decomposition (MOEA/D)", "MOEA/D implementation adapted from jMetal.")]
    11   [StorableClass]
    1232  [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms, Priority = 125)]
     33  [StorableType("FE39AD23-B3BF-4368-BB79-FE5BF4C36272")]
    1334  public class MOEADAlgorithm : MOEADAlgorithmBase {
    1435    public MOEADAlgorithm() { }
     
    2142
    2243    [StorableConstructor]
    23     protected MOEADAlgorithm(bool deserializing) : base(deserializing) { }
     44    protected MOEADAlgorithm(StorableConstructorFlag deserializing) : base(deserializing) { }
    2445
    2546    protected override void Run(CancellationToken cancellationToken) {
     
    98119
    99120        UpdateParetoFronts();
     121
     122        Results.AddOrUpdateResult("IdealPoint", new DoubleArray(IdealPoint));
     123        Results.AddOrUpdateResult("NadirPoint", new DoubleArray(NadirPoint));
    100124        Results.AddOrUpdateResult("Evaluated Solutions", new IntValue(evaluatedSolutions));
    101125
Note: See TracChangeset for help on using the changeset viewer.