Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/Operators/TreePriorityDispatchingMetaOptEvaluator.cs @ 8858

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

Added symbolic tree dispatching and metaoptimization (#1955)

File size: 2.8 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;
17using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
18using HeuristicLab.Problems.DataAnalysis.Symbolic;
19
20namespace HeuristicLab.PDPSimulation.Operators {
21  [Item("TreePriorityDispatchingMetaOptEvaluator", "Metaoptimization of the priority dispatching parameters for the PDP simulation.")]
22  [StorableClass]
23  public class TreePriorityDispatchingMetaOptEvaluator : PriorityDispatchingMetaOptEvaluator {
24    public IValueLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
25      get { return (IValueLookupParameter<ISymbolicExpressionTree>)Parameters["SymbolicExpressionTree"]; }
26    }
27
28    public IValueLookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
29      get { return (IValueLookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters["SymbolicExpressionTreeInterpreter"]; }
30    }
31
32    public TreePriorityDispatchingMetaOptEvaluator() {
33      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionTree>("SymbolicExpressionTree", "The symbolic data analysis solution encoded as a symbolic expression tree."));
34      Parameters.Add(new ValueLookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>("SymbolicExpressionTreeInterpreter", "The interpreter that should be used to calculate the output values of the symbolic data analysis tree."));
35    }
36
37    [StorableConstructor]
38    protected TreePriorityDispatchingMetaOptEvaluator(bool deserializing) : base(deserializing) { }
39    protected TreePriorityDispatchingMetaOptEvaluator(TreePriorityDispatchingMetaOptEvaluator original, Cloner cloner) : base(original, cloner) { }
40
41    public override IDeepCloneable Clone(Cloner cloner) {
42      return new TreePriorityDispatchingMetaOptEvaluator(this, cloner);
43    }
44
45    protected override void Parameterize(PriorityDispatching dispatching) {
46      var tree = SymbolicExpressionTreeParameter.ActualValue;
47      var interpreter = SymbolicDataAnalysisTreeInterpreterParameter.ActualValue;
48
49      TreePriorityDispatching treeDispatching = dispatching as TreePriorityDispatching;
50      treeDispatching.SymbolicExpressionTreeParameter.Value = tree;
51      treeDispatching.SymbolicDataAnalysisTreeInterpreterParameter.Value = interpreter;
52    }
53  }
54}
Note: See TracBrowser for help on using the repository browser.