using HeuristicLab.Common; using HeuristicLab.Core; using HeuristicLab.Parameters; using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; namespace HeuristicLab.BioBoost.Data { [StorableClass] [Item("CostFactors", "Splits the cost into several differen areas which can are different for different regions.")] public class CostFactors : DataItem { #region Parameters public IValueParameter InvestmentParameter { get { return (IValueParameter)Parameters["Investment"]; } } public IValueParameter LaborParameter { get { return (IValueParameter)Parameters["Labor"]; } } public IValueParameter FuelParameter { get { return (IValueParameter)Parameters["Fuel"]; } } public IValueParameter MaintenanceParameter { get { return (IValueParameter)Parameters["Maintenance"]; } } public IValueParameter OtherParameter { get { return (IValueParameter)Parameters["Other"]; } } #endregion #region Parameter Values public ValueParameterCollection Investment { get { return InvestmentParameter.Value; } } public ValueParameterCollection Labor { get { return LaborParameter.Value; } } public ValueParameterCollection Fuel { get { return FuelParameter.Value; } } public ValueParameterCollection Maintenance { get { return MaintenanceParameter.Value; } } public ValueParameterCollection Other { get { return OtherParameter.Value; } } #endregion #region Construction & Cloning [StorableConstructor] protected CostFactors(bool isDeserializing) : base(isDeserializing) { } protected CostFactors(CostFactors orig, Cloner cloner) : base(orig, cloner) { } public CostFactors() { Parameters.Add(new ValueParameter("Investment", "The cost factors for investment.")); Parameters.Add(new ValueParameter("Labor", "The cost factors for labor.")); Parameters.Add(new ValueParameter("Fuel", "The cost factors for fuel.")); Parameters.Add(new ValueParameter("Maintenance", "The cost factors for maintenance.")); Parameters.Add(new ValueParameter("Other", "The cost factors for other costs.")); } public override IDeepCloneable Clone(Cloner cloner) { return new CostFactors(this, cloner); } #endregion public override bool IsEquivalentTo(DataItem other) { return true; } } }