ULSAlgorithms
1.1.0-g3e5595996d
High-performance exact and heuristic algorithms for uncapacitated lot sizing
Loading...
Searching...
No Matches
CutCoefficient.cs
Go to the documentation of this file.
1
namespace
ULSAlgorithms.CuttingPlanes
;
2
3
/// <summary>
4
/// Stores one nonzero coefficient of a generated linear inequality.
5
/// </summary>
6
public
readonly record
struct
CutCoefficient
7
{
8
/// <summary>Initializes a coefficient.</summary>
9
public
CutCoefficient
(
string
variableName,
double
coefficient)
10
{
11
if
(
string
.IsNullOrWhiteSpace(variableName))
12
{
13
throw
new
ArgumentException(
14
"A variable name is required."
,
15
nameof(variableName));
16
}
17
18
if
(!
double
.IsFinite(coefficient))
19
{
20
throw
new
ArgumentOutOfRangeException(
21
nameof(coefficient),
22
"A cut coefficient must be finite."
);
23
}
24
25
VariableName
= variableName.Trim();
26
Coefficient
= coefficient;
27
}
28
29
/// <summary>Gets the solver-independent variable identifier.</summary>
30
public
string
VariableName
{
get
; }
31
32
/// <summary>Gets the coefficient value.</summary>
33
public
double
Coefficient
{
get
; }
34
}
ULSAlgorithms.CuttingPlanes
Definition
CutCoefficient.cs:1
ULSAlgorithms.CuttingPlanes.CutCoefficient.Coefficient
double Coefficient
Gets the coefficient value.
Definition
CutCoefficient.cs:33
ULSAlgorithms.CuttingPlanes.CutCoefficient.VariableName
string VariableName
Gets the solver-independent variable identifier.
Definition
CutCoefficient.cs:30
ULSAlgorithms.CuttingPlanes.CutCoefficient.CutCoefficient
CutCoefficient(string variableName, double coefficient)
Initializes a coefficient.
Definition
CutCoefficient.cs:9
src
ULSAlgorithms
CuttingPlanes
CutCoefficient.cs
Generated by
1.17.0