ULSAlgorithms 1.1.0-g3e5595996d
High-performance exact and heuristic algorithms for uncapacitated lot sizing
Loading...
Searching...
No Matches
CuttingPlaneIterationStatistics.cs
Go to the documentation of this file.
2
3/// <summary>
4/// Numerical convergence statistics for one root cutting-plane iteration.
5/// </summary>
7{
8 /// <summary>Initializes iteration statistics.</summary>
10 int iteration,
11 double lpObjective,
12 TimeSpan lpSolveTime,
13 TimeSpan separationTime,
14 int generatedCandidates,
15 int eligibleCandidates,
16 int selectedCuts,
17 int cutsAdded,
18 int cumulativeCutsAdded,
19 double maximumViolation,
20 double meanPositiveViolation,
21 double maximumEfficacy)
22 {
23 if (iteration < 0)
24 {
25 throw new ArgumentOutOfRangeException(nameof(iteration));
26 }
27
28 if (!double.IsFinite(lpObjective))
29 {
30 throw new ArgumentOutOfRangeException(nameof(lpObjective));
31 }
32
33 if (lpSolveTime < TimeSpan.Zero)
34 {
35 throw new ArgumentOutOfRangeException(nameof(lpSolveTime));
36 }
37
38 if (separationTime < TimeSpan.Zero)
39 {
40 throw new ArgumentOutOfRangeException(nameof(separationTime));
41 }
42
43 if (generatedCandidates < 0 ||
44 eligibleCandidates < 0 ||
45 selectedCuts < 0 ||
46 cutsAdded < 0 ||
47 cumulativeCutsAdded < 0)
48 {
49 throw new ArgumentOutOfRangeException(
50 nameof(generatedCandidates));
51 }
52
53 if (!double.IsFinite(maximumViolation) ||
54 !double.IsFinite(meanPositiveViolation) ||
55 !double.IsFinite(maximumEfficacy))
56 {
57 throw new ArgumentOutOfRangeException(
58 nameof(maximumViolation));
59 }
60
61 Iteration = iteration;
62 LpObjective = lpObjective;
63 LpSolveTime = lpSolveTime;
64 SeparationTime = separationTime;
65 GeneratedCandidates = generatedCandidates;
66 EligibleCandidates = eligibleCandidates;
67 SelectedCuts = selectedCuts;
68 CutsAdded = cutsAdded;
69 CumulativeCutsAdded = cumulativeCutsAdded;
70 MaximumViolation = maximumViolation;
71 MeanPositiveViolation = meanPositiveViolation;
72 MaximumEfficacy = maximumEfficacy;
73 }
74
75 public int Iteration { get; }
76 public double LpObjective { get; }
77 public TimeSpan LpSolveTime { get; }
78 public TimeSpan SeparationTime { get; }
79 public int GeneratedCandidates { get; }
80 public int EligibleCandidates { get; }
81 public int SelectedCuts { get; }
82 public int CutsAdded { get; }
83 public int CumulativeCutsAdded { get; }
84 public double MaximumViolation { get; }
85 public double MeanPositiveViolation { get; }
86 public double MaximumEfficacy { get; }
87}
CuttingPlaneIterationStatistics(int iteration, double lpObjective, TimeSpan lpSolveTime, TimeSpan separationTime, int generatedCandidates, int eligibleCandidates, int selectedCuts, int cutsAdded, int cumulativeCutsAdded, double maximumViolation, double meanPositiveViolation, double maximumEfficacy)
Initializes iteration statistics.