ULSAlgorithms 1.1.0-g3e5595996d
High-performance exact and heuristic algorithms for uncapacitated lot sizing
Loading...
Searching...
No Matches
LsCuttingPlaneOptions.cs
Go to the documentation of this file.
2
3/// <summary>
4/// Configures root LP (l,S) separation before the final exact MILP solve.
5/// </summary>
6public sealed class LsCuttingPlaneOptions
7{
8 /// <summary>
9 /// Gets or sets the maximum number of root separation iterations.
10 /// </summary>
11 public int MaximumIterations { get; set; } =
12 100;
13
14 /// <summary>
15 /// Gets or sets the positive violation required before a cut is eligible.
16 /// </summary>
17 public double ViolationTolerance { get; set; } =
18 1.0e-7;
19
20 /// <summary>
21 /// Gets or sets the minimum efficacy required before a cut is eligible.
22 /// The default zero preserves v0.20.0 behavior.
23 /// </summary>
24 public double MinimumEfficacy { get; set; }
25
26 /// <summary>
27 /// Gets or sets the cut-pool selection policy.
28 /// </summary>
29 public CutSelectionPolicy SelectionPolicy { get; set; } =
30 CutSelectionPolicy.AllViolated;
31
32 /// <summary>
33 /// Gets or sets the maximum number of cuts selected per iteration when the
34 /// policy is TopByViolation or TopByEfficacy.
35 /// </summary>
36 public int MaximumCutsPerIteration { get; set; } =
37 25;
38
39 /// <summary>Validates this option set.</summary>
40 public void EnsureValid()
41 {
42 if (MaximumIterations <= 0)
43 {
44 throw new InvalidOperationException(
45 "MaximumIterations must be strictly positive.");
46 }
47
48 if (!double.IsFinite(ViolationTolerance) ||
50 {
51 throw new InvalidOperationException(
52 "ViolationTolerance must be finite and non-negative.");
53 }
54
55 if (!double.IsFinite(MinimumEfficacy) ||
56 MinimumEfficacy < 0.0)
57 {
58 throw new InvalidOperationException(
59 "MinimumEfficacy must be finite and non-negative.");
60 }
61
62 if (!Enum.IsDefined(SelectionPolicy))
63 {
64 throw new InvalidOperationException(
65 "SelectionPolicy is not a supported cut-selection policy.");
66 }
67
69 {
70 throw new InvalidOperationException(
71 "MaximumCutsPerIteration must be strictly positive.");
72 }
73 }
74}
Configures root LP (l,S) separation before the final exact MILP solve.
int MaximumIterations
Gets or sets the maximum number of root separation iterations.
CutSelectionPolicy SelectionPolicy
Gets or sets the cut-pool selection policy.
double MinimumEfficacy
Gets or sets the minimum efficacy required before a cut is eligible. The default zero preserves v0....
int MaximumCutsPerIteration
Gets or sets the maximum number of cuts selected per iteration when the policy is TopByViolation or T...
double ViolationTolerance
Gets or sets the positive violation required before a cut is eligible.
CutSelectionPolicy
Selects which eligible violated cuts are inserted at one root-separation iteration.