#region License Information
/* HeuristicLab
* Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
*
* This file is part of HeuristicLab.
*
* HeuristicLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* HeuristicLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HeuristicLab. If not, see .
*/
#endregion
using HeuristicLab.Common;
using HeuristicLab.Core;
using HeuristicLab.Data;
using HeuristicLab.Parameters;
using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
[Item("AlbaTranslocationMoveMaker", "An operator which makes translocation moves for the Alba representation.")]
[StorableClass]
public abstract class AlbaMoveMaker : AlbaMoveOperator {
public ILookupParameter MoveVehcilesUtilizedParameter {
get { return (ILookupParameter)Parameters["MoveVehiclesUtilized"]; }
}
public ILookupParameter MoveTravelTimeParameter {
get { return (ILookupParameter)Parameters["MoveTravelTime"]; }
}
public ILookupParameter MoveDistanceParameter {
get { return (ILookupParameter)Parameters["MoveDistance"]; }
}
public ILookupParameter MoveOverloadParameter {
get { return (ILookupParameter)Parameters["MoveOverload"]; }
}
public ILookupParameter MoveTardinessParameter {
get { return (ILookupParameter)Parameters["MoveTardiness"]; }
}
public ILookupParameter VehcilesUtilizedParameter {
get { return (ILookupParameter)Parameters["VehiclesUtilized"]; }
}
public ILookupParameter TravelTimeParameter {
get { return (ILookupParameter)Parameters["TravelTime"]; }
}
public ILookupParameter DistanceParameter {
get { return (ILookupParameter)Parameters["Distance"]; }
}
public ILookupParameter OverloadParameter {
get { return (ILookupParameter)Parameters["Overload"]; }
}
public ILookupParameter TardinessParameter {
get { return (ILookupParameter)Parameters["Tardiness"]; }
}
[StorableConstructor]
protected AlbaMoveMaker(bool deserializing) : base(deserializing) { }
protected AlbaMoveMaker(AlbaMoveMaker original, Cloner cloner) : base(original, cloner) { }
public AlbaMoveMaker()
: base() {
Parameters.Add(new LookupParameter("MoveVehiclesUtilized", "The number of vehicles utilized."));
Parameters.Add(new LookupParameter("MoveTravelTime", "The total travel time."));
Parameters.Add(new LookupParameter("MoveDistance", "The distance."));
Parameters.Add(new LookupParameter("MoveOverload", "The overload."));
Parameters.Add(new LookupParameter("MoveTardiness", "The tardiness."));
Parameters.Add(new LookupParameter("VehiclesUtilized", "The number of vehicles utilized."));
Parameters.Add(new LookupParameter("TravelTime", "The total travel time."));
Parameters.Add(new LookupParameter("Distance", "The distance."));
Parameters.Add(new LookupParameter("Overload", "The overload."));
Parameters.Add(new LookupParameter("Tardiness", "The tardiness."));
}
public override IOperation Apply() {
IOperation successor = base.Apply();
VehcilesUtilizedParameter.ActualValue = MoveVehcilesUtilizedParameter.ActualValue;
TravelTimeParameter.ActualValue = MoveTravelTimeParameter.ActualValue;
DistanceParameter.ActualValue = MoveDistanceParameter.ActualValue;
OverloadParameter.ActualValue = MoveOverloadParameter.ActualValue;
TardinessParameter.ActualValue = MoveTardinessParameter.ActualValue;
return successor;
}
}
}