Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/Operators/LinearPriorityDispatchingMetaOptEvaluator.cs @ 10429

Last change on this file since 10429 was 8808, checked in by svonolfe, 12 years ago

Added symbolic tree dispatching and metaoptimization (#1955)

File size: 1.9 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Core;
6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
7using HeuristicLab.Operators;
8using HeuristicLab.Optimization;
9using HeuristicLab.Parameters;
10using HeuristicLab.Data;
11using HeuristicLab.Common;
12using System.Threading;
13using System.Threading.Tasks;
14using HeuristicLab.Encodings.PermutationEncoding;
15using HeuristicLab.Encodings.RealVectorEncoding;
16using System.Diagnostics;
17
18namespace HeuristicLab.PDPSimulation.Operators {
19  [Item("LinearPriorityDispatchingMetaOptEvaluator", "Metaoptimization of the priority dispatching parameters for the PDP simulation.")]
20  [StorableClass]
21  public class LinearPriorityDispatchingMetaOptEvaluator : PriorityDispatchingMetaOptEvaluator {
22    public IValueLookupParameter<DoubleArray> VectorParameter {
23      get { return (IValueLookupParameter<DoubleArray>)Parameters["Vector"]; }
24    }
25
26    public LinearPriorityDispatchingMetaOptEvaluator() {
27      Parameters.Add(new ValueLookupParameter<DoubleArray>("Vector", "The priority dispatching parameters."));
28    }
29
30    [StorableConstructor]
31    protected LinearPriorityDispatchingMetaOptEvaluator(bool deserializing) : base(deserializing) { }
32    protected LinearPriorityDispatchingMetaOptEvaluator(LinearPriorityDispatchingMetaOptEvaluator original, Cloner cloner) : base(original, cloner) { }
33
34    public override IDeepCloneable Clone(Cloner cloner) {
35      return new LinearPriorityDispatchingMetaOptEvaluator(this, cloner);
36    }
37
38    protected override void Parameterize(PriorityDispatching dispatching) {
39      DoubleArray vector = VectorParameter.ActualValue;
40
41      LinearPriorityDispatching linearDispatching = dispatching as LinearPriorityDispatching;
42      linearDispatching.WeightsParameter.Value = new RealVector(vector.ToArray());
43    }
44  }
45}
Note: See TracBrowser for help on using the repository browser.