13 IEnumerable<CutRecord> cuts,
14 TimeSpan separationTime)
18 throw new ArgumentOutOfRangeException(nameof(iteration));
21 ArgumentNullException.ThrowIfNull(cuts);
23 if (separationTime < TimeSpan.Zero)
25 throw new ArgumentOutOfRangeException(nameof(separationTime));
28 _cuts = cuts.ToArray();
30 if (_cuts.Any(cut => cut.Iteration != iteration))
32 throw new ArgumentException(
33 "Every cut in an iteration report must have the same iteration.",
41 : _cuts.Max(
static cut => cut.Violation);
48 public IReadOnlyList<CutRecord>
Cuts => _cuts;
54 public int AddedCount => _cuts.Count(
static cut => cut.WasAdded);
CutIterationReport(int iteration, IEnumerable< CutRecord > cuts, TimeSpan separationTime)
Initializes an iteration report.
int GeneratedCount
Gets the number of generated cuts.
int AddedCount
Gets the number of cuts actually added to the model.
IReadOnlyList< CutRecord > Cuts
Gets all generated cuts, including rejected and duplicate cuts.
int Iteration
Gets the iteration index.
double MaximumViolation
Gets the maximum measured violation in this iteration.
TimeSpan SeparationTime
Gets time spent in separation for this iteration.
int NotAddedCount
Gets the number of generated cuts not added to the model.
Trace record for one generated cutting-plane constraint.