1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.Core;
|
---|
6 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
7 | using HeuristicLab.Operators;
|
---|
8 | using HeuristicLab.Optimization;
|
---|
9 | using HeuristicLab.Parameters;
|
---|
10 | using HeuristicLab.Data;
|
---|
11 | using HeuristicLab.Common;
|
---|
12 | using System.Threading;
|
---|
13 | using System.Threading.Tasks;
|
---|
14 | using HeuristicLab.Encodings.PermutationEncoding;
|
---|
15 | using HeuristicLab.Encodings.RealVectorEncoding;
|
---|
16 | using System.Diagnostics;
|
---|
17 |
|
---|
18 | namespace 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 | }
|
---|