LotSizingDataModel.Core 2.0.1
Core domain model, shared abstractions and XML-serializable entities.
Loading...
Searching...
No Matches
SequenceDependentChangeoverCost.cs
Go to the documentation of this file.
1using System;
2using System.Xml.Serialization;
5
7
8/// <summary>
9/// Cost incurred by a changeover from one item setup state to another.
10/// </summary>
11[Serializable]
12[XmlType(TypeName = "sequenceDependentChangeoverCost")]
15{
19
21 int planningHorizon)
22 : base(planningHorizon, defaultValue: 0.0)
23 {
24 }
25
27 int planningHorizon,
28 double defaultValue)
29 : base(planningHorizon, defaultValue)
30 {
31 }
32
33 [XmlIgnore]
35 Values;
36
37 protected override void ValidateValue(
38 double value,
39 string parameterName)
40 {
41 base.ValidateValue(value, parameterName);
42
43 if (value < 0.0)
44 {
45 throw new ArgumentOutOfRangeException(
46 parameterName,
47 value,
48 "A sequence-dependent changeover cost cannot be negative.");
49 }
50 }
51}
Represents a sequence of finite double values indexed by planning period.
DoubleTimeSeriesParameter()
Initializes an empty period-dependent parameter.
DoubleTimeSeries Values
Gets or sets the values of the parameter for all planning periods.
override void ValidateValue(double value, string parameterName)
Validates one value before it is assigned to the parameter.