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 | using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
|
---|
18 | using HeuristicLab.Problems.DataAnalysis.Symbolic;
|
---|
19 |
|
---|
20 | namespace 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 | }
|
---|