LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
ProductionSetupBigMEstimate.cs
Go to the documentation of this file.
1using System;
2
4
5/// <summary>
6/// Describes one production/setup Big-M estimate.
7/// </summary>
8public sealed class ProductionSetupBigMEstimate
9{
10 /// <summary>
11 /// Initializes a production/setup Big-M estimate.
12 /// </summary>
13 /// <param name="value">Finite non-negative upper bound.</param>
14 /// <param name="source">Human-readable derivation source.</param>
15 /// <param name="isFallback">
16 /// Indicates whether the configured fallback was used.
17 /// </param>
19 double value,
20 string source,
21 bool isFallback)
22 {
23 if (!double.IsFinite(value) || value < 0.0)
24 {
25 throw new ArgumentOutOfRangeException(
26 nameof(value),
27 value,
28 "A Big-M estimate must be finite and non-negative.");
29 }
30
31 Value = value;
32 Source = source ?? string.Empty;
33 IsFallback = isFallback;
34 }
35
36 /// <summary>Gets the estimated upper bound.</summary>
37 public double Value { get; }
38
39 /// <summary>Gets the derivation description.</summary>
40 public string Source { get; }
41
42 /// <summary>
43 /// Gets a value indicating whether the configured fallback
44 /// was used.
45 /// </summary>
46 public bool IsFallback { get; }
47}
ProductionSetupBigMEstimate(double value, string source, bool isFallback)
Initializes a production/setup Big-M estimate.
bool IsFallback
Gets a value indicating whether the configured fallback was used.