LotSizingDataModel.Instance 2.0.1
Lot-sizing instance representation, descriptors and problem characterization.
Loading...
Searching...
No Matches
ClosedLoopTimeSeriesParameter.cs
Go to the documentation of this file.
1using System;
2using System.Xml.Serialization;
3using LotSizingDataModel.Core.DecisionModel;
4
6
7/// <summary>
8/// Non-negative period-dependent quantity or unit-cost series
9/// used by the closed-loop instance extension.
10/// </summary>
11[Serializable]
12[XmlType(TypeName = "closedLoopTimeSeriesParameter")]
13public sealed class ClosedLoopTimeSeriesParameter :
14 DoubleTimeSeriesParameter
15{
19
21 int planningHorizon,
22 double defaultValue = 0.0)
23 : base(
24 planningHorizon,
25 defaultValue)
26 {
27 }
28
29 protected override void ValidateValue(
30 double value,
31 string parameterName)
32 {
33 base.ValidateValue(
34 value,
35 parameterName);
36
37 if (value < 0.0)
38 {
39 throw new ArgumentOutOfRangeException(
40 parameterName,
41 value,
42 "A closed-loop period-dependent value cannot be negative.");
43 }
44 }
45}