LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
LagrangianRelaxationBuildResult.cs
Go to the documentation of this file.
2
4
5/// <summary>
6/// Result of a source-preserving Lagrangian model transformation.
7/// </summary>
9{
11 MathematicalModel relaxedModel,
12 IReadOnlyList<int> relaxedConstraintIds)
13 {
15 relaxedModel ??
16 throw new ArgumentNullException(
17 nameof(relaxedModel));
18
19 ArgumentNullException.ThrowIfNull(
20 relaxedConstraintIds);
21
23 relaxedConstraintIds.ToArray();
24
25 if (RelaxedConstraintIds.Count == 0)
26 {
27 throw new InvalidOperationException(
28 "A Lagrangian build result must identify at least one relaxed constraint.");
29 }
30 }
31
33 {
34 get;
35 }
36
37 public IReadOnlyList<int> RelaxedConstraintIds
38 {
39 get;
40 }
41}
LagrangianRelaxationBuildResult(MathematicalModel relaxedModel, IReadOnlyList< int > relaxedConstraintIds)
Represents a solver-independent mathematical optimization model.