[7163] | 1 | using HeuristicLab.Common;
|
---|
| 2 | using HeuristicLab.Core;
|
---|
| 3 | using HeuristicLab.Data;
|
---|
| 4 | using HeuristicLab.Parameters;
|
---|
| 5 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
| 6 | using HeuristicLab.Encodings.PermutationEncoding;
|
---|
| 7 | using HeuristicLab.Problems.VehicleRouting;
|
---|
[9750] | 8 | using HeuristicLab.Problems.VehicleRouting.Interfaces;
|
---|
[7163] | 9 |
|
---|
| 10 | namespace HeuristicLab.Analysis.FitnessLandscape.MultiTrajectory.VRP {
|
---|
| 11 |
|
---|
| 12 | [StorableClass]
|
---|
| 13 | public class PreassignedVRPSolutionCreator : PreassignedSolutionCreator, IVRPCreator {
|
---|
| 14 |
|
---|
[9750] | 15 |
|
---|
[7163] | 16 | [StorableConstructor]
|
---|
| 17 | protected PreassignedVRPSolutionCreator(bool deserializing) : base(deserializing) { }
|
---|
| 18 | protected PreassignedVRPSolutionCreator(PreassignedVRPSolutionCreator original, Cloner cloner)
|
---|
| 19 | : base(original, cloner) {
|
---|
| 20 | }
|
---|
| 21 | public PreassignedVRPSolutionCreator() {
|
---|
| 22 | Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The created VRP tour."));
|
---|
[9750] | 23 | Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance."));
|
---|
[7163] | 24 | }
|
---|
| 25 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
| 26 | return new PreassignedVRPSolutionCreator(this, cloner);
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | public override void Create(IScope scope) {
|
---|
[9750] | 30 | VRPToursParameter.ActualValue = (IVRPEncoding)scope.Variables[VRPToursParameter.ActualName].Value;
|
---|
[7163] | 31 | }
|
---|
| 32 |
|
---|
| 33 |
|
---|
| 34 | #region IVRPCreator Members
|
---|
| 35 | public ILookupParameter<IVRPEncoding> VRPToursParameter {
|
---|
[9750] | 36 | get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
|
---|
[7163] | 37 | }
|
---|
[9750] | 38 | #endregion
|
---|
| 39 |
|
---|
| 40 | public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
|
---|
| 41 | get { return (ILookupParameter<IVRPProblemInstance>)Parameters["ProblemInstance"]; }
|
---|
[7163] | 42 | }
|
---|
| 43 | }
|
---|
| 44 | }
|
---|